@aptos-labs/ts-sdk 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -9
- package/dist/common/{accountAddress-CDtCLtJA.d.ts → accountAddress-CuHovHdK.d.ts} +19 -0
- package/dist/common/chunk-RX5UBAME.js +4 -0
- package/dist/common/chunk-RX5UBAME.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +489 -241
- package/dist/common/index.js +32 -32
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +108 -0
- package/dist/esm/account/MultiEd25519Account.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +1 -2
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +1 -0
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account.d.mts +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +3 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +2 -2
- 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/experimental.d.mts +83 -0
- package/dist/esm/api/experimental.mjs +2 -0
- package/dist/esm/api/experimental.mjs.map +1 -0
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-P7SE5LQE.mjs → chunk-27ESCVVC.mjs} +2 -2
- package/dist/esm/chunk-2SAYQUUX.mjs +2 -0
- package/dist/esm/chunk-2SAYQUUX.mjs.map +1 -0
- package/dist/esm/{chunk-UTXEW2FT.mjs → chunk-2TRQERBL.mjs} +2 -2
- package/dist/esm/chunk-2V636AYW.mjs +2 -0
- package/dist/esm/{chunk-L6FONDPA.mjs → chunk-2YKERRHD.mjs} +2 -2
- package/dist/esm/chunk-2ZLFQBT2.mjs +2 -0
- package/dist/esm/chunk-2ZLFQBT2.mjs.map +1 -0
- package/dist/esm/{chunk-XDIX7NIP.mjs → chunk-3LDVJ2YK.mjs} +2 -2
- package/dist/esm/{chunk-J7HRQ2IH.mjs → chunk-44EHAKKW.mjs} +2 -2
- package/dist/esm/{chunk-2FNFUTFJ.mjs → chunk-53IBOHXB.mjs} +2 -2
- package/dist/esm/{chunk-X6IHNXWY.mjs → chunk-5H5D6QVX.mjs} +2 -2
- package/dist/esm/{chunk-G4O6FXCF.mjs → chunk-5W2ERBGY.mjs} +2 -2
- package/dist/esm/{chunk-VOCI2675.mjs → chunk-67A5U2X6.mjs} +2 -2
- package/dist/esm/{chunk-XXHZQFYW.mjs → chunk-6IJZRG3U.mjs} +2 -2
- package/dist/esm/{chunk-N4DM5FYH.mjs → chunk-6KZT3KFZ.mjs} +2 -2
- package/dist/esm/chunk-752TOOCA.mjs +2 -0
- package/dist/esm/chunk-752TOOCA.mjs.map +1 -0
- package/dist/esm/{chunk-ZP5EBIBE.mjs → chunk-7A2KHJ3D.mjs} +2 -2
- package/dist/esm/{chunk-ROT6S6BM.mjs → chunk-7CRQNXR5.mjs} +2 -2
- package/dist/esm/{chunk-TM6IKHMX.mjs → chunk-7OUPEQRN.mjs} +2 -2
- package/dist/esm/chunk-A3VO773Q.mjs +2 -0
- package/dist/esm/{chunk-DWJ3PGWE.mjs → chunk-AEGA5N2W.mjs} +2 -2
- package/dist/esm/{chunk-BI3BTSUB.mjs → chunk-AIPHJFJL.mjs} +2 -2
- package/dist/esm/{chunk-HLJE5XGE.mjs → chunk-AQWKKSRN.mjs} +2 -2
- package/dist/esm/{chunk-D6T3NYOA.mjs → chunk-B23VO5TB.mjs} +2 -2
- package/dist/esm/{chunk-42T3UGSW.mjs → chunk-BHVSIRNF.mjs} +2 -2
- package/dist/esm/chunk-BMPHQ3E7.mjs +2 -0
- package/dist/esm/{chunk-EGZI6EJ2.mjs → chunk-BPHCRTHD.mjs} +2 -2
- package/dist/esm/{chunk-XH3BEKII.mjs → chunk-BQYKFATL.mjs} +2 -2
- package/dist/esm/chunk-BY3XFRUM.mjs +2 -0
- package/dist/esm/{chunk-EY2JUXEC.mjs.map → chunk-BY3XFRUM.mjs.map} +1 -1
- package/dist/esm/{chunk-DBIZE7G6.mjs → chunk-CGTMSLVZ.mjs} +2 -2
- package/dist/esm/{chunk-4T75XRI2.mjs → chunk-CPAAEEF4.mjs} +2 -2
- package/dist/esm/{chunk-DMS7K76O.mjs → chunk-CPFQUFVD.mjs} +2 -2
- package/dist/esm/chunk-CXLNTATW.mjs +2 -0
- package/dist/esm/chunk-CXLNTATW.mjs.map +1 -0
- package/dist/esm/{chunk-Q7RG7KQS.mjs → chunk-DAJFOJ3L.mjs} +2 -2
- package/dist/esm/chunk-DOVH6HPL.mjs +2 -0
- package/dist/esm/{chunk-U2SJIG2T.mjs → chunk-E5PAUR4N.mjs} +2 -2
- package/dist/esm/{chunk-6LGXFXXR.mjs → chunk-EGCL6KA6.mjs} +2 -2
- package/dist/esm/{chunk-TOBQ5UE6.mjs → chunk-ERLDXTIY.mjs} +2 -2
- package/dist/esm/{chunk-CSG67JHZ.mjs → chunk-FJ5J7CVW.mjs} +2 -2
- package/dist/esm/{chunk-DLLDRANJ.mjs → chunk-FOEPRHAC.mjs} +2 -2
- package/dist/esm/{chunk-6JTNS5O6.mjs → chunk-G5F5ZOH5.mjs} +2 -2
- package/dist/esm/chunk-GFPEB22G.mjs +1 -0
- package/dist/esm/chunk-GFPEB22G.mjs.map +1 -0
- package/dist/esm/{chunk-AZWVCBK2.mjs → chunk-GI4AR6DQ.mjs} +2 -2
- package/dist/esm/{chunk-Y3Y4DVCK.mjs → chunk-GRRBXHVG.mjs} +2 -2
- package/dist/esm/{chunk-HT2WC3QV.mjs → chunk-GTVMJJQQ.mjs} +2 -2
- package/dist/esm/{chunk-HL2O3T57.mjs → chunk-GU4MD5ST.mjs} +2 -2
- package/dist/esm/chunk-H4YAL2IL.mjs +2 -0
- package/dist/esm/{chunk-X24PSWCX.mjs → chunk-HBTJN4RJ.mjs} +2 -2
- package/dist/esm/{chunk-IDTLNF4M.mjs → chunk-HHWJHOFZ.mjs} +2 -2
- package/dist/esm/{chunk-OURSLL3I.mjs → chunk-HKL4MFNL.mjs} +2 -2
- package/dist/esm/{chunk-G6RLN6ET.mjs → chunk-HVIF6DW6.mjs} +2 -2
- package/dist/esm/{chunk-VKDTI6NX.mjs → chunk-HYJQHVDZ.mjs} +2 -2
- package/dist/esm/chunk-HYJQHVDZ.mjs.map +1 -0
- package/dist/esm/{chunk-XAPQNCTN.mjs → chunk-ILUFGYLO.mjs} +2 -2
- package/dist/esm/{chunk-ABXES4FS.mjs → chunk-IMYNN4TW.mjs} +2 -2
- package/dist/esm/{chunk-2GIPNLDO.mjs → chunk-IOHESHLR.mjs} +2 -2
- package/dist/esm/{chunk-GQX5KMF7.mjs → chunk-JNNFNYDO.mjs} +2 -2
- package/dist/esm/{chunk-3HFZN7L5.mjs → chunk-K233I26C.mjs} +2 -2
- package/dist/esm/{chunk-AC3BISWL.mjs → chunk-KK5HUWF6.mjs} +2 -2
- package/dist/esm/chunk-KSLLV3ZC.mjs +2 -0
- package/dist/esm/chunk-KSLLV3ZC.mjs.map +1 -0
- package/dist/esm/{chunk-N7C6LQPZ.mjs → chunk-L6KVC7CJ.mjs} +2 -2
- package/dist/esm/{chunk-Q4C4U6I4.mjs → chunk-LQOSHBB7.mjs} +2 -2
- package/dist/esm/{chunk-XKUIMGKU.mjs → chunk-LS3IDL2N.mjs} +2 -2
- package/dist/esm/{chunk-HFCWJ6QL.mjs → chunk-MAWGZICD.mjs} +2 -2
- package/dist/esm/{chunk-JF66JS2R.mjs → chunk-MFLHAVIW.mjs} +2 -2
- package/dist/esm/chunk-OLGEN23M.mjs +2 -0
- package/dist/esm/{chunk-4UK4MUSD.mjs → chunk-ONGH5DXZ.mjs} +2 -2
- package/dist/esm/{chunk-4776UXL6.mjs → chunk-OPD5EKOA.mjs} +2 -2
- package/dist/esm/{chunk-V2EXS6TM.mjs → chunk-P5CM4C2G.mjs} +2 -2
- package/dist/esm/{chunk-BBUN4IO4.mjs → chunk-PC25RPDV.mjs} +2 -2
- package/dist/esm/{chunk-N6YTF76Q.mjs → chunk-PDAWVDI7.mjs} +2 -2
- package/dist/esm/chunk-PIPDQFL2.mjs +2 -0
- package/dist/esm/chunk-PIPDQFL2.mjs.map +1 -0
- package/dist/esm/{chunk-6PBMD2BQ.mjs → chunk-PWGTRRSJ.mjs} +2 -2
- package/dist/esm/{chunk-PWYJWTEM.mjs → chunk-PYY2RXFP.mjs} +2 -2
- package/dist/esm/chunk-PYY2RXFP.mjs.map +1 -0
- package/dist/esm/chunk-QUJM5W4L.mjs +2 -0
- package/dist/esm/chunk-QUJM5W4L.mjs.map +1 -0
- package/dist/esm/{chunk-H4GZWYIG.mjs → chunk-QYJKCRVA.mjs} +2 -2
- package/dist/esm/{chunk-X2CPDUOS.mjs → chunk-R6QCPXQG.mjs} +2 -2
- package/dist/esm/chunk-R6QCPXQG.mjs.map +1 -0
- package/dist/esm/{chunk-33CBJFX2.mjs → chunk-RDPWCN4B.mjs} +2 -2
- package/dist/esm/{chunk-MT2RJ7H3.mjs → chunk-RIINVEZA.mjs} +2 -2
- package/dist/esm/{chunk-EBMEXURY.mjs → chunk-RXHER6EA.mjs} +2 -2
- package/dist/esm/chunk-SJDHW55X.mjs +2 -0
- package/dist/esm/chunk-SJDHW55X.mjs.map +1 -0
- package/dist/esm/{chunk-KEJAUCQF.mjs → chunk-T7X4GZDU.mjs} +2 -2
- package/dist/esm/{chunk-BUTMGMSD.mjs → chunk-TH5JCPN2.mjs} +2 -2
- package/dist/esm/{chunk-ORMOQWWH.mjs → chunk-TKXEVD7A.mjs} +2 -2
- package/dist/esm/{chunk-FN4C3CKC.mjs → chunk-TTY5GFMN.mjs} +2 -2
- package/dist/esm/chunk-TWETGZ3W.mjs +2 -0
- package/dist/esm/chunk-TWETGZ3W.mjs.map +1 -0
- package/dist/esm/{chunk-PR3W2QEH.mjs → chunk-U4DEYWFT.mjs} +2 -2
- package/dist/esm/{chunk-7CYCKCVU.mjs → chunk-UJJGIPOA.mjs} +2 -2
- package/dist/esm/{chunk-ZCEBDPBJ.mjs → chunk-US2HZFOM.mjs} +2 -2
- package/dist/esm/{chunk-S47HA7O7.mjs → chunk-VDYUMBOT.mjs} +2 -2
- package/dist/esm/chunk-VHY6ZATX.mjs +2 -0
- package/dist/esm/chunk-VHY6ZATX.mjs.map +1 -0
- package/dist/esm/{chunk-TDGUMBON.mjs → chunk-VWZEJTGP.mjs} +2 -2
- package/dist/esm/{chunk-TDGUMBON.mjs.map → chunk-VWZEJTGP.mjs.map} +1 -1
- package/dist/esm/{chunk-3EY7MT2M.mjs → chunk-W2C5KRUQ.mjs} +2 -2
- package/dist/esm/{chunk-O37BZP2G.mjs → chunk-W4SMZ6IW.mjs} +2 -2
- package/dist/esm/chunk-WFKPVKU3.mjs +2 -0
- package/dist/esm/chunk-WFKPVKU3.mjs.map +1 -0
- package/dist/esm/{chunk-CXNF73OX.mjs → chunk-WHVCUVZP.mjs} +2 -2
- package/dist/esm/{chunk-QBFGY74I.mjs → chunk-WLDYBSOG.mjs} +2 -2
- package/dist/esm/{chunk-HEAWDTLG.mjs → chunk-XRVZAEQO.mjs} +2 -2
- package/dist/esm/chunk-XSBUL2WP.mjs +2 -0
- package/dist/esm/chunk-XSBUL2WP.mjs.map +1 -0
- package/dist/esm/{chunk-DNWFDS7F.mjs → chunk-XW3BXTCZ.mjs} +2 -2
- package/dist/esm/{chunk-L2AQG3G3.mjs → chunk-Y65PKZLK.mjs} +2 -2
- package/dist/esm/{chunk-WXDA4CCR.mjs → chunk-YAGIE4GN.mjs} +2 -2
- package/dist/esm/{chunk-CRFLR3ZY.mjs → chunk-YLUULY6G.mjs} +2 -2
- package/dist/esm/{chunk-SCBYJU6K.mjs → chunk-YWSDONJJ.mjs} +2 -2
- package/dist/esm/{chunk-BYHCW7MI.mjs → chunk-YXYYII5S.mjs} +2 -2
- package/dist/esm/{chunk-XTOIL6MB.mjs → chunk-ZD2TY5N3.mjs} +2 -2
- package/dist/esm/{chunk-5BSMF22B.mjs → chunk-ZS2IVRHT.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.d.mts +36 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +35 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +3 -3
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +34 -1
- package/dist/esm/client/post.mjs +1 -1
- 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 +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +17 -2
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +33 -15
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/index.d.mts +6 -4
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/experimental.d.mts +52 -0
- package/dist/esm/internal/experimental.mjs +2 -0
- package/dist/esm/internal/experimental.mjs.map +1 -0
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/scriptComposer/index.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/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
- 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.mjs +1 -1
- package/dist/esm/types/types.d.mts +19 -0
- package/dist/esm/types/types.mjs +1 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -7
- package/src/account/MultiEd25519Account.ts +154 -0
- package/src/account/MultiKeyAccount.ts +1 -2
- package/src/account/index.ts +1 -0
- package/src/api/account.ts +1 -1
- package/src/api/aptos.ts +6 -0
- package/src/api/aptosConfig.ts +2 -2
- package/src/api/experimental.ts +64 -0
- package/src/client/core.ts +120 -0
- package/src/client/get.ts +73 -1
- package/src/client/post.ts +70 -1
- package/src/core/crypto/multiEd25519.ts +19 -3
- package/src/core/crypto/multiKey.ts +76 -52
- package/src/core/hex.ts +3 -1
- package/src/internal/experimental.ts +55 -0
- package/src/internal/view.ts +4 -4
- package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -0
- package/src/types/types.ts +20 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-ZYPBABLQ.js +0 -4
- package/dist/common/chunk-ZYPBABLQ.js.map +0 -1
- package/dist/esm/chunk-4YLUM62M.mjs +0 -2
- package/dist/esm/chunk-66HHRRIX.mjs +0 -2
- package/dist/esm/chunk-66HHRRIX.mjs.map +0 -1
- package/dist/esm/chunk-7C2RDOWS.mjs +0 -1
- package/dist/esm/chunk-7DPHPPMG.mjs +0 -2
- package/dist/esm/chunk-7DPHPPMG.mjs.map +0 -1
- package/dist/esm/chunk-DNJQWGB7.mjs +0 -2
- package/dist/esm/chunk-DPW6ELCQ.mjs +0 -2
- package/dist/esm/chunk-EMURYYVO.mjs +0 -2
- package/dist/esm/chunk-EY2JUXEC.mjs +0 -2
- package/dist/esm/chunk-F2ZTBAJJ.mjs +0 -2
- package/dist/esm/chunk-F2ZTBAJJ.mjs.map +0 -1
- package/dist/esm/chunk-I7YHK6ZF.mjs +0 -2
- package/dist/esm/chunk-I7YHK6ZF.mjs.map +0 -1
- package/dist/esm/chunk-PNSF3E67.mjs +0 -2
- package/dist/esm/chunk-PNSF3E67.mjs.map +0 -1
- package/dist/esm/chunk-PWYJWTEM.mjs.map +0 -1
- package/dist/esm/chunk-STY74NUA.mjs +0 -2
- package/dist/esm/chunk-STY74NUA.mjs.map +0 -1
- package/dist/esm/chunk-ULHOJ2BE.mjs +0 -2
- package/dist/esm/chunk-ULHOJ2BE.mjs.map +0 -1
- package/dist/esm/chunk-V7G2EDNR.mjs +0 -2
- package/dist/esm/chunk-V7G2EDNR.mjs.map +0 -1
- package/dist/esm/chunk-VKDTI6NX.mjs.map +0 -1
- package/dist/esm/chunk-WCMW2L3P.mjs +0 -2
- package/dist/esm/chunk-X2CPDUOS.mjs.map +0 -1
- package/dist/esm/chunk-XJJVJOX5.mjs +0 -2
- package/dist/esm/chunk-YIF242TF.mjs +0 -2
- package/dist/esm/chunk-YIF242TF.mjs.map +0 -1
- /package/dist/esm/{chunk-7C2RDOWS.mjs.map → account/MultiEd25519Account.mjs.map} +0 -0
- /package/dist/esm/{chunk-P7SE5LQE.mjs.map → chunk-27ESCVVC.mjs.map} +0 -0
- /package/dist/esm/{chunk-UTXEW2FT.mjs.map → chunk-2TRQERBL.mjs.map} +0 -0
- /package/dist/esm/{chunk-XJJVJOX5.mjs.map → chunk-2V636AYW.mjs.map} +0 -0
- /package/dist/esm/{chunk-L6FONDPA.mjs.map → chunk-2YKERRHD.mjs.map} +0 -0
- /package/dist/esm/{chunk-XDIX7NIP.mjs.map → chunk-3LDVJ2YK.mjs.map} +0 -0
- /package/dist/esm/{chunk-J7HRQ2IH.mjs.map → chunk-44EHAKKW.mjs.map} +0 -0
- /package/dist/esm/{chunk-2FNFUTFJ.mjs.map → chunk-53IBOHXB.mjs.map} +0 -0
- /package/dist/esm/{chunk-X6IHNXWY.mjs.map → chunk-5H5D6QVX.mjs.map} +0 -0
- /package/dist/esm/{chunk-G4O6FXCF.mjs.map → chunk-5W2ERBGY.mjs.map} +0 -0
- /package/dist/esm/{chunk-VOCI2675.mjs.map → chunk-67A5U2X6.mjs.map} +0 -0
- /package/dist/esm/{chunk-XXHZQFYW.mjs.map → chunk-6IJZRG3U.mjs.map} +0 -0
- /package/dist/esm/{chunk-N4DM5FYH.mjs.map → chunk-6KZT3KFZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZP5EBIBE.mjs.map → chunk-7A2KHJ3D.mjs.map} +0 -0
- /package/dist/esm/{chunk-ROT6S6BM.mjs.map → chunk-7CRQNXR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-TM6IKHMX.mjs.map → chunk-7OUPEQRN.mjs.map} +0 -0
- /package/dist/esm/{chunk-WCMW2L3P.mjs.map → chunk-A3VO773Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-DWJ3PGWE.mjs.map → chunk-AEGA5N2W.mjs.map} +0 -0
- /package/dist/esm/{chunk-BI3BTSUB.mjs.map → chunk-AIPHJFJL.mjs.map} +0 -0
- /package/dist/esm/{chunk-HLJE5XGE.mjs.map → chunk-AQWKKSRN.mjs.map} +0 -0
- /package/dist/esm/{chunk-D6T3NYOA.mjs.map → chunk-B23VO5TB.mjs.map} +0 -0
- /package/dist/esm/{chunk-42T3UGSW.mjs.map → chunk-BHVSIRNF.mjs.map} +0 -0
- /package/dist/esm/{chunk-4YLUM62M.mjs.map → chunk-BMPHQ3E7.mjs.map} +0 -0
- /package/dist/esm/{chunk-EGZI6EJ2.mjs.map → chunk-BPHCRTHD.mjs.map} +0 -0
- /package/dist/esm/{chunk-XH3BEKII.mjs.map → chunk-BQYKFATL.mjs.map} +0 -0
- /package/dist/esm/{chunk-DBIZE7G6.mjs.map → chunk-CGTMSLVZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4T75XRI2.mjs.map → chunk-CPAAEEF4.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMS7K76O.mjs.map → chunk-CPFQUFVD.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q7RG7KQS.mjs.map → chunk-DAJFOJ3L.mjs.map} +0 -0
- /package/dist/esm/{chunk-DPW6ELCQ.mjs.map → chunk-DOVH6HPL.mjs.map} +0 -0
- /package/dist/esm/{chunk-U2SJIG2T.mjs.map → chunk-E5PAUR4N.mjs.map} +0 -0
- /package/dist/esm/{chunk-6LGXFXXR.mjs.map → chunk-EGCL6KA6.mjs.map} +0 -0
- /package/dist/esm/{chunk-TOBQ5UE6.mjs.map → chunk-ERLDXTIY.mjs.map} +0 -0
- /package/dist/esm/{chunk-CSG67JHZ.mjs.map → chunk-FJ5J7CVW.mjs.map} +0 -0
- /package/dist/esm/{chunk-DLLDRANJ.mjs.map → chunk-FOEPRHAC.mjs.map} +0 -0
- /package/dist/esm/{chunk-6JTNS5O6.mjs.map → chunk-G5F5ZOH5.mjs.map} +0 -0
- /package/dist/esm/{chunk-AZWVCBK2.mjs.map → chunk-GI4AR6DQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y3Y4DVCK.mjs.map → chunk-GRRBXHVG.mjs.map} +0 -0
- /package/dist/esm/{chunk-HT2WC3QV.mjs.map → chunk-GTVMJJQQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-HL2O3T57.mjs.map → chunk-GU4MD5ST.mjs.map} +0 -0
- /package/dist/esm/{chunk-EMURYYVO.mjs.map → chunk-H4YAL2IL.mjs.map} +0 -0
- /package/dist/esm/{chunk-X24PSWCX.mjs.map → chunk-HBTJN4RJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-IDTLNF4M.mjs.map → chunk-HHWJHOFZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-OURSLL3I.mjs.map → chunk-HKL4MFNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-G6RLN6ET.mjs.map → chunk-HVIF6DW6.mjs.map} +0 -0
- /package/dist/esm/{chunk-XAPQNCTN.mjs.map → chunk-ILUFGYLO.mjs.map} +0 -0
- /package/dist/esm/{chunk-ABXES4FS.mjs.map → chunk-IMYNN4TW.mjs.map} +0 -0
- /package/dist/esm/{chunk-2GIPNLDO.mjs.map → chunk-IOHESHLR.mjs.map} +0 -0
- /package/dist/esm/{chunk-GQX5KMF7.mjs.map → chunk-JNNFNYDO.mjs.map} +0 -0
- /package/dist/esm/{chunk-3HFZN7L5.mjs.map → chunk-K233I26C.mjs.map} +0 -0
- /package/dist/esm/{chunk-AC3BISWL.mjs.map → chunk-KK5HUWF6.mjs.map} +0 -0
- /package/dist/esm/{chunk-N7C6LQPZ.mjs.map → chunk-L6KVC7CJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q4C4U6I4.mjs.map → chunk-LQOSHBB7.mjs.map} +0 -0
- /package/dist/esm/{chunk-XKUIMGKU.mjs.map → chunk-LS3IDL2N.mjs.map} +0 -0
- /package/dist/esm/{chunk-HFCWJ6QL.mjs.map → chunk-MAWGZICD.mjs.map} +0 -0
- /package/dist/esm/{chunk-JF66JS2R.mjs.map → chunk-MFLHAVIW.mjs.map} +0 -0
- /package/dist/esm/{chunk-DNJQWGB7.mjs.map → chunk-OLGEN23M.mjs.map} +0 -0
- /package/dist/esm/{chunk-4UK4MUSD.mjs.map → chunk-ONGH5DXZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4776UXL6.mjs.map → chunk-OPD5EKOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-V2EXS6TM.mjs.map → chunk-P5CM4C2G.mjs.map} +0 -0
- /package/dist/esm/{chunk-BBUN4IO4.mjs.map → chunk-PC25RPDV.mjs.map} +0 -0
- /package/dist/esm/{chunk-N6YTF76Q.mjs.map → chunk-PDAWVDI7.mjs.map} +0 -0
- /package/dist/esm/{chunk-6PBMD2BQ.mjs.map → chunk-PWGTRRSJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-H4GZWYIG.mjs.map → chunk-QYJKCRVA.mjs.map} +0 -0
- /package/dist/esm/{chunk-33CBJFX2.mjs.map → chunk-RDPWCN4B.mjs.map} +0 -0
- /package/dist/esm/{chunk-MT2RJ7H3.mjs.map → chunk-RIINVEZA.mjs.map} +0 -0
- /package/dist/esm/{chunk-EBMEXURY.mjs.map → chunk-RXHER6EA.mjs.map} +0 -0
- /package/dist/esm/{chunk-KEJAUCQF.mjs.map → chunk-T7X4GZDU.mjs.map} +0 -0
- /package/dist/esm/{chunk-BUTMGMSD.mjs.map → chunk-TH5JCPN2.mjs.map} +0 -0
- /package/dist/esm/{chunk-ORMOQWWH.mjs.map → chunk-TKXEVD7A.mjs.map} +0 -0
- /package/dist/esm/{chunk-FN4C3CKC.mjs.map → chunk-TTY5GFMN.mjs.map} +0 -0
- /package/dist/esm/{chunk-PR3W2QEH.mjs.map → chunk-U4DEYWFT.mjs.map} +0 -0
- /package/dist/esm/{chunk-7CYCKCVU.mjs.map → chunk-UJJGIPOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZCEBDPBJ.mjs.map → chunk-US2HZFOM.mjs.map} +0 -0
- /package/dist/esm/{chunk-S47HA7O7.mjs.map → chunk-VDYUMBOT.mjs.map} +0 -0
- /package/dist/esm/{chunk-3EY7MT2M.mjs.map → chunk-W2C5KRUQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-O37BZP2G.mjs.map → chunk-W4SMZ6IW.mjs.map} +0 -0
- /package/dist/esm/{chunk-CXNF73OX.mjs.map → chunk-WHVCUVZP.mjs.map} +0 -0
- /package/dist/esm/{chunk-QBFGY74I.mjs.map → chunk-WLDYBSOG.mjs.map} +0 -0
- /package/dist/esm/{chunk-HEAWDTLG.mjs.map → chunk-XRVZAEQO.mjs.map} +0 -0
- /package/dist/esm/{chunk-DNWFDS7F.mjs.map → chunk-XW3BXTCZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-L2AQG3G3.mjs.map → chunk-Y65PKZLK.mjs.map} +0 -0
- /package/dist/esm/{chunk-WXDA4CCR.mjs.map → chunk-YAGIE4GN.mjs.map} +0 -0
- /package/dist/esm/{chunk-CRFLR3ZY.mjs.map → chunk-YLUULY6G.mjs.map} +0 -0
- /package/dist/esm/{chunk-SCBYJU6K.mjs.map → chunk-YWSDONJJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BYHCW7MI.mjs.map → chunk-YXYYII5S.mjs.map} +0 -0
- /package/dist/esm/{chunk-XTOIL6MB.mjs.map → chunk-ZD2TY5N3.mjs.map} +0 -0
- /package/dist/esm/{chunk-5BSMF22B.mjs.map → chunk-ZS2IVRHT.mjs.map} +0 -0
package/dist/esm/api/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-MFLHAVIW.mjs";import"../chunk-GRRBXHVG.mjs";import"../chunk-KK5HUWF6.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-SJDHW55X.mjs";import"../chunk-752TOOCA.mjs";import"../chunk-TWETGZ3W.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-TH5JCPN2.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BY3XFRUM.mjs";import"../chunk-KDMSOCZY.mjs";export{a as waitForIndexerOnVersion};
|
|
2
2
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-ZD2TY5N3.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Deserializer};
|
|
2
2
|
//# sourceMappingURL=deserializer.mjs.map
|
package/dist/esm/bcs/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-FZY4PMEE.mjs";import{a as
|
|
1
|
+
import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-ERLDXTIY.mjs";import{a as g}from"../chunk-RIINVEZA.mjs";import{a as p,b as q,c as r,d as s}from"../chunk-HHWJHOFZ.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-TKXEVD7A.mjs";import{a}from"../chunk-ZD2TY5N3.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,s as MoveOption,r as MoveString,p as MoveVector,b as Serializable,q as Serialized,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as EntryFunctionBytes};
|
|
2
2
|
//# sourceMappingURL=entryFunctionBytes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-RIINVEZA.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as FixedBytes};
|
|
2
2
|
//# sourceMappingURL=fixedBytes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../../chunk-TKXEVD7A.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
|
|
2
2
|
//# sourceMappingURL=movePrimitives.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../../chunk-
|
|
1
|
+
import{a,b,c,d}from"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{d as MoveOption,c as MoveString,a as MoveVector,b as Serialized};
|
|
2
2
|
//# sourceMappingURL=moveStructs.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=serializer.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as h}from"./chunk-44EHAKKW.mjs";import{a as y}from"./chunk-LS3IDL2N.mjs";import{b as n}from"./chunk-LQOSHBB7.mjs";import{a as _}from"./chunk-RXHER6EA.mjs";var t=class i extends _{constructor(e,s,a,r,c,d,l){super(),this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=r,this.gas_unit_price=c,this.expiration_timestamp_secs=d,this.chain_id=l}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){let s=n.deserialize(e),a=e.deserializeU64(),r=h.deserialize(e),c=e.deserializeU64(),d=e.deserializeU64(),l=e.deserializeU64(),m=y.deserialize(e);return new i(s,a,r,c,d,l,m)}},o=class extends _{static deserialize(e){let s=e.deserializeUleb128AsU32();switch(s){case 0:return u.load(e);case 1:return p.load(e);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${s}`)}}},u=class i extends o{constructor(e,s){super(),this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(0),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){let s=t.deserialize(e),a=e.deserializeVector(n);return new i(s,a)}},p=class i extends o{constructor(e,s,a){super(),this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(1),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){let s=t.deserialize(e),a=e.deserializeVector(n),r=n.deserialize(e);return new i(s,a,r)}};export{t as a,o as b,u as c,p as d};
|
|
2
|
+
//# sourceMappingURL=chunk-27ESCVVC.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as g}from"./chunk-P5CM4C2G.mjs";import{c as u}from"./chunk-BPHCRTHD.mjs";import{b as d}from"./chunk-WFKPVKU3.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";var l=class{constructor(t){this.signingScheme=1;let{signers:e,publicKey:r,address:a}=t;if(this.publicKey=r,this.accountAddress=a?c.from(a):this.publicKey.authKey().derivedAddress(),r.threshold>e.length)throw new Error(`Not enough signers provided to satisfy the required signatures. Need ${r.threshold} signers, but only ${e.length} provided`);if(r.threshold<e.length)throw new Error(`More signers provided than required. Need ${r.threshold} signers, but ${e.length} provided`);let n=[];for(let i of e)n.push(this.publicKey.getIndex(i.publicKey()));let s=e.map((i,o)=>[i,n[o]]);s.sort((i,o)=>i[1]-o[1]),this.signers=s.map(i=>i[0]),this.signerIndices=s.map(i=>i[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:n})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new u(this.publicKey,this.sign(t))}signTransactionWithAuthenticator(t){return new u(this.publicKey,this.signTransaction(t))}sign(t){let e=[];for(let r of this.signers)e.push(r.sign(t));return new d({signatures:e,bitmap:this.signaturesBitmap})}signTransaction(t){return this.sign(g(t))}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2SAYQUUX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/account/MultiEd25519Account.ts"],"sourcesContent":["import { AccountAddress, AccountAddressInput } from \"../core/accountAddress\";\nimport { Ed25519PrivateKey } from \"../core/crypto\";\nimport { MultiEd25519PublicKey, MultiEd25519Signature } from \"../core/crypto/multiEd25519\";\nimport { AccountAuthenticatorMultiEd25519 } from \"../transactions/authenticator/account\";\nimport { generateSigningMessageForTransaction } from \"../transactions/transactionBuilder/signingMessage\";\nimport { AnyRawTransaction } from \"../transactions/types\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport type { Account } from \"./Account\";\n\nexport interface MultiEd25519SignerConstructorArgs {\n publicKey: MultiEd25519PublicKey;\n signers: Ed25519PrivateKey[];\n address?: AccountAddressInput;\n}\n\nexport interface VerifyMultiEd25519SignatureArgs {\n message: HexInput;\n signature: MultiEd25519Signature;\n}\n\n/**\n * Signer implementation for the Multi-Ed25519 authentication scheme.\n *\n * Note: This authentication scheme is a legacy authentication scheme. Prefer using MultiKeyAccounts as a\n * MultiKeyAccount can support any type of signer, not just Ed25519. Generating a signer instance does not\n * create the account on-chain.\n */\nexport class MultiEd25519Account implements Account {\n readonly publicKey: MultiEd25519PublicKey;\n\n readonly accountAddress: AccountAddress;\n\n readonly signingScheme = SigningScheme.MultiEd25519;\n\n /**\n * The signers used to sign messages. These signers should correspond to public keys in the\n * MultiEd25519Account. The number of signers should be equal to this.publicKey.threshold.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n readonly signers: Ed25519PrivateKey[];\n\n /**\n * An array of indices where for signer[i], signerIndicies[i] is the index of the corresponding public key in\n * publicKey.publicKeys. Used to derive the right public key to use for verification.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n readonly signerIndices: number[];\n\n readonly signaturesBitmap: Uint8Array;\n\n // region Constructors\n\n constructor(args: MultiEd25519SignerConstructorArgs) {\n const { signers, publicKey, address } = args;\n this.publicKey = publicKey;\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n\n if (publicKey.threshold > signers.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `Not enough signers provided to satisfy the required signatures. Need ${publicKey.threshold} signers, but only ${signers.length} provided`,\n );\n } else if (publicKey.threshold < signers.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `More signers provided than required. Need ${publicKey.threshold} signers, but ${signers.length} provided`,\n );\n }\n\n // For each signer, find its corresponding position in the public keys array\n const bitPositions: number[] = [];\n for (const signer of signers) {\n bitPositions.push(this.publicKey.getIndex(signer.publicKey()));\n }\n\n // Create pairs of [signer, position] and sort them by position\n // This sorting is critical because:\n // 1. The on-chain verification expects signatures to be in ascending order by bit position\n // 2. The bitmap must match the order of signatures when verifying\n const signersAndBitPosition: [Ed25519PrivateKey, number][] = signers.map((signer, index) => [\n signer,\n bitPositions[index],\n ]);\n signersAndBitPosition.sort((a, b) => a[1] - b[1]);\n\n // Extract the sorted signers and their positions into separate arrays\n this.signers = signersAndBitPosition.map((value) => value[0]);\n this.signerIndices = signersAndBitPosition.map((value) => value[1]);\n\n // Create a bitmap representing which public keys from the MultiEd25519PublicKey are being used\n // This bitmap is used during signature verification to identify which public keys\n // should be used to verify each signature\n this.signaturesBitmap = this.publicKey.createBitmap({ bits: bitPositions });\n }\n\n // endregion\n\n // region Account\n\n /**\n * Verify the given message and signature with the public key.\n *\n * @param args.message raw message data in HexInput format\n * @param args.signature signed message Signature\n * @returns\n */\n verifySignature(args: VerifyMultiEd25519SignatureArgs): boolean {\n return this.publicKey.verifySignature(args);\n }\n\n /**\n * Sign a message using the account's Ed25519 private key.\n * @param message the signing message, as binary input\n * @return the AccountAuthenticator containing the signature, together with the account's public key\n */\n signWithAuthenticator(message: HexInput): AccountAuthenticatorMultiEd25519 {\n return new AccountAuthenticatorMultiEd25519(this.publicKey, this.sign(message));\n }\n\n /**\n * Sign a transaction using the account's Ed25519 private keys.\n * @param transaction the raw transaction\n * @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key\n */\n signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiEd25519 {\n return new AccountAuthenticatorMultiEd25519(this.publicKey, this.signTransaction(transaction));\n }\n\n /**\n * Sign the given message using the account's Ed25519 private keys.\n * @param message in HexInput format\n * @returns MultiEd25519Signature\n */\n sign(message: HexInput): MultiEd25519Signature {\n const signatures = [];\n for (const signer of this.signers) {\n signatures.push(signer.sign(message));\n }\n return new MultiEd25519Signature({ signatures, bitmap: this.signaturesBitmap });\n }\n\n /**\n * Sign the given transaction using the available signing capabilities.\n * @param transaction the transaction to be signed\n * @returns Signature\n */\n signTransaction(transaction: AnyRawTransaction): MultiEd25519Signature {\n return this.sign(generateSigningMessageForTransaction(transaction));\n }\n\n // endregion\n}\n"],"mappings":"oKA2BO,IAAMA,EAAN,KAA6C,CA2BlD,YAAYC,EAAyC,CAtBrD,KAAS,cAAgB,EAuBvB,GAAM,CAAE,QAAAC,EAAS,UAAAC,EAAW,QAAAC,CAAQ,EAAIH,EAIxC,GAHA,KAAK,UAAYE,EACjB,KAAK,eAAiBC,EAAUC,EAAe,KAAKD,CAAO,EAAI,KAAK,UAAU,QAAQ,EAAE,eAAe,EAEnGD,EAAU,UAAYD,EAAQ,OAChC,MAAM,IAAI,MAER,wEAAwEC,EAAU,SAAS,sBAAsBD,EAAQ,MAAM,WACjI,EACK,GAAIC,EAAU,UAAYD,EAAQ,OACvC,MAAM,IAAI,MAER,6CAA6CC,EAAU,SAAS,iBAAiBD,EAAQ,MAAM,WACjG,EAIF,IAAMI,EAAyB,CAAC,EAChC,QAAWC,KAAUL,EACnBI,EAAa,KAAK,KAAK,UAAU,SAASC,EAAO,UAAU,CAAC,CAAC,EAO/D,IAAMC,EAAuDN,EAAQ,IAAI,CAACK,EAAQE,IAAU,CAC1FF,EACAD,EAAaG,CAAK,CACpB,CAAC,EACDD,EAAsB,KAAK,CAACE,EAAGC,IAAMD,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAGhD,KAAK,QAAUH,EAAsB,IAAKI,GAAUA,EAAM,CAAC,CAAC,EAC5D,KAAK,cAAgBJ,EAAsB,IAAKI,GAAUA,EAAM,CAAC,CAAC,EAKlE,KAAK,iBAAmB,KAAK,UAAU,aAAa,CAAE,KAAMN,CAAa,CAAC,CAC5E,CAaA,gBAAgBL,EAAgD,CAC9D,OAAO,KAAK,UAAU,gBAAgBA,CAAI,CAC5C,CAOA,sBAAsBY,EAAqD,CACzE,OAAO,IAAIC,EAAiC,KAAK,UAAW,KAAK,KAAKD,CAAO,CAAC,CAChF,CAOA,iCAAiCE,EAAkE,CACjG,OAAO,IAAID,EAAiC,KAAK,UAAW,KAAK,gBAAgBC,CAAW,CAAC,CAC/F,CAOA,KAAKF,EAA0C,CAC7C,IAAMG,EAAa,CAAC,EACpB,QAAWT,KAAU,KAAK,QACxBS,EAAW,KAAKT,EAAO,KAAKM,CAAO,CAAC,EAEtC,OAAO,IAAII,EAAsB,CAAE,WAAAD,EAAY,OAAQ,KAAK,gBAAiB,CAAC,CAChF,CAOA,gBAAgBD,EAAuD,CACrE,OAAO,KAAK,KAAKG,EAAqCH,CAAW,CAAC,CACpE,CAGF","names":["MultiEd25519Account","args","signers","publicKey","address","AccountAddress","bitPositions","signer","signersAndBitPosition","index","a","b","value","message","AccountAuthenticatorMultiEd25519","transaction","signatures","MultiEd25519Signature","generateSigningMessageForTransaction"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a,c}from"./chunk-JNNFNYDO.mjs";import{a as u}from"./chunk-XW3BXTCZ.mjs";import{i as o,j as l}from"./chunk-HVIF6DW6.mjs";import{b as n,d as s}from"./chunk-7OUPEQRN.mjs";import{b as p}from"./chunk-H4YAL2IL.mjs";import{a as K}from"./chunk-A3VO773Q.mjs";import{a as b}from"./chunk-TTY5GFMN.mjs";var d=class r extends p{constructor(e){if(super(),this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else if(e instanceof u)this.variant=4;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:t,signature:i}=e;return y.isInstance(i)?this.publicKey.verifySignature({message:t,signature:i.signature}):!1}authKey(){return b.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32(),i;switch(t){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;case 4:i=u.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${t}`)}return new r(i)}static isPublicKey(e){return e instanceof r}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}static isInstance(e){return"publicKey"in e&&"variant"in e}},y=class r extends K{constructor(e){if(super(),this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return console.warn("[Aptos SDK] Calls to AnySignature.toUint8Array() will soon return the underlying signature bytes. Use AnySignature.bcsToBytes() instead."),this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32(),i;switch(t){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${t}`)}return new r(i)}static isInstance(e){return"signature"in e&&typeof e.signature=="object"&&e.signature!==null&&"toUint8Array"in e.signature}};export{d as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2TRQERBL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-WHVCUVZP.mjs";import{a}from"./chunk-MAWGZICD.mjs";import{c as i}from"./chunk-7OUPEQRN.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?a.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:n=!0}=e;return t instanceof i&&n?new a({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:n,legacy:s=!0}=e;return t===0&&s?a.fromDerivationPath({mnemonic:r,path:n}):c.fromDerivationPath({scheme:t,mnemonic:r,path:n})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2YKERRHD.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-6IJZRG3U.mjs";import{a as b}from"./chunk-U4DEYWFT.mjs";import{a as A}from"./chunk-Y65PKZLK.mjs";import{a as h}from"./chunk-3LDVJ2YK.mjs";import{a as u}from"./chunk-IOHESHLR.mjs";import{a as y}from"./chunk-L6KVC7CJ.mjs";import{a as x}from"./chunk-KSLLV3ZC.mjs";import{a}from"./chunk-DAJFOJ3L.mjs";import{a as c}from"./chunk-WLDYBSOG.mjs";import{a as l}from"./chunk-EGCL6KA6.mjs";import{a as d}from"./chunk-CXLNTATW.mjs";import{a as f}from"./chunk-UJJGIPOA.mjs";import{a as g}from"./chunk-QYJKCRVA.mjs";import{a as r}from"./chunk-VWZEJTGP.mjs";import{a as s}from"./chunk-AQWKKSRN.mjs";import{a as m}from"./chunk-VDYUMBOT.mjs";var t=class{constructor(n){this.config=new x(n),this.account=new r(this.config),this.abstraction=new s(this.config),this.ans=new m(this.config),this.coin=new a(this.config),this.digitalAsset=new c(this.config),this.event=new l(this.config),this.experimental=new d(this.config),this.faucet=new f(this.config),this.fungibleAsset=new g(this.config),this.general=new p(this.config),this.staking=new h(this.config),this.transaction=new y(this.config),this.table=new u(this.config),this.keyless=new b(this.config),this.object=new A(this.config)}};function e(w,n,j){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...k){return this[j][i](...k)},Object.defineProperty(w.prototype,i,o))})}e(t,r,"account");e(t,s,"abstraction");e(t,m,"ans");e(t,a,"coin");e(t,c,"digitalAsset");e(t,l,"event");e(t,d,"experimental");e(t,f,"faucet");e(t,g,"fungibleAsset");e(t,p,"general");e(t,h,"staking");e(t,y,"transaction");e(t,u,"table");e(t,b,"keyless");e(t,A,"object");export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2ZLFQBT2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/aptos.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"./account\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { Coin } from \"./coin\";\nimport { DigitalAsset } from \"./digitalAsset\";\nimport { Event } from \"./event\";\nimport { Faucet } from \"./faucet\";\nimport { FungibleAsset } from \"./fungibleAsset\";\nimport { General } from \"./general\";\nimport { ANS } from \"./ans\";\nimport { Staking } from \"./staking\";\nimport { Transaction } from \"./transaction\";\nimport { Table } from \"./table\";\nimport { Keyless } from \"./keyless\";\nimport { AptosObject } from \"./object\";\nimport { AccountAbstraction } from \"./account/abstraction\";\nimport { Experimental } from \"./experimental\";\n\n/**\n * The main entry point for interacting with the Aptos APIs,\n * providing access to various functionalities organized into\n * distinct namespaces.\n *\n * To utilize the SDK, instantiate a new Aptos object to gain\n * access to the complete range of SDK features.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for connecting to the Aptos testnet\n * const config = new AptosConfig({ network: Network.TESTNET });\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\nexport class Aptos {\n readonly config: AptosConfig;\n\n readonly account: Account;\n\n readonly ans: ANS;\n\n readonly coin: Coin;\n\n readonly digitalAsset: DigitalAsset;\n\n readonly event: Event;\n\n readonly experimental: Experimental;\n\n readonly faucet: Faucet;\n\n readonly fungibleAsset: FungibleAsset;\n\n readonly general: General;\n\n readonly staking: Staking;\n\n readonly transaction: Transaction;\n\n readonly table: Table;\n\n readonly keyless: Keyless;\n\n readonly object: AptosObject;\n\n /**\n * Initializes a new instance of the Aptos client with the provided configuration settings.\n * This allows you to interact with various Aptos functionalities such as accounts, transactions, and events.\n *\n * @param settings - Configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with default settings\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your own settings if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n constructor(settings?: AptosConfig) {\n this.config = new AptosConfig(settings);\n this.account = new Account(this.config);\n this.abstraction = new AccountAbstraction(this.config);\n this.ans = new ANS(this.config);\n this.coin = new Coin(this.config);\n this.digitalAsset = new DigitalAsset(this.config);\n this.event = new Event(this.config);\n this.experimental = new Experimental(this.config);\n this.faucet = new Faucet(this.config);\n this.fungibleAsset = new FungibleAsset(this.config);\n this.general = new General(this.config);\n this.staking = new Staking(this.config);\n this.transaction = new Transaction(this.config);\n this.table = new Table(this.config);\n this.keyless = new Keyless(this.config);\n this.object = new AptosObject(this.config);\n }\n}\n\n// extends Aptos interface so all the methods and properties\n// from the other classes will be recognized by typescript.\nexport interface Aptos\n extends Account,\n ANS,\n Coin,\n DigitalAsset,\n Event,\n Experimental,\n Faucet,\n FungibleAsset,\n General,\n Keyless,\n Staking,\n Table,\n AptosObject,\n Omit<Transaction, \"build\" | \"simulate\" | \"submit\" | \"batch\"> {}\n\n/**\nIn TypeScript, we can’t inherit or extend from more than one class,\nMixins helps us to get around that by creating a partial classes\nthat we can combine to form a single class that contains all the methods and properties from the partial classes.\n{@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}\n\nHere, we combine any subclass and the Aptos class.\n * @group Client\n*/\nfunction applyMixin(targetClass: any, baseClass: any, baseClassProp: string) {\n // Mixin instance methods\n Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);\n if (!propertyDescriptor) return;\n // eslint-disable-next-line func-names\n propertyDescriptor.value = function (...args: any) {\n return (this as any)[baseClassProp][propertyName](...args);\n };\n Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);\n });\n}\n\napplyMixin(Aptos, Account, \"account\");\napplyMixin(Aptos, AccountAbstraction, \"abstraction\");\napplyMixin(Aptos, ANS, \"ans\");\napplyMixin(Aptos, Coin, \"coin\");\napplyMixin(Aptos, DigitalAsset, \"digitalAsset\");\napplyMixin(Aptos, Event, \"event\");\napplyMixin(Aptos, Experimental, \"experimental\");\napplyMixin(Aptos, Faucet, \"faucet\");\napplyMixin(Aptos, FungibleAsset, \"fungibleAsset\");\napplyMixin(Aptos, General, \"general\");\napplyMixin(Aptos, Staking, \"staking\");\napplyMixin(Aptos, Transaction, \"transaction\");\napplyMixin(Aptos, Table, \"table\");\napplyMixin(Aptos, Keyless, \"keyless\");\napplyMixin(Aptos, AptosObject, \"object\");\n"],"mappings":"2oBA6CO,IAAMA,EAAN,KAAY,CAoDjB,YAAYC,EAAwB,CAClC,KAAK,OAAS,IAAIC,EAAYD,CAAQ,EACtC,KAAK,QAAU,IAAIE,EAAQ,KAAK,MAAM,EACtC,KAAK,YAAc,IAAIC,EAAmB,KAAK,MAAM,EACrD,KAAK,IAAM,IAAIC,EAAI,KAAK,MAAM,EAC9B,KAAK,KAAO,IAAIC,EAAK,KAAK,MAAM,EAChC,KAAK,aAAe,IAAIC,EAAa,KAAK,MAAM,EAChD,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,EAClC,KAAK,aAAe,IAAIC,EAAa,KAAK,MAAM,EAChD,KAAK,OAAS,IAAIC,EAAO,KAAK,MAAM,EACpC,KAAK,cAAgB,IAAIC,EAAc,KAAK,MAAM,EAClD,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,YAAc,IAAIC,EAAY,KAAK,MAAM,EAC9C,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,EAClC,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,OAAS,IAAIC,EAAY,KAAK,MAAM,CAC3C,CACF,EA6BA,SAASC,EAAWC,EAAkBC,EAAgBC,EAAuB,CAE3E,OAAO,oBAAoBD,EAAU,SAAS,EAAE,QAASE,GAAiB,CACxE,IAAMC,EAAqB,OAAO,yBAAyBH,EAAU,UAAWE,CAAY,EACvFC,IAELA,EAAmB,MAAQ,YAAaC,EAAW,CACjD,OAAQ,KAAaH,CAAa,EAAEC,CAAY,EAAE,GAAGE,CAAI,CAC3D,EACA,OAAO,eAAeL,EAAY,UAAWG,EAAcC,CAAkB,EAC/E,CAAC,CACH,CAEAL,EAAWlB,EAAOG,EAAS,SAAS,EACpCe,EAAWlB,EAAOI,EAAoB,aAAa,EACnDc,EAAWlB,EAAOK,EAAK,KAAK,EAC5Ba,EAAWlB,EAAOM,EAAM,MAAM,EAC9BY,EAAWlB,EAAOO,EAAc,cAAc,EAC9CW,EAAWlB,EAAOQ,EAAO,OAAO,EAChCU,EAAWlB,EAAOS,EAAc,cAAc,EAC9CS,EAAWlB,EAAOU,EAAQ,QAAQ,EAClCQ,EAAWlB,EAAOW,EAAe,eAAe,EAChDO,EAAWlB,EAAOY,EAAS,SAAS,EACpCM,EAAWlB,EAAOa,EAAS,SAAS,EACpCK,EAAWlB,EAAOc,EAAa,aAAa,EAC5CI,EAAWlB,EAAOe,EAAO,OAAO,EAChCG,EAAWlB,EAAOgB,EAAS,SAAS,EACpCE,EAAWlB,EAAOiB,EAAa,QAAQ","names":["Aptos","settings","AptosConfig","Account","AccountAbstraction","ANS","Coin","DigitalAsset","Event","Experimental","Faucet","FungibleAsset","General","Staking","Transaction","Table","Keyless","AptosObject","applyMixin","targetClass","baseClass","baseClassProp","propertyName","propertyDescriptor","args"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r,b as i,c as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r,b as i,c as s}from"./chunk-FOEPRHAC.mjs";import{a as o}from"./chunk-MFLHAVIW.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3LDVJ2YK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-5W2ERBGY.mjs";import{a as g}from"./chunk-6KZT3KFZ.mjs";import{a as p}from"./chunk-PDAWVDI7.mjs";import{a as S}from"./chunk-ERLDXTIY.mjs";import{a as v,b as M}from"./chunk-HHWJHOFZ.mjs";import{a as F,b as d,c as T,d as x,e as E,f as _,g as w}from"./chunk-TKXEVD7A.mjs";import{b as y}from"./chunk-LQOSHBB7.mjs";import{a as u}from"./chunk-RXHER6EA.mjs";function I(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.deserialize(t);case 1:return E.deserialize(t);case 2:return _.deserialize(t);case 3:return y.deserialize(t);case 4:return v.deserialize(t,d);case 5:return F.deserialize(t);case 6:return T.deserialize(t);case 7:return x.deserialize(t);case 8:return w.deserialize(t);case 9:return M.deserialize(t);default:throw new Error(`Unknown variant index for ScriptTransactionArgument: ${e}`)}}var a=class extends u{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return A.load(e);case 2:return z.load(e);case 3:return h.load(e);default:throw new Error(`Unknown variant index for TransactionPayload: ${r}`)}}},A=class t extends a{constructor(e){super(),this.script=e}serialize(e){e.serializeU32AsUleb128(0),this.script.serialize(e)}static load(e){let r=U.deserialize(e);return new t(r)}},z=class t extends a{constructor(e){super(),this.entryFunction=e}serialize(e){e.serializeU32AsUleb128(2),this.entryFunction.serialize(e)}static load(e){let r=l.deserialize(e);return new t(r)}},h=class t extends a{constructor(e){super(),this.multiSig=e}serialize(e){e.serializeU32AsUleb128(3),this.multiSig.serialize(e)}static load(e){let r=f.deserialize(e);return new t(r)}},l=class t{constructor(e,r,i,n){this.module_name=e,this.function_name=r,this.type_args=i,this.args=n}static build(e,r,i,n){return new t(g.fromStr(e),new p(r),i,n)}serialize(e){this.module_name.serialize(e),this.function_name.serialize(e),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(r=>{r.serializeForEntryFunction(e)})}static deserialize(e){let r=g.deserialize(e),i=p.deserialize(e),n=e.deserializeVector(m),o=e.deserializeUleb128AsU32(),s=new Array;for(let c=0;c<o;c+=1){let B=e.deserializeUleb128AsU32(),D=S.deserialize(e,B);s.push(D)}return new t(r,i,n,s)}},U=class t{constructor(e,r,i){this.bytecode=e,this.type_args=r,this.args=i}serialize(e){e.serializeBytes(this.bytecode),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(r=>{r.serializeForScriptFunction(e)})}static deserialize(e){let r=e.deserializeBytes(),i=e.deserializeVector(m),n=e.deserializeUleb128AsU32(),o=new Array;for(let s=0;s<n;s+=1){let c=I(e);o.push(c)}return new t(r,i,o)}},f=class t{constructor(e,r){this.multisig_address=e,this.transaction_payload=r}serialize(e){this.multisig_address.serialize(e),this.transaction_payload===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.transaction_payload.serialize(e))}static deserialize(e){let r=y.deserialize(e),i=e.deserializeBool(),n;return i&&(n=b.deserialize(e)),new t(r,n)}},b=class t extends u{constructor(e){super(),this.transaction_payload=e}serialize(e){e.serializeU32AsUleb128(0),this.transaction_payload.serialize(e)}static deserialize(e){return e.deserializeUleb128AsU32(),new t(l.deserialize(e))}};export{I as a,a as b,A as c,z as d,h as e,l as f,U as g,f as h,b as i};
|
|
2
|
+
//# sourceMappingURL=chunk-44EHAKKW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g,f as l,g as R,i as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g,f as l,g as R,i as x}from"./chunk-PIPDQFL2.mjs";import{a as K}from"./chunk-W2C5KRUQ.mjs";import{a as S}from"./chunk-2YKERRHD.mjs";import{a as y,b as C}from"./chunk-CPAAEEF4.mjs";import{d as I}from"./chunk-P5CM4C2G.mjs";import{a as w}from"./chunk-AEGA5N2W.mjs";import{a as b}from"./chunk-YWSDONJJ.mjs";import{c as m,m as c}from"./chunk-5W2ERBGY.mjs";import{a as h}from"./chunk-XW3BXTCZ.mjs";import{i as P}from"./chunk-HVIF6DW6.mjs";import{c as d}from"./chunk-752TOOCA.mjs";import{a as s}from"./chunk-HHWJHOFZ.mjs";import{b as f}from"./chunk-TKXEVD7A.mjs";import{a as T}from"./chunk-ZD2TY5N3.mjs";import{b as p}from"./chunk-LQOSHBB7.mjs";async function _(t){let e=await k(t);return v(t,e)}async function k(t){let{aptosConfig:e,data:n}=t,o,a;return"bytecode"in n?a=await g(n):"multisigAddress"in n?(o={aptosConfig:e,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},a=await g(o)):(o={aptosConfig:e,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},a=await g(o)),a}async function v(t,e){let{aptosConfig:n,sender:o,options:a}=t,i;if(M(t)&&(i=p.ZERO.toString()),N(t)){let{secondarySignerAddresses:r}=t;return l({aptosConfig:n,sender:o,payload:e,options:a,secondarySignerAddresses:r,feePayerAddress:i})}return l({aptosConfig:n,sender:o,payload:e,options:a,feePayerAddress:i})}function M(t){return t.withFeePayer===!0}function N(t){return"secondarySignerAddresses"in t}function sn(t){let{transaction:e}=t;return I(e)}function D(t){let{signer:e,transaction:n}=t;return e.signTransactionWithAuthenticator(n)}function G(t){let{signer:e,transaction:n}=t;if(!n.feePayerAddress)throw new Error(`Transaction ${n} is not a Fee Payer transaction`);return n.feePayerAddress=e.accountAddress,D({signer:e,transaction:n})}async function cn(t){let{aptosConfig:e,transaction:n,signerPublicKey:o,secondarySignersPublicKeys:a,feePayerPublicKey:i,options:r}=t,u=R({transaction:n,signerPublicKey:o,secondarySignersPublicKeys:a,feePayerPublicKey:i,options:r}),{data:A}=await d({aptosConfig:e,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return A}async function U(t){let{aptosConfig:e}=t,n=x({...t});try{let{data:o}=await d({aptosConfig:e,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return o}catch(o){let a=b.deserialize(new T(n));throw a.authenticator.isSingleSender()&&a.authenticator.sender.isSingleKey()&&(a.authenticator.sender.public_key.publicKey instanceof P||a.authenticator.sender.public_key.publicKey instanceof h)&&await C.fetchJWK({aptosConfig:e,publicKey:a.authenticator.sender.public_key.publicKey,kid:a.authenticator.sender.signature.signature.getJwkKid()}),o}}async function O(t){let{aptosConfig:e,signer:n,feePayer:o,transaction:a}=t;y(n)&&await n.checkKeylessAccountValidity(e),y(o)&&await o.checkKeylessAccountValidity(e);let i=t.feePayerAuthenticator||o&&G({signer:o,transaction:a}),r=D({signer:n,transaction:a});return U({aptosConfig:e,transaction:a,senderAuthenticator:r,feePayerAuthenticator:i})}async function un(t){let{aptosConfig:e,senderAuthenticator:n,feePayer:o,transaction:a}=t;y(o)&&await o.checkKeylessAccountValidity(e);let i=G({signer:o,transaction:a});return U({aptosConfig:e,transaction:a,senderAuthenticator:n,feePayerAuthenticator:i})}var E={typeParameters:[],parameters:[c.u8(),new c(c.u8())]};async function pn(t){let{aptosConfig:e,account:n,metadataBytes:o,moduleBytecode:a,options:i}=t,r=a.map(u=>s.U8(u));return _({aptosConfig:e,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[s.U8(o),new s(r)],abi:E},options:i})}var V={typeParameters:[],parameters:[new m,c.u8(),new m,c.u8(),c.u8(),c.u8()]};async function yn(t){let{aptosConfig:e,fromAccount:n,toNewPrivateKey:o}=t,a=await K({aptosConfig:e,accountAddress:n.accountAddress}),i=S.fromPrivateKey({privateKey:o,legacy:!0}),u=new w({sequenceNumber:BigInt(a.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(a.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),A=n.sign(u),B=i.sign(u),F=await _({aptosConfig:e,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new f(n.signingScheme),s.U8(n.publicKey.toUint8Array()),new f(i.signingScheme),s.U8(i.publicKey.toUint8Array()),s.U8(A.toUint8Array()),s.U8(B.toUint8Array())],abi:V}});return O({aptosConfig:e,signer:n,transaction:F})}export{_ as a,k as b,v as c,sn as d,D as e,G as f,cn as g,U as h,O as i,un as j,pn as k,yn as l};
|
|
2
|
+
//# sourceMappingURL=chunk-53IBOHXB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as h,c as d,e as m}from"./chunk-GOXRBEIJ.mjs";import{a as p,b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as h,c as d,e as m}from"./chunk-GOXRBEIJ.mjs";import{a as p,b as u}from"./chunk-PWGTRRSJ.mjs";import{c as s}from"./chunk-7OUPEQRN.mjs";import{a as y}from"./chunk-ZD2TY5N3.mjs";import{c as b,d as K}from"./chunk-BHVSIRNF.mjs";import{a as c}from"./chunk-RXHER6EA.mjs";import{b as l}from"./chunk-VHY6ZATX.mjs";import{randomBytes as E}from"@noble/hashes/utils";var S=1209600,i=class i extends c{constructor(e){super();let{privateKey:r,expiryDateSecs:a,blinder:n}=e;this.privateKey=r,this.publicKey=new p(r.publicKey()),this.expiryDateSecs=a||K(b()+S),this.blinder=n!==void 0?l.fromHexInput(n).toUint8Array():v();let t=h(this.publicKey.bcsToBytes(),93);t.push(BigInt(this.expiryDateSecs)),t.push(d(this.blinder));let x=m(t);this.nonce=x.toString()}getPublicKey(){return this.publicKey}isExpired(){return Math.floor(Date.now()/1e3)>this.expiryDateSecs}serialize(e){e.serializeU32AsUleb128(this.publicKey.variant),e.serializeBytes(this.privateKey.toUint8Array()),e.serializeU64(this.expiryDateSecs),e.serializeFixedBytes(this.blinder)}static deserialize(e){let r=e.deserializeUleb128AsU32(),a;switch(r){case 0:a=s.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let n=e.deserializeU64(),t=e.deserializeFixedBytes(31);return new i({privateKey:a,expiryDateSecs:Number(n),blinder:t})}static fromBytes(e){return i.deserialize(new y(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=s.generate()}return new i({privateKey:r,expiryDateSecs:e?.expiryDateSecs})}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new u(this.privateKey.sign(e))}};i.BLINDER_LENGTH=31;var o=i;function v(){return E(o.BLINDER_LENGTH)}export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5H5D6QVX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-PDAWVDI7.mjs";import{b as a}from"./chunk-LQOSHBB7.mjs";import{a as v}from"./chunk-RXHER6EA.mjs";var t=class i extends v{deserialize(e){let r=a.deserialize(e),s=n.deserialize(e),l=n.deserialize(e),b=e.deserializeVector(i);return new o(r,s,l,b)}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return u.load(e);case 1:return c.load(e);case 2:return p.load(e);case 3:return z.load(e);case 4:return T.load(e);case 5:return S.load(e);case 6:return f.load(e);case 7:return y.load(e);case 8:return d.load(e);case 9:return g.load(e);case 10:return h.load(e);case 255:return U.load(e);default:throw new Error(`Unknown variant index for TypeTag: ${r}`)}}isBool(){return this instanceof u}isAddress(){return this instanceof T}isGeneric(){return this instanceof U}isSigner(){return this instanceof S}isVector(){return this instanceof f}isStruct(){return this instanceof y}isU8(){return this instanceof c}isU16(){return this instanceof d}isU32(){return this instanceof g}isU64(){return this instanceof p}isU128(){return this instanceof z}isU256(){return this instanceof h}isPrimitive(){return this instanceof S||this instanceof T||this instanceof u||this instanceof c||this instanceof d||this instanceof g||this instanceof p||this instanceof z||this instanceof h}},u=class i extends t{toString(){return"bool"}serialize(e){e.serializeU32AsUleb128(0)}static load(e){return new i}},c=class i extends t{toString(){return"u8"}serialize(e){e.serializeU32AsUleb128(1)}static load(e){return new i}},d=class i extends t{toString(){return"u16"}serialize(e){e.serializeU32AsUleb128(8)}static load(e){return new i}},g=class i extends t{toString(){return"u32"}serialize(e){e.serializeU32AsUleb128(9)}static load(e){return new i}},p=class i extends t{toString(){return"u64"}serialize(e){e.serializeU32AsUleb128(2)}static load(e){return new i}},z=class i extends t{toString(){return"u128"}serialize(e){e.serializeU32AsUleb128(3)}static load(e){return new i}},h=class i extends t{toString(){return"u256"}serialize(e){e.serializeU32AsUleb128(10)}static load(e){return new i}},T=class i extends t{toString(){return"address"}serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new i}},S=class i extends t{toString(){return"signer"}serialize(e){e.serializeU32AsUleb128(5)}static load(e){return new i}},x=class i extends t{constructor(r){super();this.value=r}toString(){return`&${this.value.toString()}`}serialize(r){r.serializeU32AsUleb128(254)}static load(r){let s=t.deserialize(r);return new i(s)}},U=class i extends t{constructor(r){super();this.value=r;if(r<0)throw new Error("Generic type parameter index cannot be negative")}toString(){return`T${this.value}`}serialize(r){r.serializeU32AsUleb128(255),r.serializeU32(this.value)}static load(r){let s=r.deserializeU32();return new i(s)}},f=class i extends t{constructor(r){super();this.value=r}toString(){return`vector<${this.value.toString()}>`}static u8(){return new i(new c)}serialize(r){r.serializeU32AsUleb128(6),this.value.serialize(r)}static load(r){let s=t.deserialize(r);return new i(s)}},y=class i extends t{constructor(r){super();this.value=r}toString(){let r="";return this.value.typeArgs.length>0&&(r=`<${this.value.typeArgs.map(s=>s.toString()).join(", ")}>`),`${this.value.address.toString()}::${this.value.moduleName.identifier}::${this.value.name.identifier}${r}`}serialize(r){r.serializeU32AsUleb128(7),this.value.serialize(r)}static load(r){let s=o.deserialize(r);return new i(s)}isTypeTag(r,s,l){return this.value.moduleName.identifier===s&&this.value.name.identifier===l&&this.value.address.equals(r)}isString(){return this.isTypeTag(a.ONE,"string","String")}isOption(){return this.isTypeTag(a.ONE,"option","Option")}isObject(){return this.isTypeTag(a.ONE,"object","Object")}},o=class i extends v{constructor(e,r,s,l){super(),this.address=e,this.moduleName=r,this.name=s,this.typeArgs=l}serialize(e){e.serialize(this.address),e.serialize(this.moduleName),e.serialize(this.name),e.serializeVector(this.typeArgs)}static deserialize(e){let r=a.deserialize(e),s=n.deserialize(e),l=n.deserialize(e),b=e.deserializeVector(t);return new i(r,s,l,b)}};function O(){return new o(a.ONE,new n("aptos_coin"),new n("AptosCoin"),[])}function E(){return new o(a.ONE,new n("string"),new n("String"),[])}function V(i){return new o(a.ONE,new n("option"),new n("Option"),[i])}function j(i){return new o(a.ONE,new n("object"),new n("Object"),[i])}export{t as a,u as b,c,d,g as e,p as f,z as g,h,T as i,S as j,x as k,U as l,f as m,y as n,o,O as p,E as q,V as r,j as s};
|
|
2
|
+
//# sourceMappingURL=chunk-5W2ERBGY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{g as e}from"./chunk-GRRBXHVG.mjs";import{f as c}from"./chunk-752TOOCA.mjs";import{d as r}from"./chunk-RJ7F4JDV.mjs";import{b as s}from"./chunk-LQOSHBB7.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-67A5U2X6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,b as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c,b as g}from"./chunk-PYY2RXFP.mjs";import{k as i,l as a}from"./chunk-GRRBXHVG.mjs";import{a as e,b as n,c as s,e as r,f as t}from"./chunk-KK5HUWF6.mjs";var p=class{constructor(o){this.config=o}async getLedgerInfo(){return e({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(o){return i({aptosConfig:this.config,...o})}async getBlockByHeight(o){return a({aptosConfig:this.config,...o})}async view(o){return c({aptosConfig:this.config,...o})}async viewJson(o){return g({aptosConfig:this.config,...o})}async getChainTopUserTransactions(o){return n({aptosConfig:this.config,...o})}async queryIndexer(o){return s({aptosConfig:this.config,...o})}async getIndexerLastSuccessVersion(){return r({aptosConfig:this.config})}async getProcessorStatus(o){return t({aptosConfig:this.config,processorType:o})}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6IJZRG3U.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-PDAWVDI7.mjs";import{b as i}from"./chunk-LQOSHBB7.mjs";import{a as d}from"./chunk-RXHER6EA.mjs";var o=class t extends d{constructor(e,r){super(),this.address=e,this.name=r}static fromStr(e){let r=e.split("::");if(r.length!==2)throw new Error("Invalid module id.");return new t(i.fromString(r[0]),new s(r[1]))}serialize(e){this.address.serialize(e),this.name.serialize(e)}static deserialize(e){let r=i.deserialize(e),n=s.deserialize(e);return new t(r,n)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6KZT3KFZ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as u,d as A}from"./chunk-TWETGZ3W.mjs";async function n(e){let{type:t,originMethod:o,path:p,body:i,acceptType:r,contentType:R,params:f,aptosConfig:s,overrides:c}=e,d=s.getRequestUrl(t);return u({url:d,method:"POST",originMethod:o,path:p,body:i,contentType:R,acceptType:r,params:f,overrides:c},s,e.type)}async function y(e){let{type:t,originMethod:o,path:p,body:i,acceptType:r,contentType:R,params:f,aptosConfig:s,overrides:c}=e,d=s.getRequestUrl(t);return A({url:d,method:"POST",originMethod:o,path:p,body:i,contentType:R,acceptType:r,params:f,overrides:c},s,e.type)}async function C(e){let{aptosConfig:t}=e;return n({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function E(e){let{aptosConfig:t}=e;return y({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function l(e){let{aptosConfig:t}=e;return n({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,o={...t,clientConfig:{...t.clientConfig}};return delete o?.clientConfig?.API_KEY,n({...e,type:"Faucet",overrides:{...o.clientConfig,...o.faucetConfig,...e.overrides,HEADERS:{...o.clientConfig?.HEADERS,...o.faucetConfig?.HEADERS}}})}async function P(e){return n({...e,type:"Pepper"})}async function x(e){return n({...e,type:"Prover"})}export{n as a,y as b,C as c,E as d,l as e,m as f,P as g,x as h};
|
|
2
|
+
//# sourceMappingURL=chunk-752TOOCA.mjs.map
|
|
@@ -0,0 +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\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":"gDA8FA,eAAsBA,EACpBC,EACkC,CAClC,GAAM,CAAE,KAAAC,EAAM,aAAAC,EAAc,KAAAC,EAAM,KAAAC,EAAM,WAAAC,EAAY,YAAAC,EAAa,OAAAC,EAAQ,YAAAC,EAAa,UAAAC,CAAU,EAAIT,EAC9FU,EAAMF,EAAY,cAAcP,CAAI,EAE1C,OAAOU,EACL,CACE,IAAAD,EACA,OAAQ,OACR,aAAAR,EACA,KAAAC,EACA,KAAAC,EACA,YAAAE,EACA,WAAAD,EACA,OAAAE,EACA,UAAAE,CACF,EACAD,EACAR,EAAQ,IACV,CACF,CAoBA,eAAsBY,EAA2BZ,EAAkE,CACjH,GAAM,CAAE,KAAAC,EAAM,aAAAC,EAAc,KAAAC,EAAM,KAAAC,EAAM,WAAAC,EAAY,YAAAC,EAAa,OAAAC,EAAQ,YAAAC,EAAa,UAAAC,CAAU,EAAIT,EAC9FU,EAAMF,EAAY,cAAcP,CAAI,EAE1C,OAAOY,EACL,CACE,IAAAH,EACA,OAAQ,OACR,aAAAR,EACA,KAAAC,EACA,KAAAC,EACA,YAAAE,EACA,WAAAD,EACA,OAAAE,EACA,UAAAE,CACF,EACAD,EACAR,EAAQ,IACV,CACF,CAcA,eAAsBc,EACpBd,EACkC,CAClC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAExB,OAAOD,EAAe,CACpB,GAAGC,EACH,gBACA,UAAW,CACT,GAAGQ,EAAY,aACf,GAAGA,EAAY,eACf,GAAGR,EAAQ,UACX,QAAS,CAAE,GAAGQ,EAAY,cAAc,QAAS,GAAGA,EAAY,gBAAgB,OAAQ,CAC1F,CACF,CAAC,CACH,CAeA,eAAsBO,EACpBf,EACqC,CACrC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAExB,OAAOY,EAAgB,CACrB,GAAGZ,EACH,gBACA,UAAW,CACT,GAAGQ,EAAY,aACf,GAAGA,EAAY,eACf,GAAGR,EAAQ,UACX,QAAS,CAAE,GAAGQ,EAAY,cAAc,QAAS,GAAGA,EAAY,gBAAgB,OAAQ,CAC1F,CACF,CAAC,CACH,CAeA,eAAsBQ,EACpBhB,EACkC,CAClC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAExB,OAAOD,EAAe,CACpB,GAAGC,EACH,eACA,UAAW,CACT,GAAGQ,EAAY,aACf,GAAGA,EAAY,cACf,GAAGR,EAAQ,UACX,QAAS,CAAE,GAAGQ,EAAY,cAAc,QAAS,GAAGA,EAAY,eAAe,OAAQ,CACzF,CACF,CAAC,CACH,CAkBA,eAAsBS,EACpBjB,EACkC,CAClC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAGlBkB,EAAsB,CAC1B,GAAGV,EACH,aAAc,CAAE,GAAGA,EAAY,YAAa,CAC9C,EAEA,cAAOU,GAAqB,cAAc,QAEnCnB,EAAe,CACpB,GAAGC,EACH,cACA,UAAW,CACT,GAAGkB,EAAoB,aACvB,GAAGA,EAAoB,aACvB,GAAGlB,EAAQ,UACX,QAAS,CAAE,GAAGkB,EAAoB,cAAc,QAAS,GAAGA,EAAoB,cAAc,OAAQ,CACxG,CACF,CAAC,CACH,CAaA,eAAsBC,EACpBnB,EACkC,CAClC,OAAOD,EAAe,CAAE,GAAGC,EAAS,aAA0B,CAAC,CACjE,CAWA,eAAsBoB,EACpBpB,EACkC,CAClC,OAAOD,EAAe,CAAE,GAAGC,EAAS,aAA0B,CAAC,CACjE","names":["post","options","type","originMethod","path","body","acceptType","contentType","params","aptosConfig","overrides","url","aptosRequest","postBinary","aptosBinaryRequest","postAptosFullNode","postBinaryAptosFullNode","postAptosIndexer","postAptosFaucet","modifiedAptosConfig","postAptosPepperService","postAptosProvingService"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-53IBOHXB.mjs";import{f as t,i as o}from"./chunk-5W2ERBGY.mjs";import{e as n}from"./chunk-RJ7F4JDV.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7A2KHJ3D.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as r}from"./chunk-VHY6ZATX.mjs";var a=class a{static formatPrivateKey(i,n){let e=a.AIP80_PREFIXES[n],t=i;return typeof t=="string"&&t.startsWith(e)&&(t=t.split("-")[2]),`${e}${r.fromHexInput(t).toString()}`}static parseHexInput(i,n,e){let t,p=a.AIP80_PREFIXES[n];if(typeof i=="string")if(!e&&!i.startsWith(p))t=r.fromHexInput(i),e!==!1&&console.warn("[Aptos SDK] It is recommended that private keys are AIP-80 compliant (https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md). You can fix the private key by formatting it with `PrivateKey.formatPrivateKey(privateKey: string, type: 'ed25519' | 'secp256k1'): string`.");else if(i.startsWith(p))t=r.fromHexString(i.split("-")[2]);else throw e?new Error("Invalid HexString input while parsing private key. Must AIP-80 compliant string."):new Error("Invalid HexString input while parsing private key.");else t=r.fromHexInput(i);return t}};a.AIP80_PREFIXES={ed25519:"ed25519-priv-",secp256k1:"secp256k1-priv-"};var o=a;export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7CRQNXR5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-DOVH6HPL.mjs";import{d as A,f as v,g as S,h as E,i as H,j as P}from"./chunk-C3Q23D22.mjs";import{a as x}from"./chunk-7CRQNXR5.mjs";import{b}from"./chunk-H4YAL2IL.mjs";import{a as U}from"./chunk-A3VO773Q.mjs";import{a as K}from"./chunk-TTY5GFMN.mjs";import{a as p}from"./chunk-RXHER6EA.mjs";import{b as o}from"./chunk-VHY6ZATX.mjs";import{ed25519 as y}from"@noble/curves/ed25519";var m=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16];function T(I){let e=I.toUint8Array().slice(32);for(let t=m.length-1;t>=0;t-=1){if(e[t]<m[t])return!0;if(e[t]>m[t])return!1}return!1}var n=class n extends b{constructor(e){super();let t=o.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:i}=e;if(!T(i))return!1;let a=d(t),c=o.fromHexInput(a).toUint8Array(),u=i.toUint8Array(),l=this.key.toUint8Array();return y.verify(u,c,l)}authKey(){return K.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}static isInstance(e){return"key"in e&&e.key?.data?.length===n.LENGTH}};n.LENGTH=32;var f=n,r=class r extends p{constructor(e,t){super();let i=x.parseHexInput(e,"ed25519",t);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKey=i}static generate(){let e=y.utils.randomPrivateKey();return new r(e,!1)}static fromDerivationPath(e,t){if(!v(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,P(t))}static fromDerivationPathInner(e,t,i=A){let{key:a,chainCode:c}=S(r.SLIP_0010_SEED,t),u=H(e).map(g=>parseInt(g,10)),{key:l}=u.reduce((g,w)=>E(g,w+i),{key:a,chainCode:c});return new r(l,!1)}publicKey(){let e=y.getPublicKey(this.signingKey.toUint8Array());return new f(e)}sign(e){let t=d(e),i=o.fromHexInput(t).toUint8Array(),a=y.sign(i,this.signingKey.toUint8Array());return new h(a)}toUint8Array(){return this.signingKey.toUint8Array()}toString(){return this.toHexString()}toHexString(){return this.signingKey.toString()}toAIP80String(){return x.formatPrivateKey(this.signingKey.toString(),"ed25519")}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t,!1)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var z=r,s=class s extends U{constructor(e){super();let t=o.fromHexInput(e);if(t.toUint8Array().length!==s.LENGTH)throw new Error(`Signature length should be ${s.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new s(t)}};s.LENGTH=64;var h=s;export{T as a,f as b,z as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-7OUPEQRN.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-RXHER6EA.mjs";import{b as t}from"./chunk-VHY6ZATX.mjs";var o=class extends r{toUint8Array(){return this.bcsToBytes()}toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-A3VO773Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u,c as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u,c as r}from"./chunk-HHWJHOFZ.mjs";import{e as t}from"./chunk-TKXEVD7A.mjs";import{b as o}from"./chunk-LQOSHBB7.mjs";import{a as i}from"./chunk-RXHER6EA.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AEGA5N2W.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-LQOSHBB7.mjs";import{sha3_256 as n}from"@noble/hashes/sha3";var d=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,254]);return new c(n(o))},f=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,255]);return new c(n(o))},a=(e,r,t)=>{let s=`${r}::${t}`;return d(e,s)};export{d as a,f as b,a as c};
|
|
2
|
+
//# sourceMappingURL=chunk-AIPHJFJL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u,b as d,c as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u,b as d,c as p}from"./chunk-PC25RPDV.mjs";import{a as r}from"./chunk-PYY2RXFP.mjs";import{i as a}from"./chunk-5W2ERBGY.mjs";import{j as s}from"./chunk-BHVSIRNF.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";var A=class{constructor(n){this.config=n;this.isAccountAbstractionEnabled=async n=>{let o=await this.getAuthenticationFunction(n),{moduleAddress:t,moduleName:i,functionName:m}=s(n.authenticationFunction);return o?.some(e=>c.fromString(t).equals(e.moduleAddress)&&i===e.moduleName&&m===e.functionName)??!1};this.enableAccountAbstractionTransaction=this.addAuthenticationFunctionTransaction;this.disableAccountAbstractionTransaction=async n=>{let{accountAddress:o,authenticationFunction:t,options:i}=n;return t?this.removeAuthenticationFunctionTransaction({accountAddress:o,authenticationFunction:t,options:i}):this.removeDispatchableAuthenticatorTransaction({accountAddress:o,options:i})}}async addAuthenticationFunctionTransaction(n){let{accountAddress:o,authenticationFunction:t,options:i}=n;return u({aptosConfig:this.config,authenticationFunction:t,sender:o,options:i})}async removeAuthenticationFunctionTransaction(n){let{accountAddress:o,authenticationFunction:t,options:i}=n;return d({aptosConfig:this.config,sender:o,authenticationFunction:t,options:i})}async removeDispatchableAuthenticatorTransaction(n){let{accountAddress:o,options:t}=n;return p({aptosConfig:this.config,sender:o,options:t})}async getAuthenticationFunction(n){let{accountAddress:o}=n,[{vec:t}]=await r({aptosConfig:this.config,payload:{function:"0x1::account_abstraction::dispatchable_authenticator",functionArguments:[c.from(o)],abi:{typeParameters:[],parameters:[new a],returnTypes:[]}}});if(t.length!==0)return t[0].map(i=>({moduleAddress:c.fromString(i.module_address),moduleName:i.module_name,functionName:i.function_name}))}};export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AQWKKSRN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as a}from"./chunk-HKL4MFNL.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super(),this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B23VO5TB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-LQOSHBB7.mjs";import{decode as i}from"js-base64";async function m(n){return new Promise(e=>{setTimeout(e,n)})}function l(n){return n instanceof Error?n.message:String(n)}var g=()=>Math.floor(Date.now()/1e3);function p(n){let e=new Date(n*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function f(n){let e=n.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return i(t)}var _=(n,e)=>n*10**e,h=(n,e)=>n/10**e,a=n=>{let e="";for(let t=2;t<n.length;t+=2)e+=String.fromCharCode(parseInt(n.substring(t,t+2),16));return e},x=n=>{let{account_address:e,module_name:t,struct_name:o}=n,r=a(t),c=a(o);return`${e}::${r}::${c}`},S=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null&&"account_address"in n&&"module_name"in n&&"struct_name"in n&&typeof n.account_address=="string"&&typeof n.module_name=="string"&&typeof n.struct_name=="string";function M(n){let e=n.split("::");if(e.length!==3)throw new Error(`Invalid function ${n}`);let t=e[0],o=e[1],r=e[2];return{moduleAddress:t,moduleName:o,functionName:r}}function b(n){let e=n.split("::");return e.length===3&&s.isValid({input:e[0]}).valid}export{m as a,l as b,g as c,p as d,f as e,_ as f,h as g,x as h,S as i,M as j,b as k};
|
|
2
|
+
//# sourceMappingURL=chunk-BHVSIRNF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as E,b as K}from"./chunk-WFKPVKU3.mjs";import{b as x,c as M}from"./chunk-QUJM5W4L.mjs";import{a as S,b as f}from"./chunk-2TRQERBL.mjs";import{b as h,d as A}from"./chunk-7OUPEQRN.mjs";import{j as z,k as m}from"./chunk-BHVSIRNF.mjs";import{b as d}from"./chunk-LQOSHBB7.mjs";import{a as g}from"./chunk-RXHER6EA.mjs";import{b as r}from"./chunk-VHY6ZATX.mjs";var n=class extends g{static deserialize(e){let i=e.deserializeUleb128AsU32();switch(i){case 0:return a.load(e);case 1:return u.load(e);case 2:return o.load(e);case 3:return l.load(e);case 4:return y.load(e);case 5:return p.load(e);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${i}`)}}isEd25519(){return this instanceof a}isMultiEd25519(){return this instanceof u}isSingleKey(){return this instanceof o}isMultiKey(){return this instanceof l}},a=class s extends n{constructor(e,i){super(),this.public_key=e,this.signature=i}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let i=h.deserialize(e),t=A.deserialize(e);return new s(i,t)}},u=class s extends n{constructor(e,i){super(),this.public_key=e,this.signature=i}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let i=E.deserialize(e),t=K.deserialize(e);return new s(i,t)}},o=class s extends n{constructor(e,i){super(),this.public_key=e,this.signature=i}serialize(e){e.serializeU32AsUleb128(2),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let i=S.deserialize(e),t=f.deserialize(e);return new s(i,t)}},l=class s extends n{constructor(e,i){super(),this.public_keys=e,this.signatures=i}serialize(e){e.serializeU32AsUleb128(3),this.public_keys.serialize(e),this.signatures.serialize(e)}static load(e){let i=x.deserialize(e),t=M.deserialize(e);return new s(i,t)}},y=class s extends n{serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new s}},p=class s extends n{constructor(e,i,t){if(super(),!m(e))throw new Error(`Invalid function info ${e} passed into AccountAuthenticatorAbstraction`);this.functionInfo=e,this.authenticator=r.fromHexInput(t),this.signingMessageDigest=r.fromHexInput(r.fromHexInput(i).toUint8Array())}serialize(e){e.serializeU32AsUleb128(5);let{moduleAddress:i,moduleName:t,functionName:c}=z(this.functionInfo);d.fromString(i).serialize(e),e.serializeStr(t),e.serializeStr(c),e.serializeU32AsUleb128(0),e.serializeBytes(this.signingMessageDigest.toUint8Array()),e.serializeFixedBytes(this.authenticator.toUint8Array())}static load(e){let i=d.deserialize(e),t=e.deserializeStr(),c=e.deserializeStr(),b=e.deserializeUleb128AsU32();if(b===0){let U=e.deserializeBytes(),k=e.deserializeFixedBytes(e.remaining());return new s(`${i}::${t}::${c}`,U,k)}throw new Error(`Unknown variant index for AccountAuthenticatorAbstraction: ${b}`)}};export{n as a,a as b,u as c,o as d,l as e,y as f,p as g};
|
|
2
|
+
//# sourceMappingURL=chunk-BPHCRTHD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-BPHCRTHD.mjs";import{a as g,b}from"./chunk-WFKPVKU3.mjs";import{b as y,d as p}from"./chunk-7OUPEQRN.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";import{a as h}from"./chunk-RXHER6EA.mjs";var n=class extends h{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${t}`)}}isEd25519(){return this instanceof o}isMultiEd25519(){return this instanceof d}isMultiAgent(){return this instanceof u}isFeePayer(){return this instanceof l}isSingleSender(){return this instanceof A}},o=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=y.deserialize(e),s=p.deserialize(e);return new r(t,s)}},d=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=g.deserialize(e),s=b.deserialize(e);return new r(t,s)}},u=class r extends n{constructor(e,t,s){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i);return new r(t,s,a)}},l=class r extends n{constructor(e,t,s,a){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i),_=c.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new r(t,s,a,S)}},A=class r extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let t=i.deserialize(e);return new r(t)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
|
|
2
|
+
//# sourceMappingURL=chunk-BQYKFATL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.
|
|
1
|
+
{"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.35.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o}from"./chunk-H4YAL2IL.mjs";import{a as s}from"./chunk-A3VO773Q.mjs";import{a as i}from"./chunk-TTY5GFMN.mjs";import{b as t}from"./chunk-VHY6ZATX.mjs";var n=class r extends s{constructor(e){super(),this.value=t.fromHexInput(e)}serialize(e){e.serializeBytes(this.value.toUint8Array())}static deserialize(e){return new r(e.deserializeBytes())}},a=class extends o{constructor(e){super(),this.accountAddress=e}authKey(){return new i({data:this.accountAddress.toUint8Array()})}verifySignature(e){throw new Error("This function is not implemented for AbstractPublicKey.")}serialize(e){throw new Error("This function is not implemented for AbstractPublicKey.")}};export{n as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-CGTMSLVZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as O,b as _}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as O,b as _}from"./chunk-P5CM4C2G.mjs";import{d as A}from"./chunk-BPHCRTHD.mjs";import{a as R}from"./chunk-5H5D6QVX.mjs";import{a as u,b as w}from"./chunk-2TRQERBL.mjs";import{a as I}from"./chunk-XW3BXTCZ.mjs";import{i as b,j as T,k as x,n as P,q as v,s as k}from"./chunk-HVIF6DW6.mjs";import{d as r}from"./chunk-TH5JCPN2.mjs";import{e as F}from"./chunk-BHVSIRNF.mjs";import{b as g}from"./chunk-LQOSHBB7.mjs";import{a as m}from"./chunk-RXHER6EA.mjs";import{b as y}from"./chunk-VHY6ZATX.mjs";import D from"eventemitter3";import{jwtDecode as W}from"jwt-decode";function ne(f){return f!=null&&typeof f.checkKeylessAccountValidity=="function"}var p=class p extends m{constructor(e){super();this.signingScheme=2;let{address:i,ephemeralKeyPair:t,publicKey:o,uidKey:l,uidVal:n,aud:c,pepper:s,proof:a,proofFetchCallback:h,jwt:d,verificationKeyHash:K}=e;if(this.ephemeralKeyPair=t,this.publicKey=o,this.accountAddress=i?g.from(i):this.publicKey.authKey().derivedAddress(),this.uidKey=l,this.uidVal=n,this.aud=c,this.jwt=d,this.emitter=new D,this.proofOrPromise=a,a instanceof P)this.proof=a;else{if(h===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async C=>{await h(C),this.emitter.removeAllListeners()}),this.init(a)}let S=y.fromHexInput(s).toUint8Array();if(S.length!==p.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${p.PEPPER_LENGTH}`);if(this.pepper=S,K!==void 0){if(y.hexInputToUint8Array(K).length!==32)throw new Error("verificationKeyHash must be 32 bytes");this.verificationKeyHash=y.hexInputToUint8Array(K)}}getAnyPublicKey(){return new u(this.publicKey)}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(i){i instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:i.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(this.accountAddress.serialize(e),e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Cannot serialize - proof undefined");this.proof.serialize(e),e.serializeOption(this.verificationKeyHash,32)}static partialDeserialize(e){let i=g.deserialize(e),t=e.deserializeStr(),o=e.deserializeStr(),l=e.deserializeFixedBytes(31),n=R.deserialize(e),c=P.deserialize(e),s=e.deserializeOption("fixedBytes",32);return{address:i,jwt:t,uidKey:o,pepper:l,ephemeralKeyPair:n,proof:c,verificationKeyHash:s}}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let i=new w(this.sign(e)),t=new u(this.publicKey);return new A(t,i)}signTransactionWithAuthenticator(e){let i=new w(this.signTransaction(e)),t=new u(this.publicKey);return new A(t,i)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}async checkKeylessAccountValidity(e){if(this.isExpired())throw r.fromErrorType({type:0});if(await this.waitForProofFetch(),this.proof===void 0)throw r.fromErrorType({type:2});let i=W(this.jwt,{header:!0});if(i.kid===void 0)throw r.fromErrorType({type:12,details:"checkKeylessAccountValidity failed. JWT is missing 'kid' in header. This should never happen."});if(this.verificationKeyHash!==void 0){let{verificationKey:t}=await v({aptosConfig:e});if(y.hexInputToString(t.hash())!==y.hexInputToString(this.verificationKeyHash))throw r.fromErrorType({type:4})}else console.warn("[Aptos SDK] The verification key hash was not set. Proof may be invalid if the verification key has rotated.");await p.fetchJWK({aptosConfig:e,publicKey:this.publicKey,kid:i.kid})}sign(e){let{expiryDateSecs:i}=this.ephemeralKeyPair;if(this.isExpired())throw r.fromErrorType({type:0});if(this.proof===void 0)throw r.fromErrorType({type:1,details:"Proof not found - make sure to call `await account.checkKeylessAccountValidity()` before signing."});let t=this.ephemeralKeyPair.getPublicKey(),o=this.ephemeralKeyPair.sign(e);return new T({jwtHeader:F(this.jwt.split(".")[0]),ephemeralCertificate:new x(this.proof,0),expiryDateSecs:i,ephemeralPublicKey:t,ephemeralSignature:o})}signTransaction(e){if(this.proof===void 0)throw r.fromErrorType({type:1,details:"Proof not found - make sure to call `await account.checkKeylessAccountValidity()` before signing."});let i=O(e),o=new E(i,this.proof.proof).hash();return this.sign(o)}verifySignature(e){let{message:i,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:i,signature:t.ephemeralSignature}))}static async fetchJWK(e){let{aptosConfig:i,publicKey:t,kid:o}=e,l=t instanceof b?t:t.keylessPublicKey,{iss:n}=l,c,s=t instanceof I?t.jwkAddress:void 0;try{c=await k({aptosConfig:i,jwkAddr:s})}catch(d){throw r.fromErrorType({type:24,error:d,details:`Failed to fetch ${s?"Federated":"Patched"}JWKs ${s?`for address ${s}`:"0x1"}`})}let a=c.get(n);if(a===void 0)throw r.fromErrorType({type:7,details:`JWKs for issuer ${n} not found.`});let h=a.find(d=>d.kid===o);if(h===void 0)throw r.fromErrorType({type:6,details:`JWK with kid '${o}' for issuer '${n}' not found.`});return h}};p.PEPPER_LENGTH=31;var H=p,E=class extends m{constructor(e,i){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=e,this.proof=i}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}hash(){return _(this.bcsToBytes(),this.domainSeparator)}};export{ne as a,H as b,E as c};
|
|
2
|
+
//# sourceMappingURL=chunk-CPAAEEF4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-CPAAEEF4.mjs";import{a as A}from"./chunk-XW3BXTCZ.mjs";import{r as y}from"./chunk-HVIF6DW6.mjs";import{a as m}from"./chunk-ZD2TY5N3.mjs";import{b as K}from"./chunk-LQOSHBB7.mjs";var h=class d extends f{constructor(e){let r=A.create(e);super({publicKey:r,...e}),this.publicKey=r,this.audless=e.audless??!1}serialize(e){super.serialize(e),this.publicKey.jwkAddress.serialize(e)}static deserialize(e){let{address:r,proof:l,ephemeralKeyPair:s,jwt:i,uidKey:o,pepper:c,verificationKeyHash:t}=f.partialDeserialize(e),n=K.deserialize(e),{iss:a,aud:p,uidVal:u}=y({jwt:i,uidKey:o});return new d({address:r,proof:l,ephemeralKeyPair:s,iss:a,uidKey:o,uidVal:u,aud:p,pepper:c,jwt:i,verificationKeyHash:t,jwkAddress:n})}static fromBytes(e){return d.deserialize(m.fromHex(e))}static create(e){let{address:r,proof:l,jwt:s,ephemeralKeyPair:i,pepper:o,jwkAddress:c,uidKey:t="sub",proofFetchCallback:n,verificationKey:a}=e,{iss:p,aud:u,uidVal:w}=y({jwt:s,uidKey:t});return new d({address:r,proof:l,ephemeralKeyPair:i,iss:p,uidKey:t,uidVal:w,aud:u,pepper:o,jwkAddress:K.from(c),jwt:s,proofFetchCallback:n,verificationKeyHash:a?a.hash():void 0})}};export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CPFQUFVD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/experimental.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LedgerVersionArg } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { InputViewFunctionData } from \"../transactions\";\nimport { viewBinary } from \"../internal/experimental\";\n\n/**\n * A class to have experimental functionality to the SDK. Anything used here is subject to change.\n * @group Experimental\n * @experimental\n */\nexport class Experimental {\n /**\n * Initializes a new instance of the Aptos client with the provided configuration.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., Testnet, Mainnet).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n * @param config.faucetUrl - The URL of the faucet to use for funding accounts.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with Testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your own network if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Experimental\n * @experimental\n */\n constructor(readonly config: AptosConfig) {}\n\n async viewBinary(args: {\n payload: InputViewFunctionData;\n options?: LedgerVersionArg & { convert?: undefined };\n }): Promise<Uint8Array>;\n async viewBinary<T extends {}>(args: {\n payload: InputViewFunctionData;\n options: LedgerVersionArg & { convert: (input: Uint8Array) => T };\n }): Promise<T>;\n\n /**\n * Returns BCS encoded results of the view function. It can also convert the results to a specific type, if a\n * converter is provided.\n *\n * @experimental\n * @group Experimental\n * @param args\n */\n async viewBinary<T extends {} = Uint8Array>(args: {\n payload: InputViewFunctionData;\n options?: LedgerVersionArg & { convert?: (input: Uint8Array) => T };\n }): Promise<Uint8Array | T> {\n return viewBinary<T>({ ...args, aptosConfig: this.config });\n }\n}\n"],"mappings":"yCAaO,IAAMA,EAAN,KAAmB,CAyBxB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAmB3C,MAAM,WAAsCC,EAGhB,CAC1B,OAAOC,EAAc,CAAE,GAAGD,EAAM,YAAa,KAAK,MAAO,CAAC,CAC5D,CACF","names":["Experimental","config","args","viewBinary"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-7A2KHJ3D.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DAJFOJ3L.mjs.map
|