@aptos-labs/ts-sdk 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{cjs → browser}/index.d.ts +431 -237
- package/dist/browser/index.global.js +44 -42
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +5831 -0
- package/dist/common/index.js +406 -0
- package/dist/common/index.js.map +1 -0
- package/dist/esm/api/account.d.ts +292 -0
- package/dist/esm/api/account.mjs +2 -0
- package/dist/esm/api/account.mjs.map +1 -0
- package/dist/esm/api/ans.d.ts +79 -0
- package/dist/esm/api/ans.mjs +2 -0
- package/dist/esm/api/ans.mjs.map +1 -0
- package/dist/esm/api/aptos.d.ts +72 -0
- package/dist/esm/api/aptos.mjs +2 -0
- package/dist/esm/api/aptos.mjs.map +1 -0
- package/dist/esm/api/aptosConfig.d.ts +51 -0
- package/dist/esm/api/aptosConfig.mjs +2 -0
- package/dist/esm/api/aptosConfig.mjs.map +1 -0
- package/dist/esm/api/coin.d.ts +59 -0
- package/dist/esm/api/coin.mjs +2 -0
- package/dist/esm/api/coin.mjs.map +1 -0
- package/dist/esm/api/digitalAsset.d.ts +174 -0
- package/dist/esm/api/digitalAsset.mjs +2 -0
- package/dist/esm/api/digitalAsset.mjs.map +1 -0
- package/dist/esm/api/event.d.ts +74 -0
- package/dist/esm/api/event.mjs +2 -0
- package/dist/esm/api/event.mjs.map +1 -0
- package/dist/esm/api/faucet.d.ts +37 -0
- package/dist/esm/api/faucet.mjs +2 -0
- package/dist/esm/api/faucet.mjs.map +1 -0
- package/dist/esm/api/fungibleAsset.d.ts +72 -0
- package/dist/esm/api/fungibleAsset.mjs +2 -0
- package/dist/esm/api/fungibleAsset.mjs.map +1 -0
- package/dist/esm/api/general.d.ts +150 -0
- package/dist/esm/api/general.mjs +2 -0
- package/dist/esm/api/general.mjs.map +1 -0
- package/dist/esm/api/index.d.ts +46 -0
- package/dist/esm/api/index.mjs +2 -0
- package/dist/esm/api/index.mjs.map +1 -0
- package/dist/esm/api/staking.d.ts +53 -0
- package/dist/esm/api/staking.mjs +2 -0
- package/dist/esm/api/staking.mjs.map +1 -0
- package/dist/esm/api/transaction.d.ts +101 -0
- package/dist/esm/api/transaction.mjs +2 -0
- package/dist/esm/api/transaction.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission.d.ts +142 -0
- package/dist/esm/api/transactionSubmission.mjs +2 -0
- package/dist/esm/api/transactionSubmission.mjs.map +1 -0
- package/dist/esm/bcs/consts.d.ts +14 -0
- package/dist/esm/bcs/consts.mjs +2 -0
- package/dist/esm/bcs/consts.mjs.map +1 -0
- package/dist/esm/bcs/deserializer.d.ts +150 -0
- package/dist/esm/bcs/deserializer.mjs +2 -0
- package/dist/esm/bcs/deserializer.mjs.map +1 -0
- package/dist/esm/bcs/index.d.ts +14 -0
- package/dist/esm/bcs/index.mjs +2 -0
- package/dist/esm/bcs/index.mjs.map +1 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.ts +40 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +2 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -0
- package/dist/esm/bcs/serializable/fixedBytes.d.ts +52 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs +2 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -0
- package/dist/esm/bcs/serializable/movePrimitives.d.ts +69 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs +2 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -0
- package/dist/esm/bcs/serializable/moveStructs.d.ts +284 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs +2 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -0
- package/dist/esm/bcs/serializer.d.ts +192 -0
- package/dist/esm/bcs/serializer.mjs +2 -0
- package/dist/esm/bcs/serializer.mjs.map +1 -0
- package/dist/esm/chunk-2444YR3Y.mjs +2 -0
- package/dist/esm/chunk-2444YR3Y.mjs.map +1 -0
- package/dist/esm/chunk-27P7PELS.mjs +2 -0
- package/dist/esm/chunk-27P7PELS.mjs.map +1 -0
- package/dist/esm/chunk-2B5QXKPU.mjs +2 -0
- package/dist/esm/chunk-2B5QXKPU.mjs.map +1 -0
- package/dist/esm/chunk-2MQZUGO6.mjs +2 -0
- package/dist/esm/chunk-2MQZUGO6.mjs.map +1 -0
- package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
- package/dist/esm/chunk-3JPVQHOR.mjs.map +1 -0
- package/dist/esm/chunk-3OJN4I42.mjs +2 -0
- package/dist/esm/chunk-3OJN4I42.mjs.map +1 -0
- package/dist/esm/chunk-3YOV42H5.mjs +2 -0
- package/dist/esm/chunk-3YOV42H5.mjs.map +1 -0
- package/dist/esm/chunk-4WPQQPUF.mjs +1 -0
- package/dist/esm/chunk-4WPQQPUF.mjs.map +1 -0
- package/dist/esm/chunk-6FBKUTGF.mjs +2 -0
- package/dist/esm/chunk-6FBKUTGF.mjs.map +1 -0
- package/dist/esm/chunk-7AIV5FEN.mjs +2 -0
- package/dist/esm/chunk-7AIV5FEN.mjs.map +1 -0
- package/dist/esm/chunk-7AQXAH6Q.mjs +2 -0
- package/dist/esm/chunk-7AQXAH6Q.mjs.map +1 -0
- package/dist/esm/chunk-7TL2MY2B.mjs +2 -0
- package/dist/esm/chunk-7TL2MY2B.mjs.map +1 -0
- package/dist/esm/chunk-ADR4XQPR.mjs +2 -0
- package/dist/esm/chunk-ADR4XQPR.mjs.map +1 -0
- package/dist/esm/chunk-AH44UPM4.mjs +2 -0
- package/dist/esm/chunk-AH44UPM4.mjs.map +1 -0
- package/dist/esm/chunk-AY2HWVDO.mjs +2 -0
- package/dist/esm/chunk-AY2HWVDO.mjs.map +1 -0
- package/dist/esm/chunk-BC2NOUYT.mjs +2 -0
- package/dist/esm/chunk-BC2NOUYT.mjs.map +1 -0
- package/dist/esm/chunk-BIUGRAMO.mjs +2 -0
- package/dist/esm/chunk-BIUGRAMO.mjs.map +1 -0
- package/dist/esm/chunk-BREUBEPM.mjs +2 -0
- package/dist/esm/chunk-BREUBEPM.mjs.map +1 -0
- package/dist/esm/chunk-BSCOVLWS.mjs +1 -0
- package/dist/esm/chunk-BSCOVLWS.mjs.map +1 -0
- package/dist/esm/chunk-BTK34A5U.mjs +406 -0
- package/dist/esm/chunk-BTK34A5U.mjs.map +1 -0
- package/dist/esm/chunk-CZZJAR3B.mjs +2 -0
- package/dist/esm/chunk-CZZJAR3B.mjs.map +1 -0
- package/dist/esm/chunk-DNDWTM7A.mjs +2 -0
- package/dist/esm/chunk-DNDWTM7A.mjs.map +1 -0
- package/dist/esm/chunk-DNYVUM3K.mjs +2 -0
- package/dist/esm/chunk-DNYVUM3K.mjs.map +1 -0
- package/dist/esm/chunk-DXUIJ6KA.mjs +2 -0
- package/dist/esm/chunk-DXUIJ6KA.mjs.map +1 -0
- package/dist/esm/chunk-E72CFUU4.mjs +2 -0
- package/dist/esm/chunk-E72CFUU4.mjs.map +1 -0
- package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
- package/dist/esm/chunk-E7FWVXGX.mjs.map +1 -0
- package/dist/esm/chunk-EKAOAGNQ.mjs +2 -0
- package/dist/esm/chunk-EKAOAGNQ.mjs.map +1 -0
- package/dist/esm/chunk-FBPNHF54.mjs +2 -0
- package/dist/esm/chunk-FBPNHF54.mjs.map +1 -0
- package/dist/esm/chunk-FHJ7F7Z6.mjs +2 -0
- package/dist/esm/chunk-FHJ7F7Z6.mjs.map +1 -0
- package/dist/esm/chunk-FNB6CFQR.mjs +2 -0
- package/dist/esm/chunk-FNB6CFQR.mjs.map +1 -0
- package/dist/esm/chunk-FYIFBLHU.mjs +2 -0
- package/dist/esm/chunk-FYIFBLHU.mjs.map +1 -0
- package/dist/esm/chunk-FZY4PMEE.mjs +1 -0
- package/dist/esm/chunk-FZY4PMEE.mjs.map +1 -0
- package/dist/esm/chunk-GUT3G5CG.mjs +2 -0
- package/dist/esm/chunk-GUT3G5CG.mjs.map +1 -0
- package/dist/esm/chunk-HH5RSP2H.mjs +2 -0
- package/dist/esm/chunk-HH5RSP2H.mjs.map +1 -0
- package/dist/esm/chunk-HTZTTZQJ.mjs +1 -0
- package/dist/esm/chunk-HTZTTZQJ.mjs.map +1 -0
- package/dist/esm/chunk-I5OYNCZS.mjs +1 -0
- package/dist/esm/chunk-I5OYNCZS.mjs.map +1 -0
- package/dist/esm/chunk-IPJKGHQY.mjs +2 -0
- package/dist/esm/chunk-IPJKGHQY.mjs.map +1 -0
- package/dist/esm/chunk-IXMH6AXJ.mjs +2 -0
- package/dist/esm/chunk-IXMH6AXJ.mjs.map +1 -0
- package/dist/esm/chunk-IZHPCZE3.mjs +2 -0
- package/dist/esm/chunk-IZHPCZE3.mjs.map +1 -0
- package/dist/esm/chunk-J3QOSJFP.mjs +2 -0
- package/dist/esm/chunk-J3QOSJFP.mjs.map +1 -0
- package/dist/esm/chunk-J5OKXARS.mjs +2 -0
- package/dist/esm/chunk-J5OKXARS.mjs.map +1 -0
- package/dist/esm/chunk-JTGGMXB7.mjs +2 -0
- package/dist/esm/chunk-JTGGMXB7.mjs.map +1 -0
- package/dist/esm/chunk-KC64ESLO.mjs +2 -0
- package/dist/esm/chunk-KC64ESLO.mjs.map +1 -0
- package/dist/esm/chunk-KFP7MDSD.mjs +2 -0
- package/dist/esm/chunk-KFP7MDSD.mjs.map +1 -0
- package/dist/esm/chunk-KJDY66XF.mjs +2 -0
- package/dist/esm/chunk-KJDY66XF.mjs.map +1 -0
- package/dist/esm/chunk-KNLMUSIO.mjs +2 -0
- package/dist/esm/chunk-KNLMUSIO.mjs.map +1 -0
- package/dist/esm/chunk-KPESAXVI.mjs +2 -0
- package/dist/esm/chunk-KPESAXVI.mjs.map +1 -0
- package/dist/esm/chunk-KWJ6XKNF.mjs +2 -0
- package/dist/esm/chunk-KWJ6XKNF.mjs.map +1 -0
- package/dist/esm/chunk-KYWYIK5P.mjs +2 -0
- package/dist/esm/chunk-KYWYIK5P.mjs.map +1 -0
- package/dist/esm/chunk-LAXIJRYU.mjs +2 -0
- package/dist/esm/chunk-LAXIJRYU.mjs.map +1 -0
- package/dist/esm/chunk-LR65XHSF.mjs +2 -0
- package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
- package/dist/esm/chunk-LU6VS7PJ.mjs +2 -0
- package/dist/esm/chunk-LU6VS7PJ.mjs.map +1 -0
- package/dist/esm/chunk-LV33NV4J.mjs +2 -0
- package/dist/esm/chunk-LV33NV4J.mjs.map +1 -0
- package/dist/esm/chunk-MIBLZSNS.mjs +2 -0
- package/dist/esm/chunk-MIBLZSNS.mjs.map +1 -0
- package/dist/esm/chunk-N2FKVZ4D.mjs +1 -0
- package/dist/esm/chunk-N2FKVZ4D.mjs.map +1 -0
- package/dist/esm/chunk-N6XWY4UT.mjs +2 -0
- package/dist/esm/chunk-N6XWY4UT.mjs.map +1 -0
- package/dist/esm/chunk-NKTKHC3Z.mjs +2 -0
- package/dist/esm/chunk-NKTKHC3Z.mjs.map +1 -0
- package/dist/esm/chunk-O243HOP3.mjs +2 -0
- package/dist/esm/chunk-O243HOP3.mjs.map +1 -0
- package/dist/esm/chunk-PDLUCVJB.mjs +2 -0
- package/dist/esm/chunk-PDLUCVJB.mjs.map +1 -0
- package/dist/esm/chunk-PJDVHU7X.mjs +2 -0
- package/dist/esm/chunk-PJDVHU7X.mjs.map +1 -0
- package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
- package/dist/esm/chunk-R7G3CLRI.mjs.map +1 -0
- package/dist/esm/chunk-RMMOF53Q.mjs +1 -0
- package/dist/esm/chunk-RMMOF53Q.mjs.map +1 -0
- package/dist/esm/chunk-SJLO3JIH.mjs +2 -0
- package/dist/esm/chunk-SJLO3JIH.mjs.map +1 -0
- package/dist/esm/chunk-TCTZCPQ6.mjs +1 -0
- package/dist/esm/chunk-TCTZCPQ6.mjs.map +1 -0
- package/dist/esm/chunk-TXUMB5ZO.mjs +2 -0
- package/dist/esm/chunk-TXUMB5ZO.mjs.map +1 -0
- package/dist/esm/chunk-TYHBYRUA.mjs +2 -0
- package/dist/esm/chunk-TYHBYRUA.mjs.map +1 -0
- package/dist/esm/chunk-UQIOMAXE.mjs +2 -0
- package/dist/esm/chunk-UQIOMAXE.mjs.map +1 -0
- package/dist/esm/chunk-UVGCVCNG.mjs +2 -0
- package/dist/esm/chunk-UVGCVCNG.mjs.map +1 -0
- package/dist/esm/chunk-UYVPNUH3.mjs +1 -0
- package/dist/esm/chunk-UYVPNUH3.mjs.map +1 -0
- package/dist/esm/chunk-V3MBJJTL.mjs +1 -0
- package/dist/esm/chunk-V3MBJJTL.mjs.map +1 -0
- package/dist/esm/chunk-V6AAQLLJ.mjs +2 -0
- package/dist/esm/chunk-V6AAQLLJ.mjs.map +1 -0
- package/dist/esm/chunk-VAGYTPSI.mjs +2 -0
- package/dist/esm/chunk-VAGYTPSI.mjs.map +1 -0
- package/dist/esm/chunk-WGXAIQ7K.mjs +2 -0
- package/dist/esm/chunk-WGXAIQ7K.mjs.map +1 -0
- package/dist/esm/chunk-WNEZCERQ.mjs +2 -0
- package/dist/esm/chunk-WNEZCERQ.mjs.map +1 -0
- package/dist/esm/chunk-WVMDCC4V.mjs +2 -0
- package/dist/esm/chunk-WVMDCC4V.mjs.map +1 -0
- package/dist/esm/chunk-XFS5O5GJ.mjs +2 -0
- package/dist/esm/chunk-XFS5O5GJ.mjs.map +1 -0
- package/dist/esm/chunk-XFSL7O6Q.mjs +2 -0
- package/dist/esm/chunk-XFSL7O6Q.mjs.map +1 -0
- package/dist/esm/chunk-XNFEUXDS.mjs +2 -0
- package/dist/esm/chunk-XNFEUXDS.mjs.map +1 -0
- package/dist/esm/chunk-YS2OX7AB.mjs +2 -0
- package/dist/esm/chunk-YS2OX7AB.mjs.map +1 -0
- package/dist/esm/chunk-Z56AKXJ7.mjs +2 -0
- package/dist/esm/chunk-Z56AKXJ7.mjs.map +1 -0
- package/dist/esm/chunk-ZT2A5ABR.mjs +2 -0
- package/dist/esm/chunk-ZT2A5ABR.mjs.map +1 -0
- package/dist/esm/chunk-ZXJ5ZBTL.mjs +2 -0
- package/dist/esm/chunk-ZXJ5ZBTL.mjs.map +1 -0
- package/dist/esm/client/core.d.ts +24 -0
- package/dist/esm/client/core.mjs +2 -0
- package/dist/esm/client/core.mjs.map +1 -0
- package/dist/esm/client/get.d.ts +55 -0
- package/dist/esm/client/get.mjs +2 -0
- package/dist/esm/client/get.mjs.map +1 -0
- package/dist/esm/client/index.d.ts +11 -0
- package/dist/esm/client/index.mjs +2 -0
- package/dist/esm/client/index.mjs.map +1 -0
- package/dist/esm/client/post.d.ts +60 -0
- package/dist/esm/client/post.mjs +2 -0
- package/dist/esm/client/post.mjs.map +1 -0
- package/dist/esm/client/types.d.ts +46 -0
- package/dist/esm/client/types.mjs +2 -0
- package/dist/esm/client/types.mjs.map +1 -0
- package/dist/esm/core/account.d.ts +184 -0
- package/dist/esm/core/account.mjs +2 -0
- package/dist/esm/core/account.mjs.map +1 -0
- package/dist/esm/core/accountAddress.d.ts +244 -0
- package/dist/esm/core/accountAddress.mjs +2 -0
- package/dist/esm/core/accountAddress.mjs.map +1 -0
- package/dist/esm/core/authenticationKey.d.ts +74 -0
- package/dist/esm/core/authenticationKey.mjs +2 -0
- package/dist/esm/core/authenticationKey.mjs.map +1 -0
- package/dist/esm/core/common.d.ts +32 -0
- package/dist/esm/core/common.mjs +2 -0
- package/dist/esm/core/common.mjs.map +1 -0
- package/dist/esm/core/crypto/anyPublicKey.d.ts +54 -0
- package/dist/esm/core/crypto/anyPublicKey.mjs +2 -0
- package/dist/esm/core/crypto/anyPublicKey.mjs.map +1 -0
- package/dist/esm/core/crypto/anySignature.d.ts +31 -0
- package/dist/esm/core/crypto/anySignature.mjs +2 -0
- package/dist/esm/core/crypto/anySignature.mjs.map +1 -0
- package/dist/esm/core/crypto/asymmetricCrypto.d.ts +74 -0
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +2 -0
- package/dist/esm/core/crypto/asymmetricCrypto.mjs.map +1 -0
- package/dist/esm/core/crypto/ed25519.d.ts +173 -0
- package/dist/esm/core/crypto/ed25519.mjs +2 -0
- package/dist/esm/core/crypto/ed25519.mjs.map +1 -0
- package/dist/esm/core/crypto/hdKey.d.ts +65 -0
- package/dist/esm/core/crypto/hdKey.mjs +2 -0
- package/dist/esm/core/crypto/hdKey.mjs.map +1 -0
- package/dist/esm/core/crypto/index.d.ts +17 -0
- package/dist/esm/core/crypto/index.mjs +2 -0
- package/dist/esm/core/crypto/index.mjs.map +1 -0
- package/dist/esm/core/crypto/multiEd25519.d.ts +126 -0
- package/dist/esm/core/crypto/multiEd25519.mjs +2 -0
- package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -0
- package/dist/esm/core/crypto/multiKey.d.ts +52 -0
- package/dist/esm/core/crypto/multiKey.mjs +2 -0
- package/dist/esm/core/crypto/multiKey.mjs.map +1 -0
- package/dist/esm/core/crypto/secp256k1.d.ts +161 -0
- package/dist/esm/core/crypto/secp256k1.mjs +2 -0
- package/dist/esm/core/crypto/secp256k1.mjs.map +1 -0
- package/dist/esm/core/hex.d.ts +105 -0
- package/dist/esm/core/hex.mjs +2 -0
- package/dist/esm/core/hex.mjs.map +1 -0
- package/dist/esm/core/index.d.ts +21 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/index.mjs.map +1 -0
- package/dist/esm/index.d.ts +60 -5637
- package/dist/esm/index.mjs +1 -5444
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/internal/account.d.ts +143 -0
- package/dist/esm/internal/account.mjs +2 -0
- package/dist/esm/internal/account.mjs.map +1 -0
- package/dist/esm/internal/ans.d.ts +83 -0
- package/dist/esm/internal/ans.mjs +2 -0
- package/dist/esm/internal/ans.mjs.map +1 -0
- package/dist/esm/internal/coin.d.ts +43 -0
- package/dist/esm/internal/coin.mjs +2 -0
- package/dist/esm/internal/coin.mjs.map +1 -0
- package/dist/esm/internal/digitalAsset.d.ts +118 -0
- package/dist/esm/internal/digitalAsset.mjs +2 -0
- package/dist/esm/internal/digitalAsset.mjs.map +1 -0
- package/dist/esm/internal/event.d.ts +45 -0
- package/dist/esm/internal/event.mjs +2 -0
- package/dist/esm/internal/event.mjs.map +1 -0
- package/dist/esm/internal/faucet.d.ts +29 -0
- package/dist/esm/internal/faucet.mjs +2 -0
- package/dist/esm/internal/faucet.mjs.map +1 -0
- package/dist/esm/internal/fungibleAsset.d.ts +38 -0
- package/dist/esm/internal/fungibleAsset.mjs +2 -0
- package/dist/esm/internal/fungibleAsset.mjs.map +1 -0
- package/dist/esm/internal/general.d.ts +60 -0
- package/dist/esm/internal/general.mjs +2 -0
- package/dist/esm/internal/general.mjs.map +1 -0
- package/dist/esm/internal/staking.d.ts +38 -0
- package/dist/esm/internal/staking.mjs +2 -0
- package/dist/esm/internal/staking.mjs.map +1 -0
- package/dist/esm/internal/transaction.d.ts +57 -0
- package/dist/esm/internal/transaction.mjs +2 -0
- package/dist/esm/internal/transaction.mjs.map +1 -0
- package/dist/esm/internal/transactionSubmission.d.ts +148 -0
- package/dist/esm/internal/transactionSubmission.mjs +2 -0
- package/dist/esm/internal/transactionSubmission.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/account.d.ts +79 -0
- package/dist/esm/transactions/authenticator/account.mjs +2 -0
- package/dist/esm/transactions/authenticator/account.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/index.d.ts +19 -0
- package/dist/esm/transactions/authenticator/index.mjs +2 -0
- package/dist/esm/transactions/authenticator/index.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/transaction.d.ts +105 -0
- package/dist/esm/transactions/authenticator/transaction.mjs +2 -0
- package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -0
- package/dist/esm/transactions/index.d.ts +39 -0
- package/dist/esm/transactions/index.mjs +2 -0
- package/dist/esm/transactions/index.mjs.map +1 -0
- package/dist/esm/transactions/instances/chainId.d.ts +21 -0
- package/dist/esm/transactions/instances/chainId.mjs +2 -0
- package/dist/esm/transactions/instances/chainId.mjs.map +1 -0
- package/dist/esm/transactions/instances/identifier.d.ts +23 -0
- package/dist/esm/transactions/instances/identifier.mjs +2 -0
- package/dist/esm/transactions/instances/identifier.mjs.map +1 -0
- package/dist/esm/transactions/instances/index.d.ts +29 -0
- package/dist/esm/transactions/instances/index.mjs +2 -0
- package/dist/esm/transactions/instances/index.mjs.map +1 -0
- package/dist/esm/transactions/instances/moduleId.d.ts +37 -0
- package/dist/esm/transactions/instances/moduleId.mjs +2 -0
- package/dist/esm/transactions/instances/moduleId.mjs.map +1 -0
- package/dist/esm/transactions/instances/rawTransaction.d.ts +98 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.d.ts +37 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +2 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -0
- package/dist/esm/transactions/instances/signedTransaction.d.ts +46 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionArgument.d.ts +40 -0
- package/dist/esm/transactions/instances/transactionArgument.mjs +2 -0
- package/dist/esm/transactions/instances/transactionArgument.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionPayload.d.ts +211 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs +2 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/helpers.d.ts +63 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/index.d.ts +35 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.ts +54 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.ts +128 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -0
- package/dist/esm/transactions/typeTag/index.d.ts +127 -0
- package/dist/esm/transactions/typeTag/index.mjs +2 -0
- package/dist/esm/transactions/typeTag/index.mjs.map +1 -0
- package/dist/esm/transactions/typeTag/parser.d.ts +47 -0
- package/dist/esm/transactions/typeTag/parser.mjs +2 -0
- package/dist/esm/transactions/typeTag/parser.mjs.map +1 -0
- package/dist/esm/transactions/types.d.ts +253 -0
- package/dist/esm/transactions/types.mjs +2 -0
- package/dist/esm/transactions/types.mjs.map +1 -0
- package/dist/esm/types/generated/operations.d.ts +604 -0
- package/dist/esm/types/generated/operations.mjs +1 -0
- package/dist/esm/types/generated/operations.mjs.map +1 -0
- package/dist/esm/types/generated/queries.d.ts +55 -0
- package/dist/esm/types/generated/queries.mjs +2 -0
- package/dist/esm/types/generated/queries.mjs.map +1 -0
- package/dist/esm/types/generated/types.d.ts +9458 -0
- package/dist/esm/types/generated/types.mjs +2 -0
- package/dist/esm/types/generated/types.mjs.map +1 -0
- package/dist/{types → esm/types}/index.d.ts +19 -451
- package/dist/esm/types/index.mjs +2 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/types/indexer.d.ts +62 -0
- package/dist/esm/types/indexer.mjs +2 -0
- package/dist/esm/types/indexer.mjs.map +1 -0
- package/dist/esm/utils/apiEndpoints.d.ts +14 -0
- package/dist/esm/utils/apiEndpoints.mjs +2 -0
- package/dist/esm/utils/apiEndpoints.mjs.map +1 -0
- package/dist/esm/utils/const.d.ts +42 -0
- package/dist/esm/utils/const.mjs +2 -0
- package/dist/esm/utils/const.mjs.map +1 -0
- package/dist/esm/utils/helpers.d.ts +7 -0
- package/dist/esm/utils/helpers.mjs +2 -0
- package/dist/esm/utils/helpers.mjs.map +1 -0
- package/dist/esm/utils/memoize.d.ts +20 -0
- package/dist/esm/utils/memoize.mjs +2 -0
- package/dist/esm/utils/memoize.mjs.map +1 -0
- package/dist/esm/version.d.ts +8 -0
- package/dist/esm/version.mjs +2 -0
- package/dist/esm/version.mjs.map +1 -0
- package/package.json +17 -13
- package/src/api/account.ts +17 -18
- package/src/api/ans.ts +58 -0
- package/src/api/aptos.ts +7 -1
- package/src/api/coin.ts +3 -3
- package/src/api/digitalAsset.ts +9 -8
- package/src/api/event.ts +4 -3
- package/src/api/faucet.ts +3 -2
- package/src/api/general.ts +2 -2
- package/src/api/staking.ts +5 -4
- package/src/api/transactionSubmission.ts +41 -20
- package/src/bcs/deserializer.ts +4 -4
- package/src/bcs/serializable/moveStructs.ts +13 -13
- package/src/bcs/serializer.ts +4 -4
- package/src/client/core.ts +18 -8
- package/src/core/account.ts +90 -33
- package/src/core/accountAddress.ts +34 -30
- package/src/core/authenticationKey.ts +11 -9
- package/src/core/crypto/ed25519.ts +48 -1
- package/src/core/crypto/hdKey.ts +105 -0
- package/src/core/crypto/index.ts +1 -0
- package/src/core/crypto/secp256k1.ts +36 -0
- package/src/index.ts +0 -1
- package/src/internal/account.ts +80 -58
- package/src/internal/ans.ts +175 -0
- package/src/internal/coin.ts +5 -5
- package/src/internal/digitalAsset.ts +16 -17
- package/src/internal/event.ts +8 -8
- package/src/internal/faucet.ts +4 -4
- package/src/internal/general.ts +3 -3
- package/src/internal/queries/getEvents.graphql +1 -0
- package/src/internal/staking.ts +8 -8
- package/src/internal/transactionSubmission.ts +78 -19
- package/src/transactions/instances/index.ts +1 -0
- package/src/transactions/instances/moduleId.ts +1 -1
- package/src/transactions/instances/rotationProofChallenge.ts +58 -0
- package/src/transactions/transactionBuilder/helpers.ts +5 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +4 -4
- package/src/transactions/transactionBuilder/transactionBuilder.ts +31 -49
- package/src/transactions/typeTag/index.ts +10 -10
- package/src/transactions/typeTag/parser.ts +1 -1
- package/src/transactions/types.ts +31 -20
- package/src/types/generated/operations.ts +19 -18
- package/src/types/generated/queries.ts +20 -19
- package/src/types/generated/types.ts +6 -0
- package/src/types/index.ts +15 -18
- package/src/utils/apiEndpoints.ts +8 -0
- package/src/version.ts +1 -1
- package/dist/cjs/index.js +0 -5631
- package/dist/cjs/index.js.map +0 -1
- package/dist/types/index.js +0 -176
- package/dist/types/index.js.map +0 -1
- package/src/utils/hdKey.ts +0 -113
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { PublicKey, PrivateKey, Signature } from './asymmetricCrypto.js';
|
|
2
|
+
import { Deserializer } from '../../bcs/deserializer.js';
|
|
3
|
+
import { Serializer } from '../../bcs/serializer.js';
|
|
4
|
+
import { HexInput } from '../../types/index.js';
|
|
5
|
+
import '../../utils/apiEndpoints.js';
|
|
6
|
+
import '../../types/indexer.js';
|
|
7
|
+
import '../../types/generated/operations.js';
|
|
8
|
+
import '../../types/generated/types.js';
|
|
9
|
+
import '../hex.js';
|
|
10
|
+
import '../common.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Represents the public key of an Ed25519 key pair.
|
|
14
|
+
*
|
|
15
|
+
* Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263) Aptos supports
|
|
16
|
+
* `Legacy` and `Unified` authentication keys.
|
|
17
|
+
*
|
|
18
|
+
* Ed25519 scheme is represented in the SDK as `Legacy authentication key` and also
|
|
19
|
+
* as `AnyPublicKey` that represents any `Unified authentication key`
|
|
20
|
+
*/
|
|
21
|
+
declare class Ed25519PublicKey extends PublicKey {
|
|
22
|
+
/**
|
|
23
|
+
* Length of an Ed25519 public key
|
|
24
|
+
*/
|
|
25
|
+
static readonly LENGTH: number;
|
|
26
|
+
/**
|
|
27
|
+
* Bytes of the public key
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
private readonly key;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new PublicKey instance from a Uint8Array or String.
|
|
33
|
+
*
|
|
34
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
35
|
+
*/
|
|
36
|
+
constructor(hexInput: HexInput);
|
|
37
|
+
/**
|
|
38
|
+
* Get the public key in bytes (Uint8Array).
|
|
39
|
+
*
|
|
40
|
+
* @returns Uint8Array representation of the public key
|
|
41
|
+
*/
|
|
42
|
+
toUint8Array(): Uint8Array;
|
|
43
|
+
/**
|
|
44
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
45
|
+
*
|
|
46
|
+
* @returns string representation of the public key
|
|
47
|
+
*/
|
|
48
|
+
toString(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Verifies a signed data with a public key
|
|
51
|
+
* @param args.message a signed message
|
|
52
|
+
* @param args.signature the signature of the message
|
|
53
|
+
*/
|
|
54
|
+
verifySignature(args: {
|
|
55
|
+
message: HexInput;
|
|
56
|
+
signature: Ed25519Signature;
|
|
57
|
+
}): boolean;
|
|
58
|
+
serialize(serializer: Serializer): void;
|
|
59
|
+
static deserialize(deserializer: Deserializer): Ed25519PublicKey;
|
|
60
|
+
static load(deserializer: Deserializer): Ed25519PublicKey;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Represents the private key of an Ed25519 key pair.
|
|
64
|
+
*/
|
|
65
|
+
declare class Ed25519PrivateKey extends PrivateKey {
|
|
66
|
+
/**
|
|
67
|
+
* Length of an Ed25519 private key
|
|
68
|
+
*/
|
|
69
|
+
static readonly LENGTH: number;
|
|
70
|
+
/**
|
|
71
|
+
* The Ed25519 key seed to use for BIP-32 compatibility
|
|
72
|
+
* See more {@link https://github.com/satoshilabs/slips/blob/master/slip-0010.md}
|
|
73
|
+
*/
|
|
74
|
+
static readonly SLIP_0010_SEED = "ed25519 seed";
|
|
75
|
+
/**
|
|
76
|
+
* The Ed25519 signing key
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
private readonly signingKeyPair;
|
|
80
|
+
/**
|
|
81
|
+
* Create a new PrivateKey instance from a Uint8Array or String.
|
|
82
|
+
*
|
|
83
|
+
* @param hexInput HexInput (string or Uint8Array)
|
|
84
|
+
*/
|
|
85
|
+
constructor(hexInput: HexInput);
|
|
86
|
+
/**
|
|
87
|
+
* Get the private key in bytes (Uint8Array).
|
|
88
|
+
*
|
|
89
|
+
* @returns Uint8Array representation of the private key
|
|
90
|
+
*/
|
|
91
|
+
toUint8Array(): Uint8Array;
|
|
92
|
+
/**
|
|
93
|
+
* Get the private key as a hex string with the 0x prefix.
|
|
94
|
+
*
|
|
95
|
+
* @returns string representation of the private key
|
|
96
|
+
*/
|
|
97
|
+
toString(): string;
|
|
98
|
+
/**
|
|
99
|
+
* Sign the given message with the private key.
|
|
100
|
+
*
|
|
101
|
+
* @param message in HexInput format
|
|
102
|
+
* @returns Signature
|
|
103
|
+
*/
|
|
104
|
+
sign(message: HexInput): Ed25519Signature;
|
|
105
|
+
serialize(serializer: Serializer): void;
|
|
106
|
+
static deserialize(deserializer: Deserializer): Ed25519PrivateKey;
|
|
107
|
+
/**
|
|
108
|
+
* Generate a new random private key.
|
|
109
|
+
*
|
|
110
|
+
* @returns Ed25519PrivateKey
|
|
111
|
+
*/
|
|
112
|
+
static generate(): Ed25519PrivateKey;
|
|
113
|
+
/**
|
|
114
|
+
* Derive the Ed25519PublicKey for this private key.
|
|
115
|
+
*
|
|
116
|
+
* @returns Ed25519PublicKey
|
|
117
|
+
*/
|
|
118
|
+
publicKey(): Ed25519PublicKey;
|
|
119
|
+
/**
|
|
120
|
+
* Derives a private key from a mnemonic seed phrase.
|
|
121
|
+
*
|
|
122
|
+
* To derive multiple keys from the same phrase, change the path
|
|
123
|
+
*
|
|
124
|
+
* IMPORTANT: Ed25519 supports hardened derivation only (since it lacks a key homomorphism,
|
|
125
|
+
* so non-hardened derivation cannot work)
|
|
126
|
+
*
|
|
127
|
+
* @param path the BIP44 path
|
|
128
|
+
* @param mnemonics the mnemonic seed phrase
|
|
129
|
+
*/
|
|
130
|
+
static fromDerivationPath(path: string, mnemonics: string): Ed25519PrivateKey;
|
|
131
|
+
/**
|
|
132
|
+
* A private inner function so we can separate from the main fromDerivationPath() method
|
|
133
|
+
* to add tests to verify we create the keys correctly.
|
|
134
|
+
*
|
|
135
|
+
* @param path the BIP44 path
|
|
136
|
+
* @param seed the seed phrase created by the mnemonics
|
|
137
|
+
* @param offset the offset used for key derivation, defaults to 0x80000000
|
|
138
|
+
* @returns
|
|
139
|
+
*/
|
|
140
|
+
private static fromDerivationPathInner;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* A signature of a message signed using an Ed25519 private key
|
|
144
|
+
*/
|
|
145
|
+
declare class Ed25519Signature extends Signature {
|
|
146
|
+
/**
|
|
147
|
+
* Length of an Ed25519 signature
|
|
148
|
+
*/
|
|
149
|
+
static readonly LENGTH = 64;
|
|
150
|
+
/**
|
|
151
|
+
* The signature bytes
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
private readonly data;
|
|
155
|
+
constructor(hexInput: HexInput);
|
|
156
|
+
/**
|
|
157
|
+
* Get the signature in bytes (Uint8Array).
|
|
158
|
+
*
|
|
159
|
+
* @returns Uint8Array representation of the signature
|
|
160
|
+
*/
|
|
161
|
+
toUint8Array(): Uint8Array;
|
|
162
|
+
/**
|
|
163
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
164
|
+
*
|
|
165
|
+
* @returns string representation of the signature
|
|
166
|
+
*/
|
|
167
|
+
toString(): string;
|
|
168
|
+
serialize(serializer: Serializer): void;
|
|
169
|
+
static deserialize(deserializer: Deserializer): Ed25519Signature;
|
|
170
|
+
static load(deserializer: Deserializer): Ed25519Signature;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c}from"../../chunk-BIUGRAMO.mjs";import"../../chunk-E72CFUU4.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-LU6VS7PJ.mjs";import"../../chunk-V6AAQLLJ.mjs";import"../../chunk-7AQXAH6Q.mjs";import"../../chunk-PDLUCVJB.mjs";import"../../chunk-BC2NOUYT.mjs";import"../../chunk-27P7PELS.mjs";import"../../chunk-IZHPCZE3.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-GUT3G5CG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-XNFEUXDS.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
|
|
2
|
+
//# sourceMappingURL=ed25519.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare type DerivedKeys = {
|
|
2
|
+
key: Uint8Array;
|
|
3
|
+
chainCode: Uint8Array;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Aptos derive path is 637
|
|
7
|
+
*/
|
|
8
|
+
declare const APTOS_HARDENED_REGEX: RegExp;
|
|
9
|
+
declare const APTOS_BIP44_REGEX: RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* A list of supported key types and associated seeds
|
|
12
|
+
*/
|
|
13
|
+
declare enum KeyType {
|
|
14
|
+
ED25519 = "ed25519 seed"
|
|
15
|
+
}
|
|
16
|
+
declare const HARDENED_OFFSET = 2147483648;
|
|
17
|
+
/**
|
|
18
|
+
* Aptos derive path is 637
|
|
19
|
+
*
|
|
20
|
+
* Parse and validate a path that is compliant to BIP-44 in form m/44'/637'/{account_index}'/{change_index}/{address_index}
|
|
21
|
+
* for Secp256k1
|
|
22
|
+
*
|
|
23
|
+
* Note that for secp256k1, last two components must be non-hardened.
|
|
24
|
+
*
|
|
25
|
+
* @param path path string (e.g. `m/44'/637'/0'/0/0`).
|
|
26
|
+
*/
|
|
27
|
+
declare function isValidBIP44Path(path: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Aptos derive path is 637
|
|
30
|
+
*
|
|
31
|
+
* Parse and validate a path that is compliant to SLIP-0010 and BIP-44
|
|
32
|
+
* in form m/44'/637'/{account_index}'/{change_index}'/{address_index}'.
|
|
33
|
+
* See SLIP-0010 {@link https://github.com/satoshilabs/slips/blob/master/slip-0044.md}
|
|
34
|
+
* See BIP-44 {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
35
|
+
*
|
|
36
|
+
* Note that for Ed25519, all components must be hardened.
|
|
37
|
+
* This is because non-hardened [PK] derivation would not work due to Ed25519's lack of a key homomorphism.
|
|
38
|
+
* Specifically, you cannot derive the PK associated with derivation path a/b/c given the PK of a/b.
|
|
39
|
+
* This is because the PK in Ed25519 is, more or less, computed as 𝑔𝐻(𝑠𝑘),
|
|
40
|
+
* with the hash function breaking the homomorphism.
|
|
41
|
+
*
|
|
42
|
+
* @param path path string (e.g. `m/44'/637'/0'/0'/0'`).
|
|
43
|
+
*/
|
|
44
|
+
declare function isValidHardenedPath(path: string): boolean;
|
|
45
|
+
declare const deriveKey: (hashSeed: Uint8Array | string, data: Uint8Array | string) => DerivedKeys;
|
|
46
|
+
/**
|
|
47
|
+
* Derive a child key from the private key
|
|
48
|
+
* @param key
|
|
49
|
+
* @param chainCode
|
|
50
|
+
* @param index
|
|
51
|
+
* @constructor
|
|
52
|
+
*/
|
|
53
|
+
declare const CKDPriv: ({ key, chainCode }: DerivedKeys, index: number) => DerivedKeys;
|
|
54
|
+
/**
|
|
55
|
+
* Splits derive path into segments
|
|
56
|
+
* @param path
|
|
57
|
+
*/
|
|
58
|
+
declare const splitPath: (path: string) => Array<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Normalizes the mnemonic by removing extra whitespace and making it lowercase
|
|
61
|
+
* @param mnemonic the mnemonic seed phrase
|
|
62
|
+
*/
|
|
63
|
+
declare const mnemonicToSeed: (mnemonic: string) => Uint8Array;
|
|
64
|
+
|
|
65
|
+
export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, CKDPriv, DerivedKeys, HARDENED_OFFSET, KeyType, deriveKey, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, splitPath };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-LR65XHSF.mjs";import"../../chunk-XNFEUXDS.mjs";export{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,h as CKDPriv,d as HARDENED_OFFSET,c as KeyType,g as deriveKey,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,i as splitPath};
|
|
2
|
+
//# sourceMappingURL=hdKey.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { PrivateKey, PublicKey, Signature } from './asymmetricCrypto.js';
|
|
2
|
+
export { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from './ed25519.js';
|
|
3
|
+
export { MultiEd25519PublicKey, MultiEd25519Signature } from './multiEd25519.js';
|
|
4
|
+
export { Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature } from './secp256k1.js';
|
|
5
|
+
export { MultiKey } from './multiKey.js';
|
|
6
|
+
export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, CKDPriv, DerivedKeys, HARDENED_OFFSET, KeyType, deriveKey, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, splitPath } from './hdKey.js';
|
|
7
|
+
import '../../types/index.js';
|
|
8
|
+
import '../../utils/apiEndpoints.js';
|
|
9
|
+
import '../../types/indexer.js';
|
|
10
|
+
import '../../types/generated/operations.js';
|
|
11
|
+
import '../../types/generated/types.js';
|
|
12
|
+
import '../../bcs/serializer.js';
|
|
13
|
+
import '../hex.js';
|
|
14
|
+
import '../common.js';
|
|
15
|
+
import '../../bcs/deserializer.js';
|
|
16
|
+
import './anyPublicKey.js';
|
|
17
|
+
import './anySignature.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../../chunk-TCTZCPQ6.mjs";import{a as q,b as r}from"../../chunk-FNB6CFQR.mjs";import{a as v}from"../../chunk-CZZJAR3B.mjs";import"../../chunk-UVGCVCNG.mjs";import{a as n,b as o,c as p}from"../../chunk-BIUGRAMO.mjs";import{a as s,b as t,c as u}from"../../chunk-YS2OX7AB.mjs";import{a,b,c}from"../../chunk-E72CFUU4.mjs";import{a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m}from"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-LU6VS7PJ.mjs";import"../../chunk-V6AAQLLJ.mjs";import"../../chunk-7AQXAH6Q.mjs";import"../../chunk-PDLUCVJB.mjs";import"../../chunk-BC2NOUYT.mjs";import"../../chunk-27P7PELS.mjs";import"../../chunk-IZHPCZE3.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-GUT3G5CG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-XNFEUXDS.mjs";export{e as APTOS_BIP44_REGEX,d as APTOS_HARDENED_REGEX,k as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,g as HARDENED_OFFSET,f as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,v as MultiKey,b as PrivateKey,a as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,c as Signature,j as deriveKey,h as isValidBIP44Path,i as isValidHardenedPath,m as mnemonicToSeed,l as splitPath};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { PublicKey, Signature } from './asymmetricCrypto.js';
|
|
2
|
+
import { Deserializer } from '../../bcs/deserializer.js';
|
|
3
|
+
import { Serializer } from '../../bcs/serializer.js';
|
|
4
|
+
import { Ed25519PublicKey, Ed25519Signature } from './ed25519.js';
|
|
5
|
+
import { HexInput } from '../../types/index.js';
|
|
6
|
+
import '../../utils/apiEndpoints.js';
|
|
7
|
+
import '../../types/indexer.js';
|
|
8
|
+
import '../../types/generated/operations.js';
|
|
9
|
+
import '../../types/generated/types.js';
|
|
10
|
+
import '../hex.js';
|
|
11
|
+
import '../common.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the public key of a K-of-N Ed25519 multi-sig transaction.
|
|
15
|
+
*/
|
|
16
|
+
declare class MultiEd25519PublicKey extends PublicKey {
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of public keys supported
|
|
19
|
+
*/
|
|
20
|
+
static readonly MAX_KEYS = 32;
|
|
21
|
+
/**
|
|
22
|
+
* Minimum number of public keys needed
|
|
23
|
+
*/
|
|
24
|
+
static readonly MIN_KEYS = 2;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum threshold for the number of valid signatures required
|
|
27
|
+
*/
|
|
28
|
+
static readonly MIN_THRESHOLD = 1;
|
|
29
|
+
/**
|
|
30
|
+
* List of Ed25519 public keys for this MultiEd25519PublicKey
|
|
31
|
+
*/
|
|
32
|
+
readonly publicKeys: Ed25519PublicKey[];
|
|
33
|
+
/**
|
|
34
|
+
* The minimum number of valid signatures required, for the number of public keys specified
|
|
35
|
+
*/
|
|
36
|
+
readonly threshold: number;
|
|
37
|
+
/**
|
|
38
|
+
* Public key for a K-of-N multi-sig transaction. A K-of-N multi-sig transaction means that for such a
|
|
39
|
+
* transaction to be executed, at least K out of the N authorized signers have signed the transaction
|
|
40
|
+
* and passed the check conducted by the chain.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link
|
|
43
|
+
* https://aptos.dev/integration/creating-a-signed-transaction/ | Creating a Signed Transaction}
|
|
44
|
+
*
|
|
45
|
+
* @param args.publicKeys A list of public keys
|
|
46
|
+
* @param args.threshold At least "threshold" signatures must be valid
|
|
47
|
+
*/
|
|
48
|
+
constructor(args: {
|
|
49
|
+
publicKeys: Ed25519PublicKey[];
|
|
50
|
+
threshold: number;
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Converts a PublicKeys into Uint8Array (bytes) with: bytes = p1_bytes | ... | pn_bytes | threshold
|
|
54
|
+
*/
|
|
55
|
+
toUint8Array(): Uint8Array;
|
|
56
|
+
toString(): string;
|
|
57
|
+
verifySignature(args: {
|
|
58
|
+
message: HexInput;
|
|
59
|
+
signature: MultiEd25519Signature;
|
|
60
|
+
}): boolean;
|
|
61
|
+
serialize(serializer: Serializer): void;
|
|
62
|
+
static deserialize(deserializer: Deserializer): MultiEd25519PublicKey;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Represents the signature of a K-of-N Ed25519 multi-sig transaction.
|
|
66
|
+
*/
|
|
67
|
+
declare class MultiEd25519Signature extends Signature {
|
|
68
|
+
/**
|
|
69
|
+
* Maximum number of Ed25519 signatures supported
|
|
70
|
+
*/
|
|
71
|
+
static MAX_SIGNATURES_SUPPORTED: number;
|
|
72
|
+
/**
|
|
73
|
+
* Number of bytes in the bitmap representing who signed the transaction (32-bits)
|
|
74
|
+
*/
|
|
75
|
+
static BITMAP_LEN: number;
|
|
76
|
+
/**
|
|
77
|
+
* The list of underlying Ed25519 signatures
|
|
78
|
+
*/
|
|
79
|
+
readonly signatures: Ed25519Signature[];
|
|
80
|
+
/**
|
|
81
|
+
* 32-bit Bitmap representing who signed the transaction
|
|
82
|
+
*
|
|
83
|
+
* This is represented where each public key can be masked to determine whether the message was signed by that key.
|
|
84
|
+
*/
|
|
85
|
+
readonly bitmap: Uint8Array;
|
|
86
|
+
/**
|
|
87
|
+
* Signature for a K-of-N multi-sig transaction.
|
|
88
|
+
*
|
|
89
|
+
* @see {@link
|
|
90
|
+
* https://aptos.dev/integration/creating-a-signed-transaction/#multisignature-transactions | Creating a Signed Transaction}
|
|
91
|
+
*
|
|
92
|
+
* @param args.signatures A list of signatures
|
|
93
|
+
* @param args.bitmap 4 bytes, at most 32 signatures are supported. If Nth bit value is `1`, the Nth
|
|
94
|
+
* signature should be provided in `signatures`. Bits are read from left to right
|
|
95
|
+
*/
|
|
96
|
+
constructor(args: {
|
|
97
|
+
signatures: Ed25519Signature[];
|
|
98
|
+
bitmap: Uint8Array;
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Converts a MultiSignature into Uint8Array (bytes) with `bytes = s1_bytes | ... | sn_bytes | bitmap`
|
|
102
|
+
*/
|
|
103
|
+
toUint8Array(): Uint8Array;
|
|
104
|
+
toString(): string;
|
|
105
|
+
/**
|
|
106
|
+
* Helper method to create a bitmap out of the specified bit positions
|
|
107
|
+
* @param args.bits The bitmap positions that should be set. A position starts at index 0.
|
|
108
|
+
* Valid position should range between 0 and 31.
|
|
109
|
+
* @example
|
|
110
|
+
* Here's an example of valid `bits`
|
|
111
|
+
* ```
|
|
112
|
+
* [0, 2, 31]
|
|
113
|
+
* ```
|
|
114
|
+
* `[0, 2, 31]` means the 1st, 3rd and 32nd bits should be set in the bitmap.
|
|
115
|
+
* The result bitmap should be 0b1010000000000000000000000000001
|
|
116
|
+
*
|
|
117
|
+
* @returns bitmap that is 32bit long
|
|
118
|
+
*/
|
|
119
|
+
static createBitmap(args: {
|
|
120
|
+
bits: number[];
|
|
121
|
+
}): Uint8Array;
|
|
122
|
+
serialize(serializer: Serializer): void;
|
|
123
|
+
static deserialize(deserializer: Deserializer): MultiEd25519Signature;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { MultiEd25519PublicKey, MultiEd25519Signature };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"../../chunk-FNB6CFQR.mjs";import"../../chunk-BIUGRAMO.mjs";import"../../chunk-E72CFUU4.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-LU6VS7PJ.mjs";import"../../chunk-V6AAQLLJ.mjs";import"../../chunk-7AQXAH6Q.mjs";import"../../chunk-PDLUCVJB.mjs";import"../../chunk-BC2NOUYT.mjs";import"../../chunk-27P7PELS.mjs";import"../../chunk-IZHPCZE3.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-GUT3G5CG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-XNFEUXDS.mjs";export{a as MultiEd25519PublicKey,b as MultiEd25519Signature};
|
|
2
|
+
//# sourceMappingURL=multiEd25519.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HexInput } from '../../types/index.js';
|
|
2
|
+
import { Deserializer } from '../../bcs/deserializer.js';
|
|
3
|
+
import { Serializer } from '../../bcs/serializer.js';
|
|
4
|
+
import { AnyPublicKey } from './anyPublicKey.js';
|
|
5
|
+
import { AnySignature } from './anySignature.js';
|
|
6
|
+
import { PublicKey } from './asymmetricCrypto.js';
|
|
7
|
+
import '../../utils/apiEndpoints.js';
|
|
8
|
+
import '../../types/indexer.js';
|
|
9
|
+
import '../../types/generated/operations.js';
|
|
10
|
+
import '../../types/generated/types.js';
|
|
11
|
+
import '../hex.js';
|
|
12
|
+
import '../common.js';
|
|
13
|
+
|
|
14
|
+
declare class MultiKey extends PublicKey {
|
|
15
|
+
/**
|
|
16
|
+
* List of any public keys
|
|
17
|
+
*/
|
|
18
|
+
readonly publicKeys: AnyPublicKey[];
|
|
19
|
+
/**
|
|
20
|
+
* The minimum number of valid signatures required, for the number of public keys specified
|
|
21
|
+
*/
|
|
22
|
+
readonly signaturesRequired: number;
|
|
23
|
+
constructor(args: {
|
|
24
|
+
publicKeys: PublicKey[];
|
|
25
|
+
signaturesRequired: number;
|
|
26
|
+
});
|
|
27
|
+
toUint8Array(): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* Create a bitmap that holds the mapping from the original public keys
|
|
30
|
+
* to the signatures passed in
|
|
31
|
+
*
|
|
32
|
+
* @param args.bits array of the index mapping to the matching public keys
|
|
33
|
+
* @returns Uint8array bit map
|
|
34
|
+
*/
|
|
35
|
+
createBitmap(args: {
|
|
36
|
+
bits: number[];
|
|
37
|
+
}): Uint8Array;
|
|
38
|
+
/**
|
|
39
|
+
* Hex string representation the multi key bytes
|
|
40
|
+
*
|
|
41
|
+
* @returns string
|
|
42
|
+
*/
|
|
43
|
+
toString(): string;
|
|
44
|
+
verifySignature(args: {
|
|
45
|
+
message: HexInput;
|
|
46
|
+
signature: AnySignature;
|
|
47
|
+
}): boolean;
|
|
48
|
+
serialize(serializer: Serializer): void;
|
|
49
|
+
static deserialize(deserializer: Deserializer): MultiKey;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { MultiKey };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../../chunk-CZZJAR3B.mjs";import"../../chunk-UVGCVCNG.mjs";import"../../chunk-BIUGRAMO.mjs";import"../../chunk-YS2OX7AB.mjs";import"../../chunk-E72CFUU4.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-LU6VS7PJ.mjs";import"../../chunk-V6AAQLLJ.mjs";import"../../chunk-7AQXAH6Q.mjs";import"../../chunk-PDLUCVJB.mjs";import"../../chunk-BC2NOUYT.mjs";import"../../chunk-27P7PELS.mjs";import"../../chunk-IZHPCZE3.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-GUT3G5CG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-XNFEUXDS.mjs";export{a as MultiKey};
|
|
2
|
+
//# sourceMappingURL=multiKey.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { PublicKey, PrivateKey, Signature } from './asymmetricCrypto.js';
|
|
2
|
+
import { Deserializer } from '../../bcs/deserializer.js';
|
|
3
|
+
import { Serializer } from '../../bcs/serializer.js';
|
|
4
|
+
import { HexInput } from '../../types/index.js';
|
|
5
|
+
import '../../utils/apiEndpoints.js';
|
|
6
|
+
import '../../types/indexer.js';
|
|
7
|
+
import '../../types/generated/operations.js';
|
|
8
|
+
import '../../types/generated/types.js';
|
|
9
|
+
import '../hex.js';
|
|
10
|
+
import '../common.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Represents the Secp256k1 ecdsa public key
|
|
14
|
+
*
|
|
15
|
+
* Secp256k1 authentication key is represented in the SDK as `AnyPublicKey`.
|
|
16
|
+
*/
|
|
17
|
+
declare class Secp256k1PublicKey extends PublicKey {
|
|
18
|
+
static readonly LENGTH: number;
|
|
19
|
+
private readonly key;
|
|
20
|
+
/**
|
|
21
|
+
* Create a new PublicKey instance from a Uint8Array or String.
|
|
22
|
+
*
|
|
23
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
24
|
+
*/
|
|
25
|
+
constructor(hexInput: HexInput);
|
|
26
|
+
/**
|
|
27
|
+
* Get the public key in bytes (Uint8Array).
|
|
28
|
+
*
|
|
29
|
+
* @returns Uint8Array representation of the public key
|
|
30
|
+
*/
|
|
31
|
+
toUint8Array(): Uint8Array;
|
|
32
|
+
/**
|
|
33
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
34
|
+
*
|
|
35
|
+
* @returns string representation of the public key
|
|
36
|
+
*/
|
|
37
|
+
toString(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Verifies a signed data with a public key
|
|
40
|
+
*
|
|
41
|
+
* @param args.message message
|
|
42
|
+
* @param args.signature The signature
|
|
43
|
+
* @returns true if the signature is valid
|
|
44
|
+
*/
|
|
45
|
+
verifySignature(args: {
|
|
46
|
+
message: HexInput;
|
|
47
|
+
signature: Secp256k1Signature;
|
|
48
|
+
}): boolean;
|
|
49
|
+
serialize(serializer: Serializer): void;
|
|
50
|
+
static deserialize(deserializer: Deserializer): Secp256k1PublicKey;
|
|
51
|
+
static load(deserializer: Deserializer): Secp256k1PublicKey;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A Secp256k1 ecdsa private key
|
|
55
|
+
*/
|
|
56
|
+
declare class Secp256k1PrivateKey extends PrivateKey {
|
|
57
|
+
/**
|
|
58
|
+
* Length of Secp256k1 ecdsa private key
|
|
59
|
+
*/
|
|
60
|
+
static readonly LENGTH: number;
|
|
61
|
+
/**
|
|
62
|
+
* The private key bytes
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
private readonly key;
|
|
66
|
+
/**
|
|
67
|
+
* Create a new PrivateKey instance from a Uint8Array or String.
|
|
68
|
+
*
|
|
69
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
70
|
+
*/
|
|
71
|
+
constructor(hexInput: HexInput);
|
|
72
|
+
/**
|
|
73
|
+
* Get the private key in bytes (Uint8Array).
|
|
74
|
+
*
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
toUint8Array(): Uint8Array;
|
|
78
|
+
/**
|
|
79
|
+
* Get the private key as a hex string with the 0x prefix.
|
|
80
|
+
*
|
|
81
|
+
* @returns string representation of the private key
|
|
82
|
+
*/
|
|
83
|
+
toString(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Sign the given message with the private key.
|
|
86
|
+
*
|
|
87
|
+
* @param message in HexInput format
|
|
88
|
+
* @returns Signature
|
|
89
|
+
*/
|
|
90
|
+
sign(message: HexInput): Secp256k1Signature;
|
|
91
|
+
serialize(serializer: Serializer): void;
|
|
92
|
+
static deserialize(deserializer: Deserializer): Secp256k1PrivateKey;
|
|
93
|
+
/**
|
|
94
|
+
* Generate a new random private key.
|
|
95
|
+
*
|
|
96
|
+
* @returns Secp256k1PrivateKey
|
|
97
|
+
*/
|
|
98
|
+
static generate(): Secp256k1PrivateKey;
|
|
99
|
+
/**
|
|
100
|
+
* Derive the Secp256k1PublicKey from this private key.
|
|
101
|
+
*
|
|
102
|
+
* @returns Secp256k1PublicKey
|
|
103
|
+
*/
|
|
104
|
+
publicKey(): Secp256k1PublicKey;
|
|
105
|
+
/**
|
|
106
|
+
* Derives a private key from a mnemonic seed phrase.
|
|
107
|
+
*
|
|
108
|
+
* @param path the BIP44 path
|
|
109
|
+
* @param mnemonics the mnemonic seed phrase
|
|
110
|
+
*
|
|
111
|
+
* @returns The generated key
|
|
112
|
+
*/
|
|
113
|
+
static fromDerivationPath(path: string, mnemonics: string): Secp256k1PrivateKey;
|
|
114
|
+
/**
|
|
115
|
+
* A private inner function so we can separate from the main fromDerivationPath() method
|
|
116
|
+
* to add tests to verify we create the keys correctly.
|
|
117
|
+
*
|
|
118
|
+
* @param path the BIP44 path
|
|
119
|
+
* @param seed the seed phrase created by the mnemonics
|
|
120
|
+
*
|
|
121
|
+
* @returns The generated key
|
|
122
|
+
*/
|
|
123
|
+
private static fromDerivationPathInner;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A signature of a message signed using an Secp256k1 ecdsa private key
|
|
127
|
+
*/
|
|
128
|
+
declare class Secp256k1Signature extends Signature {
|
|
129
|
+
/**
|
|
130
|
+
* Secp256k1 ecdsa signatures are 256-bit.
|
|
131
|
+
*/
|
|
132
|
+
static readonly LENGTH = 64;
|
|
133
|
+
/**
|
|
134
|
+
* The signature bytes
|
|
135
|
+
* @private
|
|
136
|
+
*/
|
|
137
|
+
private readonly data;
|
|
138
|
+
/**
|
|
139
|
+
* Create a new Signature instance from a Uint8Array or String.
|
|
140
|
+
*
|
|
141
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
142
|
+
*/
|
|
143
|
+
constructor(hexInput: HexInput);
|
|
144
|
+
/**
|
|
145
|
+
* Get the signature in bytes (Uint8Array).
|
|
146
|
+
*
|
|
147
|
+
* @returns Uint8Array representation of the signature
|
|
148
|
+
*/
|
|
149
|
+
toUint8Array(): Uint8Array;
|
|
150
|
+
/**
|
|
151
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
152
|
+
*
|
|
153
|
+
* @returns string representation of the signature
|
|
154
|
+
*/
|
|
155
|
+
toString(): string;
|
|
156
|
+
serialize(serializer: Serializer): void;
|
|
157
|
+
static deserialize(deserializer: Deserializer): Secp256k1Signature;
|
|
158
|
+
static load(deserializer: Deserializer): Secp256k1Signature;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export { Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c}from"../../chunk-YS2OX7AB.mjs";import"../../chunk-E72CFUU4.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-LU6VS7PJ.mjs";import"../../chunk-V6AAQLLJ.mjs";import"../../chunk-7AQXAH6Q.mjs";import"../../chunk-PDLUCVJB.mjs";import"../../chunk-BC2NOUYT.mjs";import"../../chunk-27P7PELS.mjs";import"../../chunk-IZHPCZE3.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-GUT3G5CG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-XNFEUXDS.mjs";export{b as Secp256k1PrivateKey,a as Secp256k1PublicKey,c as Secp256k1Signature};
|
|
2
|
+
//# sourceMappingURL=secp256k1.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|