@aptos-labs/ts-sdk 1.35.0-zeta.0 → 1.35.0-zeta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/{accountAddress-D3UA_cOZ.d.ts → accountAddress-Ce4Cv60D.d.ts} +36 -2
- package/dist/common/{chunk-CSUBLTFA.js → chunk-JMOQXLED.js} +10 -2
- package/dist/common/chunk-JMOQXLED.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +2 -2
- package/dist/common/index.d.ts +33 -19
- package/dist/common/index.js +1325 -1289
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +14 -14
- package/dist/esm/account/AbstractedAccount.mjs +17 -17
- package/dist/esm/account/Account.mjs +16 -16
- package/dist/esm/account/AccountUtils.mjs +21 -21
- package/dist/esm/account/Ed25519Account.mjs +14 -14
- package/dist/esm/account/EphemeralKeyPair.mjs +5 -5
- package/dist/esm/account/FederatedKeylessAccount.mjs +15 -15
- package/dist/esm/account/KeylessAccount.mjs +15 -15
- package/dist/esm/account/MultiEd25519Account.mjs +14 -14
- package/dist/esm/account/MultiKeyAccount.d.mts +1 -0
- package/dist/esm/account/MultiKeyAccount.mjs +17 -17
- package/dist/esm/account/SingleKeyAccount.mjs +14 -14
- package/dist/esm/account/index.mjs +24 -24
- package/dist/esm/account/utils.mjs +6 -6
- package/dist/esm/api/account/abstraction.mjs +36 -36
- package/dist/esm/api/account.mjs +40 -38
- package/dist/esm/api/ans.mjs +36 -36
- package/dist/esm/api/aptos.d.mts +0 -1
- package/dist/esm/api/aptos.mjs +71 -68
- package/dist/esm/api/coin.mjs +35 -34
- package/dist/esm/api/digitalAsset.mjs +36 -36
- package/dist/esm/api/event.mjs +10 -10
- package/dist/esm/api/experimental.mjs +23 -37
- package/dist/esm/api/faucet.mjs +9 -9
- package/dist/esm/api/fungibleAsset.mjs +36 -36
- package/dist/esm/api/general.d.mts +2 -2
- package/dist/esm/api/general.mjs +23 -37
- package/dist/esm/api/index.d.mts +0 -1
- package/dist/esm/api/index.mjs +71 -68
- package/dist/esm/api/keyless.mjs +37 -35
- package/dist/esm/api/object.mjs +10 -10
- package/dist/esm/api/staking.mjs +10 -10
- package/dist/esm/api/table.mjs +10 -10
- package/dist/esm/api/transaction.d.mts +30 -18
- package/dist/esm/api/transaction.mjs +43 -41
- package/dist/esm/api/transactionSubmission/build.mjs +34 -34
- package/dist/esm/api/transactionSubmission/management.mjs +38 -36
- package/dist/esm/api/transactionSubmission/sign.mjs +33 -33
- package/dist/esm/api/transactionSubmission/simulate.mjs +34 -34
- package/dist/esm/api/transactionSubmission/submit.mjs +34 -34
- package/dist/esm/api/utils.mjs +8 -8
- package/dist/esm/bcs/index.mjs +7 -7
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-XGUYC57L.mjs → chunk-2FTF6J7F.mjs} +3 -3
- package/dist/esm/{chunk-LHQJNJUB.mjs → chunk-2HL7JEFC.mjs} +9 -9
- package/dist/esm/{chunk-EFJAJFI3.mjs → chunk-2WBJAKBO.mjs} +2 -2
- package/dist/esm/{chunk-J7WQ42OC.mjs → chunk-3DAVHDK4.mjs} +2 -2
- package/dist/esm/{chunk-QN5BQMWP.mjs → chunk-56UCIGTO.mjs} +2 -2
- package/dist/esm/{chunk-I6QE3PKO.mjs → chunk-5ORUQZAR.mjs} +2 -2
- package/dist/esm/{chunk-P64LPFEC.mjs → chunk-62LC4PPC.mjs} +2 -2
- package/dist/esm/{chunk-ZWD4BJVD.mjs → chunk-6OFCIXWS.mjs} +3 -3
- package/dist/esm/chunk-6OFCIXWS.mjs.map +1 -0
- package/dist/esm/{chunk-LL4RQKIB.mjs → chunk-6T3V5LXK.mjs} +1 -2
- package/dist/esm/{chunk-LL4RQKIB.mjs.map → chunk-6T3V5LXK.mjs.map} +1 -1
- package/dist/esm/{chunk-UXAUOSSB.mjs → chunk-7F32C225.mjs} +6 -6
- package/dist/esm/{chunk-ESZLRZTK.mjs → chunk-7WW735TU.mjs} +3 -3
- package/dist/esm/{chunk-BQ5JTYXK.mjs → chunk-A33OBGVN.mjs} +3 -3
- package/dist/esm/{chunk-LFMXR5C2.mjs → chunk-A7LYGPFL.mjs} +3 -3
- package/dist/esm/{chunk-SDIZSFCQ.mjs → chunk-BU43ZFDJ.mjs} +2 -2
- package/dist/esm/{chunk-YIHVPGHN.mjs → chunk-C7EEG6SW.mjs} +4 -4
- package/dist/esm/{chunk-XGB3QLVI.mjs → chunk-D6RXVCE3.mjs} +3 -3
- package/dist/esm/{chunk-SGKF62FT.mjs → chunk-DGDZNHUJ.mjs} +5 -3
- package/dist/esm/{chunk-SGKF62FT.mjs.map → chunk-DGDZNHUJ.mjs.map} +1 -1
- package/dist/esm/{chunk-WEOK7WVL.mjs → chunk-EBFKT35C.mjs} +2 -2
- package/dist/esm/{chunk-JOVCSFQC.mjs → chunk-F4VI7BNX.mjs} +2 -2
- package/dist/esm/{chunk-VGI2LPO3.mjs → chunk-FDMI4BUL.mjs} +32 -25
- package/dist/esm/chunk-FDMI4BUL.mjs.map +1 -0
- package/dist/esm/chunk-FRLS4GRM.mjs +62 -0
- package/dist/esm/chunk-FRLS4GRM.mjs.map +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
- package/dist/esm/{chunk-ZNGTK5IZ.mjs → chunk-G6R77JKO.mjs} +29 -29
- package/dist/esm/{chunk-6PMKDSGB.mjs → chunk-G7BB6K4B.mjs} +2 -2
- package/dist/esm/{chunk-ODG7T6OV.mjs → chunk-GCQK2S5Q.mjs} +2 -2
- package/dist/esm/{chunk-4BXAKN6A.mjs → chunk-HBXBODME.mjs} +3 -3
- package/dist/esm/{chunk-UKZP2GAB.mjs → chunk-HKQY5GXT.mjs} +7 -191
- package/dist/esm/chunk-HKQY5GXT.mjs.map +1 -0
- package/dist/esm/{chunk-NMYFY7WN.mjs → chunk-HL337SEM.mjs} +3 -3
- package/dist/esm/{chunk-K3CXNID3.mjs → chunk-HQDHSKVS.mjs} +2 -2
- package/dist/esm/{chunk-S56SMMAK.mjs → chunk-I5G7XFGT.mjs} +3 -3
- package/dist/esm/{chunk-HQ6A6TYS.mjs → chunk-IJ7XCPP3.mjs} +17 -12
- package/dist/esm/chunk-IJ7XCPP3.mjs.map +1 -0
- package/dist/esm/{chunk-46VPRC7E.mjs → chunk-ILTEOGFF.mjs} +2 -2
- package/dist/esm/{chunk-KLZCGNPI.mjs → chunk-IP7GATDH.mjs} +6 -6
- package/dist/esm/{chunk-KLZCGNPI.mjs.map → chunk-IP7GATDH.mjs.map} +1 -1
- package/dist/esm/{chunk-MHZVL3EA.mjs → chunk-IQVHXOD3.mjs} +8 -8
- package/dist/esm/{chunk-4WNIKKIV.mjs → chunk-JAZJE3OR.mjs} +3 -3
- package/dist/esm/{chunk-SN6KXHPA.mjs → chunk-JEVGHYEP.mjs} +2 -2
- package/dist/esm/{chunk-OQ6XT2GF.mjs → chunk-JFMFZ2IL.mjs} +3 -3
- package/dist/esm/{chunk-HQTQEHHZ.mjs → chunk-JQIRRM7G.mjs} +4 -4
- package/dist/esm/{chunk-MG6UFOJW.mjs → chunk-K5OCDM3W.mjs} +6 -6
- package/dist/esm/{chunk-MG6UFOJW.mjs.map → chunk-K5OCDM3W.mjs.map} +1 -1
- package/dist/esm/{chunk-MUSTBCQX.mjs → chunk-KW64NP2F.mjs} +2 -2
- package/dist/esm/{chunk-DUOU3SNQ.mjs → chunk-ORCQEMJL.mjs} +3 -3
- package/dist/esm/{chunk-LSIXUJ5T.mjs → chunk-QYNYDQE3.mjs} +4 -4
- package/dist/esm/{chunk-5E2IDRDF.mjs → chunk-R45SPK6Q.mjs} +2 -2
- package/dist/esm/{chunk-KAKSJSCR.mjs → chunk-RCXGTN36.mjs} +2 -2
- package/dist/esm/{chunk-3QMLVT4L.mjs → chunk-SPI2HO3E.mjs} +2 -2
- package/dist/esm/{chunk-KEZG4OGH.mjs → chunk-SPVJXZL5.mjs} +208 -68
- package/dist/esm/chunk-SPVJXZL5.mjs.map +1 -0
- package/dist/esm/{chunk-QW7RQDZ5.mjs → chunk-SQNS4SFV.mjs} +9 -1
- package/dist/esm/{chunk-QW7RQDZ5.mjs.map → chunk-SQNS4SFV.mjs.map} +1 -1
- package/dist/esm/{chunk-MIVDDJAH.mjs → chunk-SRXIHVZE.mjs} +2 -2
- package/dist/esm/{chunk-2ZOIVB2U.mjs → chunk-T4BFWV46.mjs} +2 -2
- package/dist/esm/{chunk-TQDWZXFD.mjs → chunk-TDLL7QX5.mjs} +7 -7
- package/dist/esm/{chunk-Y4FHNC5I.mjs → chunk-TJDF4CXI.mjs} +2 -2
- package/dist/esm/{chunk-HMHFKEHQ.mjs → chunk-TL4Z4KHK.mjs} +2 -2
- package/dist/esm/{chunk-Y7KAC4I4.mjs → chunk-UGFIWCJQ.mjs} +2 -2
- package/dist/esm/{chunk-EBEO4SA4.mjs → chunk-UGKZQUGE.mjs} +4 -4
- package/dist/esm/{chunk-KCV4HRSJ.mjs → chunk-UK7SPHIE.mjs} +4 -4
- package/dist/esm/{chunk-KEKNIJHE.mjs → chunk-WHSS6I7T.mjs} +3 -3
- package/dist/esm/{chunk-3SCNBHUA.mjs → chunk-WLTQHGIJ.mjs} +5 -5
- package/dist/esm/{chunk-I4OHHVRF.mjs → chunk-WUM247HF.mjs} +2 -2
- package/dist/esm/{chunk-A3TQLIEM.mjs → chunk-WXQUBQK4.mjs} +2 -2
- package/dist/esm/{chunk-WPV52HGD.mjs → chunk-X4N5BN3S.mjs} +3 -3
- package/dist/esm/{chunk-KPAICS4T.mjs → chunk-XX6C2QGI.mjs} +2 -2
- package/dist/esm/{chunk-XXLSA7W7.mjs → chunk-Y3M32DIB.mjs} +2 -2
- package/dist/esm/{chunk-HLTYSM7H.mjs → chunk-YK66QBML.mjs} +2 -2
- package/dist/esm/{chunk-EMKV5DFX.mjs → chunk-YT7V6AVJ.mjs} +3 -3
- package/dist/esm/chunk-ZRBUAZZD.mjs +36 -0
- package/dist/esm/chunk-ZRBUAZZD.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +4 -4
- package/dist/esm/client/get.mjs +4 -4
- package/dist/esm/client/index.mjs +5 -5
- package/dist/esm/client/post.mjs +5 -5
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.mjs +3 -3
- package/dist/esm/core/crypto/ed25519.mjs +3 -3
- package/dist/esm/core/crypto/ephemeral.mjs +3 -3
- package/dist/esm/core/crypto/federatedKeyless.mjs +5 -5
- package/dist/esm/core/crypto/index.mjs +5 -5
- package/dist/esm/core/crypto/keyless.mjs +5 -5
- package/dist/esm/core/crypto/multiEd25519.mjs +5 -5
- package/dist/esm/core/crypto/multiKey.mjs +5 -5
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +3 -3
- package/dist/esm/core/crypto/publicKey.mjs +3 -3
- package/dist/esm/core/crypto/secp256k1.mjs +3 -3
- package/dist/esm/core/crypto/signature.mjs +3 -3
- package/dist/esm/core/crypto/singleKey.mjs +5 -5
- package/dist/esm/core/index.mjs +5 -5
- package/dist/esm/errors/index.mjs +2 -2
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +81 -74
- package/dist/esm/internal/abstraction.mjs +34 -34
- package/dist/esm/internal/account.d.mts +45 -5
- package/dist/esm/internal/account.mjs +44 -30
- package/dist/esm/internal/ans.mjs +35 -35
- package/dist/esm/internal/coin.mjs +34 -33
- package/dist/esm/internal/digitalAsset.mjs +34 -34
- package/dist/esm/internal/event.mjs +7 -7
- package/dist/esm/internal/experimental.mjs +22 -36
- package/dist/esm/internal/faucet.mjs +8 -8
- package/dist/esm/internal/fungibleAsset.mjs +34 -34
- package/dist/esm/internal/general.mjs +6 -6
- package/dist/esm/internal/keyless.mjs +36 -34
- package/dist/esm/internal/object.mjs +7 -7
- package/dist/esm/internal/staking.mjs +7 -7
- package/dist/esm/internal/table.mjs +7 -7
- package/dist/esm/internal/transaction.mjs +7 -7
- package/dist/esm/internal/transactionSubmission.d.mts +6 -36
- package/dist/esm/internal/transactionSubmission.mjs +33 -39
- package/dist/esm/internal/utils/index.d.mts +15 -0
- package/dist/esm/internal/utils/index.mjs +39 -0
- package/dist/esm/internal/utils/index.mjs.map +1 -0
- package/dist/esm/internal/utils/utils.d.mts +65 -0
- package/dist/esm/internal/utils/utils.mjs +38 -0
- package/dist/esm/internal/utils/utils.mjs.map +1 -0
- package/dist/esm/internal/view.mjs +22 -36
- package/dist/esm/transactions/authenticator/account.mjs +5 -5
- package/dist/esm/transactions/authenticator/index.mjs +5 -5
- package/dist/esm/transactions/authenticator/transaction.mjs +5 -5
- package/dist/esm/transactions/index.mjs +23 -37
- package/dist/esm/transactions/instances/index.mjs +14 -14
- package/dist/esm/transactions/instances/moduleId.mjs +5 -5
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +9 -9
- package/dist/esm/transactions/instances/rawTransaction.mjs +8 -8
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +3 -3
- package/dist/esm/transactions/instances/signedTransaction.mjs +9 -9
- package/dist/esm/transactions/instances/simpleTransaction.mjs +9 -9
- package/dist/esm/transactions/instances/transactionPayload.mjs +6 -6
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +41 -29
- package/dist/esm/transactions/management/index.mjs +37 -35
- package/dist/esm/transactions/management/transactionWorker.mjs +37 -35
- package/dist/esm/transactions/scriptComposer/index.mjs +21 -35
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +6 -6
- package/dist/esm/transactions/transactionBuilder/index.mjs +20 -34
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +9 -40
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +13 -13
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +19 -34
- package/dist/esm/transactions/typeTag/index.mjs +5 -5
- package/dist/esm/transactions/typeTag/parser.mjs +5 -5
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/index.mjs +5 -1
- package/dist/esm/types/types.d.mts +36 -2
- package/dist/esm/types/types.mjs +5 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +4 -4
- package/dist/esm/utils/normalizeBundle.mjs +3 -3
- package/package.json +25 -24
- package/src/account/MultiKeyAccount.ts +3 -2
- package/src/api/general.ts +2 -2
- package/src/api/transaction.ts +30 -29
- package/src/client/post.ts +0 -1
- package/src/internal/account.ts +230 -71
- package/src/internal/transactionSubmission.ts +4 -202
- package/src/internal/utils/index.ts +4 -0
- package/src/internal/utils/utils.ts +116 -0
- package/src/transactions/scriptComposer/index.ts +3 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -2
- package/src/types/types.ts +38 -1
- package/dist/common/chunk-CSUBLTFA.js.map +0 -1
- package/dist/esm/chunk-HQ6A6TYS.mjs.map +0 -1
- package/dist/esm/chunk-KEZG4OGH.mjs.map +0 -1
- package/dist/esm/chunk-UKZP2GAB.mjs.map +0 -1
- package/dist/esm/chunk-VGI2LPO3.mjs.map +0 -1
- package/dist/esm/chunk-ZWD4BJVD.mjs.map +0 -1
- /package/dist/esm/{chunk-XGUYC57L.mjs.map → chunk-2FTF6J7F.mjs.map} +0 -0
- /package/dist/esm/{chunk-LHQJNJUB.mjs.map → chunk-2HL7JEFC.mjs.map} +0 -0
- /package/dist/esm/{chunk-EFJAJFI3.mjs.map → chunk-2WBJAKBO.mjs.map} +0 -0
- /package/dist/esm/{chunk-J7WQ42OC.mjs.map → chunk-3DAVHDK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-QN5BQMWP.mjs.map → chunk-56UCIGTO.mjs.map} +0 -0
- /package/dist/esm/{chunk-I6QE3PKO.mjs.map → chunk-5ORUQZAR.mjs.map} +0 -0
- /package/dist/esm/{chunk-P64LPFEC.mjs.map → chunk-62LC4PPC.mjs.map} +0 -0
- /package/dist/esm/{chunk-UXAUOSSB.mjs.map → chunk-7F32C225.mjs.map} +0 -0
- /package/dist/esm/{chunk-ESZLRZTK.mjs.map → chunk-7WW735TU.mjs.map} +0 -0
- /package/dist/esm/{chunk-BQ5JTYXK.mjs.map → chunk-A33OBGVN.mjs.map} +0 -0
- /package/dist/esm/{chunk-LFMXR5C2.mjs.map → chunk-A7LYGPFL.mjs.map} +0 -0
- /package/dist/esm/{chunk-SDIZSFCQ.mjs.map → chunk-BU43ZFDJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YIHVPGHN.mjs.map → chunk-C7EEG6SW.mjs.map} +0 -0
- /package/dist/esm/{chunk-XGB3QLVI.mjs.map → chunk-D6RXVCE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-WEOK7WVL.mjs.map → chunk-EBFKT35C.mjs.map} +0 -0
- /package/dist/esm/{chunk-JOVCSFQC.mjs.map → chunk-F4VI7BNX.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZNGTK5IZ.mjs.map → chunk-G6R77JKO.mjs.map} +0 -0
- /package/dist/esm/{chunk-6PMKDSGB.mjs.map → chunk-G7BB6K4B.mjs.map} +0 -0
- /package/dist/esm/{chunk-ODG7T6OV.mjs.map → chunk-GCQK2S5Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-4BXAKN6A.mjs.map → chunk-HBXBODME.mjs.map} +0 -0
- /package/dist/esm/{chunk-NMYFY7WN.mjs.map → chunk-HL337SEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-K3CXNID3.mjs.map → chunk-HQDHSKVS.mjs.map} +0 -0
- /package/dist/esm/{chunk-S56SMMAK.mjs.map → chunk-I5G7XFGT.mjs.map} +0 -0
- /package/dist/esm/{chunk-46VPRC7E.mjs.map → chunk-ILTEOGFF.mjs.map} +0 -0
- /package/dist/esm/{chunk-MHZVL3EA.mjs.map → chunk-IQVHXOD3.mjs.map} +0 -0
- /package/dist/esm/{chunk-4WNIKKIV.mjs.map → chunk-JAZJE3OR.mjs.map} +0 -0
- /package/dist/esm/{chunk-SN6KXHPA.mjs.map → chunk-JEVGHYEP.mjs.map} +0 -0
- /package/dist/esm/{chunk-OQ6XT2GF.mjs.map → chunk-JFMFZ2IL.mjs.map} +0 -0
- /package/dist/esm/{chunk-HQTQEHHZ.mjs.map → chunk-JQIRRM7G.mjs.map} +0 -0
- /package/dist/esm/{chunk-MUSTBCQX.mjs.map → chunk-KW64NP2F.mjs.map} +0 -0
- /package/dist/esm/{chunk-DUOU3SNQ.mjs.map → chunk-ORCQEMJL.mjs.map} +0 -0
- /package/dist/esm/{chunk-LSIXUJ5T.mjs.map → chunk-QYNYDQE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-5E2IDRDF.mjs.map → chunk-R45SPK6Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAKSJSCR.mjs.map → chunk-RCXGTN36.mjs.map} +0 -0
- /package/dist/esm/{chunk-3QMLVT4L.mjs.map → chunk-SPI2HO3E.mjs.map} +0 -0
- /package/dist/esm/{chunk-MIVDDJAH.mjs.map → chunk-SRXIHVZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-2ZOIVB2U.mjs.map → chunk-T4BFWV46.mjs.map} +0 -0
- /package/dist/esm/{chunk-TQDWZXFD.mjs.map → chunk-TDLL7QX5.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y4FHNC5I.mjs.map → chunk-TJDF4CXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-HMHFKEHQ.mjs.map → chunk-TL4Z4KHK.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y7KAC4I4.mjs.map → chunk-UGFIWCJQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-EBEO4SA4.mjs.map → chunk-UGKZQUGE.mjs.map} +0 -0
- /package/dist/esm/{chunk-KCV4HRSJ.mjs.map → chunk-UK7SPHIE.mjs.map} +0 -0
- /package/dist/esm/{chunk-KEKNIJHE.mjs.map → chunk-WHSS6I7T.mjs.map} +0 -0
- /package/dist/esm/{chunk-3SCNBHUA.mjs.map → chunk-WLTQHGIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-I4OHHVRF.mjs.map → chunk-WUM247HF.mjs.map} +0 -0
- /package/dist/esm/{chunk-A3TQLIEM.mjs.map → chunk-WXQUBQK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-WPV52HGD.mjs.map → chunk-X4N5BN3S.mjs.map} +0 -0
- /package/dist/esm/{chunk-KPAICS4T.mjs.map → chunk-XX6C2QGI.mjs.map} +0 -0
- /package/dist/esm/{chunk-XXLSA7W7.mjs.map → chunk-Y3M32DIB.mjs.map} +0 -0
- /package/dist/esm/{chunk-HLTYSM7H.mjs.map → chunk-YK66QBML.mjs.map} +0 -0
- /package/dist/esm/{chunk-EMKV5DFX.mjs.map → chunk-YT7V6AVJ.mjs.map} +0 -0
|
@@ -7,19 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { AptosConfig } from "../api/aptosConfig";
|
|
10
|
-
import { Deserializer, MoveVector
|
|
10
|
+
import { Deserializer, MoveVector } from "../bcs";
|
|
11
11
|
import { postAptosFullNode } from "../client";
|
|
12
12
|
import { Account, AbstractKeylessAccount, isKeylessSigner } from "../account";
|
|
13
13
|
import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
14
|
-
import {
|
|
15
|
-
Ed25519PrivateKey,
|
|
16
|
-
FederatedKeylessPublicKey,
|
|
17
|
-
KeylessPublicKey,
|
|
18
|
-
KeylessSignature,
|
|
19
|
-
PrivateKeyInput,
|
|
20
|
-
} from "../core/crypto";
|
|
14
|
+
import { FederatedKeylessPublicKey, KeylessPublicKey, KeylessSignature } from "../core/crypto";
|
|
21
15
|
import { AccountAuthenticator } from "../transactions/authenticator/account";
|
|
22
|
-
import { RotationProofChallenge } from "../transactions/instances/rotationProofChallenge";
|
|
23
16
|
import {
|
|
24
17
|
buildTransaction,
|
|
25
18
|
generateTransactionPayload,
|
|
@@ -38,22 +31,10 @@ import {
|
|
|
38
31
|
AnyTransactionPayloadInstance,
|
|
39
32
|
EntryFunctionABI,
|
|
40
33
|
} from "../transactions/types";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
UserTransactionResponse,
|
|
44
|
-
PendingTransactionResponse,
|
|
45
|
-
MimeType,
|
|
46
|
-
HexInput,
|
|
47
|
-
TransactionResponse,
|
|
48
|
-
CommittedTransactionResponse,
|
|
49
|
-
} from "../types";
|
|
50
|
-
import { SignedTransaction, TypeTagU8, TypeTagVector, generateSigningMessageForTransaction } from "../transactions";
|
|
34
|
+
import { UserTransactionResponse, PendingTransactionResponse, MimeType, HexInput } from "../types";
|
|
35
|
+
import { SignedTransaction, TypeTagVector, generateSigningMessageForTransaction } from "../transactions";
|
|
51
36
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
52
37
|
import { MultiAgentTransaction } from "../transactions/instances/multiAgentTransaction";
|
|
53
|
-
import { MultiEd25519Account } from "../account/MultiEd25519Account";
|
|
54
|
-
import { AuthenticationKey, Hex } from "../core";
|
|
55
|
-
import { waitForTransaction } from "./transaction";
|
|
56
|
-
import { transferCoinTransaction } from "./coin";
|
|
57
38
|
|
|
58
39
|
/**
|
|
59
40
|
* We are defining function signatures, each with its specific input and output.
|
|
@@ -461,182 +442,3 @@ export async function publicPackageTransaction(args: {
|
|
|
461
442
|
options,
|
|
462
443
|
});
|
|
463
444
|
}
|
|
464
|
-
|
|
465
|
-
const rotateAuthKeyAbi: EntryFunctionABI = {
|
|
466
|
-
typeParameters: [],
|
|
467
|
-
parameters: [
|
|
468
|
-
new TypeTagU8(),
|
|
469
|
-
TypeTagVector.u8(),
|
|
470
|
-
new TypeTagU8(),
|
|
471
|
-
TypeTagVector.u8(),
|
|
472
|
-
TypeTagVector.u8(),
|
|
473
|
-
TypeTagVector.u8(),
|
|
474
|
-
],
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
const rotateAuthKeyUnverifiedAbi: EntryFunctionABI = {
|
|
478
|
-
typeParameters: [],
|
|
479
|
-
parameters: [TypeTagVector.u8()],
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Rotates the authentication key for a given account, allowing for enhanced security and management of account access.
|
|
484
|
-
*
|
|
485
|
-
* @param args - The arguments for rotating the authentication key.
|
|
486
|
-
* @param args.aptosConfig - The configuration settings for the Aptos network.
|
|
487
|
-
* @param args.fromAccount - The account from which the authentication key will be rotated.
|
|
488
|
-
* @param args.toNewPrivateKey - The new private key that will be associated with the account.
|
|
489
|
-
*
|
|
490
|
-
* @remarks
|
|
491
|
-
* This function requires the current authentication key and the new private key to sign a challenge that validates the rotation.
|
|
492
|
-
*
|
|
493
|
-
* TODO: Need to refactor and move this function out of transactionSubmission.
|
|
494
|
-
* @group Implementation
|
|
495
|
-
*/
|
|
496
|
-
export async function rotateAuthKey(args: {
|
|
497
|
-
aptosConfig: AptosConfig;
|
|
498
|
-
fromAccount: Account;
|
|
499
|
-
toNewPrivateKey: Ed25519PrivateKey;
|
|
500
|
-
}): Promise<PendingTransactionResponse> {
|
|
501
|
-
const { aptosConfig, fromAccount, toNewPrivateKey } = args;
|
|
502
|
-
const accountInfo = await getInfo({
|
|
503
|
-
aptosConfig,
|
|
504
|
-
accountAddress: fromAccount.accountAddress,
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
const newAccount = Account.fromPrivateKey({ privateKey: toNewPrivateKey, legacy: true });
|
|
508
|
-
|
|
509
|
-
const challenge = new RotationProofChallenge({
|
|
510
|
-
sequenceNumber: BigInt(accountInfo.sequence_number),
|
|
511
|
-
originator: fromAccount.accountAddress,
|
|
512
|
-
currentAuthKey: AccountAddress.from(accountInfo.authentication_key),
|
|
513
|
-
newPublicKey: newAccount.publicKey,
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
// Sign the challenge
|
|
517
|
-
const challengeHex = challenge.bcsToBytes();
|
|
518
|
-
const proofSignedByCurrentPrivateKey = fromAccount.sign(challengeHex);
|
|
519
|
-
const proofSignedByNewPrivateKey = newAccount.sign(challengeHex);
|
|
520
|
-
|
|
521
|
-
// Generate transaction
|
|
522
|
-
const rawTxn = await generateTransaction({
|
|
523
|
-
aptosConfig,
|
|
524
|
-
sender: fromAccount.accountAddress,
|
|
525
|
-
data: {
|
|
526
|
-
function: "0x1::account::rotate_authentication_key",
|
|
527
|
-
functionArguments: [
|
|
528
|
-
new U8(fromAccount.signingScheme), // from scheme
|
|
529
|
-
MoveVector.U8(fromAccount.publicKey.toUint8Array()),
|
|
530
|
-
new U8(newAccount.signingScheme), // to scheme
|
|
531
|
-
MoveVector.U8(newAccount.publicKey.toUint8Array()),
|
|
532
|
-
MoveVector.U8(proofSignedByCurrentPrivateKey.toUint8Array()),
|
|
533
|
-
MoveVector.U8(proofSignedByNewPrivateKey.toUint8Array()),
|
|
534
|
-
],
|
|
535
|
-
abi: rotateAuthKeyAbi,
|
|
536
|
-
},
|
|
537
|
-
});
|
|
538
|
-
return signAndSubmitTransaction({
|
|
539
|
-
aptosConfig,
|
|
540
|
-
signer: fromAccount,
|
|
541
|
-
transaction: rawTxn,
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
export async function rotateAuthKeyToMultiEd25519(args: {
|
|
546
|
-
aptosConfig: AptosConfig;
|
|
547
|
-
fromAccount: Account;
|
|
548
|
-
multiEd25519Account: MultiEd25519Account;
|
|
549
|
-
}): Promise<PendingTransactionResponse> {
|
|
550
|
-
const { aptosConfig, fromAccount, multiEd25519Account } = args;
|
|
551
|
-
const accountInfo = await getInfo({
|
|
552
|
-
aptosConfig,
|
|
553
|
-
accountAddress: fromAccount.accountAddress,
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
const newAccount = multiEd25519Account;
|
|
557
|
-
|
|
558
|
-
const challenge = new RotationProofChallenge({
|
|
559
|
-
sequenceNumber: BigInt(accountInfo.sequence_number),
|
|
560
|
-
originator: fromAccount.accountAddress,
|
|
561
|
-
currentAuthKey: AccountAddress.from(accountInfo.authentication_key),
|
|
562
|
-
newPublicKey: newAccount.publicKey,
|
|
563
|
-
});
|
|
564
|
-
|
|
565
|
-
// Sign the challenge
|
|
566
|
-
const challengeHex = challenge.bcsToBytes();
|
|
567
|
-
const proofSignedByCurrentPrivateKey = fromAccount.sign(challengeHex);
|
|
568
|
-
const proofSignedByNewPrivateKey = newAccount.sign(challengeHex);
|
|
569
|
-
|
|
570
|
-
// Generate transaction
|
|
571
|
-
const rawTxn = await generateTransaction({
|
|
572
|
-
aptosConfig,
|
|
573
|
-
sender: fromAccount.accountAddress,
|
|
574
|
-
data: {
|
|
575
|
-
function: "0x1::account::rotate_authentication_key",
|
|
576
|
-
functionArguments: [
|
|
577
|
-
new U8(fromAccount.signingScheme), // from scheme
|
|
578
|
-
MoveVector.U8(fromAccount.publicKey.toUint8Array()),
|
|
579
|
-
new U8(newAccount.signingScheme), // to scheme
|
|
580
|
-
MoveVector.U8(newAccount.publicKey.toUint8Array()),
|
|
581
|
-
MoveVector.U8(proofSignedByCurrentPrivateKey.toUint8Array()),
|
|
582
|
-
MoveVector.U8(proofSignedByNewPrivateKey.toUint8Array()),
|
|
583
|
-
],
|
|
584
|
-
abi: rotateAuthKeyAbi,
|
|
585
|
-
},
|
|
586
|
-
});
|
|
587
|
-
return signAndSubmitTransaction({
|
|
588
|
-
aptosConfig,
|
|
589
|
-
signer: fromAccount,
|
|
590
|
-
transaction: rawTxn,
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
export async function rotateAuthKeyWithVerificationTransaction(args: {
|
|
595
|
-
aptosConfig: AptosConfig;
|
|
596
|
-
fromAccount: Account;
|
|
597
|
-
toAccount: Account;
|
|
598
|
-
}): Promise<CommittedTransactionResponse> {
|
|
599
|
-
const { aptosConfig, fromAccount, toAccount } = args;
|
|
600
|
-
|
|
601
|
-
// Generate transaction
|
|
602
|
-
const rawTxn = await generateTransaction({
|
|
603
|
-
aptosConfig,
|
|
604
|
-
sender: fromAccount.accountAddress,
|
|
605
|
-
data: {
|
|
606
|
-
function: "0x1::account::rotate_authentication_key_call",
|
|
607
|
-
functionArguments: [MoveVector.U8(toAccount.publicKey.authKey().toUint8Array())],
|
|
608
|
-
abi: rotateAuthKeyUnverifiedAbi,
|
|
609
|
-
},
|
|
610
|
-
});
|
|
611
|
-
const pendingTxn = await signAndSubmitTransaction({
|
|
612
|
-
aptosConfig,
|
|
613
|
-
signer: fromAccount,
|
|
614
|
-
transaction: rawTxn,
|
|
615
|
-
});
|
|
616
|
-
const txnResponse = await waitForTransaction({
|
|
617
|
-
aptosConfig,
|
|
618
|
-
transactionHash: pendingTxn.hash,
|
|
619
|
-
});
|
|
620
|
-
if (!txnResponse.success) {
|
|
621
|
-
throw new Error(`Failed to rotate authentication key - ${txnResponse}`);
|
|
622
|
-
}
|
|
623
|
-
const coinTxn = await transferCoinTransaction({
|
|
624
|
-
aptosConfig,
|
|
625
|
-
sender: toAccount.accountAddress,
|
|
626
|
-
recipient: toAccount.accountAddress,
|
|
627
|
-
amount: 1,
|
|
628
|
-
});
|
|
629
|
-
const pendingCoinTxn = await signAndSubmitTransaction({
|
|
630
|
-
aptosConfig,
|
|
631
|
-
signer: fromAccount,
|
|
632
|
-
transaction: coinTxn,
|
|
633
|
-
});
|
|
634
|
-
const coinTxnResponse = await waitForTransaction({
|
|
635
|
-
aptosConfig,
|
|
636
|
-
transactionHash: pendingCoinTxn.hash,
|
|
637
|
-
});
|
|
638
|
-
if (!coinTxnResponse.success) {
|
|
639
|
-
throw new Error(`Failed to verify authentication key - ${coinTxnResponse}`);
|
|
640
|
-
}
|
|
641
|
-
return coinTxnResponse;
|
|
642
|
-
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { AccountAddress, AccountAddressInput } from "../../core/accountAddress";
|
|
2
|
+
import { MoveModuleBytecode, LedgerVersionArg, PaginationArgs, AccountData } from "../../types/types";
|
|
3
|
+
import { AptosConfig } from "../../api/aptosConfig";
|
|
4
|
+
import { getAptosFullNode, paginateWithObfuscatedCursor } from "../../client";
|
|
5
|
+
import { memoizeAsync } from "../../utils/memoize";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the modules associated with a specified account address.
|
|
9
|
+
*
|
|
10
|
+
* @param args - The arguments for retrieving modules.
|
|
11
|
+
* @param args.aptosConfig - The configuration for connecting to the Aptos blockchain.
|
|
12
|
+
* @param args.accountAddress - The address of the account whose modules are to be retrieved.
|
|
13
|
+
* @param args.options - Optional parameters for pagination and ledger version.
|
|
14
|
+
* @param args.options.limit - The maximum number of modules to retrieve (default is 1000).
|
|
15
|
+
* @param args.options.offset - The starting point for pagination. Note, this is obfuscated and is not an index.
|
|
16
|
+
* @param args.options.ledgerVersion - The specific ledger version to query.
|
|
17
|
+
* @group Implementation
|
|
18
|
+
*/
|
|
19
|
+
export async function getModules(args: {
|
|
20
|
+
aptosConfig: AptosConfig;
|
|
21
|
+
accountAddress: AccountAddressInput;
|
|
22
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
23
|
+
}): Promise<MoveModuleBytecode[]> {
|
|
24
|
+
const { aptosConfig, accountAddress, options } = args;
|
|
25
|
+
return paginateWithObfuscatedCursor<{}, MoveModuleBytecode[]>({
|
|
26
|
+
aptosConfig,
|
|
27
|
+
originMethod: "getModules",
|
|
28
|
+
path: `accounts/${AccountAddress.from(accountAddress).toString()}/modules`,
|
|
29
|
+
params: {
|
|
30
|
+
ledger_version: options?.ledgerVersion,
|
|
31
|
+
offset: options?.offset,
|
|
32
|
+
limit: options?.limit ?? 1000,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves account information for a specified account address.
|
|
39
|
+
*
|
|
40
|
+
* @param args - The arguments for retrieving account information.
|
|
41
|
+
* @param args.aptosConfig - The configuration object for Aptos.
|
|
42
|
+
* @param args.accountAddress - The address of the account to retrieve information for.
|
|
43
|
+
* @group Implementation
|
|
44
|
+
*/
|
|
45
|
+
export async function getInfo(args: {
|
|
46
|
+
aptosConfig: AptosConfig;
|
|
47
|
+
accountAddress: AccountAddressInput;
|
|
48
|
+
}): Promise<AccountData> {
|
|
49
|
+
const { aptosConfig, accountAddress } = args;
|
|
50
|
+
const { data } = await getAptosFullNode<{}, AccountData>({
|
|
51
|
+
aptosConfig,
|
|
52
|
+
originMethod: "getInfo",
|
|
53
|
+
path: `accounts/${AccountAddress.from(accountAddress).toString()}`,
|
|
54
|
+
});
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Queries for a move module given an account address and module name.
|
|
60
|
+
* This function can help you retrieve the module's ABI and other relevant information.
|
|
61
|
+
*
|
|
62
|
+
* @param args - The arguments for retrieving the module.
|
|
63
|
+
* @param args.aptosConfig - The configuration for the Aptos client.
|
|
64
|
+
* @param args.accountAddress - The account address in hex-encoded 32 byte format.
|
|
65
|
+
* @param args.moduleName - The name of the module to retrieve.
|
|
66
|
+
* @param args.options - Optional parameters for the request.
|
|
67
|
+
* @param args.options.ledgerVersion - Specifies the ledger version of transactions. By default, the latest version will be used.
|
|
68
|
+
* @returns The move module.
|
|
69
|
+
* @group Implementation
|
|
70
|
+
*/
|
|
71
|
+
export async function getModule(args: {
|
|
72
|
+
aptosConfig: AptosConfig;
|
|
73
|
+
accountAddress: AccountAddressInput;
|
|
74
|
+
moduleName: string;
|
|
75
|
+
options?: LedgerVersionArg;
|
|
76
|
+
}): Promise<MoveModuleBytecode> {
|
|
77
|
+
// We don't memoize the account module by ledger version, as it's not a common use case, this would be handled
|
|
78
|
+
// by the developer directly
|
|
79
|
+
if (args.options?.ledgerVersion !== undefined) {
|
|
80
|
+
return getModuleInner(args);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return memoizeAsync(
|
|
84
|
+
async () => getModuleInner(args),
|
|
85
|
+
`module-${args.accountAddress}-${args.moduleName}`,
|
|
86
|
+
1000 * 60 * 5, // 5 minutes
|
|
87
|
+
)();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Retrieves the bytecode of a specified module from a given account address.
|
|
92
|
+
*
|
|
93
|
+
* @param args - The parameters for retrieving the module bytecode.
|
|
94
|
+
* @param args.aptosConfig - The configuration for connecting to the Aptos network.
|
|
95
|
+
* @param args.accountAddress - The address of the account from which to retrieve the module.
|
|
96
|
+
* @param args.moduleName - The name of the module to retrieve.
|
|
97
|
+
* @param args.options - Optional parameters for specifying the ledger version.
|
|
98
|
+
* @param args.options.ledgerVersion - The specific ledger version to query.
|
|
99
|
+
* @group Implementation
|
|
100
|
+
*/
|
|
101
|
+
async function getModuleInner(args: {
|
|
102
|
+
aptosConfig: AptosConfig;
|
|
103
|
+
accountAddress: AccountAddressInput;
|
|
104
|
+
moduleName: string;
|
|
105
|
+
options?: LedgerVersionArg;
|
|
106
|
+
}): Promise<MoveModuleBytecode> {
|
|
107
|
+
const { aptosConfig, accountAddress, moduleName, options } = args;
|
|
108
|
+
|
|
109
|
+
const { data } = await getAptosFullNode<{}, MoveModuleBytecode>({
|
|
110
|
+
aptosConfig,
|
|
111
|
+
originMethod: "getModule",
|
|
112
|
+
path: `accounts/${AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,
|
|
113
|
+
params: { ledger_version: options?.ledgerVersion },
|
|
114
|
+
});
|
|
115
|
+
return data;
|
|
116
|
+
}
|
|
@@ -58,7 +58,9 @@ export class AptosScriptComposer {
|
|
|
58
58
|
|
|
59
59
|
// Load the calling type arguments into the loader.
|
|
60
60
|
if (input.typeArguments !== undefined) {
|
|
61
|
-
|
|
61
|
+
for (const typeArgument of input.typeArguments) {
|
|
62
|
+
await this.builder.load_type_tag(nodeUrl, typeArgument.toString());
|
|
63
|
+
}
|
|
62
64
|
}
|
|
63
65
|
const typeArguments = standardizeTypeTags(input.typeArguments);
|
|
64
66
|
const functionAbi = await fetchMoveFunctionAbi(moduleAddress, moduleName, functionName, this.config);
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "../types";
|
|
26
26
|
import { Bool, MoveOption, MoveString, MoveVector, U128, U16, U256, U32, U64, U8 } from "../../bcs";
|
|
27
27
|
import { AccountAddress } from "../../core";
|
|
28
|
-
import { getModule } from "../../internal/
|
|
28
|
+
import { getModule } from "../../internal/utils";
|
|
29
29
|
import {
|
|
30
30
|
findFirstNonSignerArg,
|
|
31
31
|
isBcsAddress,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
MultiKeySignature,
|
|
21
21
|
} from "../../core/crypto";
|
|
22
22
|
import { Ed25519PublicKey, Ed25519Signature } from "../../core/crypto/ed25519";
|
|
23
|
-
import { getInfo } from "../../internal/
|
|
23
|
+
import { getInfo } from "../../internal/utils";
|
|
24
24
|
import { getLedgerInfo } from "../../internal/general";
|
|
25
25
|
import { getGasPriceEstimation } from "../../internal/transaction";
|
|
26
26
|
import { NetworkToChainId } from "../../utils/apiEndpoints";
|
|
@@ -638,7 +638,12 @@ export function getAuthenticatorForSimulation(publicKey?: PublicKey) {
|
|
|
638
638
|
return new AccountAuthenticatorMultiKey(
|
|
639
639
|
accountPublicKey,
|
|
640
640
|
new MultiKeySignature({
|
|
641
|
-
signatures: accountPublicKey.publicKeys.map(() =>
|
|
641
|
+
signatures: accountPublicKey.publicKeys.map((pubKey) => {
|
|
642
|
+
if (KeylessPublicKey.isInstance(pubKey.publicKey) || FederatedKeylessPublicKey.isInstance(pubKey.publicKey)) {
|
|
643
|
+
return new AnySignature(KeylessSignature.getSimulationSignature());
|
|
644
|
+
}
|
|
645
|
+
return new AnySignature(invalidSignature);
|
|
646
|
+
}),
|
|
642
647
|
bitmap: accountPublicKey.createBitmap({
|
|
643
648
|
bits: Array(accountPublicKey.publicKeys.length)
|
|
644
649
|
.fill(0)
|
package/src/types/types.ts
CHANGED
|
@@ -1041,6 +1041,30 @@ export function isSingleSenderSignature(
|
|
|
1041
1041
|
return signature.type === "single_sender";
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* Determine if the provided signature is of type "single_sender".
|
|
1046
|
+
*
|
|
1047
|
+
* @param signature - The transaction signature to check.
|
|
1048
|
+
* @returns A boolean indicating whether the signature is a single-sender signature.
|
|
1049
|
+
*/
|
|
1050
|
+
export function isSingleSenderSingleKeySignature(
|
|
1051
|
+
signature: TransactionSignature,
|
|
1052
|
+
): signature is TransactionSingleSenderSingleKeySignature {
|
|
1053
|
+
return signature.type === "single_sender" && !("signatures_required" in signature);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Determine if the provided signature is of type "single_sender".
|
|
1058
|
+
*
|
|
1059
|
+
* @param signature - The transaction signature to check.
|
|
1060
|
+
* @returns A boolean indicating whether the signature is a single-sender signature.
|
|
1061
|
+
*/
|
|
1062
|
+
export function isSingleSenderMultiKeySignature(
|
|
1063
|
+
signature: TransactionSignature,
|
|
1064
|
+
): signature is TransactionSingleSenderMultiKeySignature {
|
|
1065
|
+
return signature.type === "single_sender" && "signatures_required" in signature;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1044
1068
|
/**
|
|
1045
1069
|
* The signature for a transaction using the Ed25519 algorithm.
|
|
1046
1070
|
*/
|
|
@@ -1062,10 +1086,23 @@ export type TransactionSecp256k1Signature = {
|
|
|
1062
1086
|
/**
|
|
1063
1087
|
* The structure for a multi-signature transaction using Ed25519.
|
|
1064
1088
|
*/
|
|
1065
|
-
export type TransactionSingleSenderSignature =
|
|
1089
|
+
export type TransactionSingleSenderSignature = TransactionSingleSenderSingleKeySignature | TransactionSingleSenderMultiKeySignature;
|
|
1090
|
+
|
|
1091
|
+
export type TransactionSingleSenderSingleKeySignature = {
|
|
1066
1092
|
type: "single_sender";
|
|
1067
1093
|
public_key: { value: string; type: string };
|
|
1068
1094
|
signature: { value: string; type: string };
|
|
1095
|
+
signatures_required: never;
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* The structure for a multi-signature transaction using Ed25519.
|
|
1100
|
+
*/
|
|
1101
|
+
export type TransactionSingleSenderMultiKeySignature = {
|
|
1102
|
+
type: "single_sender";
|
|
1103
|
+
public_keys: { value: string; type: string }[];
|
|
1104
|
+
signatures: { index: number; signature: { value: string; type: string } }[];
|
|
1105
|
+
signatures_required: number;
|
|
1069
1106
|
};
|
|
1070
1107
|
|
|
1071
1108
|
/**
|