@aptos-labs/ts-sdk 1.35.0-zeta.2 → 1.36.0-zeta.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/dist/common/{accountAddress-Ce4Cv60D.d.ts → accountAddress-C685VEzA.d.ts} +11 -99
- package/dist/common/chunk-5GUWOXQG.js +4 -0
- package/dist/common/chunk-5GUWOXQG.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -486
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +9105 -8699
- package/dist/common/index.js +436 -18333
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-D4j3_WIS.d.mts → Ed25519Account-6KGApCPu.d.mts} +3 -3
- package/dist/esm/account/AbstractKeylessAccount.d.mts +23 -13
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -75
- package/dist/esm/account/AbstractedAccount.d.mts +10 -10
- package/dist/esm/account/AbstractedAccount.mjs +1 -74
- package/dist/esm/account/Account.d.mts +6 -6
- package/dist/esm/account/Account.mjs +1 -72
- package/dist/esm/account/AccountUtils.d.mts +11 -10
- package/dist/esm/account/AccountUtils.mjs +1 -78
- package/dist/esm/account/Ed25519Account.d.mts +5 -5
- package/dist/esm/account/Ed25519Account.mjs +1 -70
- package/dist/esm/account/EphemeralKeyPair.d.mts +3 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -50
- package/dist/esm/account/FederatedKeylessAccount.d.mts +12 -11
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -72
- package/dist/esm/account/KeylessAccount.d.mts +12 -11
- package/dist/esm/account/KeylessAccount.mjs +1 -72
- package/dist/esm/account/MultiEd25519Account.d.mts +9 -9
- package/dist/esm/account/MultiEd25519Account.mjs +1 -70
- package/dist/esm/account/MultiKeyAccount.d.mts +34 -12
- package/dist/esm/account/MultiKeyAccount.mjs +1 -74
- package/dist/esm/account/SingleKeyAccount.d.mts +5 -5
- package/dist/esm/account/SingleKeyAccount.mjs +1 -72
- package/dist/esm/account/index.d.mts +7 -6
- package/dist/esm/account/index.mjs +1 -119
- package/dist/esm/account/utils.mjs +1 -54
- package/dist/esm/api/account/abstraction.d.mts +9 -9
- package/dist/esm/api/account/abstraction.mjs +1 -101
- package/dist/esm/api/account.d.mts +4 -20
- package/dist/esm/api/account.mjs +1 -105
- package/dist/esm/api/ans.d.mts +13 -13
- package/dist/esm/api/ans.mjs +1 -101
- package/dist/esm/api/aptos.d.mts +6 -5
- package/dist/esm/api/aptos.mjs +1 -139
- package/dist/esm/api/aptosConfig.mjs +1 -9
- package/dist/esm/api/coin.d.mts +9 -9
- package/dist/esm/api/coin.mjs +1 -100
- package/dist/esm/api/digitalAsset.d.mts +5 -5
- package/dist/esm/api/digitalAsset.mjs +1 -101
- package/dist/esm/api/event.mjs +1 -59
- package/dist/esm/api/experimental.d.mts +7 -7
- package/dist/esm/api/experimental.mjs +1 -85
- package/dist/esm/api/faucet.mjs +1 -58
- package/dist/esm/api/fungibleAsset.d.mts +13 -13
- package/dist/esm/api/fungibleAsset.mjs +1 -101
- package/dist/esm/api/general.d.mts +7 -7
- package/dist/esm/api/general.mjs +1 -85
- package/dist/esm/api/index.d.mts +6 -5
- package/dist/esm/api/index.mjs +1 -143
- package/dist/esm/api/keyless.d.mts +20 -19
- package/dist/esm/api/keyless.mjs +1 -102
- package/dist/esm/api/object.mjs +1 -59
- package/dist/esm/api/staking.mjs +1 -59
- package/dist/esm/api/table.mjs +1 -38
- package/dist/esm/api/transaction.d.mts +4 -4
- package/dist/esm/api/transaction.mjs +1 -110
- package/dist/esm/api/transactionSubmission/build.d.mts +9 -9
- package/dist/esm/api/transactionSubmission/build.mjs +1 -99
- package/dist/esm/api/transactionSubmission/helpers.mjs +1 -9
- package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
- package/dist/esm/api/transactionSubmission/management.mjs +1 -105
- package/dist/esm/api/transactionSubmission/sign.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -218
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +9 -9
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -100
- package/dist/esm/api/transactionSubmission/submit.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -100
- package/dist/esm/api/utils.mjs +1 -36
- package/dist/esm/bcs/consts.mjs +1 -17
- package/dist/esm/bcs/deserializer.mjs +1 -10
- package/dist/esm/bcs/index.mjs +1 -60
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -12
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -11
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -26
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -22
- package/dist/esm/bcs/serializer.mjs +1 -18
- package/dist/esm/chunk-2V636AYW.mjs +2 -0
- package/dist/esm/{chunk-3IWV2Q3K.mjs.map → chunk-2V636AYW.mjs.map} +1 -1
- package/dist/esm/chunk-35CO4BP4.mjs +2 -0
- package/dist/esm/chunk-35CO4BP4.mjs.map +1 -0
- package/dist/esm/chunk-35DKMW7Q.mjs +2 -0
- package/dist/esm/{chunk-GUA5YTIK.mjs.map → chunk-35DKMW7Q.mjs.map} +1 -1
- package/dist/esm/chunk-3EUHEZND.mjs +2 -0
- package/dist/esm/{chunk-G34CJDST.mjs.map → chunk-3EUHEZND.mjs.map} +1 -1
- package/dist/esm/chunk-3OLFJ65O.mjs +2 -0
- package/dist/esm/{chunk-G4NBRMZ2.mjs.map → chunk-3OLFJ65O.mjs.map} +1 -1
- package/dist/esm/chunk-3RVAGHAA.mjs +2 -0
- package/dist/esm/{chunk-XQFUKBY7.mjs.map → chunk-3RVAGHAA.mjs.map} +1 -1
- package/dist/esm/chunk-4RXKALLC.mjs +2 -0
- package/dist/esm/{chunk-SFLQPB72.mjs.map → chunk-4RXKALLC.mjs.map} +1 -1
- package/dist/esm/chunk-56CNRT2K.mjs +2 -0
- package/dist/esm/{chunk-SBB4YEPT.mjs.map → chunk-56CNRT2K.mjs.map} +1 -1
- package/dist/esm/chunk-6KE4JZD6.mjs +2 -0
- package/dist/esm/chunk-6KE4JZD6.mjs.map +1 -0
- package/dist/esm/chunk-7CRQNXR5.mjs +2 -0
- package/dist/esm/{chunk-YU65LNIC.mjs.map → chunk-7CRQNXR5.mjs.map} +1 -1
- package/dist/esm/chunk-7YTGBTWH.mjs +2 -0
- package/dist/esm/chunk-7YTGBTWH.mjs.map +1 -0
- package/dist/esm/chunk-A3VO773Q.mjs +2 -0
- package/dist/esm/{chunk-KLUO6XPE.mjs.map → chunk-A3VO773Q.mjs.map} +1 -1
- package/dist/esm/chunk-A5L76YP7.mjs +2 -0
- package/dist/esm/{chunk-PT2QHUB6.mjs.map → chunk-A5L76YP7.mjs.map} +1 -1
- package/dist/esm/chunk-AEGA5N2W.mjs +2 -0
- package/dist/esm/{chunk-QJ6CGH7N.mjs.map → chunk-AEGA5N2W.mjs.map} +1 -1
- package/dist/esm/chunk-AIPHJFJL.mjs +2 -0
- package/dist/esm/{chunk-6I37A76G.mjs.map → chunk-AIPHJFJL.mjs.map} +1 -1
- package/dist/esm/chunk-BMPHQ3E7.mjs +2 -0
- package/dist/esm/{chunk-MWXBQ6HR.mjs.map → chunk-BMPHQ3E7.mjs.map} +1 -1
- package/dist/esm/chunk-C3Q23D22.mjs +2 -0
- package/dist/esm/{chunk-F7W7KS5C.mjs.map → chunk-C3Q23D22.mjs.map} +1 -1
- package/dist/esm/chunk-CWL7ZA3P.mjs +2 -0
- package/dist/esm/{chunk-6T3V5LXK.mjs.map → chunk-CWL7ZA3P.mjs.map} +1 -1
- package/dist/esm/chunk-DOVH6HPL.mjs +2 -0
- package/dist/esm/{chunk-THWEBWUC.mjs.map → chunk-DOVH6HPL.mjs.map} +1 -1
- package/dist/esm/chunk-EODSU3YN.mjs +2 -0
- package/dist/esm/{chunk-WXQUBQK4.mjs.map → chunk-EODSU3YN.mjs.map} +1 -1
- package/dist/esm/chunk-ERLDXTIY.mjs +2 -0
- package/dist/esm/{chunk-6ASWESA2.mjs.map → chunk-ERLDXTIY.mjs.map} +1 -1
- package/dist/esm/chunk-GOXRBEIJ.mjs +2 -0
- package/dist/esm/{chunk-APM7OSLS.mjs.map → chunk-GOXRBEIJ.mjs.map} +1 -1
- package/dist/esm/chunk-HHWJHOFZ.mjs +2 -0
- package/dist/esm/{chunk-KSK3XIGF.mjs.map → chunk-HHWJHOFZ.mjs.map} +1 -1
- package/dist/esm/chunk-IF4UU2MT.mjs +2 -0
- package/dist/esm/{chunk-QPT4BSAB.mjs.map → chunk-IF4UU2MT.mjs.map} +1 -1
- package/dist/esm/chunk-IMTC3J2M.mjs +2 -0
- package/dist/esm/{chunk-LJRNGZMY.mjs.map → chunk-IMTC3J2M.mjs.map} +1 -1
- package/dist/esm/chunk-KDMSOCZY.mjs +2 -0
- package/dist/esm/chunk-KSLLV3ZC.mjs +2 -0
- package/dist/esm/{chunk-OFUNBTK4.mjs.map → chunk-KSLLV3ZC.mjs.map} +1 -1
- package/dist/esm/chunk-KXVD52Y6.mjs +2 -0
- package/dist/esm/{chunk-YT7V6AVJ.mjs.map → chunk-KXVD52Y6.mjs.map} +1 -1
- package/dist/esm/chunk-LGC2JORV.mjs +2 -0
- package/dist/esm/chunk-LGC2JORV.mjs.map +1 -0
- package/dist/esm/chunk-LQOSHBB7.mjs +4 -0
- package/dist/esm/{chunk-CXLXUSCG.mjs.map → chunk-LQOSHBB7.mjs.map} +1 -1
- package/dist/esm/chunk-LS3IDL2N.mjs +2 -0
- package/dist/esm/{chunk-MYEYZ7PF.mjs.map → chunk-LS3IDL2N.mjs.map} +1 -1
- package/dist/esm/chunk-MIW45ADL.mjs +2 -0
- package/dist/esm/chunk-MIW45ADL.mjs.map +1 -0
- package/dist/esm/chunk-NFPNWY6Z.mjs +4 -0
- package/dist/esm/chunk-NFPNWY6Z.mjs.map +1 -0
- package/dist/esm/chunk-PDAWVDI7.mjs +2 -0
- package/dist/esm/{chunk-MFFBZ43D.mjs.map → chunk-PDAWVDI7.mjs.map} +1 -1
- package/dist/esm/chunk-PSZYS4RG.mjs +2 -0
- package/dist/esm/{chunk-YK66QBML.mjs.map → chunk-PSZYS4RG.mjs.map} +1 -1
- package/dist/esm/chunk-R6QCPXQG.mjs +2 -0
- package/dist/esm/{chunk-SQNS4SFV.mjs.map → chunk-R6QCPXQG.mjs.map} +1 -1
- package/dist/esm/chunk-RIINVEZA.mjs +2 -0
- package/dist/esm/{chunk-Y3ENAKRC.mjs.map → chunk-RIINVEZA.mjs.map} +1 -1
- package/dist/esm/chunk-RJ7F4JDV.mjs +2 -0
- package/dist/esm/chunk-RJ7F4JDV.mjs.map +1 -0
- package/dist/esm/chunk-RXHER6EA.mjs +2 -0
- package/dist/esm/{chunk-C7T6GW5P.mjs.map → chunk-RXHER6EA.mjs.map} +1 -1
- package/dist/esm/chunk-RXMLONF7.mjs +2 -0
- package/dist/esm/{chunk-BU43ZFDJ.mjs.map → chunk-RXMLONF7.mjs.map} +1 -1
- package/dist/esm/chunk-TBY3VMMV.mjs +2 -0
- package/dist/esm/chunk-TBY3VMMV.mjs.map +1 -0
- package/dist/esm/chunk-TKXEVD7A.mjs +2 -0
- package/dist/esm/{chunk-QSYWLSSN.mjs.map → chunk-TKXEVD7A.mjs.map} +1 -1
- package/dist/esm/chunk-TNWABITK.mjs +2 -0
- package/dist/esm/{chunk-FRLS4GRM.mjs.map → chunk-TNWABITK.mjs.map} +1 -1
- package/dist/esm/chunk-TTY5GFMN.mjs +2 -0
- package/dist/esm/{chunk-PKUXOBIV.mjs.map → chunk-TTY5GFMN.mjs.map} +1 -1
- package/dist/esm/chunk-VHNX2NUR.mjs +473 -0
- package/dist/esm/chunk-VHNX2NUR.mjs.map +1 -0
- package/dist/esm/chunk-VHY6ZATX.mjs +2 -0
- package/dist/esm/{chunk-BDM6FBUO.mjs.map → chunk-VHY6ZATX.mjs.map} +1 -1
- package/dist/esm/chunk-W4BSN6SK.mjs +2 -0
- package/dist/esm/{chunk-ZWCTF3NQ.mjs.map → chunk-W4BSN6SK.mjs.map} +1 -1
- package/dist/esm/chunk-WB26DWOY.mjs +7 -0
- package/dist/esm/chunk-WB26DWOY.mjs.map +1 -0
- package/dist/esm/chunk-X5YB74NB.mjs +2 -0
- package/dist/esm/{chunk-I25AX6PQ.mjs.map → chunk-X5YB74NB.mjs.map} +1 -1
- package/dist/esm/chunk-XLDMPCLF.mjs +2 -0
- package/dist/esm/{chunk-WLTQHGIJ.mjs.map → chunk-XLDMPCLF.mjs.map} +1 -1
- package/dist/esm/chunk-YOZBVVKL.mjs +2 -0
- package/dist/esm/{chunk-BEYIOC2H.mjs.map → chunk-YOZBVVKL.mjs.map} +1 -1
- package/dist/esm/chunk-ZD2TY5N3.mjs +2 -0
- package/dist/esm/{chunk-NUT2VOX2.mjs.map → chunk-ZD2TY5N3.mjs.map} +1 -1
- package/dist/esm/chunk-ZELTLAUN.mjs +2 -0
- package/dist/esm/chunk-ZELTLAUN.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -20
- package/dist/esm/cli/localNode.mjs +1 -16
- package/dist/esm/cli/move.mjs +1 -7
- package/dist/esm/client/core.mjs +1 -34
- package/dist/esm/client/get.mjs +1 -41
- package/dist/esm/client/index.mjs +1 -69
- package/dist/esm/client/post.mjs +1 -43
- package/dist/esm/core/account/index.mjs +1 -21
- package/dist/esm/core/account/utils/address.mjs +1 -19
- package/dist/esm/core/account/utils/index.mjs +1 -20
- package/dist/esm/core/accountAddress.mjs +1 -16
- package/dist/esm/core/authenticationKey.d.mts +3 -1
- package/dist/esm/core/authenticationKey.mjs +1 -15
- package/dist/esm/core/common.mjs +1 -7
- package/dist/esm/core/crypto/abstraction.d.mts +4 -1
- package/dist/esm/core/crypto/abstraction.mjs +1 -26
- package/dist/esm/core/crypto/ed25519.d.mts +18 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -33
- package/dist/esm/core/crypto/ephemeral.d.mts +8 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -30
- package/dist/esm/core/crypto/federatedKeyless.d.mts +11 -87
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -44
- package/dist/esm/core/crypto/hdKey.mjs +1 -25
- package/dist/esm/core/crypto/index.d.mts +8 -6
- package/dist/esm/core/crypto/index.mjs +1 -173
- package/dist/esm/core/crypto/keyless.d.mts +13 -586
- package/dist/esm/core/crypto/keyless.mjs +1 -83
- package/dist/esm/core/crypto/multiEd25519.d.mts +14 -4
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -50
- package/dist/esm/core/crypto/multiKey.d.mts +39 -3
- package/dist/esm/core/crypto/multiKey.mjs +1 -51
- package/dist/esm/core/crypto/poseidon.mjs +1 -15
- package/dist/esm/core/crypto/privateKey.d.mts +3 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -12
- package/dist/esm/core/crypto/proof.mjs +1 -20
- package/dist/esm/core/crypto/publicKey.d.mts +3 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -22
- package/dist/esm/core/crypto/secp256k1.d.mts +26 -2
- package/dist/esm/core/crypto/secp256k1.mjs +1 -29
- package/dist/esm/core/crypto/signature.mjs +1 -20
- package/dist/esm/core/crypto/singleKey.d.mts +27 -5
- package/dist/esm/core/crypto/singleKey.mjs +1 -48
- package/dist/esm/core/crypto/utils.mjs +1 -9
- package/dist/esm/core/hex.mjs +1 -12
- package/dist/esm/core/index.d.mts +8 -6
- package/dist/esm/core/index.mjs +1 -202
- package/dist/esm/errors/index.d.mts +10 -2
- package/dist/esm/errors/index.mjs +1 -25
- package/dist/esm/federatedKeyless-Qe_j8OqV.d.mts +875 -0
- package/dist/esm/index.d.mts +11 -10
- package/dist/esm/index.mjs +1 -798
- package/dist/esm/internal/abstraction.d.mts +9 -9
- package/dist/esm/internal/abstraction.mjs +1 -103
- package/dist/esm/internal/account.d.mts +7 -24
- package/dist/esm/internal/account.mjs +1 -142
- package/dist/esm/internal/ans.d.mts +13 -13
- package/dist/esm/internal/ans.mjs +1 -138
- package/dist/esm/internal/coin.d.mts +7 -7
- package/dist/esm/internal/coin.mjs +1 -99
- package/dist/esm/internal/digitalAsset.d.mts +2 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -145
- package/dist/esm/internal/event.mjs +1 -62
- package/dist/esm/internal/experimental.d.mts +7 -7
- package/dist/esm/internal/experimental.mjs +1 -84
- package/dist/esm/internal/faucet.mjs +1 -57
- package/dist/esm/internal/fungibleAsset.d.mts +2 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -105
- package/dist/esm/internal/general.mjs +1 -43
- package/dist/esm/internal/keyless.d.mts +10 -20
- package/dist/esm/internal/keyless.mjs +1 -107
- package/dist/esm/internal/object.mjs +1 -58
- package/dist/esm/internal/staking.mjs +1 -60
- package/dist/esm/internal/table.mjs +1 -38
- package/dist/esm/internal/transaction.mjs +1 -57
- package/dist/esm/internal/transactionSubmission.d.mts +6 -6
- package/dist/esm/internal/transactionSubmission.mjs +1 -118
- package/dist/esm/internal/utils/index.mjs +1 -38
- package/dist/esm/internal/utils/utils.mjs +1 -37
- package/dist/esm/internal/view.d.mts +7 -7
- package/dist/esm/internal/view.mjs +1 -86
- package/dist/esm/{publicKey-BMtGNNLg.d.mts → publicKey-pDHBAZlT.d.mts} +27 -1
- package/dist/esm/transactions/authenticator/account.d.mts +3 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -67
- package/dist/esm/transactions/authenticator/index.d.mts +3 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -82
- package/dist/esm/transactions/authenticator/transaction.d.mts +4 -2
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -66
- package/dist/esm/transactions/index.d.mts +4 -4
- package/dist/esm/transactions/index.mjs +1 -296
- package/dist/esm/transactions/instances/chainId.mjs +1 -11
- package/dist/esm/transactions/instances/identifier.mjs +1 -11
- package/dist/esm/transactions/instances/index.d.mts +4 -2
- package/dist/esm/transactions/instances/index.mjs +1 -114
- package/dist/esm/transactions/instances/moduleId.mjs +1 -55
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -60
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -65
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +3 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -21
- package/dist/esm/transactions/instances/signedTransaction.d.mts +3 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -63
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -60
- package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -73
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -101
- package/dist/esm/transactions/management/asyncQueue.mjs +1 -9
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -111
- package/dist/esm/transactions/management/transactionWorker.d.mts +3 -3
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -107
- package/dist/esm/transactions/scriptComposer/index.d.mts +7 -7
- package/dist/esm/transactions/scriptComposer/index.mjs +1 -80
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +8 -8
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -92
- package/dist/esm/transactions/transactionBuilder/index.d.mts +8 -8
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -166
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +34 -23
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -74
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +7 -7
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -75
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +8 -8
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -97
- package/dist/esm/transactions/typeTag/index.d.mts +16 -0
- package/dist/esm/transactions/typeTag/index.mjs +1 -91
- package/dist/esm/transactions/typeTag/parser.mjs +1 -60
- package/dist/esm/transactions/types.d.mts +5 -5
- package/dist/esm/transactions/types.mjs +1 -1
- package/dist/esm/types/abstraction.mjs +1 -7
- package/dist/esm/types/generated/operations.d.mts +10 -63
- package/dist/esm/types/generated/queries.d.mts +2 -10
- package/dist/esm/types/generated/queries.mjs +1 -69
- package/dist/esm/types/generated/types.d.mts +1054 -824
- package/dist/esm/types/generated/types.mjs +1 -774
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +2 -2
- package/dist/esm/types/index.mjs +1 -82
- package/dist/esm/types/indexer.d.mts +2 -14
- package/dist/esm/types/indexer.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +1 -1
- package/dist/esm/types/types.d.mts +3 -58
- package/dist/esm/types/types.mjs +1 -77
- package/dist/esm/utils/apiEndpoints.mjs +1 -21
- package/dist/esm/utils/const.d.mts +1 -1
- package/dist/esm/utils/const.mjs +1 -25
- package/dist/esm/utils/helpers.d.mts +2 -1
- package/dist/esm/utils/helpers.mjs +1 -37
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -88
- package/dist/esm/utils/memoize.mjs +1 -9
- package/dist/esm/utils/normalizeBundle.mjs +1 -20
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -7
- package/package.json +3 -3
- package/src/account/AbstractKeylessAccount.ts +33 -49
- package/src/account/MultiKeyAccount.ts +23 -16
- package/src/api/account.ts +2 -56
- package/src/cli/localNode.ts +6 -15
- package/src/core/crypto/abstraction.ts +6 -1
- package/src/core/crypto/ed25519.ts +19 -1
- package/src/core/crypto/ephemeral.ts +9 -0
- package/src/core/crypto/federatedKeyless.ts +40 -4
- package/src/core/crypto/index.ts +4 -3
- package/src/core/crypto/keyless.ts +577 -17
- package/src/core/crypto/multiEd25519.ts +11 -3
- package/src/core/crypto/multiKey.ts +74 -4
- package/src/core/crypto/publicKey.ts +28 -0
- package/src/core/crypto/secp256k1.ts +25 -2
- package/src/core/crypto/singleKey.ts +32 -7
- package/src/errors/index.ts +50 -0
- package/src/internal/account.ts +2 -395
- package/src/internal/keyless.ts +9 -17
- package/src/transactions/scriptComposer/index.ts +19 -6
- package/src/transactions/transactionBuilder/remoteAbi.ts +107 -35
- package/src/transactions/typeTag/index.ts +22 -0
- package/src/types/codegen.yaml +1 -1
- package/src/types/generated/operations.ts +8 -69
- package/src/types/generated/queries.ts +0 -111
- package/src/types/generated/types.ts +1159 -951
- package/src/types/indexer.ts +0 -16
- package/src/types/keyless.ts +1 -1
- package/src/types/types.ts +3 -62
- package/src/utils/const.ts +1 -1
- package/src/utils/helpers.ts +11 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-JMOQXLED.js +0 -1305
- package/dist/common/chunk-JMOQXLED.js.map +0 -1
- package/dist/esm/chunk-2FTF6J7F.mjs +0 -97
- package/dist/esm/chunk-2FTF6J7F.mjs.map +0 -1
- package/dist/esm/chunk-2HL7JEFC.mjs +0 -829
- package/dist/esm/chunk-2HL7JEFC.mjs.map +0 -1
- package/dist/esm/chunk-2WBJAKBO.mjs +0 -53
- package/dist/esm/chunk-2WBJAKBO.mjs.map +0 -1
- package/dist/esm/chunk-32UQAST6.mjs +0 -296
- package/dist/esm/chunk-32UQAST6.mjs.map +0 -1
- package/dist/esm/chunk-3DAVHDK4.mjs +0 -195
- package/dist/esm/chunk-3DAVHDK4.mjs.map +0 -1
- package/dist/esm/chunk-3IWV2Q3K.mjs +0 -12
- package/dist/esm/chunk-3TUV6YMI.mjs +0 -305
- package/dist/esm/chunk-3TUV6YMI.mjs.map +0 -1
- package/dist/esm/chunk-4NMDYPUD.mjs +0 -1
- package/dist/esm/chunk-56UCIGTO.mjs +0 -21
- package/dist/esm/chunk-56UCIGTO.mjs.map +0 -1
- package/dist/esm/chunk-5ORUQZAR.mjs +0 -100
- package/dist/esm/chunk-5ORUQZAR.mjs.map +0 -1
- package/dist/esm/chunk-5QHMFYVL.mjs +0 -42
- package/dist/esm/chunk-5QHMFYVL.mjs.map +0 -1
- package/dist/esm/chunk-62LC4PPC.mjs +0 -128
- package/dist/esm/chunk-62LC4PPC.mjs.map +0 -1
- package/dist/esm/chunk-6ASWESA2.mjs +0 -77
- package/dist/esm/chunk-6I37A76G.mjs +0 -29
- package/dist/esm/chunk-6OFCIXWS.mjs +0 -379
- package/dist/esm/chunk-6OFCIXWS.mjs.map +0 -1
- package/dist/esm/chunk-6SNGKTWE.mjs +0 -91
- package/dist/esm/chunk-6SNGKTWE.mjs.map +0 -1
- package/dist/esm/chunk-6T3V5LXK.mjs +0 -119
- package/dist/esm/chunk-7F32C225.mjs +0 -219
- package/dist/esm/chunk-7F32C225.mjs.map +0 -1
- package/dist/esm/chunk-7WW735TU.mjs +0 -276
- package/dist/esm/chunk-7WW735TU.mjs.map +0 -1
- package/dist/esm/chunk-A33OBGVN.mjs +0 -1014
- package/dist/esm/chunk-A33OBGVN.mjs.map +0 -1
- package/dist/esm/chunk-A7LYGPFL.mjs +0 -208
- package/dist/esm/chunk-A7LYGPFL.mjs.map +0 -1
- package/dist/esm/chunk-AGKEC2IM.mjs +0 -250
- package/dist/esm/chunk-AGKEC2IM.mjs.map +0 -1
- package/dist/esm/chunk-AKXCFBYF.mjs +0 -49
- package/dist/esm/chunk-AKXCFBYF.mjs.map +0 -1
- package/dist/esm/chunk-APM7OSLS.mjs +0 -122
- package/dist/esm/chunk-BDM6FBUO.mjs +0 -198
- package/dist/esm/chunk-BEYIOC2H.mjs +0 -34
- package/dist/esm/chunk-BMM72IIP.mjs +0 -250
- package/dist/esm/chunk-BMM72IIP.mjs.map +0 -1
- package/dist/esm/chunk-BSCOVLWS.mjs +0 -1
- package/dist/esm/chunk-BSCOVLWS.mjs.map +0 -1
- package/dist/esm/chunk-BU43ZFDJ.mjs +0 -281
- package/dist/esm/chunk-C7EEG6SW.mjs +0 -689
- package/dist/esm/chunk-C7EEG6SW.mjs.map +0 -1
- package/dist/esm/chunk-C7T6GW5P.mjs +0 -376
- package/dist/esm/chunk-CXLXUSCG.mjs +0 -417
- package/dist/esm/chunk-D4MW64RH.mjs +0 -188
- package/dist/esm/chunk-D4MW64RH.mjs.map +0 -1
- package/dist/esm/chunk-D6RXVCE3.mjs +0 -86
- package/dist/esm/chunk-D6RXVCE3.mjs.map +0 -1
- package/dist/esm/chunk-DDZGHA66.mjs +0 -495
- package/dist/esm/chunk-DDZGHA66.mjs.map +0 -1
- package/dist/esm/chunk-DGDZNHUJ.mjs +0 -72
- package/dist/esm/chunk-DGDZNHUJ.mjs.map +0 -1
- package/dist/esm/chunk-DMFRIING.mjs +0 -286
- package/dist/esm/chunk-DMFRIING.mjs.map +0 -1
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-E7FWVXGX.mjs.map +0 -1
- package/dist/esm/chunk-EBFKT35C.mjs +0 -66
- package/dist/esm/chunk-EBFKT35C.mjs.map +0 -1
- package/dist/esm/chunk-ECTX2FGD.mjs +0 -355
- package/dist/esm/chunk-ECTX2FGD.mjs.map +0 -1
- package/dist/esm/chunk-EPTUAWRA.mjs +0 -895
- package/dist/esm/chunk-EPTUAWRA.mjs.map +0 -1
- package/dist/esm/chunk-F4VI7BNX.mjs +0 -58
- package/dist/esm/chunk-F4VI7BNX.mjs.map +0 -1
- package/dist/esm/chunk-F7W7KS5C.mjs +0 -52
- package/dist/esm/chunk-FDMI4BUL.mjs +0 -611
- package/dist/esm/chunk-FDMI4BUL.mjs.map +0 -1
- package/dist/esm/chunk-FMNMYKYH.mjs +0 -71
- package/dist/esm/chunk-FMNMYKYH.mjs.map +0 -1
- package/dist/esm/chunk-FRLS4GRM.mjs +0 -62
- package/dist/esm/chunk-G34CJDST.mjs +0 -139
- package/dist/esm/chunk-G4NBRMZ2.mjs +0 -7
- package/dist/esm/chunk-G6R77JKO.mjs +0 -121
- package/dist/esm/chunk-G6R77JKO.mjs.map +0 -1
- package/dist/esm/chunk-G7BB6K4B.mjs +0 -167
- package/dist/esm/chunk-G7BB6K4B.mjs.map +0 -1
- package/dist/esm/chunk-GCQK2S5Q.mjs +0 -43
- package/dist/esm/chunk-GCQK2S5Q.mjs.map +0 -1
- package/dist/esm/chunk-GFPEB22G.mjs +0 -1
- package/dist/esm/chunk-GFPEB22G.mjs.map +0 -1
- package/dist/esm/chunk-GUA5YTIK.mjs +0 -362
- package/dist/esm/chunk-HBXBODME.mjs +0 -84
- package/dist/esm/chunk-HBXBODME.mjs.map +0 -1
- package/dist/esm/chunk-HEZ2ZYZA.mjs +0 -1
- package/dist/esm/chunk-HEZ2ZYZA.mjs.map +0 -1
- package/dist/esm/chunk-HKQY5GXT.mjs +0 -231
- package/dist/esm/chunk-HKQY5GXT.mjs.map +0 -1
- package/dist/esm/chunk-HL337SEM.mjs +0 -219
- package/dist/esm/chunk-HL337SEM.mjs.map +0 -1
- package/dist/esm/chunk-HQDHSKVS.mjs +0 -74
- package/dist/esm/chunk-HQDHSKVS.mjs.map +0 -1
- package/dist/esm/chunk-I25AX6PQ.mjs +0 -7
- package/dist/esm/chunk-I5G7XFGT.mjs +0 -86
- package/dist/esm/chunk-I5G7XFGT.mjs.map +0 -1
- package/dist/esm/chunk-IHYTP2EW.mjs +0 -1
- package/dist/esm/chunk-IHYTP2EW.mjs.map +0 -1
- package/dist/esm/chunk-IJ7XCPP3.mjs +0 -480
- package/dist/esm/chunk-IJ7XCPP3.mjs.map +0 -1
- package/dist/esm/chunk-ILTEOGFF.mjs +0 -407
- package/dist/esm/chunk-ILTEOGFF.mjs.map +0 -1
- package/dist/esm/chunk-IP7GATDH.mjs +0 -322
- package/dist/esm/chunk-IP7GATDH.mjs.map +0 -1
- package/dist/esm/chunk-IPUAVRGL.mjs +0 -248
- package/dist/esm/chunk-IPUAVRGL.mjs.map +0 -1
- package/dist/esm/chunk-IQVHXOD3.mjs +0 -192
- package/dist/esm/chunk-IQVHXOD3.mjs.map +0 -1
- package/dist/esm/chunk-JAZJE3OR.mjs +0 -45
- package/dist/esm/chunk-JAZJE3OR.mjs.map +0 -1
- package/dist/esm/chunk-JEVGHYEP.mjs +0 -162
- package/dist/esm/chunk-JEVGHYEP.mjs.map +0 -1
- package/dist/esm/chunk-JFMFZ2IL.mjs +0 -147
- package/dist/esm/chunk-JFMFZ2IL.mjs.map +0 -1
- package/dist/esm/chunk-JQIRRM7G.mjs +0 -195
- package/dist/esm/chunk-JQIRRM7G.mjs.map +0 -1
- package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
- package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
- package/dist/esm/chunk-K5OCDM3W.mjs +0 -207
- package/dist/esm/chunk-K5OCDM3W.mjs.map +0 -1
- package/dist/esm/chunk-KLUO6XPE.mjs +0 -33
- package/dist/esm/chunk-KSK3XIGF.mjs +0 -502
- package/dist/esm/chunk-KW64NP2F.mjs +0 -71
- package/dist/esm/chunk-KW64NP2F.mjs.map +0 -1
- package/dist/esm/chunk-LJRNGZMY.mjs +0 -10
- package/dist/esm/chunk-MFFBZ43D.mjs +0 -45
- package/dist/esm/chunk-MWXBQ6HR.mjs +0 -15
- package/dist/esm/chunk-MYEYZ7PF.mjs +0 -46
- package/dist/esm/chunk-NUT2VOX2.mjs +0 -317
- package/dist/esm/chunk-OFUNBTK4.mjs +0 -169
- package/dist/esm/chunk-ORCQEMJL.mjs +0 -51
- package/dist/esm/chunk-ORCQEMJL.mjs.map +0 -1
- package/dist/esm/chunk-PGFEUN7K.mjs +0 -129
- package/dist/esm/chunk-PGFEUN7K.mjs.map +0 -1
- package/dist/esm/chunk-PKUXOBIV.mjs +0 -138
- package/dist/esm/chunk-PT2QHUB6.mjs +0 -96
- package/dist/esm/chunk-QJ6CGH7N.mjs +0 -71
- package/dist/esm/chunk-QPT4BSAB.mjs +0 -20
- package/dist/esm/chunk-QSYWLSSN.mjs +0 -216
- package/dist/esm/chunk-QYNYDQE3.mjs +0 -288
- package/dist/esm/chunk-QYNYDQE3.mjs.map +0 -1
- package/dist/esm/chunk-R45SPK6Q.mjs +0 -61
- package/dist/esm/chunk-R45SPK6Q.mjs.map +0 -1
- package/dist/esm/chunk-R4JTQQBX.mjs +0 -37
- package/dist/esm/chunk-R4JTQQBX.mjs.map +0 -1
- package/dist/esm/chunk-RCXGTN36.mjs +0 -58
- package/dist/esm/chunk-RCXGTN36.mjs.map +0 -1
- package/dist/esm/chunk-RMMOF53Q.mjs +0 -1
- package/dist/esm/chunk-RMMOF53Q.mjs.map +0 -1
- package/dist/esm/chunk-RQS33JAS.mjs +0 -77
- package/dist/esm/chunk-RQS33JAS.mjs.map +0 -1
- package/dist/esm/chunk-SAWN7RJP.mjs +0 -15
- package/dist/esm/chunk-SAWN7RJP.mjs.map +0 -1
- package/dist/esm/chunk-SBB4YEPT.mjs +0 -17
- package/dist/esm/chunk-SFLQPB72.mjs +0 -63
- package/dist/esm/chunk-SPI2HO3E.mjs +0 -177
- package/dist/esm/chunk-SPI2HO3E.mjs.map +0 -1
- package/dist/esm/chunk-SPVJXZL5.mjs +0 -865
- package/dist/esm/chunk-SPVJXZL5.mjs.map +0 -1
- package/dist/esm/chunk-SQNS4SFV.mjs +0 -232
- package/dist/esm/chunk-SRXIHVZE.mjs +0 -50
- package/dist/esm/chunk-SRXIHVZE.mjs.map +0 -1
- package/dist/esm/chunk-T4BFWV46.mjs +0 -63
- package/dist/esm/chunk-T4BFWV46.mjs.map +0 -1
- package/dist/esm/chunk-T573PCIR.mjs +0 -700
- package/dist/esm/chunk-T573PCIR.mjs.map +0 -1
- package/dist/esm/chunk-TDLL7QX5.mjs +0 -239
- package/dist/esm/chunk-TDLL7QX5.mjs.map +0 -1
- package/dist/esm/chunk-TFW6N66T.mjs +0 -415
- package/dist/esm/chunk-TFW6N66T.mjs.map +0 -1
- package/dist/esm/chunk-THWEBWUC.mjs +0 -20
- package/dist/esm/chunk-TJDF4CXI.mjs +0 -513
- package/dist/esm/chunk-TJDF4CXI.mjs.map +0 -1
- package/dist/esm/chunk-TL4Z4KHK.mjs +0 -70
- package/dist/esm/chunk-TL4Z4KHK.mjs.map +0 -1
- package/dist/esm/chunk-UGFIWCJQ.mjs +0 -130
- package/dist/esm/chunk-UGFIWCJQ.mjs.map +0 -1
- package/dist/esm/chunk-UGKZQUGE.mjs +0 -367
- package/dist/esm/chunk-UGKZQUGE.mjs.map +0 -1
- package/dist/esm/chunk-UIRAXHDH.mjs +0 -1
- package/dist/esm/chunk-UIRAXHDH.mjs.map +0 -1
- package/dist/esm/chunk-UK7SPHIE.mjs +0 -420
- package/dist/esm/chunk-UK7SPHIE.mjs.map +0 -1
- package/dist/esm/chunk-UOHCJOXI.mjs +0 -150
- package/dist/esm/chunk-UOHCJOXI.mjs.map +0 -1
- package/dist/esm/chunk-WHSS6I7T.mjs +0 -90
- package/dist/esm/chunk-WHSS6I7T.mjs.map +0 -1
- package/dist/esm/chunk-WLTQHGIJ.mjs +0 -177
- package/dist/esm/chunk-WUM247HF.mjs +0 -125
- package/dist/esm/chunk-WUM247HF.mjs.map +0 -1
- package/dist/esm/chunk-WXQUBQK4.mjs +0 -19
- package/dist/esm/chunk-X4N5BN3S.mjs +0 -40
- package/dist/esm/chunk-X4N5BN3S.mjs.map +0 -1
- package/dist/esm/chunk-XIBOO3WF.mjs +0 -168
- package/dist/esm/chunk-XIBOO3WF.mjs.map +0 -1
- package/dist/esm/chunk-XQFUKBY7.mjs +0 -136
- package/dist/esm/chunk-XX6C2QGI.mjs +0 -160
- package/dist/esm/chunk-XX6C2QGI.mjs.map +0 -1
- package/dist/esm/chunk-Y3ENAKRC.mjs +0 -73
- package/dist/esm/chunk-Y3M32DIB.mjs +0 -79
- package/dist/esm/chunk-Y3M32DIB.mjs.map +0 -1
- package/dist/esm/chunk-YK66QBML.mjs +0 -89
- package/dist/esm/chunk-YT7V6AVJ.mjs +0 -66
- package/dist/esm/chunk-YU65LNIC.mjs +0 -72
- package/dist/esm/chunk-ZRBUAZZD.mjs +0 -36
- package/dist/esm/chunk-ZRBUAZZD.mjs.map +0 -1
- package/dist/esm/chunk-ZWCTF3NQ.mjs +0 -25
- package/src/internal/queries/getAccountAddressForAuthKey.graphql +0 -8
- package/src/internal/queries/getAuthKeysForPublicKey.graphql +0 -9
- package/src/internal/queries/getMultiKeyForAuthKey.graphql +0 -9
- package/src/internal/queries/getSignatures.graphql +0 -13
- /package/dist/esm/{chunk-4NMDYPUD.mjs.map → chunk-KDMSOCZY.mjs.map} +0 -0
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sleep
|
|
3
|
-
} from "./chunk-RQS33JAS.mjs";
|
|
4
|
-
|
|
5
|
-
// src/cli/localNode.ts
|
|
6
|
-
import { spawn } from "child_process";
|
|
7
|
-
import kill from "tree-kill";
|
|
8
|
-
import { platform } from "os";
|
|
9
|
-
var LocalNode = class {
|
|
10
|
-
constructor(args) {
|
|
11
|
-
this.MAXIMUM_WAIT_TIME_SEC = 75;
|
|
12
|
-
this.READINESS_ENDPOINT = "http://127.0.0.1:8070/";
|
|
13
|
-
this.showStdout = true;
|
|
14
|
-
this.process = null;
|
|
15
|
-
this.showStdout = args?.showStdout ?? true;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Kills the current process and all its descendant processes.
|
|
19
|
-
*
|
|
20
|
-
* @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.
|
|
21
|
-
* @throws {Error} If there is an error while attempting to kill the process.
|
|
22
|
-
* @group Implementation
|
|
23
|
-
* @category CLI
|
|
24
|
-
*/
|
|
25
|
-
async stop() {
|
|
26
|
-
await new Promise((resolve, reject) => {
|
|
27
|
-
if (!this.process?.pid) return;
|
|
28
|
-
kill(this.process.pid, (err) => {
|
|
29
|
-
if (err) {
|
|
30
|
-
reject(err);
|
|
31
|
-
} else {
|
|
32
|
-
resolve(true);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Runs a localnet and waits for the process to be up.
|
|
39
|
-
* If the local node process is already running, it returns without starting the process.
|
|
40
|
-
*
|
|
41
|
-
* @returns {Promise<void>} A promise that resolves when the process is up.
|
|
42
|
-
* @group Implementation
|
|
43
|
-
* @category CLI
|
|
44
|
-
*/
|
|
45
|
-
async run() {
|
|
46
|
-
const nodeIsUp = await this.checkIfProcessIsUp();
|
|
47
|
-
if (nodeIsUp) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
this.start();
|
|
51
|
-
await this.waitUntilProcessIsUp();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Starts the localnet by running the Aptos node with the specified command-line arguments.
|
|
55
|
-
*
|
|
56
|
-
* @returns {void}
|
|
57
|
-
*
|
|
58
|
-
* @throws {Error} If there is an issue starting the localnet.
|
|
59
|
-
* @group Implementation
|
|
60
|
-
* @category CLI
|
|
61
|
-
*/
|
|
62
|
-
start() {
|
|
63
|
-
const cliCommand = "npx";
|
|
64
|
-
const cliArgs = ["aptos", "node", "run-localnet", "--force-restart", "--assume-yes", "--with-indexer-api"];
|
|
65
|
-
const currentPlatform = platform();
|
|
66
|
-
let childProcess;
|
|
67
|
-
if (currentPlatform === "win32") {
|
|
68
|
-
childProcess = spawn(cliCommand, cliArgs, { shell: true });
|
|
69
|
-
} else {
|
|
70
|
-
childProcess = spawn(cliCommand, cliArgs);
|
|
71
|
-
}
|
|
72
|
-
this.process = childProcess;
|
|
73
|
-
childProcess.stderr?.on("data", (data) => {
|
|
74
|
-
const str = data.toString();
|
|
75
|
-
console.log(str);
|
|
76
|
-
});
|
|
77
|
-
childProcess.stdout?.on("data", (data) => {
|
|
78
|
-
const str = data.toString();
|
|
79
|
-
if (this.showStdout) {
|
|
80
|
-
console.log(str);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Waits for the localnet process to be operational within a specified maximum wait time.
|
|
86
|
-
* This function continuously checks if the process is up and will throw an error if it fails to start.
|
|
87
|
-
*
|
|
88
|
-
* @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.
|
|
89
|
-
* @group Implementation
|
|
90
|
-
* @category CLI
|
|
91
|
-
*/
|
|
92
|
-
async waitUntilProcessIsUp() {
|
|
93
|
-
let operational = await this.checkIfProcessIsUp();
|
|
94
|
-
const start = Date.now() / 1e3;
|
|
95
|
-
let last = start;
|
|
96
|
-
while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {
|
|
97
|
-
await sleep(1e3);
|
|
98
|
-
operational = await this.checkIfProcessIsUp();
|
|
99
|
-
last = Date.now() / 1e3;
|
|
100
|
-
}
|
|
101
|
-
if (!operational) {
|
|
102
|
-
throw new Error("Process failed to start");
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Checks if the localnet is up by querying the readiness endpoint.
|
|
108
|
-
*
|
|
109
|
-
* @returns Promise<boolean> - A promise that resolves to true if the localnet is up, otherwise false.
|
|
110
|
-
* @group Implementation
|
|
111
|
-
* @category CLI
|
|
112
|
-
*/
|
|
113
|
-
async checkIfProcessIsUp() {
|
|
114
|
-
try {
|
|
115
|
-
const data = await fetch(this.READINESS_ENDPOINT);
|
|
116
|
-
if (data.status === 200) {
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
return false;
|
|
120
|
-
} catch (err) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export {
|
|
127
|
-
LocalNode
|
|
128
|
-
};
|
|
129
|
-
//# sourceMappingURL=chunk-PGFEUN7K.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/localNode.ts"],"sourcesContent":["/* eslint-disable no-console */\n\nimport { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\n/**\n * Represents a local node for running a localnet environment.\n * This class provides methods to start, stop, and check the status of the localnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n * @group Implementation\n * @category CLI\n */\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n showStdout: boolean = true;\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n constructor(args?: { showStdout?: boolean }) {\n this.showStdout = args?.showStdout ?? true;\n }\n\n /**\n * Kills the current process and all its descendant processes.\n *\n * @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.\n * @throws {Error} If there is an error while attempting to kill the process.\n * @group Implementation\n * @category CLI\n */\n async stop(): Promise<void> {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\n\n /**\n * Terminates the process associated with the given process ID.\n *\n * @param pid - The process ID of the process to be terminated.\n * @param callback - A function that is called after the termination attempt is complete.\n * @param callback.err - An error object if the termination failed; otherwise, null.\n * @param callback.resolve - A boolean indicating whether the termination was successful.\n * @group Implementation\n * @category CLI\n */\n kill(this.process.pid, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve(true);\n }\n });\n });\n }\n\n /**\n * Runs a localnet and waits for the process to be up.\n * If the local node process is already running, it returns without starting the process.\n *\n * @returns {Promise<void>} A promise that resolves when the process is up.\n * @group Implementation\n * @category CLI\n */\n async run(): Promise<void> {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the localnet by running the Aptos node with the specified command-line arguments.\n *\n * @returns {void}\n *\n * @throws {Error} If there is an issue starting the localnet.\n * @group Implementation\n * @category CLI\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-localnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output error log\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n if (this.showStdout) {\n console.log(str);\n }\n });\n }\n\n /**\n * Waits for the localnet process to be operational within a specified maximum wait time.\n * This function continuously checks if the process is up and will throw an error if it fails to start.\n *\n * @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.\n * @group Implementation\n * @category CLI\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the localnet is up by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the localnet is up, otherwise false.\n * @group Implementation\n * @category CLI\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n"],"mappings":";;;;;AAEA,SAAyC,aAAa;AACtD,OAAO,UAAU;AACjB,SAAS,gBAAgB;AAWlB,IAAM,YAAN,MAAgB;AAAA,EASrB,YAAY,MAAiC;AAR7C,SAAS,wBAAwB;AAEjC,SAAS,qBAAqB;AAE9B,sBAAsB;AAEtB,mBAAiD;AAG/C,SAAK,aAAa,MAAM,cAAc;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,OAAsB;AAC1B,UAAM,IAAI,QAAQ,CAAC,SAAS,WAAW;AACrC,UAAI,CAAC,KAAK,SAAS,IAAK;AAYxB,WAAK,KAAK,QAAQ,KAAK,CAAC,QAAQ;AAC9B,YAAI,KAAK;AACP,iBAAO,GAAG;AAAA,QACZ,OAAO;AACL,kBAAQ,IAAI;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,MAAqB;AACzB,UAAM,WAAW,MAAM,KAAK,mBAAmB;AAC/C,QAAI,UAAU;AACZ;AAAA,IACF;AACA,SAAK,MAAM;AACX,UAAM,KAAK,qBAAqB;AAAA,EAClC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,QAAc;AACZ,UAAM,aAAa;AACnB,UAAM,UAAU,CAAC,SAAS,QAAQ,gBAAgB,mBAAmB,gBAAgB,oBAAoB;AAEzG,UAAM,kBAAkB,SAAS;AACjC,QAAI;AAEJ,QAAI,oBAAoB,SAAS;AAC/B,qBAAe,MAAM,YAAY,SAAS,EAAE,OAAO,KAAK,CAAC;AAAA,IAC3D,OAAO;AACL,qBAAe,MAAM,YAAY,OAAO;AAAA,IAC1C;AAEA,SAAK,UAAU;AAEf,iBAAa,QAAQ,GAAG,QAAQ,CAAC,SAAc;AAC7C,YAAM,MAAM,KAAK,SAAS;AAE1B,cAAQ,IAAI,GAAG;AAAA,IACjB,CAAC;AAED,iBAAa,QAAQ,GAAG,QAAQ,CAAC,SAAc;AAC7C,YAAM,MAAM,KAAK,SAAS;AAE1B,UAAI,KAAK,YAAY;AACnB,gBAAQ,IAAI,GAAG;AAAA,MACjB;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,uBAAyC;AAC7C,QAAI,cAAc,MAAM,KAAK,mBAAmB;AAChD,UAAM,QAAQ,KAAK,IAAI,IAAI;AAC3B,QAAI,OAAO;AAEX,WAAO,CAAC,eAAe,QAAQ,KAAK,wBAAwB,MAAM;AAEhE,YAAM,MAAM,GAAI;AAEhB,oBAAc,MAAM,KAAK,mBAAmB;AAC5C,aAAO,KAAK,IAAI,IAAI;AAAA,IACtB;AAIA,QAAI,CAAC,aAAa;AAChB,YAAM,IAAI,MAAM,yBAAyB;AAAA,IAC3C;AAEA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,qBAAuC;AAC3C,QAAI;AAEF,YAAM,OAAO,MAAM,MAAM,KAAK,kBAAkB;AAChD,UAAI,KAAK,WAAW,KAAK;AACvB,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,SAAS,KAAU;AACjB,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AccountAddress
|
|
3
|
-
} from "./chunk-CXLXUSCG.mjs";
|
|
4
|
-
import {
|
|
5
|
-
Serializable
|
|
6
|
-
} from "./chunk-C7T6GW5P.mjs";
|
|
7
|
-
import {
|
|
8
|
-
Hex
|
|
9
|
-
} from "./chunk-BDM6FBUO.mjs";
|
|
10
|
-
|
|
11
|
-
// src/core/authenticationKey.ts
|
|
12
|
-
import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
|
|
13
|
-
var _AuthenticationKey = class _AuthenticationKey extends Serializable {
|
|
14
|
-
/**
|
|
15
|
-
* Creates an instance of the AuthenticationKey using the provided hex input.
|
|
16
|
-
* This ensures that the hex input is valid and conforms to the required length for an Authentication Key.
|
|
17
|
-
*
|
|
18
|
-
* @param args - The arguments for constructing the AuthenticationKey.
|
|
19
|
-
* @param args.data - The hex input data to be used for the Authentication Key.
|
|
20
|
-
* @throws {Error} Throws an error if the length of the provided hex input is not equal to the required Authentication Key
|
|
21
|
-
* length.
|
|
22
|
-
* @group Implementation
|
|
23
|
-
* @category Serialization
|
|
24
|
-
*/
|
|
25
|
-
constructor(args) {
|
|
26
|
-
super();
|
|
27
|
-
const { data } = args;
|
|
28
|
-
const hex = Hex.fromHexInput(data);
|
|
29
|
-
if (hex.toUint8Array().length !== _AuthenticationKey.LENGTH) {
|
|
30
|
-
throw new Error(`Authentication Key length should be ${_AuthenticationKey.LENGTH}`);
|
|
31
|
-
}
|
|
32
|
-
this.data = hex;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Serializes the fixed bytes data into a format suitable for transmission or storage.
|
|
36
|
-
*
|
|
37
|
-
* @param serializer - The serializer instance used to perform the serialization.
|
|
38
|
-
* @group Implementation
|
|
39
|
-
* @category Serialization
|
|
40
|
-
*/
|
|
41
|
-
serialize(serializer) {
|
|
42
|
-
serializer.serializeFixedBytes(this.data.toUint8Array());
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Deserialize an AuthenticationKey from the byte buffer in a Deserializer instance.
|
|
46
|
-
* @param deserializer - The deserializer to deserialize the AuthenticationKey from.
|
|
47
|
-
* @returns An instance of AuthenticationKey.
|
|
48
|
-
* @group Implementation
|
|
49
|
-
* @category Serialization
|
|
50
|
-
*/
|
|
51
|
-
static deserialize(deserializer) {
|
|
52
|
-
const bytes = deserializer.deserializeFixedBytes(_AuthenticationKey.LENGTH);
|
|
53
|
-
return new _AuthenticationKey({ data: bytes });
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Convert the internal data representation to a Uint8Array.
|
|
57
|
-
*
|
|
58
|
-
* This function is useful for obtaining a byte representation of the data, which can be utilized for serialization or transmission.
|
|
59
|
-
*
|
|
60
|
-
* @returns Uint8Array representation of the internal data.
|
|
61
|
-
* @group Implementation
|
|
62
|
-
* @category Serialization
|
|
63
|
-
*/
|
|
64
|
-
toUint8Array() {
|
|
65
|
-
return this.data.toUint8Array();
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Generates an AuthenticationKey from the specified scheme and input bytes.
|
|
69
|
-
* This function is essential for creating a valid authentication key based on a given scheme.
|
|
70
|
-
*
|
|
71
|
-
* @param args - The arguments for generating the AuthenticationKey.
|
|
72
|
-
* @param args.scheme - The authentication key scheme to use.
|
|
73
|
-
* @param args.input - The input data in hexadecimal format to derive the key.
|
|
74
|
-
* @returns An instance of AuthenticationKey containing the generated key data.
|
|
75
|
-
* @group Implementation
|
|
76
|
-
* @category Serialization
|
|
77
|
-
*/
|
|
78
|
-
static fromSchemeAndBytes(args) {
|
|
79
|
-
const { scheme, input } = args;
|
|
80
|
-
const inputBytes = Hex.fromHexInput(input).toUint8Array();
|
|
81
|
-
const hashInput = new Uint8Array([...inputBytes, scheme]);
|
|
82
|
-
const hash = sha3Hash.create();
|
|
83
|
-
hash.update(hashInput);
|
|
84
|
-
const hashDigest = hash.digest();
|
|
85
|
-
return new _AuthenticationKey({ data: hashDigest });
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Derives an AuthenticationKey from the provided public key using a specified derivation scheme.
|
|
89
|
-
*
|
|
90
|
-
* @deprecated Use `fromPublicKey` instead.
|
|
91
|
-
* @param args - The arguments for deriving the authentication key.
|
|
92
|
-
* @param args.publicKey - The public key used for the derivation.
|
|
93
|
-
* @param args.scheme - The scheme to use for deriving the authentication key.
|
|
94
|
-
* @group Implementation
|
|
95
|
-
* @category Serialization
|
|
96
|
-
*/
|
|
97
|
-
static fromPublicKeyAndScheme(args) {
|
|
98
|
-
const { publicKey } = args;
|
|
99
|
-
return publicKey.authKey();
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Converts a PublicKey to an AuthenticationKey using the derivation scheme inferred from the provided PublicKey instance.
|
|
103
|
-
*
|
|
104
|
-
* @param args - The arguments for the function.
|
|
105
|
-
* @param args.publicKey - The PublicKey to be converted.
|
|
106
|
-
* @returns AuthenticationKey - The derived AuthenticationKey.
|
|
107
|
-
* @group Implementation
|
|
108
|
-
* @category Serialization
|
|
109
|
-
*/
|
|
110
|
-
static fromPublicKey(args) {
|
|
111
|
-
const { publicKey } = args;
|
|
112
|
-
return publicKey.authKey();
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Derives an account address from an AuthenticationKey by translating the AuthenticationKey bytes directly to an AccountAddress.
|
|
116
|
-
*
|
|
117
|
-
* @returns AccountAddress - The derived account address.
|
|
118
|
-
* @group Implementation
|
|
119
|
-
* @category Serialization
|
|
120
|
-
*/
|
|
121
|
-
derivedAddress() {
|
|
122
|
-
return new AccountAddress(this.data.toUint8Array());
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* An authentication key is always a SHA3-256 hash of data, and is always 32 bytes.
|
|
127
|
-
*
|
|
128
|
-
* The data to hash depends on the underlying public key type and the derivation scheme.
|
|
129
|
-
* @group Implementation
|
|
130
|
-
* @category Serialization
|
|
131
|
-
*/
|
|
132
|
-
_AuthenticationKey.LENGTH = 32;
|
|
133
|
-
var AuthenticationKey = _AuthenticationKey;
|
|
134
|
-
|
|
135
|
-
export {
|
|
136
|
-
AuthenticationKey
|
|
137
|
-
};
|
|
138
|
-
//# sourceMappingURL=chunk-PKUXOBIV.mjs.map
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// src/transactions/management/asyncQueue.ts
|
|
2
|
-
var AsyncQueue = class {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.queue = [];
|
|
5
|
-
// The pendingDequeue is used to handle the resolution of promises when items are enqueued and dequeued.
|
|
6
|
-
this.pendingDequeue = [];
|
|
7
|
-
this.cancelled = false;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Adds an item to the queue. If there are pending dequeued promises, it resolves the oldest promise with the enqueued item
|
|
11
|
-
* immediately; otherwise, it adds the item to the queue.
|
|
12
|
-
*
|
|
13
|
-
* @param item - The item to be added to the queue.
|
|
14
|
-
* @group Implementation
|
|
15
|
-
* @category Transactions
|
|
16
|
-
*/
|
|
17
|
-
enqueue(item) {
|
|
18
|
-
this.cancelled = false;
|
|
19
|
-
if (this.pendingDequeue.length > 0) {
|
|
20
|
-
const promise = this.pendingDequeue.shift();
|
|
21
|
-
promise?.resolve(item);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
this.queue.push(item);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Dequeues the next item from the queue and returns a promise that resolves to it.
|
|
28
|
-
* If the queue is empty, it creates a new promise that will be resolved when an item is enqueued.
|
|
29
|
-
*
|
|
30
|
-
* @returns Promise<T>
|
|
31
|
-
* @group Implementation
|
|
32
|
-
* @category Transactions
|
|
33
|
-
*/
|
|
34
|
-
async dequeue() {
|
|
35
|
-
if (this.queue.length > 0) {
|
|
36
|
-
return Promise.resolve(this.queue.shift());
|
|
37
|
-
}
|
|
38
|
-
return new Promise((resolve, reject) => {
|
|
39
|
-
this.pendingDequeue.push({ resolve, reject });
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Determine whether the queue is empty.
|
|
44
|
-
*
|
|
45
|
-
* @returns boolean - Returns true if the queue has no elements, otherwise false.
|
|
46
|
-
* @group Implementation
|
|
47
|
-
* @category Transactions
|
|
48
|
-
*/
|
|
49
|
-
isEmpty() {
|
|
50
|
-
return this.queue.length === 0;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Cancels all pending promises in the queue and rejects them with an AsyncQueueCancelledError.
|
|
54
|
-
* This ensures that any awaiting code can handle the cancellation appropriately.
|
|
55
|
-
*
|
|
56
|
-
* @returns {void}
|
|
57
|
-
* @group Implementation
|
|
58
|
-
* @category Transactions
|
|
59
|
-
*/
|
|
60
|
-
cancel() {
|
|
61
|
-
this.cancelled = true;
|
|
62
|
-
this.pendingDequeue.forEach(async ({ reject }) => {
|
|
63
|
-
reject(new AsyncQueueCancelledError("Task cancelled"));
|
|
64
|
-
});
|
|
65
|
-
this.pendingDequeue = [];
|
|
66
|
-
this.queue.length = 0;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Determine whether the queue has been cancelled.
|
|
70
|
-
*
|
|
71
|
-
* @returns boolean - Returns true if the queue is cancelled, otherwise false.
|
|
72
|
-
* @group Implementation
|
|
73
|
-
* @category Transactions
|
|
74
|
-
*/
|
|
75
|
-
isCancelled() {
|
|
76
|
-
return this.cancelled;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Retrieve the length of the pending dequeue.
|
|
80
|
-
*
|
|
81
|
-
* @returns number - The number of items currently in the pending dequeue.
|
|
82
|
-
* @group Implementation
|
|
83
|
-
* @category Transactions
|
|
84
|
-
*/
|
|
85
|
-
pendingDequeueLength() {
|
|
86
|
-
return this.pendingDequeue.length;
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
var AsyncQueueCancelledError = class extends Error {
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export {
|
|
93
|
-
AsyncQueue,
|
|
94
|
-
AsyncQueueCancelledError
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=chunk-PT2QHUB6.mjs.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AccountAddress
|
|
3
|
-
} from "./chunk-CXLXUSCG.mjs";
|
|
4
|
-
import {
|
|
5
|
-
MoveString,
|
|
6
|
-
MoveVector
|
|
7
|
-
} from "./chunk-KSK3XIGF.mjs";
|
|
8
|
-
import {
|
|
9
|
-
U64
|
|
10
|
-
} from "./chunk-QSYWLSSN.mjs";
|
|
11
|
-
import {
|
|
12
|
-
Serializable
|
|
13
|
-
} from "./chunk-C7T6GW5P.mjs";
|
|
14
|
-
|
|
15
|
-
// src/transactions/instances/rotationProofChallenge.ts
|
|
16
|
-
var RotationProofChallenge = class extends Serializable {
|
|
17
|
-
/**
|
|
18
|
-
* Initializes a new instance of the class with the specified parameters.
|
|
19
|
-
* This constructor sets up the necessary attributes for managing account keys.
|
|
20
|
-
*
|
|
21
|
-
* @param args - The parameters required to create the instance.
|
|
22
|
-
* @param args.sequenceNumber - The sequence number associated with the transaction.
|
|
23
|
-
* @param args.originator - The account address of the originator.
|
|
24
|
-
* @param args.currentAuthKey - The current authentication key of the account.
|
|
25
|
-
* @param args.newPublicKey - The new public key to be set for the account.
|
|
26
|
-
* @group Implementation
|
|
27
|
-
* @category Transactions
|
|
28
|
-
*/
|
|
29
|
-
constructor(args) {
|
|
30
|
-
super();
|
|
31
|
-
// Resource account address
|
|
32
|
-
this.accountAddress = AccountAddress.ONE;
|
|
33
|
-
// Module name, i.e: 0x1::account
|
|
34
|
-
this.moduleName = new MoveString("account");
|
|
35
|
-
// The rotation proof challenge struct name that live under the module
|
|
36
|
-
this.structName = new MoveString("RotationProofChallenge");
|
|
37
|
-
this.sequenceNumber = new U64(args.sequenceNumber);
|
|
38
|
-
this.originator = args.originator;
|
|
39
|
-
this.currentAuthKey = args.currentAuthKey;
|
|
40
|
-
this.newPublicKey = MoveVector.U8(args.newPublicKey.toUint8Array());
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Serializes the properties of the current instance for transmission or storage.
|
|
44
|
-
* This function helps in converting the instance data into a format suitable for serialization.
|
|
45
|
-
*
|
|
46
|
-
* @param serializer - The serializer used to serialize the instance properties.
|
|
47
|
-
* @param serializer.accountAddress - The account address to serialize.
|
|
48
|
-
* @param serializer.moduleName - The module name to serialize.
|
|
49
|
-
* @param serializer.structName - The struct name to serialize.
|
|
50
|
-
* @param serializer.sequenceNumber - The sequence number to serialize.
|
|
51
|
-
* @param serializer.originator - The originator to serialize.
|
|
52
|
-
* @param serializer.currentAuthKey - The current authentication key to serialize.
|
|
53
|
-
* @param serializer.newPublicKey - The new public key to serialize.
|
|
54
|
-
* @group Implementation
|
|
55
|
-
* @category Transactions
|
|
56
|
-
*/
|
|
57
|
-
serialize(serializer) {
|
|
58
|
-
serializer.serialize(this.accountAddress);
|
|
59
|
-
serializer.serialize(this.moduleName);
|
|
60
|
-
serializer.serialize(this.structName);
|
|
61
|
-
serializer.serialize(this.sequenceNumber);
|
|
62
|
-
serializer.serialize(this.originator);
|
|
63
|
-
serializer.serialize(this.currentAuthKey);
|
|
64
|
-
serializer.serialize(this.newPublicKey);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export {
|
|
69
|
-
RotationProofChallenge
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=chunk-QJ6CGH7N.mjs.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/core/common.ts
|
|
2
|
-
var ParsingError = class extends Error {
|
|
3
|
-
/**
|
|
4
|
-
* Creates an instance of the error with a specified message and invalid reason.
|
|
5
|
-
*
|
|
6
|
-
* @param message The error message that describes the issue.
|
|
7
|
-
* @param invalidReason The reason why the input is considered invalid.
|
|
8
|
-
* @group Implementation
|
|
9
|
-
* @category Serialization
|
|
10
|
-
*/
|
|
11
|
-
constructor(message, invalidReason) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.invalidReason = invalidReason;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
ParsingError
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=chunk-QPT4BSAB.mjs.map
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Serializable,
|
|
3
|
-
ensureBoolean,
|
|
4
|
-
validateNumberInRange
|
|
5
|
-
} from "./chunk-C7T6GW5P.mjs";
|
|
6
|
-
import {
|
|
7
|
-
MAX_U128_BIG_INT,
|
|
8
|
-
MAX_U16_NUMBER,
|
|
9
|
-
MAX_U256_BIG_INT,
|
|
10
|
-
MAX_U32_NUMBER,
|
|
11
|
-
MAX_U64_BIG_INT,
|
|
12
|
-
MAX_U8_NUMBER
|
|
13
|
-
} from "./chunk-SBB4YEPT.mjs";
|
|
14
|
-
|
|
15
|
-
// src/bcs/serializable/movePrimitives.ts
|
|
16
|
-
var Bool = class _Bool extends Serializable {
|
|
17
|
-
/**
|
|
18
|
-
* Constructs a new instance with a specified value.
|
|
19
|
-
* This ensures that the value is validated to be within the acceptable range.
|
|
20
|
-
*
|
|
21
|
-
* @param value - The number to be validated and assigned, which must be between 0 and MAX_U256_BIG_INT.
|
|
22
|
-
* @group Implementation
|
|
23
|
-
* @category BCS
|
|
24
|
-
*/
|
|
25
|
-
constructor(value) {
|
|
26
|
-
super();
|
|
27
|
-
ensureBoolean(value);
|
|
28
|
-
this.value = value;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Serializes the value using the provided serializer.
|
|
32
|
-
* This function is essential for converting the value into a format suitable for transmission or storage.
|
|
33
|
-
*
|
|
34
|
-
* @param serializer - The serializer instance used to perform the serialization.
|
|
35
|
-
* @group Implementation
|
|
36
|
-
* @category BCS
|
|
37
|
-
*/
|
|
38
|
-
serialize(serializer) {
|
|
39
|
-
serializer.serializeBool(this.value);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Serializes the current instance for use in an entry function by converting it to a byte sequence.
|
|
43
|
-
* This allows the instance to be properly formatted for serialization in transactions.
|
|
44
|
-
*
|
|
45
|
-
* @param serializer - The serializer instance used to serialize the byte sequence.
|
|
46
|
-
* @group Implementation
|
|
47
|
-
* @category BCS
|
|
48
|
-
*/
|
|
49
|
-
serializeForEntryFunction(serializer) {
|
|
50
|
-
const bcsBytes = this.bcsToBytes();
|
|
51
|
-
serializer.serializeBytes(bcsBytes);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Serializes the current instance for use in a script function.
|
|
55
|
-
* This allows for the conversion of the instance into a format suitable for transmission or storage.
|
|
56
|
-
*
|
|
57
|
-
* @param serializer - The serializer used to perform the serialization.
|
|
58
|
-
* @group Implementation
|
|
59
|
-
* @category BCS
|
|
60
|
-
*/
|
|
61
|
-
serializeForScriptFunction(serializer) {
|
|
62
|
-
serializer.serializeU32AsUleb128(5 /* Bool */);
|
|
63
|
-
serializer.serialize(this);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Deserializes a U256 value from the provided deserializer.
|
|
67
|
-
*
|
|
68
|
-
* @param deserializer - The deserializer instance used to read the U256 data.
|
|
69
|
-
* @group Implementation
|
|
70
|
-
* @category BCS
|
|
71
|
-
*/
|
|
72
|
-
// eslint-disable-next-line class-methods-use-this
|
|
73
|
-
deserialize(deserializer) {
|
|
74
|
-
return new U256(deserializer.deserializeU256());
|
|
75
|
-
}
|
|
76
|
-
static deserialize(deserializer) {
|
|
77
|
-
return new _Bool(deserializer.deserializeBool());
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
var U8 = class _U8 extends Serializable {
|
|
81
|
-
constructor(value) {
|
|
82
|
-
super();
|
|
83
|
-
validateNumberInRange(value, 0, MAX_U8_NUMBER);
|
|
84
|
-
this.value = value;
|
|
85
|
-
}
|
|
86
|
-
serialize(serializer) {
|
|
87
|
-
serializer.serializeU8(this.value);
|
|
88
|
-
}
|
|
89
|
-
serializeForEntryFunction(serializer) {
|
|
90
|
-
const bcsBytes = this.bcsToBytes();
|
|
91
|
-
serializer.serializeBytes(bcsBytes);
|
|
92
|
-
}
|
|
93
|
-
serializeForScriptFunction(serializer) {
|
|
94
|
-
serializer.serializeU32AsUleb128(0 /* U8 */);
|
|
95
|
-
serializer.serialize(this);
|
|
96
|
-
}
|
|
97
|
-
static deserialize(deserializer) {
|
|
98
|
-
return new _U8(deserializer.deserializeU8());
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
var U16 = class _U16 extends Serializable {
|
|
102
|
-
constructor(value) {
|
|
103
|
-
super();
|
|
104
|
-
validateNumberInRange(value, 0, MAX_U16_NUMBER);
|
|
105
|
-
this.value = value;
|
|
106
|
-
}
|
|
107
|
-
serialize(serializer) {
|
|
108
|
-
serializer.serializeU16(this.value);
|
|
109
|
-
}
|
|
110
|
-
serializeForEntryFunction(serializer) {
|
|
111
|
-
const bcsBytes = this.bcsToBytes();
|
|
112
|
-
serializer.serializeBytes(bcsBytes);
|
|
113
|
-
}
|
|
114
|
-
serializeForScriptFunction(serializer) {
|
|
115
|
-
serializer.serializeU32AsUleb128(6 /* U16 */);
|
|
116
|
-
serializer.serialize(this);
|
|
117
|
-
}
|
|
118
|
-
static deserialize(deserializer) {
|
|
119
|
-
return new _U16(deserializer.deserializeU16());
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
var U32 = class _U32 extends Serializable {
|
|
123
|
-
constructor(value) {
|
|
124
|
-
super();
|
|
125
|
-
validateNumberInRange(value, 0, MAX_U32_NUMBER);
|
|
126
|
-
this.value = value;
|
|
127
|
-
}
|
|
128
|
-
serialize(serializer) {
|
|
129
|
-
serializer.serializeU32(this.value);
|
|
130
|
-
}
|
|
131
|
-
serializeForEntryFunction(serializer) {
|
|
132
|
-
const bcsBytes = this.bcsToBytes();
|
|
133
|
-
serializer.serializeBytes(bcsBytes);
|
|
134
|
-
}
|
|
135
|
-
serializeForScriptFunction(serializer) {
|
|
136
|
-
serializer.serializeU32AsUleb128(7 /* U32 */);
|
|
137
|
-
serializer.serialize(this);
|
|
138
|
-
}
|
|
139
|
-
static deserialize(deserializer) {
|
|
140
|
-
return new _U32(deserializer.deserializeU32());
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
var U64 = class _U64 extends Serializable {
|
|
144
|
-
constructor(value) {
|
|
145
|
-
super();
|
|
146
|
-
validateNumberInRange(value, BigInt(0), MAX_U64_BIG_INT);
|
|
147
|
-
this.value = BigInt(value);
|
|
148
|
-
}
|
|
149
|
-
serialize(serializer) {
|
|
150
|
-
serializer.serializeU64(this.value);
|
|
151
|
-
}
|
|
152
|
-
serializeForEntryFunction(serializer) {
|
|
153
|
-
const bcsBytes = this.bcsToBytes();
|
|
154
|
-
serializer.serializeBytes(bcsBytes);
|
|
155
|
-
}
|
|
156
|
-
serializeForScriptFunction(serializer) {
|
|
157
|
-
serializer.serializeU32AsUleb128(1 /* U64 */);
|
|
158
|
-
serializer.serialize(this);
|
|
159
|
-
}
|
|
160
|
-
static deserialize(deserializer) {
|
|
161
|
-
return new _U64(deserializer.deserializeU64());
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
var U128 = class _U128 extends Serializable {
|
|
165
|
-
constructor(value) {
|
|
166
|
-
super();
|
|
167
|
-
validateNumberInRange(value, BigInt(0), MAX_U128_BIG_INT);
|
|
168
|
-
this.value = BigInt(value);
|
|
169
|
-
}
|
|
170
|
-
serialize(serializer) {
|
|
171
|
-
serializer.serializeU128(this.value);
|
|
172
|
-
}
|
|
173
|
-
serializeForEntryFunction(serializer) {
|
|
174
|
-
const bcsBytes = this.bcsToBytes();
|
|
175
|
-
serializer.serializeBytes(bcsBytes);
|
|
176
|
-
}
|
|
177
|
-
serializeForScriptFunction(serializer) {
|
|
178
|
-
serializer.serializeU32AsUleb128(2 /* U128 */);
|
|
179
|
-
serializer.serialize(this);
|
|
180
|
-
}
|
|
181
|
-
static deserialize(deserializer) {
|
|
182
|
-
return new _U128(deserializer.deserializeU128());
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
var U256 = class _U256 extends Serializable {
|
|
186
|
-
constructor(value) {
|
|
187
|
-
super();
|
|
188
|
-
validateNumberInRange(value, BigInt(0), MAX_U256_BIG_INT);
|
|
189
|
-
this.value = BigInt(value);
|
|
190
|
-
}
|
|
191
|
-
serialize(serializer) {
|
|
192
|
-
serializer.serializeU256(this.value);
|
|
193
|
-
}
|
|
194
|
-
serializeForEntryFunction(serializer) {
|
|
195
|
-
const bcsBytes = this.bcsToBytes();
|
|
196
|
-
serializer.serializeBytes(bcsBytes);
|
|
197
|
-
}
|
|
198
|
-
serializeForScriptFunction(serializer) {
|
|
199
|
-
serializer.serializeU32AsUleb128(8 /* U256 */);
|
|
200
|
-
serializer.serialize(this);
|
|
201
|
-
}
|
|
202
|
-
static deserialize(deserializer) {
|
|
203
|
-
return new _U256(deserializer.deserializeU256());
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
export {
|
|
208
|
-
Bool,
|
|
209
|
-
U8,
|
|
210
|
-
U16,
|
|
211
|
-
U32,
|
|
212
|
-
U64,
|
|
213
|
-
U128,
|
|
214
|
-
U256
|
|
215
|
-
};
|
|
216
|
-
//# sourceMappingURL=chunk-QSYWLSSN.mjs.map
|