@aptos-labs/ts-sdk 1.30.0 → 1.31.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/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +4 -1
- package/dist/common/index.js +5 -3
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +4 -2
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.d.mts +2 -2
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +2 -2
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +5 -4
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +2 -2
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +2 -2
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-HGVZ7ULA.mjs → chunk-22ZSW5EN.mjs} +2 -2
- package/dist/esm/{chunk-WOOH5MMX.mjs → chunk-2652SPOM.mjs} +2 -2
- package/dist/esm/chunk-2CGJLPHP.mjs +2 -0
- package/dist/esm/{chunk-UI3AKMZX.mjs.map → chunk-2CGJLPHP.mjs.map} +1 -1
- package/dist/esm/{chunk-CRL4WGOH.mjs → chunk-2GEIHUHT.mjs} +2 -2
- package/dist/esm/{chunk-HCV3NGLS.mjs → chunk-3H5DGQKX.mjs} +2 -2
- package/dist/esm/{chunk-WUCPTRXU.mjs → chunk-4JXB6V5O.mjs} +2 -2
- package/dist/esm/{chunk-7PVIWKGT.mjs → chunk-4LKLOUMG.mjs} +2 -2
- package/dist/esm/{chunk-DZJXOL64.mjs → chunk-4VU2ABLU.mjs} +2 -2
- package/dist/esm/{chunk-OV5UQ75K.mjs → chunk-4ZK3JNQT.mjs} +2 -2
- package/dist/esm/{chunk-D3KBNFZR.mjs → chunk-5N6KJ7KS.mjs} +2 -2
- package/dist/esm/{chunk-2I56E4T2.mjs → chunk-5S3Z7MT4.mjs} +2 -2
- package/dist/esm/{chunk-ZS3EWM5A.mjs → chunk-5SGSPCOY.mjs} +2 -2
- package/dist/esm/{chunk-6AGTDRNM.mjs → chunk-6DMDYBV6.mjs} +2 -2
- package/dist/esm/{chunk-HAMXSLWF.mjs → chunk-73GCGRFW.mjs} +2 -2
- package/dist/esm/{chunk-GIQQF2PD.mjs → chunk-7JK7UG4E.mjs} +2 -2
- package/dist/esm/{chunk-5AAFF2PV.mjs → chunk-A2AEFKXS.mjs} +2 -2
- package/dist/esm/chunk-AITN3DO4.mjs +2 -0
- package/dist/esm/chunk-AITN3DO4.mjs.map +1 -0
- package/dist/esm/{chunk-QBP4XJT5.mjs → chunk-AT2ZGTXQ.mjs} +2 -2
- package/dist/esm/{chunk-RNAKZVRN.mjs → chunk-AZ6LVQEG.mjs} +2 -2
- package/dist/esm/chunk-BAGUHYFD.mjs +2 -0
- package/dist/esm/chunk-BAGUHYFD.mjs.map +1 -0
- package/dist/esm/{chunk-TRU3EK64.mjs → chunk-BG2TZI3H.mjs} +2 -2
- package/dist/esm/{chunk-37UZKMJI.mjs → chunk-BOWPP6YG.mjs} +2 -2
- package/dist/esm/{chunk-HDTKBFRX.mjs → chunk-BVVHGSWC.mjs} +2 -2
- package/dist/esm/{chunk-WIXNX7HY.mjs → chunk-CC7VOPYH.mjs} +2 -2
- package/dist/esm/{chunk-5ZBHIUWG.mjs → chunk-CDQGPCHU.mjs} +2 -2
- package/dist/esm/{chunk-2QRWGJJA.mjs → chunk-CL6EEMSL.mjs} +2 -2
- package/dist/esm/{chunk-RUDS7RSB.mjs → chunk-DMSHPWA5.mjs} +2 -2
- package/dist/esm/{chunk-Z36WHOZV.mjs → chunk-EE7GDBA5.mjs} +2 -2
- package/dist/esm/{chunk-5XXIIWG7.mjs → chunk-EUGLLGYW.mjs} +2 -2
- package/dist/esm/{chunk-JY3JJ55D.mjs → chunk-F2RY4YQ7.mjs} +2 -2
- package/dist/esm/{chunk-5CCHECTE.mjs → chunk-FTZGP6XW.mjs} +2 -2
- package/dist/esm/{chunk-LZS7BQ2B.mjs → chunk-GLATLXF6.mjs} +2 -2
- package/dist/esm/chunk-HM5HITUC.mjs +4 -0
- package/dist/esm/{chunk-KFSVKIFO.mjs.map → chunk-HM5HITUC.mjs.map} +1 -1
- package/dist/esm/{chunk-R3Y6WH2U.mjs → chunk-IAVI3H4V.mjs} +2 -2
- package/dist/esm/{chunk-N3OYD6VZ.mjs → chunk-IFXUWUP2.mjs} +2 -2
- package/dist/esm/{chunk-PGZWRY7A.mjs → chunk-JN36BNWA.mjs} +2 -2
- package/dist/esm/{chunk-XIY2VORC.mjs → chunk-JNRMHDRA.mjs} +2 -2
- package/dist/esm/{chunk-PHG2IWZW.mjs → chunk-JVTDP4KV.mjs} +2 -2
- package/dist/esm/{chunk-EN2HDNFE.mjs → chunk-KW4FVBDD.mjs} +2 -2
- package/dist/esm/{chunk-DXQT55L3.mjs → chunk-KYJU5PWF.mjs} +2 -2
- package/dist/esm/{chunk-RAXP3STS.mjs → chunk-L5J3V3HW.mjs} +2 -2
- package/dist/esm/{chunk-TIZL5YVP.mjs → chunk-LDZPO76C.mjs} +2 -2
- package/dist/esm/{chunk-L5I7F3NZ.mjs → chunk-M22UGFQ5.mjs} +2 -2
- package/dist/esm/{chunk-IFHQSZLK.mjs → chunk-MK2QAHXC.mjs} +2 -2
- package/dist/esm/{chunk-EF2PUPUH.mjs → chunk-MSHZ4FWB.mjs} +2 -2
- package/dist/esm/chunk-MSHZ4FWB.mjs.map +1 -0
- package/dist/esm/{chunk-XHCALZ7X.mjs → chunk-OAEDFM7T.mjs} +2 -2
- package/dist/esm/{chunk-QBWGWHJK.mjs → chunk-OXM4BVAY.mjs} +2 -2
- package/dist/esm/{chunk-WSVOJSAC.mjs → chunk-P3J54CQG.mjs} +2 -2
- package/dist/esm/{chunk-JNHFQTFC.mjs → chunk-RAJTNQNL.mjs} +2 -2
- package/dist/esm/{chunk-LD5MUWGW.mjs → chunk-RBJNSUSU.mjs} +2 -2
- package/dist/esm/{chunk-OLPI7QAH.mjs → chunk-RNJHULIT.mjs} +2 -2
- package/dist/esm/{chunk-QRTZYRH2.mjs → chunk-RNRNGJDA.mjs} +2 -2
- package/dist/esm/{chunk-OS2EG6AE.mjs → chunk-SGQFWWLQ.mjs} +2 -2
- package/dist/esm/{chunk-FPF4KZ5M.mjs → chunk-SOLWFAUY.mjs} +2 -2
- package/dist/esm/{chunk-DCUVV3VY.mjs → chunk-T5BCTWGK.mjs} +2 -2
- package/dist/esm/{chunk-S3FVA55H.mjs → chunk-TPJLAYW6.mjs} +2 -2
- package/dist/esm/{chunk-EKZQ3EYX.mjs → chunk-UCRROMZN.mjs} +2 -2
- package/dist/esm/{chunk-ZUTOMGB7.mjs → chunk-UGL2GPGK.mjs} +2 -2
- package/dist/esm/{chunk-K6MZXKVV.mjs → chunk-VYMRIKUV.mjs} +2 -2
- package/dist/esm/{chunk-VQTEGTUQ.mjs → chunk-WSZCPSV4.mjs} +2 -2
- package/dist/esm/{chunk-UKAXCARD.mjs → chunk-WV2VJQDS.mjs} +2 -2
- package/dist/esm/{chunk-KSKQVOBA.mjs → chunk-WZCKSN2U.mjs} +2 -2
- package/dist/esm/{chunk-NV6DHDM3.mjs → chunk-XFJD6QIP.mjs} +2 -2
- package/dist/esm/{chunk-BQXVHY7J.mjs → chunk-XFY4O2S3.mjs} +2 -2
- package/dist/esm/{chunk-FO4F3OJJ.mjs → chunk-XQ7ONNII.mjs} +2 -2
- package/dist/esm/{chunk-7D3RY73L.mjs → chunk-Y267I7DC.mjs} +2 -2
- package/dist/esm/{chunk-KSUZS6EL.mjs → chunk-YZ5BCOGI.mjs} +2 -2
- package/dist/esm/{chunk-JDYASF3E.mjs → chunk-ZPIMARUG.mjs} +2 -2
- package/dist/esm/{chunk-7V6RL27I.mjs → chunk-ZPQUCT22.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +3 -2
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/src/api/account.ts +12 -2
- package/src/api/keyless.ts +2 -1
- package/src/cli/move.ts +20 -5
- package/src/internal/keyless.ts +4 -2
- package/src/version.ts +1 -1
- package/dist/esm/chunk-EF2PUPUH.mjs.map +0 -1
- package/dist/esm/chunk-FY7TSOUU.mjs +0 -2
- package/dist/esm/chunk-FY7TSOUU.mjs.map +0 -1
- package/dist/esm/chunk-GPZRGLU2.mjs +0 -2
- package/dist/esm/chunk-GPZRGLU2.mjs.map +0 -1
- package/dist/esm/chunk-KFSVKIFO.mjs +0 -2
- package/dist/esm/chunk-UI3AKMZX.mjs +0 -2
- /package/dist/esm/{chunk-HGVZ7ULA.mjs.map → chunk-22ZSW5EN.mjs.map} +0 -0
- /package/dist/esm/{chunk-WOOH5MMX.mjs.map → chunk-2652SPOM.mjs.map} +0 -0
- /package/dist/esm/{chunk-CRL4WGOH.mjs.map → chunk-2GEIHUHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-HCV3NGLS.mjs.map → chunk-3H5DGQKX.mjs.map} +0 -0
- /package/dist/esm/{chunk-WUCPTRXU.mjs.map → chunk-4JXB6V5O.mjs.map} +0 -0
- /package/dist/esm/{chunk-7PVIWKGT.mjs.map → chunk-4LKLOUMG.mjs.map} +0 -0
- /package/dist/esm/{chunk-DZJXOL64.mjs.map → chunk-4VU2ABLU.mjs.map} +0 -0
- /package/dist/esm/{chunk-OV5UQ75K.mjs.map → chunk-4ZK3JNQT.mjs.map} +0 -0
- /package/dist/esm/{chunk-D3KBNFZR.mjs.map → chunk-5N6KJ7KS.mjs.map} +0 -0
- /package/dist/esm/{chunk-2I56E4T2.mjs.map → chunk-5S3Z7MT4.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZS3EWM5A.mjs.map → chunk-5SGSPCOY.mjs.map} +0 -0
- /package/dist/esm/{chunk-6AGTDRNM.mjs.map → chunk-6DMDYBV6.mjs.map} +0 -0
- /package/dist/esm/{chunk-HAMXSLWF.mjs.map → chunk-73GCGRFW.mjs.map} +0 -0
- /package/dist/esm/{chunk-GIQQF2PD.mjs.map → chunk-7JK7UG4E.mjs.map} +0 -0
- /package/dist/esm/{chunk-5AAFF2PV.mjs.map → chunk-A2AEFKXS.mjs.map} +0 -0
- /package/dist/esm/{chunk-QBP4XJT5.mjs.map → chunk-AT2ZGTXQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-RNAKZVRN.mjs.map → chunk-AZ6LVQEG.mjs.map} +0 -0
- /package/dist/esm/{chunk-TRU3EK64.mjs.map → chunk-BG2TZI3H.mjs.map} +0 -0
- /package/dist/esm/{chunk-37UZKMJI.mjs.map → chunk-BOWPP6YG.mjs.map} +0 -0
- /package/dist/esm/{chunk-HDTKBFRX.mjs.map → chunk-BVVHGSWC.mjs.map} +0 -0
- /package/dist/esm/{chunk-WIXNX7HY.mjs.map → chunk-CC7VOPYH.mjs.map} +0 -0
- /package/dist/esm/{chunk-5ZBHIUWG.mjs.map → chunk-CDQGPCHU.mjs.map} +0 -0
- /package/dist/esm/{chunk-2QRWGJJA.mjs.map → chunk-CL6EEMSL.mjs.map} +0 -0
- /package/dist/esm/{chunk-RUDS7RSB.mjs.map → chunk-DMSHPWA5.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z36WHOZV.mjs.map → chunk-EE7GDBA5.mjs.map} +0 -0
- /package/dist/esm/{chunk-5XXIIWG7.mjs.map → chunk-EUGLLGYW.mjs.map} +0 -0
- /package/dist/esm/{chunk-JY3JJ55D.mjs.map → chunk-F2RY4YQ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-5CCHECTE.mjs.map → chunk-FTZGP6XW.mjs.map} +0 -0
- /package/dist/esm/{chunk-LZS7BQ2B.mjs.map → chunk-GLATLXF6.mjs.map} +0 -0
- /package/dist/esm/{chunk-R3Y6WH2U.mjs.map → chunk-IAVI3H4V.mjs.map} +0 -0
- /package/dist/esm/{chunk-N3OYD6VZ.mjs.map → chunk-IFXUWUP2.mjs.map} +0 -0
- /package/dist/esm/{chunk-PGZWRY7A.mjs.map → chunk-JN36BNWA.mjs.map} +0 -0
- /package/dist/esm/{chunk-XIY2VORC.mjs.map → chunk-JNRMHDRA.mjs.map} +0 -0
- /package/dist/esm/{chunk-PHG2IWZW.mjs.map → chunk-JVTDP4KV.mjs.map} +0 -0
- /package/dist/esm/{chunk-EN2HDNFE.mjs.map → chunk-KW4FVBDD.mjs.map} +0 -0
- /package/dist/esm/{chunk-DXQT55L3.mjs.map → chunk-KYJU5PWF.mjs.map} +0 -0
- /package/dist/esm/{chunk-RAXP3STS.mjs.map → chunk-L5J3V3HW.mjs.map} +0 -0
- /package/dist/esm/{chunk-TIZL5YVP.mjs.map → chunk-LDZPO76C.mjs.map} +0 -0
- /package/dist/esm/{chunk-L5I7F3NZ.mjs.map → chunk-M22UGFQ5.mjs.map} +0 -0
- /package/dist/esm/{chunk-IFHQSZLK.mjs.map → chunk-MK2QAHXC.mjs.map} +0 -0
- /package/dist/esm/{chunk-XHCALZ7X.mjs.map → chunk-OAEDFM7T.mjs.map} +0 -0
- /package/dist/esm/{chunk-QBWGWHJK.mjs.map → chunk-OXM4BVAY.mjs.map} +0 -0
- /package/dist/esm/{chunk-WSVOJSAC.mjs.map → chunk-P3J54CQG.mjs.map} +0 -0
- /package/dist/esm/{chunk-JNHFQTFC.mjs.map → chunk-RAJTNQNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-LD5MUWGW.mjs.map → chunk-RBJNSUSU.mjs.map} +0 -0
- /package/dist/esm/{chunk-OLPI7QAH.mjs.map → chunk-RNJHULIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-QRTZYRH2.mjs.map → chunk-RNRNGJDA.mjs.map} +0 -0
- /package/dist/esm/{chunk-OS2EG6AE.mjs.map → chunk-SGQFWWLQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-FPF4KZ5M.mjs.map → chunk-SOLWFAUY.mjs.map} +0 -0
- /package/dist/esm/{chunk-DCUVV3VY.mjs.map → chunk-T5BCTWGK.mjs.map} +0 -0
- /package/dist/esm/{chunk-S3FVA55H.mjs.map → chunk-TPJLAYW6.mjs.map} +0 -0
- /package/dist/esm/{chunk-EKZQ3EYX.mjs.map → chunk-UCRROMZN.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZUTOMGB7.mjs.map → chunk-UGL2GPGK.mjs.map} +0 -0
- /package/dist/esm/{chunk-K6MZXKVV.mjs.map → chunk-VYMRIKUV.mjs.map} +0 -0
- /package/dist/esm/{chunk-VQTEGTUQ.mjs.map → chunk-WSZCPSV4.mjs.map} +0 -0
- /package/dist/esm/{chunk-UKAXCARD.mjs.map → chunk-WV2VJQDS.mjs.map} +0 -0
- /package/dist/esm/{chunk-KSKQVOBA.mjs.map → chunk-WZCKSN2U.mjs.map} +0 -0
- /package/dist/esm/{chunk-NV6DHDM3.mjs.map → chunk-XFJD6QIP.mjs.map} +0 -0
- /package/dist/esm/{chunk-BQXVHY7J.mjs.map → chunk-XFY4O2S3.mjs.map} +0 -0
- /package/dist/esm/{chunk-FO4F3OJJ.mjs.map → chunk-XQ7ONNII.mjs.map} +0 -0
- /package/dist/esm/{chunk-7D3RY73L.mjs.map → chunk-Y267I7DC.mjs.map} +0 -0
- /package/dist/esm/{chunk-KSUZS6EL.mjs.map → chunk-YZ5BCOGI.mjs.map} +0 -0
- /package/dist/esm/{chunk-JDYASF3E.mjs.map → chunk-ZPIMARUG.mjs.map} +0 -0
- /package/dist/esm/{chunk-7V6RL27I.mjs.map → chunk-ZPQUCT22.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"_spec": "cucumber-js -p default"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aptos-labs/aptos-cli": "^1.0.
|
|
53
|
+
"@aptos-labs/aptos-cli": "^1.0.2",
|
|
54
54
|
"@aptos-labs/aptos-client": "^0.1.1",
|
|
55
55
|
"@noble/curves": "^1.4.0",
|
|
56
56
|
"@noble/hashes": "^1.4.0",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"typedoc-plugin-missing-exports": "^3.0.0",
|
|
97
97
|
"typescript": "^5.6.2"
|
|
98
98
|
},
|
|
99
|
-
"version": "1.
|
|
99
|
+
"version": "1.31.0"
|
|
100
100
|
}
|
package/src/api/account.ts
CHANGED
|
@@ -675,7 +675,9 @@ export class Account {
|
|
|
675
675
|
* is specified.
|
|
676
676
|
* @param args.faMetadataAddress The fungible asset metadata address to query. Note: If not provided, it may be automatically
|
|
677
677
|
* populated if `coinType` is specified.
|
|
678
|
-
* @param args.minimumLedgerVersion
|
|
678
|
+
* @param args.minimumLedgerVersion Not used anymore, here for backward compatibility
|
|
679
|
+
* see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, will be removed in the near future.
|
|
680
|
+
* Optional ledger version to sync up to before querying.
|
|
679
681
|
* @returns The current amount of the specified coin held by the account.
|
|
680
682
|
*
|
|
681
683
|
* @example
|
|
@@ -703,8 +705,16 @@ export class Account {
|
|
|
703
705
|
faMetadataAddress?: AccountAddressInput;
|
|
704
706
|
minimumLedgerVersion?: AnyNumber;
|
|
705
707
|
}): Promise<number> {
|
|
706
|
-
const { accountAddress, coinType, faMetadataAddress } = args;
|
|
708
|
+
const { accountAddress, coinType, faMetadataAddress, minimumLedgerVersion } = args;
|
|
707
709
|
|
|
710
|
+
if (minimumLedgerVersion) {
|
|
711
|
+
// eslint-disable-next-line no-console
|
|
712
|
+
console.warn(
|
|
713
|
+
`minimumLedgerVersion is not used anymore, here for backward
|
|
714
|
+
compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519,
|
|
715
|
+
will be removed in the near future`,
|
|
716
|
+
);
|
|
717
|
+
}
|
|
708
718
|
// Attempt to populate the CoinType field if the FA address is provided.
|
|
709
719
|
// We cannot do this internally due to dependency cycles issue.
|
|
710
720
|
let coinAssetType: MoveStructId | undefined = coinType;
|
package/src/api/keyless.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getProof,
|
|
11
11
|
updateFederatedKeylessJwkSetTransaction,
|
|
12
12
|
} from "../internal/keyless";
|
|
13
|
-
import { SimpleTransaction } from "../transactions";
|
|
13
|
+
import { InputGenerateTransactionOptions, SimpleTransaction } from "../transactions";
|
|
14
14
|
import { HexInput } from "../types";
|
|
15
15
|
import { AptosConfig } from "./aptosConfig";
|
|
16
16
|
|
|
@@ -214,6 +214,7 @@ export class Keyless {
|
|
|
214
214
|
sender: Account;
|
|
215
215
|
iss: string;
|
|
216
216
|
jwksUrl?: string;
|
|
217
|
+
options?: InputGenerateTransactionOptions;
|
|
217
218
|
}): Promise<SimpleTransaction> {
|
|
218
219
|
return updateFederatedKeylessJwkSetTransaction({ aptosConfig: this.config, ...args });
|
|
219
220
|
}
|
package/src/cli/move.ts
CHANGED
|
@@ -186,8 +186,8 @@ export class Move {
|
|
|
186
186
|
cliArgs.push(...extraArguments);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
const
|
|
190
|
-
return { objectAddress: this.extractAddressFromOutput(
|
|
189
|
+
const { output } = await this.runCommand(cliArgs, showStdout);
|
|
190
|
+
return { objectAddress: this.extractAddressFromOutput(output) };
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
/**
|
|
@@ -318,11 +318,14 @@ export class Move {
|
|
|
318
318
|
* @returns The standard output generated by the command.
|
|
319
319
|
*/
|
|
320
320
|
// eslint-disable-next-line class-methods-use-this
|
|
321
|
-
private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ output: string }> {
|
|
321
|
+
private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ result?: any; output: string }> {
|
|
322
322
|
return new Promise((resolve, reject) => {
|
|
323
323
|
const currentPlatform = platform();
|
|
324
324
|
let childProcess;
|
|
325
325
|
let stdout = "";
|
|
326
|
+
// CLI final stdout is the Result/Error JSON string output
|
|
327
|
+
// so we need to keep track of the last stdout
|
|
328
|
+
let lastStdout = "";
|
|
326
329
|
|
|
327
330
|
// Check if current OS is windows
|
|
328
331
|
if (currentPlatform === "win32") {
|
|
@@ -332,18 +335,30 @@ export class Move {
|
|
|
332
335
|
}
|
|
333
336
|
|
|
334
337
|
childProcess.stdout.on("data", (data) => {
|
|
338
|
+
lastStdout = data.toString();
|
|
335
339
|
stdout += data.toString();
|
|
336
340
|
});
|
|
337
341
|
|
|
338
342
|
if (showStdout) {
|
|
339
343
|
childProcess.stdout.pipe(process.stdout);
|
|
340
344
|
childProcess.stderr.pipe(process.stderr);
|
|
341
|
-
process.stdin.pipe(childProcess.stdin);
|
|
342
345
|
}
|
|
346
|
+
process.stdin.pipe(childProcess.stdin);
|
|
343
347
|
|
|
344
348
|
childProcess.on("close", (code) => {
|
|
345
349
|
if (code === 0) {
|
|
346
|
-
|
|
350
|
+
try {
|
|
351
|
+
// parse the last stdout as it might be the result
|
|
352
|
+
const parsed = JSON.parse(lastStdout);
|
|
353
|
+
if (parsed.Error) {
|
|
354
|
+
reject(new Error(`Error: ${parsed.Error}`)); // Reject if the "Error" key exists
|
|
355
|
+
} else if (parsed.Result) {
|
|
356
|
+
resolve({ result: parsed.Result, output: stdout }); // Resolve if the "Result" key exists
|
|
357
|
+
}
|
|
358
|
+
} catch (error: any) {
|
|
359
|
+
// resolve the stdout as it might be just a stdout
|
|
360
|
+
resolve({ output: stdout });
|
|
361
|
+
}
|
|
347
362
|
} else {
|
|
348
363
|
reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code
|
|
349
364
|
}
|
package/src/internal/keyless.ts
CHANGED
|
@@ -28,7 +28,7 @@ import { FederatedKeylessPublicKey } from "../core/crypto/federatedKeyless";
|
|
|
28
28
|
import { FederatedKeylessAccount } from "../account/FederatedKeylessAccount";
|
|
29
29
|
import { MoveVector } from "../bcs";
|
|
30
30
|
import { generateTransaction } from "./transactionSubmission";
|
|
31
|
-
import { SimpleTransaction } from "../transactions";
|
|
31
|
+
import { InputGenerateTransactionOptions, SimpleTransaction } from "../transactions";
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Retrieves a pepper value based on the provided configuration and authentication details.
|
|
@@ -218,8 +218,9 @@ export async function updateFederatedKeylessJwkSetTransaction(args: {
|
|
|
218
218
|
sender: Account;
|
|
219
219
|
iss: string;
|
|
220
220
|
jwksUrl?: string;
|
|
221
|
+
options?: InputGenerateTransactionOptions;
|
|
221
222
|
}): Promise<SimpleTransaction> {
|
|
222
|
-
const { aptosConfig, sender, iss } = args;
|
|
223
|
+
const { aptosConfig, sender, iss, options } = args;
|
|
223
224
|
const jwksUrl = args.jwksUrl ?? (iss.endsWith("/") ? `${iss}.well-known/jwks.json` : `${iss}/.well-known/jwks.json`);
|
|
224
225
|
const response = await fetch(jwksUrl);
|
|
225
226
|
if (!response.ok) {
|
|
@@ -239,5 +240,6 @@ export async function updateFederatedKeylessJwkSetTransaction(args: {
|
|
|
239
240
|
MoveVector.MoveString(jwks.keys.map((key) => key.n)),
|
|
240
241
|
],
|
|
241
242
|
},
|
|
243
|
+
options,
|
|
242
244
|
});
|
|
243
245
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/keyless.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account, EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { FederatedKeylessAccount } from \"../account/FederatedKeylessAccount\";\nimport { AccountAddressInput, ZeroKnowledgeSig } from \"../core\";\nimport {\n deriveKeylessAccount,\n getPepper,\n getProof,\n updateFederatedKeylessJwkSetTransaction,\n} from \"../internal/keyless\";\nimport { SimpleTransaction } from \"../transactions\";\nimport { HexInput } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to query all `Keyless` related queries on Aptos.\n *\n * More documentation on how to integrate Keyless Accounts see the below\n * [Aptos Keyless Integration Guide](https://aptos.dev/guides/keyless-accounts/#aptos-keyless-integration-guide).\n */\nexport class Keyless {\n /**\n * Initializes a new instance of the Aptos class with the provided configuration.\n * This allows you to interact with the Aptos blockchain using the specified network settings.\n *\n * @param config - The configuration settings for connecting to the Aptos network.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your desired network\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Fetches the pepper from the Aptos pepper service API.\n *\n * @param args - The arguments for fetching the pepper.\n * @param args.jwt - JWT token.\n * @param args.ephemeralKeyPair - The EphemeralKeyPair used to generate the nonce in the JWT token.\n * @param args.derivationPath - A derivation path used for creating multiple accounts per user via the BIP-44 standard. Defaults\n * to \"m/44'/637'/0'/0'/0\".\n * @returns The pepper which is a Uint8Array of length 31.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const ephemeralKeyPair = new EphemeralKeyPair(); // create a new ephemeral key pair\n * const jwt = \"your_jwt_token\"; // replace with a real JWT token\n *\n * // Fetching the pepper using the provided JWT and ephemeral key pair\n * const pepper = await aptos.getPepper({\n * jwt,\n * ephemeralKeyPair,\n * // derivationPath: \"m/44'/637'/0'/0'/0\" // specify your own if needed\n * });\n *\n * console.log(\"Fetched pepper:\", pepper);\n * }\n * runExample().catch(console.error);\n * ```\n */\n async getPepper(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n derivationPath?: string;\n }): Promise<Uint8Array> {\n return getPepper({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches a proof from the Aptos prover service API.\n *\n * @param args - The arguments for fetching the proof.\n * @param args.jwt - JWT token.\n * @param args.ephemeralKeyPair - The EphemeralKeyPair used to generate the nonce in the JWT token.\n * @param args.pepper - The pepper used for the account. If not provided, it will be fetched from the Aptos pepper service.\n * @param args.uidKey - A key in the JWT token to use to set the uidVal in the IdCommitment.\n *\n * @returns The proof which is represented by a ZeroKnowledgeSig.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, EphemeralKeyPair, getPepper } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const jwt = \"your_jwt_token\"; // replace with a real JWT token\n * const ephemeralKeyPair = new EphemeralKeyPair(); // create a new ephemeral key pair\n *\n * // Fetch the proof using the getProof function\n * const proof = await aptos.getProof({\n * jwt,\n * ephemeralKeyPair,\n * pepper: await getPepper({}), // fetch the pepper if not provided\n * uidKey: \"sub\", // specify the uid key\n * });\n *\n * console.log(\"Fetched proof:\", proof);\n * }\n * runExample().catch(console.error);\n * ```\n */\n async getProof(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper?: HexInput;\n uidKey?: string;\n }): Promise<ZeroKnowledgeSig> {\n return getProof({ aptosConfig: this.config, ...args });\n }\n\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<KeylessAccount>;\n\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<FederatedKeylessAccount>;\n\n /**\n * Derives a Keyless Account from the provided JWT token and corresponding EphemeralKeyPair. This function computes the proof\n * via the proving service and can fetch the pepper from the pepper service if not explicitly provided.\n *\n * @param args - The arguments required to derive the Keyless Account.\n * @param args.jwt - The JWT token used for deriving the account.\n * @param args.ephemeralKeyPair - The EphemeralKeyPair used to generate the nonce in the JWT token.\n * @param args.jwkAddress - The address the where the JWKs used to verify signatures are found. Setting the value derives a\n * FederatedKeylessAccount\n * @param args.uidKey - An optional key in the JWT token to set the uidVal in the IdCommitment.\n * @param args.pepper - An optional pepper value.\n * @param args.proofFetchCallback - An optional callback function for fetching the proof in the background, allowing for a more\n * responsive user experience.\n *\n * @returns A KeylessAccount that can be used to sign transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, deriveKeylessAccount } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const jwt = \"your_jwt_token\"; // replace with a real JWT token\n * const ephemeralKeyPair = new EphemeralKeyPair(); // create a new ephemeral key pair\n *\n * // Deriving the Keyless Account\n * const keylessAccount = await deriveKeylessAccount({\n * jwt,\n * ephemeralKeyPair,\n * uidKey: \"your_uid_key\", // optional\n * pepper: \"your_pepper\", // optional\n * });\n *\n * console.log(\"Keyless Account derived:\", keylessAccount);\n * }\n * runExample().catch(console.error);\n * ```\n */\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress?: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<KeylessAccount | FederatedKeylessAccount> {\n return deriveKeylessAccount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * This installs a set of FederatedJWKs at an address for a given iss.\n *\n * It will fetch the JWK set from the well-known endpoint and update the FederatedJWKs at the sender's address\n * to reflect it.\n *\n * @param args.sender The account that will install the JWKs\n * @param args.iss the iss claim of the federated OIDC provider.\n * @param args.jwksUrl the URL to find the corresponding JWKs. For supported IDP providers this parameter in not necessary.\n *\n * @returns The pending transaction that results from submission.\n */\n async updateFederatedKeylessJwkSetTransaction(args: {\n sender: Account;\n iss: string;\n jwksUrl?: string;\n }): Promise<SimpleTransaction> {\n return updateFederatedKeylessJwkSetTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"8DAsBO,IAAMA,EAAN,KAAc,CAuBnB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAmC3C,MAAM,UAAUC,EAIQ,CACtB,OAAOC,EAAU,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CACxD,CAqCA,MAAM,SAASA,EAKe,CAC5B,OAAOE,EAAS,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACvD,CA2DA,MAAM,qBAAqBA,EAO2B,CACpD,OAAOG,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CACnE,CAcA,MAAM,wCAAwCA,EAIf,CAC7B,OAAOI,EAAwC,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CACtF,CACF","names":["Keyless","config","args","getPepper","getProof","deriveKeylessAccount","updateFederatedKeylessJwkSetTransaction"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as j}from"./chunk-2I56E4T2.mjs";import{g}from"./chunk-7D3RY73L.mjs";import{a as l}from"./chunk-L5I7F3NZ.mjs";import{a as S}from"./chunk-LZS7BQ2B.mjs";import{a as C}from"./chunk-37UZKMJI.mjs";import{i as K,l as k,m as A,n as x,p as b}from"./chunk-5CCHECTE.mjs";import{b as P}from"./chunk-XHCALZ7X.mjs";import{e as h,f as w}from"./chunk-WOOH5MMX.mjs";import{a as d}from"./chunk-IECDO22V.mjs";import{b as p}from"./chunk-KFNDDPOW.mjs";import{jwtDecode as E}from"jwt-decode";async function v(r){let{aptosConfig:s,jwt:i,ephemeralKeyPair:e,uidKey:a="sub",derivationPath:n}=r,t={jwt_b64:i,epk:e.getPublicKey().bcsToHex().toStringWithoutPrefix(),exp_date_secs:e.expiryDateSecs,epk_blinder:p.fromHexInput(e.blinder).toStringWithoutPrefix(),uid_key:a,derivation_path:n},{data:o}=await h({aptosConfig:s,path:"fetch",body:t,originMethod:"getPepper",overrides:{WITH_CREDENTIALS:!1}});return p.fromHexInput(o.pepper).toUint8Array()}async function _(r){let{aptosConfig:s,jwt:i,ephemeralKeyPair:e,pepper:a=await v(r),uidKey:n="sub"}=r;if(p.fromHexInput(a).toUint8Array().length!==l.PEPPER_LENGTH)throw new Error(`Pepper needs to be ${l.PEPPER_LENGTH} bytes`);let{maxExpHorizonSecs:t}=await b({aptosConfig:s}),o=E(i);if(typeof o.iat!="number")throw new Error("iat was not found");if(t<e.expiryDateSecs-o.iat)throw Error(`The EphemeralKeyPair is too long lived. It's lifespan must be less than ${t}`);let f={jwt_b64:i,epk:e.getPublicKey().bcsToHex().toStringWithoutPrefix(),epk_blinder:p.fromHexInput(e.blinder).toStringWithoutPrefix(),exp_date_secs:e.expiryDateSecs,exp_horizon_secs:t,pepper:p.fromHexInput(a).toStringWithoutPrefix(),uid_key:n},{data:u}=await w({aptosConfig:s,path:"prove",body:f,originMethod:"getProof",overrides:{WITH_CREDENTIALS:!1}}),c=u.proof,y=new k({a:c.a,b:c.b,c:c.c});return new x({proof:new A(y,0),trainingWheelsSignature:P.fromHex(u.training_wheels_signature),expHorizonSecs:t})}async function V(r){let{aptosConfig:s,jwt:i,jwkAddress:e,uidKey:a,proofFetchCallback:n,pepper:t=await v(r)}=r,o=_({...r,pepper:t}),f=n?o:await o;if(e!==void 0){let y=C.fromJwtAndPepper({jwt:i,pepper:t,jwkAddress:e,uidKey:a}),m=await g({aptosConfig:s,authenticationKey:y.authKey().derivedAddress()});return S.create({...r,address:m,proof:f,pepper:t,proofFetchCallback:n,jwkAddress:e})}let u=K.fromJwtAndPepper({jwt:i,pepper:t,uidKey:a}),c=await g({aptosConfig:s,authenticationKey:u.authKey().derivedAddress()});return l.create({...r,address:c,proof:f,pepper:t,proofFetchCallback:n})}async function O(r){let{aptosConfig:s,sender:i,iss:e}=r,a=r.jwksUrl??(e.endsWith("/")?`${e}.well-known/jwks.json`:`${e}/.well-known/jwks.json`),n=await fetch(a);if(!n.ok)throw new Error(`Failed to fetch JWKS: ${n.status} ${n.statusText}`);let t=await n.json();return j({aptosConfig:s,sender:i.accountAddress,data:{function:"0x1::jwks::update_federated_jwk_set",functionArguments:[e,d.MoveString(t.keys.map(o=>o.kid)),d.MoveString(t.keys.map(o=>o.alg)),d.MoveString(t.keys.map(o=>o.e)),d.MoveString(t.keys.map(o=>o.n))]}})}export{v as a,_ as b,V as c,O as d};
|
|
2
|
-
//# sourceMappingURL=chunk-FY7TSOUU.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/internal/keyless.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/keyless}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * keyless namespace and without having a dependency cycle error.\n */\nimport { jwtDecode, JwtPayload } from \"jwt-decode\";\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { postAptosPepperService, postAptosProvingService } from \"../client\";\nimport {\n AccountAddressInput,\n EphemeralSignature,\n Groth16Zkp,\n Hex,\n KeylessPublicKey,\n ZeroKnowledgeSig,\n ZkProof,\n getKeylessConfig,\n} from \"../core\";\nimport { HexInput, ZkpVariant } from \"../types\";\nimport { Account, EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { PepperFetchRequest, PepperFetchResponse, ProverRequest, ProverResponse } from \"../types/keyless\";\nimport { lookupOriginalAccountAddress } from \"./account\";\nimport { FederatedKeylessPublicKey } from \"../core/crypto/federatedKeyless\";\nimport { FederatedKeylessAccount } from \"../account/FederatedKeylessAccount\";\nimport { MoveVector } from \"../bcs\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { SimpleTransaction } from \"../transactions\";\n\n/**\n * Retrieves a pepper value based on the provided configuration and authentication details.\n *\n * @param args - The arguments required to fetch the pepper.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.jwt - The JSON Web Token used for authentication.\n * @param args.ephemeralKeyPair - The ephemeral key pair used for the operation.\n * @param args.uidKey - An optional unique identifier key (defaults to \"sub\").\n * @param args.derivationPath - An optional derivation path for the key.\n * @returns A Uint8Array containing the fetched pepper value.\n */\nexport async function getPepper(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n derivationPath?: string;\n}): Promise<Uint8Array> {\n const { aptosConfig, jwt, ephemeralKeyPair, uidKey = \"sub\", derivationPath } = args;\n\n const body = {\n jwt_b64: jwt,\n epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),\n exp_date_secs: ephemeralKeyPair.expiryDateSecs,\n epk_blinder: Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),\n uid_key: uidKey,\n derivation_path: derivationPath,\n };\n const { data } = await postAptosPepperService<PepperFetchRequest, PepperFetchResponse>({\n aptosConfig,\n path: \"fetch\",\n body,\n originMethod: \"getPepper\",\n overrides: { WITH_CREDENTIALS: false },\n });\n return Hex.fromHexInput(data.pepper).toUint8Array();\n}\n\n/**\n * Generates a zero-knowledge proof based on the provided parameters.\n * This function is essential for creating a signed proof that can be used in various cryptographic operations.\n *\n * @param args - The parameters required to generate the proof.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.jwt - The JSON Web Token used for authentication.\n * @param args.ephemeralKeyPair - The ephemeral key pair used for generating the proof.\n * @param args.pepper - An optional hex input used to enhance security (default is generated if not provided).\n * @param args.uidKey - An optional string that specifies the unique identifier key (defaults to \"sub\").\n * @throws Error if the pepper length is not valid or if the ephemeral key pair's lifespan exceeds the maximum allowed.\n */\nexport async function getProof(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper?: HexInput;\n uidKey?: string;\n}): Promise<ZeroKnowledgeSig> {\n const { aptosConfig, jwt, ephemeralKeyPair, pepper = await getPepper(args), uidKey = \"sub\" } = args;\n if (Hex.fromHexInput(pepper).toUint8Array().length !== KeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper needs to be ${KeylessAccount.PEPPER_LENGTH} bytes`);\n }\n const { maxExpHorizonSecs } = await getKeylessConfig({ aptosConfig });\n const decodedJwt = jwtDecode<JwtPayload>(jwt);\n if (typeof decodedJwt.iat !== \"number\") {\n throw new Error(\"iat was not found\");\n }\n if (maxExpHorizonSecs < ephemeralKeyPair.expiryDateSecs - decodedJwt.iat) {\n throw Error(`The EphemeralKeyPair is too long lived. It's lifespan must be less than ${maxExpHorizonSecs}`);\n }\n const json = {\n jwt_b64: jwt,\n epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),\n epk_blinder: Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),\n exp_date_secs: ephemeralKeyPair.expiryDateSecs,\n exp_horizon_secs: maxExpHorizonSecs,\n pepper: Hex.fromHexInput(pepper).toStringWithoutPrefix(),\n uid_key: uidKey,\n };\n\n const { data } = await postAptosProvingService<ProverRequest, ProverResponse>({\n aptosConfig,\n path: \"prove\",\n body: json,\n originMethod: \"getProof\",\n overrides: { WITH_CREDENTIALS: false },\n });\n\n const proofPoints = data.proof;\n const groth16Zkp = new Groth16Zkp({\n a: proofPoints.a,\n b: proofPoints.b,\n c: proofPoints.c,\n });\n\n const signedProof = new ZeroKnowledgeSig({\n proof: new ZkProof(groth16Zkp, ZkpVariant.Groth16),\n trainingWheelsSignature: EphemeralSignature.fromHex(data.training_wheels_signature),\n expHorizonSecs: maxExpHorizonSecs,\n });\n return signedProof;\n}\n\n/**\n * Derives a keyless account by fetching the necessary proof and looking up the original account address.\n * This function helps in creating a keyless account that can be used without managing private keys directly.\n *\n * @param args - The arguments required to derive the keyless account.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.jwt - The JSON Web Token used for authentication.\n * @param args.ephemeralKeyPair - The ephemeral key pair used for cryptographic operations.\n * @param args.uidKey - An optional unique identifier key for the user.\n * @param args.pepper - An optional hexadecimal input used for additional security.\n * @param args.proofFetchCallback - An optional callback function to handle the proof fetch outcome.\n * @returns A keyless account object.\n */\nexport async function deriveKeylessAccount(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n}): Promise<KeylessAccount>;\n\nexport async function deriveKeylessAccount(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n}): Promise<FederatedKeylessAccount>;\n\nexport async function deriveKeylessAccount(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress?: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n}): Promise<KeylessAccount | FederatedKeylessAccount> {\n const { aptosConfig, jwt, jwkAddress, uidKey, proofFetchCallback, pepper = await getPepper(args) } = args;\n const proofPromise = getProof({ ...args, pepper });\n // If a callback is provided, pass in the proof as a promise to KeylessAccount.create. This will make the proof be fetched in the\n // background and the callback will handle the outcome of the fetch. This allows the developer to not have to block on the proof fetch\n // allowing for faster rendering of UX.\n //\n // If no callback is provided, the just await the proof fetch and continue synchronously.\n const proof = proofFetchCallback ? proofPromise : await proofPromise;\n\n // Look up the original address to handle key rotations and then instantiate the account.\n if (jwkAddress !== undefined) {\n const publicKey = FederatedKeylessPublicKey.fromJwtAndPepper({ jwt, pepper, jwkAddress, uidKey });\n const address = await lookupOriginalAccountAddress({\n aptosConfig,\n authenticationKey: publicKey.authKey().derivedAddress(),\n });\n\n return FederatedKeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback, jwkAddress });\n }\n\n const publicKey = KeylessPublicKey.fromJwtAndPepper({ jwt, pepper, uidKey });\n const address = await lookupOriginalAccountAddress({\n aptosConfig,\n authenticationKey: publicKey.authKey().derivedAddress(),\n });\n return KeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback });\n}\n\ninterface JWK {\n kty: string; // Key type\n kid: string; // Key ID\n alg: string; // Algorithm used with the key\n n: string; // Modulus (for RSA keys)\n e: string; // Exponent (for RSA keys)\n}\n\ninterface JWKS {\n keys: JWK[];\n}\n\nexport async function updateFederatedKeylessJwkSetTransaction(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n iss: string;\n jwksUrl?: string;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, iss } = args;\n const jwksUrl = args.jwksUrl ?? (iss.endsWith(\"/\") ? `${iss}.well-known/jwks.json` : `${iss}/.well-known/jwks.json`);\n const response = await fetch(jwksUrl);\n if (!response.ok) {\n throw new Error(`Failed to fetch JWKS: ${response.status} ${response.statusText}`);\n }\n const jwks: JWKS = await response.json();\n return generateTransaction({\n aptosConfig,\n sender: sender.accountAddress,\n data: {\n function: \"0x1::jwks::update_federated_jwk_set\",\n functionArguments: [\n iss,\n MoveVector.MoveString(jwks.keys.map((key) => key.kid)),\n MoveVector.MoveString(jwks.keys.map((key) => key.alg)),\n Mo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AAiB,CAAE,IAAAjC,EAAK,OAAAS,EAAQ,OAAAP,CAAO,CAAC,EACrE4B,EAAU,MAAMC,EAA6B,CACjD,YAAAhC,EACA,kBAAmB6B,EAAU,QAAQ,EAAE,eAAe,CACxD,CAAC,EACD,OAAOlB,EAAe,OAAO,CAAE,GAAGZ,EAAM,QAAAgC,EAAS,MAAAH,EAAO,OAAAlB,EAAQ,mBAAAgB,CAAmB,CAAC,CACtF,CAcA,eAAsBS,EAAwCpC,EAK/B,CAC7B,GAAM,CAAE,YAAAC,EAAa,OAAAoC,EAAQ,IAAAC,CAAI,EAAItC,EAC/BuC,EAAUvC,EAAK,UAAYsC,EAAI,SAAS,GAAG,EAAI,GAAGA,CAAG,wBAA0B,GAAGA,CAAG,0BACrFE,EAAW,MAAM,MAAMD,CAAO,EACpC,GAAI,CAACC,EAAS,GACZ,MAAM,IAAI,MAAM,yBAAyBA,EAAS,MAAM,IAAIA,EAAS,UAAU,EAAE,EAEnF,IAAMC,EAAa,MAAMD,EAAS,KAAK,EACvC,OAAOE,EAAoB,CACzB,YAAAzC,EACA,OAAQoC,EAAO,eACf,KAAM,CACJ,SAAU,sCACV,kBAAmB,CACjBC,EACAK,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,GAAG,CAAC,EACrDD,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,GAAG,CAAC,EACrDD,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,CAAC,CAAC,EACnDD,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,CAAC,CAAC,CACrD,CACF,CACF,CAAC,CACH","names":["jwtDecode","getPepper","args","aptosConfig","jwt","ephemeralKeyPair","uidKey","derivationPath","body","Hex","data","postAptosPepperService","getProof","pepper","KeylessAccount","maxExpHorizonSecs","getKeylessConfig","decodedJwt","jwtDecode","json","postAptosProvingService","proofPoints","groth16Zkp","Groth16Zkp","ZeroKnowledgeSig","ZkProof","EphemeralSignature","deriveKeylessAccount","jwkAddress","proofFetchCallback","proofPromise","proof","publicKey","FederatedKeylessPublicKey","address","lookupOriginalAccountAddress","FederatedKeylessAccount","KeylessPublicKey","updateFederatedKeylessJwkSetTransaction","sender","iss","jwksUrl","response","jwks","generateTransaction","MoveVector","key"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{spawn as c}from"child_process";import{platform as m}from"os";var p=class{async init(e){let{network:t,profile:o,extraArguments:r,showStdout:a}=e,s=["aptos","init",`--network=${t??"local"}`,`--profile=${o??"default"}`];return r&&s.push(...r),this.runCommand(s,a)}async compile(e){let{packageDirectoryPath:t,namedAddresses:o,extraArguments:r,showStdout:a}=e,s=["aptos","move","compile","--package-dir",t],d=this.parseNamedAddresses(o);return s.push(...this.prepareNamedAddresses(d)),r&&s.push(...r),this.runCommand(s,a)}async test(e){let{packageDirectoryPath:t,namedAddresses:o,extraArguments:r,showStdout:a}=e,s=["aptos","move","test","--package-dir",t],d=this.parseNamedAddresses(o);return s.push(...this.prepareNamedAddresses(d)),r&&s.push(...r),this.runCommand(s,a)}async publish(e){let{packageDirectoryPath:t,namedAddresses:o,profile:r,extraArguments:a,showStdout:s}=e,d=["aptos","move","publish","--package-dir",t,`--profile=${r??"default"}`],n=this.parseNamedAddresses(o);return d.push(...this.prepareNamedAddresses(n)),a&&d.push(...a),this.runCommand(d,s)}async createObjectAndPublishPackage(e){let{packageDirectoryPath:t,addressName:o,namedAddresses:r,profile:a,extraArguments:s,showStdout:d}=e,n=["aptos","move","create-object-and-publish-package","--package-dir",t,"--address-name",o,`--profile=${a??"default"}`],i=this.parseNamedAddresses(r);n.push(...this.prepareNamedAddresses(i)),s&&n.push(...s);let u=await this.runCommand(n,d);return{objectAddress:this.extractAddressFromOutput(u.output)}}async upgradeObjectPackage(e){let{packageDirectoryPath:t,objectAddress:o,namedAddresses:r,profile:a,extraArguments:s,showStdout:d}=e,n=["aptos","move","upgrade-object-package","--package-dir",t,"--object-address",o,`--profile=${a??"default"}`],i=this.parseNamedAddresses(r);return n.push(...this.prepareNamedAddresses(i)),s&&n.push(...s),this.runCommand(n,d)}async buildPublishPayload(e){let{outputFile:t,packageDirectoryPath:o,namedAddresses:r,extraArguments:a,showStdout:s}=e,d=["aptos","move","build-publish-payload","--json-output-file",t,"--package-dir",o],n=this.parseNamedAddresses(r);return d.push(...this.prepareNamedAddresses(n)),a&&d.push(...a),this.runCommand(d,s)}async runScript(e){let{compiledScriptPath:t,profile:o,extraArguments:r,showStdout:a}=e,s=["aptos","move","run-script","--compiled-script-path",t,`--profile=${o??"default"}`];return r&&s.push(...r),this.runCommand(s,a)}async runCommand(e,t=!0){return new Promise((o,r)=>{let a=m(),s,d="";a==="win32"?s=c("npx",e,{shell:!0}):s=c("npx",e),s.stdout.on("data",n=>{d+=n.toString()}),t&&(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr),process.stdin.pipe(s.stdin)),s.on("close",n=>{n===0?o({output:d}):r(new Error(`Child process exited with code ${n}`))})})}prepareNamedAddresses(e){let t=e.size,o=[];if(t===0)return o;o.push("--named-addresses");let r=[];return e.forEach((a,s)=>{let d=`${s}=${a.toString()}`;r.push(d)}),o.push(r.join(",")),o}parseNamedAddresses(e){let t=new Map;return Object.keys(e).forEach(o=>{let r=e[o];t.set(o,r)}),t}extractAddressFromOutput(e){let t=e.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)");if(t)return t[1];throw new Error("Failed to extract object address from output")}};export{p as a};
|
|
2
|
-
//# sourceMappingURL=chunk-GPZRGLU2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/move.ts"],"sourcesContent":["import { spawn } from \"child_process\";\nimport { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\n/**\n * Class representing a Move package management utility for the Aptos blockchain.\n * This class provides methods to initialize directories, compile packages, run tests, publish modules, create objects, upgrade\n * packages, build transaction payloads, and run scripts.\n */\nexport class Move {\n /**\n * Initialize the current directory for Aptos by configuring the necessary settings.\n * Configuration will be pushed into .aptos/config.yaml.\n *\n * @param args - The arguments for initialization.\n * @param args.network - Optional Network type argument to use for default settings; defaults to local.\n * @param args.profile - Optional Profile to use from the config file; defaults to 'default'. This will override associated\n * settings such as the REST URL, the Faucet URL, and the private key arguments.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async init(args: {\n network?: Network;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { network, profile, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Compile a Move package located at the specified directory path.\n * This function helps in preparing the Move package for deployment or further processing.\n *\n * @param args - The arguments for compiling the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run Move unit tests for a specified package.\n *\n * @param args - The arguments for running the tests.\n * @param args.packageDirectoryPath - The path to a Move package (the folder containing a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The stdout output from running the tests.\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Publishes the modules to the publisher account on the Aptos blockchain.\n *\n * @param args - The arguments for publishing the modules.\n * @param args.packageDirectoryPath - The path to a move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Create a new object and publish the Move package to it on the Aptos blockchain.\n *\n * @param args - The arguments for creating the object and publishing the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.addressName - Address name for the Move package.\n * @param args.namedAddresses - Named addresses for the Move binary.\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The object address.\n *\n * A complete example in CLI:\n * aptos move create-object-and-publish-package \\\n * --package-dir path_to_directory_that_has_move.toml \\\n * --address-name launchpad_addr \\\n * --named-addresses \"launchpad_addr=0x123,initial_creator_addr=0x456\" \\\n * --profile my_profile \\\n * --assume-yes\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"create-object-and-publish-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--address-name\",\n addressName,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n const result = await this.runCommand(cliArgs, showStdout);\n return { objectAddress: this.extractAddressFromOutput(result.output) };\n }\n\n /**\n * Upgrade a Move package previously published to an object on the Aptos blockchain.\n * The caller must be the object owner to execute this function.\n *\n * @param args - The arguments for upgrading the object package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.objectAddress - Address of the object that the Move package published to. Ex. 0x1000\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"upgrade-object-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--object-address\",\n objectAddress,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Build a publication transaction payload and store it in a JSON output file.\n *\n * @param args - The arguments for building the publishing payload.\n * @param args.packageDirectoryPath - Path to a move package (the folder with a Move.toml file).\n * @param args.outputFile - Output file to write the publication transaction to.\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"] *\n * @returns stdout\n */\n async buildPublishPayload(args: {\n packageDirectoryPath: string;\n outputFile: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { outputFile, packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"build-publish-payload\",\n \"--json-output-file\",\n outputFile,\n \"--package-dir\",\n packageDirectoryPath,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Runs a Move script using the provided compiled script path and optional parameters. Ensure that the script is compiled\n * before executing this function.\n *\n * @param args - The arguments for running the script.\n * @param args.compiledScriptPath - Path to a compiled Move script bytecode file.\n * Ex. \"build/my_package/bytecode_scripts/my_move_script.mv\"\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n *\n * @returns The standard output from running the script.\n */\n async runScript(args: {\n compiledScriptPath: string;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { compiledScriptPath, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run a command with the specified arguments and return the output.\n *\n * @param args - An array of strings representing the command-line arguments to be passed to the command.\n * @param showStdout - Show the standard output generated by the command.\n * @returns The standard output generated by the command.\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\n\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(\"npx\", args, { shell: true });\n } else {\n childProcess = spawn(\"npx\", args);\n }\n\n childProcess.stdout.on(\"data\", (data) => {\n stdout += data.toString();\n });\n\n if (showStdout) {\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n }\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve({ output: stdout }); // Resolve with stdout if the child process exits successfully\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array separated by a comma.\n *\n * @param namedAddresses - A Map where the key is a string representing the name and the value is an AccountAddress.\n * Ex. {'alice' => '0x123', 'bob' => '0x456'}\n * @returns An array of named addresses formatted as strings separated by a comma. Ex. \"alice=0x123,bob=0x456\"\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n const names: Array<string> = [];\n namedAddresses.forEach((value, key) => {\n const toAppend = `${key}=${value.toString()}`;\n names.push(toAppend);\n });\n newArgs.push(names.join(\",\"));\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map.\n *\n * This function transforms a collection of named addresses into a more accessible format by mapping each name to its\n * corresponding address.\n *\n * @param namedAddresses - A record containing named addresses where the key is the name and the value is the AccountAddress.\n * @returns A Map where each key is a name and each value is the corresponding address.\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extracts the object address from the provided output string.\n *\n * @param output - The output string containing the object address.\n * @returns The extracted object address.\n * @throws Error if the object address cannot be extracted from the output.\n */\n // eslint-disable-next-line class-methods-use-this\n private extractAddressFromOutput(output: string): string {\n const match = output.match(\"Code was successfully deployed to object address (0x[0-9a-fA-F]+)\");\n if (match) {\n return match[1];\n }\n throw new Error(\"Failed to extract object address from output\");\n }\n}\n"],"mappings":"AAAA,OAAS,SAAAA,MAAa,gBACtB,OAAS,YAAAC,MAAgB,KAUlB,IAAMC,EAAN,KAAW,CAahB,MAAM,KAAKC,EAKqB,CAC9B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S,CAAC,GAC3CD,EAAM,KAAKG,CAAQ,CACrB,CAAC,EACDJ,EAAQ,KAAKC,EAAM,KAAK,GAAG,CAAC,EACrBD,CACT,CAYQ,oBAAoBf,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASkB,GAAQ,CAC3C,IAAME,EAAUpB,EAAekB,CAAG,EAClCjB,EAAa,IAAIiB,EAAKE,CAAO,CAC/B,CAAC,EAEMnB,CACT,CAUQ,yBAAyBoB,EAAwB,CACvD,IAAMC,EAAQD,EAAO,MAAM,mEAAmE,EAC9F,GAAIC,EACF,OAAOA,EAAM,CAAC,EAEhB,MAAM,IAAI,MAAM,8CAA8C,CAChE,CACF","names":["spawn","platform","Move","args","network","profile","extraArguments","showStdout","cliArgs","packageDirectoryPath","namedAddresses","addressesMap","addressName","result","objectAddress","outputFile","compiledScriptPath","resolve","reject","currentPlatform","childProcess","stdout","data","code","totalNames","newArgs","names","value","key","toAppend","address","output","match"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-KSUZS6EL.mjs";import{a as o}from"./chunk-TRU3EK64.mjs";import{a as y,b as C,c as l,d as T,e as O,f as P,g as h,h as S,i as L,j as R,k as V,l as I,n as b,o as w,p as v,q as M}from"./chunk-7D3RY73L.mjs";import{a as f}from"./chunk-PCLU4KLY.mjs";import{a as p}from"./chunk-HBIDHQ2M.mjs";import{g,h as m}from"./chunk-LEKBJ2EG.mjs";import{b as r}from"./chunk-KM6UXNC7.mjs";import{e as u,f as A}from"./chunk-J245N3XF.mjs";var N=class{constructor(e){this.config=e}async getAccountInfo(e){return y({aptosConfig:this.config,...e})}async getAccountModules(e){return C({aptosConfig:this.config,...e})}async getAccountModule(e){return l({aptosConfig:this.config,...e})}async getAccountTransactions(e){return T({aptosConfig:this.config,...e})}async getAccountResources(e){return O({aptosConfig:this.config,...e})}async getAccountResource(e){return P({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return h({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),S({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),L({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),R({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),V({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),I({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),b({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),w({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:u,faMetadataAddress:A,...e})}async getAccountCoinAmount(e){let{accountAddress:a,coinType:s,faMetadataAddress:t}=e,c=s;s===void 0&&t!==void 0&&(c=await p(async()=>{try{let n=(await d({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[t]}})).at(0);if(n.vec.length>0&&m(n.vec[0]))return g(n.vec[0])}catch{}},`coin-mapping-${t.toString()}`,1e3*60*5)());let i;if(s!==void 0&&t!==void 0)i=r.from(t).toStringLong();else if(s!==void 0&&t===void 0)s===u?i=r.A.toStringLong():i=f(r.A,s).toStringLong();else if(s===void 0&&t!==void 0){let n=r.from(t);i=n.toStringLong(),n===r.A&&(c=u)}else throw new Error("Either coinType, faMetadataAddress, or both must be provided");if(c!==void 0){let[n]=await d({aptosConfig:this.config,payload:{function:"0x1::coin::balance",typeArguments:[c],functionArguments:[a]}});return parseInt(n,10)}let[k]=await d({aptosConfig:this.config,payload:{function:"0x1::primary_fungible_store::balance",typeArguments:["0x1::object::ObjectCore"],functionArguments:[a,i]}});return parseInt(k,10)}async getAccountOwnedObjects(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),v({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return M({aptosConfig:this.config,...e})}};export{N as a};
|
|
2
|
-
//# sourceMappingURL=chunk-KFSVKIFO.mjs.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|