@aptos-labs/ts-sdk 0.0.4 → 0.0.6
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 +3 -3
- package/dist/{cjs → browser}/index.d.ts +357 -297
- package/dist/browser/index.global.js +72 -47
- package/dist/browser/index.global.js.map +1 -1
- package/dist/{esm → common}/index.d.ts +357 -297
- package/dist/common/index.js +406 -0
- package/dist/common/index.js.map +1 -0
- package/dist/esm/api/account.d.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +192 -0
- package/dist/esm/bcs/serializer.mjs +2 -0
- package/dist/esm/bcs/serializer.mjs.map +1 -0
- package/dist/esm/chunk-2W744GUN.mjs +2 -0
- package/dist/esm/chunk-2W744GUN.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-3JVGSFHP.mjs +2 -0
- package/dist/esm/chunk-3JVGSFHP.mjs.map +1 -0
- package/dist/esm/chunk-44MGBJ73.mjs +2 -0
- package/dist/esm/chunk-44MGBJ73.mjs.map +1 -0
- package/dist/esm/chunk-4ADA5BE7.mjs +2 -0
- package/dist/esm/chunk-4ADA5BE7.mjs.map +1 -0
- package/dist/esm/chunk-4RVIA63I.mjs +2 -0
- package/dist/esm/chunk-4RVIA63I.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-62SCW5NH.mjs +2 -0
- package/dist/esm/chunk-62SCW5NH.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-7MNEEVXY.mjs +2 -0
- package/dist/esm/chunk-7MNEEVXY.mjs.map +1 -0
- package/dist/esm/chunk-AAIBCWZY.mjs +2 -0
- package/dist/esm/chunk-AAIBCWZY.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-ARVSIDVB.mjs +2 -0
- package/dist/esm/chunk-ARVSIDVB.mjs.map +1 -0
- package/dist/esm/chunk-BFSEVKNA.mjs +2 -0
- package/dist/esm/chunk-BFSEVKNA.mjs.map +1 -0
- package/dist/esm/chunk-BP5ZO7NK.mjs +2 -0
- package/dist/esm/chunk-BP5ZO7NK.mjs.map +1 -0
- package/dist/esm/chunk-BPYLPPEQ.mjs +2 -0
- package/dist/esm/chunk-BPYLPPEQ.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-BV4OOU5Y.mjs +2 -0
- package/dist/esm/chunk-BV4OOU5Y.mjs.map +1 -0
- package/dist/esm/chunk-BWMNPUTK.mjs +2 -0
- package/dist/esm/chunk-BWMNPUTK.mjs.map +1 -0
- package/dist/esm/chunk-CYDWEPFL.mjs +1 -0
- package/dist/esm/chunk-CYDWEPFL.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-E7FWVXGX.mjs +1 -0
- package/dist/esm/chunk-E7FWVXGX.mjs.map +1 -0
- package/dist/esm/chunk-EFIYW4WK.mjs +2 -0
- package/dist/esm/chunk-EFIYW4WK.mjs.map +1 -0
- package/dist/esm/chunk-EGOYLZBU.mjs +2 -0
- package/dist/esm/chunk-EGOYLZBU.mjs.map +1 -0
- package/dist/esm/chunk-EQ5BEDJ7.mjs +2 -0
- package/dist/esm/chunk-EQ5BEDJ7.mjs.map +1 -0
- package/dist/esm/chunk-EWTHPMEE.mjs +2 -0
- package/dist/esm/chunk-EWTHPMEE.mjs.map +1 -0
- package/dist/esm/chunk-EYXHVA6W.mjs +2 -0
- package/dist/esm/chunk-EYXHVA6W.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-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-GEFQFRL3.mjs +2 -0
- package/dist/esm/chunk-GEFQFRL3.mjs.map +1 -0
- package/dist/esm/chunk-GTC7WHMV.mjs +2 -0
- package/dist/esm/chunk-GTC7WHMV.mjs.map +1 -0
- package/dist/esm/chunk-HA6JD5R6.mjs +2 -0
- package/dist/esm/chunk-HA6JD5R6.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-HVADSXTB.mjs +2 -0
- package/dist/esm/chunk-HVADSXTB.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-IG5CHHSI.mjs +2 -0
- package/dist/esm/chunk-IG5CHHSI.mjs.map +1 -0
- package/dist/esm/chunk-IXMB2GOK.mjs +2 -0
- package/dist/esm/chunk-IXMB2GOK.mjs.map +1 -0
- package/dist/esm/chunk-J5ZFOJN2.mjs +2 -0
- package/dist/esm/chunk-J5ZFOJN2.mjs.map +1 -0
- package/dist/esm/chunk-JDS7K2WI.mjs +2 -0
- package/dist/esm/chunk-JDS7K2WI.mjs.map +1 -0
- package/dist/esm/chunk-JZNLZMUC.mjs +2 -0
- package/dist/esm/chunk-JZNLZMUC.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-KQXRH5FK.mjs +2 -0
- package/dist/esm/chunk-KQXRH5FK.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-LV33NV4J.mjs +2 -0
- package/dist/esm/chunk-LV33NV4J.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-NGCFPQ22.mjs +2 -0
- package/dist/esm/chunk-NGCFPQ22.mjs.map +1 -0
- package/dist/esm/chunk-NTD3H2S4.mjs +2 -0
- package/dist/esm/chunk-NTD3H2S4.mjs.map +1 -0
- package/dist/esm/chunk-NYFVEKF6.mjs +2 -0
- package/dist/esm/chunk-NYFVEKF6.mjs.map +1 -0
- package/dist/esm/chunk-NZIJV4O2.mjs +2 -0
- package/dist/esm/chunk-NZIJV4O2.mjs.map +1 -0
- package/dist/esm/chunk-P32MY5YF.mjs +2 -0
- package/dist/esm/chunk-P32MY5YF.mjs.map +1 -0
- package/dist/esm/chunk-Q6N6QACD.mjs +2 -0
- package/dist/esm/chunk-Q6N6QACD.mjs.map +1 -0
- package/dist/esm/chunk-QWVR4RCV.mjs +2 -0
- package/dist/esm/chunk-QWVR4RCV.mjs.map +1 -0
- package/dist/esm/chunk-R26XML3D.mjs +2 -0
- package/dist/esm/chunk-R26XML3D.mjs.map +1 -0
- package/dist/esm/chunk-R3KWVOFG.mjs +2 -0
- package/dist/esm/chunk-R3KWVOFG.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-RYETO74W.mjs +2 -0
- package/dist/esm/chunk-RYETO74W.mjs.map +1 -0
- package/dist/esm/chunk-S36IYY6K.mjs +2 -0
- package/dist/esm/chunk-S36IYY6K.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-TIH6ARYP.mjs +2 -0
- package/dist/esm/chunk-TIH6ARYP.mjs.map +1 -0
- package/dist/esm/chunk-TQD4IGUM.mjs +2 -0
- package/dist/esm/chunk-TQD4IGUM.mjs.map +1 -0
- package/dist/esm/chunk-U25N2VWA.mjs +2 -0
- package/dist/esm/chunk-U25N2VWA.mjs.map +1 -0
- package/dist/esm/chunk-U3LO2FSJ.mjs +2 -0
- package/dist/esm/chunk-U3LO2FSJ.mjs.map +1 -0
- package/dist/esm/chunk-U6SZNNVL.mjs +2 -0
- package/dist/esm/chunk-U6SZNNVL.mjs.map +1 -0
- package/dist/esm/chunk-UAAI3NCA.mjs +2 -0
- package/dist/esm/chunk-UAAI3NCA.mjs.map +1 -0
- package/dist/esm/chunk-UNQNACJT.mjs +2 -0
- package/dist/esm/chunk-UNQNACJT.mjs.map +1 -0
- package/dist/esm/chunk-UPLWWSB4.mjs +2 -0
- package/dist/esm/chunk-UPLWWSB4.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-V45RFKH7.mjs +2 -0
- package/dist/esm/chunk-V45RFKH7.mjs.map +1 -0
- package/dist/esm/chunk-VMQWW5UT.mjs +2 -0
- package/dist/esm/chunk-VMQWW5UT.mjs.map +1 -0
- package/dist/esm/chunk-VOYW2TZW.mjs +2 -0
- package/dist/esm/chunk-VOYW2TZW.mjs.map +1 -0
- package/dist/esm/chunk-VWVEDCBM.mjs +2 -0
- package/dist/esm/chunk-VWVEDCBM.mjs.map +1 -0
- package/dist/esm/chunk-VYAVLUPJ.mjs +2 -0
- package/dist/esm/chunk-VYAVLUPJ.mjs.map +1 -0
- package/dist/esm/chunk-WKY5ENCK.mjs +2 -0
- package/dist/esm/chunk-WKY5ENCK.mjs.map +1 -0
- package/dist/esm/chunk-WX43AJTD.mjs +406 -0
- package/dist/esm/chunk-WX43AJTD.mjs.map +1 -0
- package/dist/esm/chunk-X32O46IB.mjs +2 -0
- package/dist/esm/chunk-X32O46IB.mjs.map +1 -0
- package/dist/esm/chunk-Y5DJPHJT.mjs +2 -0
- package/dist/esm/chunk-Y5DJPHJT.mjs.map +1 -0
- package/dist/esm/chunk-Y7VR7X5W.mjs +2 -0
- package/dist/esm/chunk-Y7VR7X5W.mjs.map +1 -0
- package/dist/esm/chunk-YYRDFZE6.mjs +2 -0
- package/dist/esm/chunk-YYRDFZE6.mjs.map +1 -0
- package/dist/esm/chunk-Z2UDRTHA.mjs +2 -0
- package/dist/esm/chunk-Z2UDRTHA.mjs.map +1 -0
- package/dist/esm/chunk-ZWH2ESXT.mjs +2 -0
- package/dist/esm/chunk-ZWH2ESXT.mjs.map +1 -0
- package/dist/esm/client/core.d.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +21 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/index.mjs.map +1 -0
- package/dist/esm/index.d.mts +60 -0
- package/dist/esm/index.mjs +1 -5706
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/internal/account.d.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +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.mts +126 -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.mts +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.mts +48 -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.mts +242 -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.mts +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.mts +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.mts +9496 -0
- package/dist/esm/types/generated/types.mjs +2 -0
- package/dist/esm/types/generated/types.mjs.map +1 -0
- package/dist/esm/types/index.d.mts +886 -0
- package/dist/esm/types/index.mjs +2 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/types/indexer.d.mts +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.mts +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.mts +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.mts +7 -0
- package/dist/esm/utils/helpers.mjs +2 -0
- package/dist/esm/utils/helpers.mjs.map +1 -0
- package/dist/esm/utils/index.d.mts +2 -0
- package/dist/esm/utils/index.mjs +2 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/dist/esm/utils/memoize.d.mts +20 -0
- package/dist/esm/utils/memoize.mjs +2 -0
- package/dist/esm/utils/memoize.mjs.map +1 -0
- package/dist/esm/version.d.mts +8 -0
- package/dist/esm/version.mjs +2 -0
- package/dist/esm/version.mjs.map +1 -0
- package/package.json +43 -40
- package/src/api/account.ts +2 -2
- package/src/api/coin.ts +2 -2
- package/src/api/event.ts +2 -2
- package/src/api/general.ts +4 -4
- package/src/api/transactionSubmission.ts +20 -3
- package/src/bcs/serializable/moveStructs.ts +8 -4
- package/src/client/core.ts +7 -5
- package/src/client/get.ts +6 -2
- package/src/client/post.ts +12 -4
- package/src/core/account.ts +7 -4
- package/src/index.ts +1 -1
- package/src/internal/account.ts +2 -2
- package/src/internal/ans.ts +4 -6
- package/src/internal/coin.ts +2 -2
- package/src/internal/event.ts +3 -3
- package/src/internal/general.ts +7 -6
- package/src/internal/queries/getEvents.graphql +1 -0
- package/src/internal/transactionSubmission.ts +41 -3
- package/src/transactions/transactionBuilder/helpers.ts +2 -2
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +15 -20
- package/src/transactions/typeTag/parser.ts +10 -2
- package/src/transactions/types.ts +5 -14
- package/src/types/generated/operations.ts +52 -51
- package/src/types/generated/queries.ts +42 -41
- package/src/types/generated/types.ts +2257 -2249
- package/src/types/index.ts +20 -12
- package/src/utils/index.ts +2 -0
- package/dist/cjs/index.js +0 -5901
- package/dist/cjs/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -1310
- package/dist/types/index.js +0 -176
- package/dist/types/index.js.map +0 -1
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { Serializable, Serializer } from '../bcs/serializer.mjs';
|
|
2
|
+
import { Deserializer } from '../bcs/deserializer.mjs';
|
|
3
|
+
import { ParsingResult } from './common.mjs';
|
|
4
|
+
import { TransactionArgument } from '../transactions/instances/transactionArgument.mjs';
|
|
5
|
+
import { HexInput } from '../types/index.mjs';
|
|
6
|
+
import './hex.mjs';
|
|
7
|
+
import '../utils/apiEndpoints.mjs';
|
|
8
|
+
import '../types/indexer.mjs';
|
|
9
|
+
import '../types/generated/operations.mjs';
|
|
10
|
+
import '../types/generated/types.mjs';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This enum is used to explain why an address was invalid.
|
|
14
|
+
*/
|
|
15
|
+
declare enum AddressInvalidReason {
|
|
16
|
+
INCORRECT_NUMBER_OF_BYTES = "incorrect_number_of_bytes",
|
|
17
|
+
INVALID_HEX_CHARS = "invalid_hex_chars",
|
|
18
|
+
TOO_SHORT = "too_short",
|
|
19
|
+
TOO_LONG = "too_long",
|
|
20
|
+
LEADING_ZERO_X_REQUIRED = "leading_zero_x_required",
|
|
21
|
+
LONG_FORM_REQUIRED_UNLESS_SPECIAL = "long_form_required_unless_special",
|
|
22
|
+
INVALID_PADDING_ZEROES = "INVALID_PADDING_ZEROES"
|
|
23
|
+
}
|
|
24
|
+
type AccountAddressInput = HexInput | AccountAddress;
|
|
25
|
+
/**
|
|
26
|
+
* NOTE: Only use this class for account addresses. For other hex data, e.g. transaction
|
|
27
|
+
* hashes, use the Hex class.
|
|
28
|
+
*
|
|
29
|
+
* AccountAddress is used for working with account addresses. Account addresses, when
|
|
30
|
+
* represented as a string, generally look like these examples:
|
|
31
|
+
* - 0x1
|
|
32
|
+
* - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c
|
|
33
|
+
*
|
|
34
|
+
* Proper formatting and parsing of account addresses is defined by AIP-40.
|
|
35
|
+
* To learn more about the standard, read the AIP here:
|
|
36
|
+
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
37
|
+
*
|
|
38
|
+
* The comments in this class make frequent reference to the LONG and SHORT formats,
|
|
39
|
+
* as well as "special" addresses. To learn what these refer to see AIP-40.
|
|
40
|
+
*/
|
|
41
|
+
declare class AccountAddress extends Serializable implements TransactionArgument {
|
|
42
|
+
/**
|
|
43
|
+
* This is the internal representation of an account address.
|
|
44
|
+
*/
|
|
45
|
+
readonly data: Uint8Array;
|
|
46
|
+
/**
|
|
47
|
+
* The number of bytes that make up an account address.
|
|
48
|
+
*/
|
|
49
|
+
static readonly LENGTH: number;
|
|
50
|
+
/**
|
|
51
|
+
* The length of an address string in LONG form without a leading 0x.
|
|
52
|
+
*/
|
|
53
|
+
static readonly LONG_STRING_LENGTH: number;
|
|
54
|
+
static ZERO: AccountAddress;
|
|
55
|
+
static ONE: AccountAddress;
|
|
56
|
+
static TWO: AccountAddress;
|
|
57
|
+
static THREE: AccountAddress;
|
|
58
|
+
static FOUR: AccountAddress;
|
|
59
|
+
/**
|
|
60
|
+
* Creates an instance of AccountAddress from a Uint8Array.
|
|
61
|
+
*
|
|
62
|
+
* @param args.data A Uint8Array representing an account address.
|
|
63
|
+
*/
|
|
64
|
+
constructor(input: Uint8Array);
|
|
65
|
+
/**
|
|
66
|
+
* Returns whether an address is special, where special is defined as 0x0 to 0xf
|
|
67
|
+
* inclusive. In other words, the last byte of the address must be < 0b10000 (16)
|
|
68
|
+
* and every other byte must be zero.
|
|
69
|
+
*
|
|
70
|
+
* For more information on how special addresses are defined see AIP-40:
|
|
71
|
+
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
72
|
+
*
|
|
73
|
+
* @returns true if the address is special, false if not.
|
|
74
|
+
*/
|
|
75
|
+
isSpecial(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Return the AccountAddress as a string as per AIP-40.
|
|
78
|
+
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
79
|
+
*
|
|
80
|
+
* In short, it means that special addresses are represented in SHORT form, meaning
|
|
81
|
+
* 0x0 through to 0xf inclusive, and every other address is represented in LONG form,
|
|
82
|
+
* meaning 0x + 64 hex characters.
|
|
83
|
+
*
|
|
84
|
+
* @returns AccountAddress as a string conforming to AIP-40.
|
|
85
|
+
*/
|
|
86
|
+
toString(): `0x${string}`;
|
|
87
|
+
/**
|
|
88
|
+
* NOTE: Prefer to use `toString` where possible.
|
|
89
|
+
*
|
|
90
|
+
* Return the AccountAddress as a string as per AIP-40 but without the leading 0x.
|
|
91
|
+
*
|
|
92
|
+
* Learn more by reading the docstring of `toString`.
|
|
93
|
+
*
|
|
94
|
+
* @returns AccountAddress as a string conforming to AIP-40 but without the leading 0x.
|
|
95
|
+
*/
|
|
96
|
+
toStringWithoutPrefix(): string;
|
|
97
|
+
/**
|
|
98
|
+
* NOTE: Prefer to use `toString` where possible.
|
|
99
|
+
*
|
|
100
|
+
* Whereas toString will format special addresses (as defined by isSpecial) using the
|
|
101
|
+
* SHORT form (no leading 0s), this format the address in the LONG format
|
|
102
|
+
* unconditionally.
|
|
103
|
+
*
|
|
104
|
+
* This means it will be 0x + 64 hex characters.
|
|
105
|
+
*
|
|
106
|
+
* @returns AccountAddress as a string in LONG form.
|
|
107
|
+
*/
|
|
108
|
+
toStringLong(): `0x${string}`;
|
|
109
|
+
/**
|
|
110
|
+
* NOTE: Prefer to use `toString` where possible.
|
|
111
|
+
*
|
|
112
|
+
* Whereas toString will format special addresses (as defined by isSpecial) using the
|
|
113
|
+
* SHORT form (no leading 0s), this function will include leading zeroes. The string
|
|
114
|
+
* will not have a leading zero.
|
|
115
|
+
*
|
|
116
|
+
* This means it will be 64 hex characters without a leading 0x.
|
|
117
|
+
*
|
|
118
|
+
* @returns AccountAddress as a string in LONG form without a leading 0x.
|
|
119
|
+
*/
|
|
120
|
+
toStringLongWithoutPrefix(): string;
|
|
121
|
+
/**
|
|
122
|
+
* Get the inner hex data. The inner data is already a Uint8Array so no conversion
|
|
123
|
+
* is taking place here, it just returns the inner data.
|
|
124
|
+
*
|
|
125
|
+
* @returns Hex data as Uint8Array
|
|
126
|
+
*/
|
|
127
|
+
toUint8Array(): Uint8Array;
|
|
128
|
+
/**
|
|
129
|
+
* Serialize the AccountAddress to a Serializer instance's data buffer.
|
|
130
|
+
* @param serializer The serializer to serialize the AccountAddress to.
|
|
131
|
+
* @returns void
|
|
132
|
+
* @example
|
|
133
|
+
* const serializer = new Serializer();
|
|
134
|
+
* const address = AccountAddress.fromString("0x1");
|
|
135
|
+
* address.serialize(serializer);
|
|
136
|
+
* const bytes = serializer.toUint8Array();
|
|
137
|
+
* // `bytes` is now the BCS-serialized address.
|
|
138
|
+
*/
|
|
139
|
+
serialize(serializer: Serializer): void;
|
|
140
|
+
serializeForEntryFunction(serializer: Serializer): void;
|
|
141
|
+
serializeForScriptFunction(serializer: Serializer): void;
|
|
142
|
+
/**
|
|
143
|
+
* Deserialize an AccountAddress from the byte buffer in a Deserializer instance.
|
|
144
|
+
* @param deserializer The deserializer to deserialize the AccountAddress from.
|
|
145
|
+
* @returns An instance of AccountAddress.
|
|
146
|
+
* @example
|
|
147
|
+
* const bytes = hexToBytes("0x0102030405060708091011121314151617181920212223242526272829303132");
|
|
148
|
+
* const deserializer = new Deserializer(bytes);
|
|
149
|
+
* const address = AccountAddress.deserialize(deserializer);
|
|
150
|
+
* // `address` is now an instance of AccountAddress.
|
|
151
|
+
*/
|
|
152
|
+
static deserialize(deserializer: Deserializer): AccountAddress;
|
|
153
|
+
/**
|
|
154
|
+
* NOTE: This function has strict parsing behavior. For relaxed behavior, please use
|
|
155
|
+
* the `fromStringRelaxed` function.
|
|
156
|
+
*
|
|
157
|
+
* Creates an instance of AccountAddress from a hex string.
|
|
158
|
+
*
|
|
159
|
+
* This function allows only the strictest formats defined by AIP-40. In short this
|
|
160
|
+
* means only the following formats are accepted:
|
|
161
|
+
*
|
|
162
|
+
* - LONG
|
|
163
|
+
* - SHORT for special addresses
|
|
164
|
+
*
|
|
165
|
+
* Where:
|
|
166
|
+
* - LONG is defined as 0x + 64 hex characters.
|
|
167
|
+
* - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.
|
|
168
|
+
*
|
|
169
|
+
* This means the following are not accepted:
|
|
170
|
+
* - SHORT for non-special addresses.
|
|
171
|
+
* - Any address without a leading 0x.
|
|
172
|
+
*
|
|
173
|
+
* Learn more about the different address formats by reading AIP-40:
|
|
174
|
+
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
175
|
+
*
|
|
176
|
+
* @param input A hex string representing an account address.
|
|
177
|
+
*
|
|
178
|
+
* @returns An instance of AccountAddress.
|
|
179
|
+
*/
|
|
180
|
+
static fromString(input: string): AccountAddress;
|
|
181
|
+
/**
|
|
182
|
+
* NOTE: This function has relaxed parsing behavior. For strict behavior, please use
|
|
183
|
+
* the `fromString` function. Where possible use `fromString` rather than this
|
|
184
|
+
* function, `fromStringRelaxed` is only provided for backwards compatibility.
|
|
185
|
+
*
|
|
186
|
+
* Creates an instance of AccountAddress from a hex string.
|
|
187
|
+
*
|
|
188
|
+
* This function allows all formats defined by AIP-40. In short this means the
|
|
189
|
+
* following formats are accepted:
|
|
190
|
+
*
|
|
191
|
+
* - LONG, with or without leading 0x
|
|
192
|
+
* - SHORT, with or without leading 0x
|
|
193
|
+
*
|
|
194
|
+
* Where:
|
|
195
|
+
* - LONG is 64 hex characters.
|
|
196
|
+
* - SHORT is 1 to 63 hex characters inclusive.
|
|
197
|
+
* - Padding zeroes are allowed, e.g. 0x0123 is valid.
|
|
198
|
+
*
|
|
199
|
+
* Learn more about the different address formats by reading AIP-40:
|
|
200
|
+
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
201
|
+
*
|
|
202
|
+
* @param input A hex string representing an account address.
|
|
203
|
+
*
|
|
204
|
+
* @returns An instance of AccountAddress.
|
|
205
|
+
*/
|
|
206
|
+
static fromStringRelaxed(input: string): AccountAddress;
|
|
207
|
+
/**
|
|
208
|
+
* Convenience method for creating an AccountAddress from all known inputs.
|
|
209
|
+
*
|
|
210
|
+
* This handles, Uint8array, string, and AccountAddress itself
|
|
211
|
+
* @param input
|
|
212
|
+
*/
|
|
213
|
+
static fromRelaxed(input: AccountAddressInput): AccountAddress;
|
|
214
|
+
/**
|
|
215
|
+
* Convenience method for creating an AccountAddress from all known inputs.
|
|
216
|
+
*
|
|
217
|
+
* This handles, Uint8array, string, and AccountAddress itself
|
|
218
|
+
* @param input
|
|
219
|
+
*/
|
|
220
|
+
static from(input: AccountAddressInput): AccountAddress;
|
|
221
|
+
/**
|
|
222
|
+
* Check if the string is a valid AccountAddress.
|
|
223
|
+
*
|
|
224
|
+
* @param args.input A hex string representing an account address.
|
|
225
|
+
* @param args.relaxed If true, use relaxed parsing behavior. If false, use strict parsing behavior.
|
|
226
|
+
*
|
|
227
|
+
* @returns valid = true if the string is valid, valid = false if not. If the string
|
|
228
|
+
* is not valid, invalidReason will be set explaining why it is invalid.
|
|
229
|
+
*/
|
|
230
|
+
static isValid(args: {
|
|
231
|
+
input: AccountAddressInput;
|
|
232
|
+
relaxed?: boolean;
|
|
233
|
+
}): ParsingResult<AddressInvalidReason>;
|
|
234
|
+
/**
|
|
235
|
+
* Return whether AccountAddresses are equal. AccountAddresses are considered equal
|
|
236
|
+
* if their underlying byte data is identical.
|
|
237
|
+
*
|
|
238
|
+
* @param other The AccountAddress to compare to.
|
|
239
|
+
* @returns true if the AccountAddresses are equal, false if not.
|
|
240
|
+
*/
|
|
241
|
+
equals(other: AccountAddress): boolean;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export { AccountAddress, AccountAddressInput, AddressInvalidReason };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{b as AccountAddress,a as AddressInvalidReason};
|
|
2
|
+
//# sourceMappingURL=accountAddress.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AccountAddress } from './accountAddress.mjs';
|
|
2
|
+
import { PublicKey } from './crypto/asymmetricCrypto.mjs';
|
|
3
|
+
import { Hex } from './hex.mjs';
|
|
4
|
+
import { HexInput, AuthenticationKeyScheme } from '../types/index.mjs';
|
|
5
|
+
import { Serializable, Serializer } from '../bcs/serializer.mjs';
|
|
6
|
+
import { Deserializer } from '../bcs/deserializer.mjs';
|
|
7
|
+
import './common.mjs';
|
|
8
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
9
|
+
import '../utils/apiEndpoints.mjs';
|
|
10
|
+
import '../types/indexer.mjs';
|
|
11
|
+
import '../types/generated/operations.mjs';
|
|
12
|
+
import '../types/generated/types.mjs';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Each account stores an authentication key. Authentication key enables account owners to rotate
|
|
16
|
+
* their private key(s) associated with the account without changing the address that hosts their account.
|
|
17
|
+
* @see {@link https://aptos.dev/concepts/accounts | Account Basics}
|
|
18
|
+
*
|
|
19
|
+
* Account addresses can be derived from AuthenticationKey
|
|
20
|
+
*/
|
|
21
|
+
declare class AuthenticationKey extends Serializable {
|
|
22
|
+
/**
|
|
23
|
+
* An authentication key is always a SHA3-256 hash of data, and is always 32 bytes.
|
|
24
|
+
*
|
|
25
|
+
* The data to hash depends on the underlying public key type and the derivation scheme.
|
|
26
|
+
*/
|
|
27
|
+
static readonly LENGTH: number;
|
|
28
|
+
/**
|
|
29
|
+
* The raw bytes of the authentication key.
|
|
30
|
+
*/
|
|
31
|
+
readonly data: Hex;
|
|
32
|
+
constructor(args: {
|
|
33
|
+
data: HexInput;
|
|
34
|
+
});
|
|
35
|
+
serialize(serializer: Serializer): void;
|
|
36
|
+
/**
|
|
37
|
+
* Deserialize an AuthenticationKey from the byte buffer in a Deserializer instance.
|
|
38
|
+
* @param deserializer The deserializer to deserialize the AuthenticationKey from.
|
|
39
|
+
* @returns An instance of AuthenticationKey.
|
|
40
|
+
*/
|
|
41
|
+
static deserialize(deserializer: Deserializer): AuthenticationKey;
|
|
42
|
+
toString(): string;
|
|
43
|
+
toUint8Array(): Uint8Array;
|
|
44
|
+
/**
|
|
45
|
+
* Derives an AuthenticationKey from the public key seed bytes and an explicit derivation scheme.
|
|
46
|
+
*
|
|
47
|
+
* This facilitates targeting a specific scheme for deriving an authentication key from a public key.
|
|
48
|
+
*
|
|
49
|
+
* @param args - the public key and scheme to use for the derivation
|
|
50
|
+
*/
|
|
51
|
+
static fromPublicKeyAndScheme(args: {
|
|
52
|
+
publicKey: PublicKey;
|
|
53
|
+
scheme: AuthenticationKeyScheme;
|
|
54
|
+
}): AuthenticationKey;
|
|
55
|
+
/**
|
|
56
|
+
* Converts a PublicKey(s) to an AuthenticationKey, using the derivation scheme inferred from the
|
|
57
|
+
* instance of the PublicKey type passed in.
|
|
58
|
+
*
|
|
59
|
+
* @param args.publicKey
|
|
60
|
+
* @returns AuthenticationKey
|
|
61
|
+
*/
|
|
62
|
+
static fromPublicKey(args: {
|
|
63
|
+
publicKey: PublicKey;
|
|
64
|
+
}): AuthenticationKey;
|
|
65
|
+
/**
|
|
66
|
+
* Derives an account address from an AuthenticationKey. Since an AccountAddress is also 32 bytes,
|
|
67
|
+
* the AuthenticationKey bytes are directly translated to an AccountAddress.
|
|
68
|
+
*
|
|
69
|
+
* @returns AccountAddress
|
|
70
|
+
*/
|
|
71
|
+
derivedAddress(): AccountAddress;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { AuthenticationKey };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../chunk-U3LO2FSJ.mjs";import"../chunk-U25N2VWA.mjs";import"../chunk-44MGBJ73.mjs";import"../chunk-YYRDFZE6.mjs";import"../chunk-62SCW5NH.mjs";import"../chunk-RYETO74W.mjs";import"../chunk-EFIYW4WK.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HVADSXTB.mjs";import"../chunk-BPYLPPEQ.mjs";import"../chunk-4ADA5BE7.mjs";import"../chunk-X32O46IB.mjs";import"../chunk-GTC7WHMV.mjs";import"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as AuthenticationKey};
|
|
2
|
+
//# sourceMappingURL=authenticationKey.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This error is used to explain why parsing failed.
|
|
3
|
+
*/
|
|
4
|
+
declare class ParsingError<T> extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* This provides a programmatic way to access why parsing failed. Downstream devs
|
|
7
|
+
* might want to use this to build their own error messages if the default error
|
|
8
|
+
* messages are not suitable for their use case. This should be an enum.
|
|
9
|
+
*/
|
|
10
|
+
invalidReason: T;
|
|
11
|
+
constructor(message: string, invalidReason: T);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,
|
|
15
|
+
* this type is returned from "defensive" functions like isValid.
|
|
16
|
+
*/
|
|
17
|
+
type ParsingResult<T> = {
|
|
18
|
+
/**
|
|
19
|
+
* True if valid, false otherwise.
|
|
20
|
+
*/
|
|
21
|
+
valid: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* If valid is false, this will be a code explaining why parsing failed.
|
|
24
|
+
*/
|
|
25
|
+
invalidReason?: T;
|
|
26
|
+
/**
|
|
27
|
+
* If valid is false, this will be a string explaining why parsing failed.
|
|
28
|
+
*/
|
|
29
|
+
invalidReasonMessage?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { ParsingError, ParsingResult };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Deserializer } from '../../bcs/deserializer.mjs';
|
|
2
|
+
import { Serializer } from '../../bcs/serializer.mjs';
|
|
3
|
+
import { HexInput } from '../../types/index.mjs';
|
|
4
|
+
import { AnySignature } from './anySignature.mjs';
|
|
5
|
+
import { PublicKey } from './asymmetricCrypto.mjs';
|
|
6
|
+
import '../../utils/apiEndpoints.mjs';
|
|
7
|
+
import '../../types/indexer.mjs';
|
|
8
|
+
import '../../types/generated/operations.mjs';
|
|
9
|
+
import '../../types/generated/types.mjs';
|
|
10
|
+
import '../hex.mjs';
|
|
11
|
+
import '../common.mjs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents any public key supported by Aptos.
|
|
15
|
+
*
|
|
16
|
+
* Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263) Aptos supports
|
|
17
|
+
* `Legacy` and `Unified` authentication keys.
|
|
18
|
+
*
|
|
19
|
+
* Any unified authentication key is represented in the SDK as `AnyPublicKey`.
|
|
20
|
+
*/
|
|
21
|
+
declare class AnyPublicKey extends PublicKey {
|
|
22
|
+
/**
|
|
23
|
+
* Reference to the inner public key
|
|
24
|
+
*/
|
|
25
|
+
readonly publicKey: PublicKey;
|
|
26
|
+
constructor(publicKey: PublicKey);
|
|
27
|
+
/**
|
|
28
|
+
* Get the public key in bytes (Uint8Array).
|
|
29
|
+
*
|
|
30
|
+
* @returns Uint8Array representation of the public key
|
|
31
|
+
*/
|
|
32
|
+
toUint8Array(): Uint8Array;
|
|
33
|
+
/**
|
|
34
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
35
|
+
*
|
|
36
|
+
* @returns string representation of the public key
|
|
37
|
+
*/
|
|
38
|
+
toString(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Verifies a signed data with a public key
|
|
41
|
+
*
|
|
42
|
+
* @param args.message message
|
|
43
|
+
* @param args.signature The signature
|
|
44
|
+
* @returns true if the signature is valid
|
|
45
|
+
*/
|
|
46
|
+
verifySignature(args: {
|
|
47
|
+
message: HexInput;
|
|
48
|
+
signature: AnySignature;
|
|
49
|
+
}): boolean;
|
|
50
|
+
serialize(serializer: Serializer): void;
|
|
51
|
+
static deserialize(deserializer: Deserializer): AnyPublicKey;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { AnyPublicKey };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../../chunk-YYRDFZE6.mjs";import"../../chunk-62SCW5NH.mjs";import"../../chunk-RYETO74W.mjs";import"../../chunk-EFIYW4WK.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as AnyPublicKey};
|
|
2
|
+
//# sourceMappingURL=anyPublicKey.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Deserializer } from '../../bcs/deserializer.mjs';
|
|
2
|
+
import { Serializer } from '../../bcs/serializer.mjs';
|
|
3
|
+
import { Signature } from './asymmetricCrypto.mjs';
|
|
4
|
+
import '../../types/index.mjs';
|
|
5
|
+
import '../../utils/apiEndpoints.mjs';
|
|
6
|
+
import '../../types/indexer.mjs';
|
|
7
|
+
import '../../types/generated/operations.mjs';
|
|
8
|
+
import '../../types/generated/types.mjs';
|
|
9
|
+
import '../hex.mjs';
|
|
10
|
+
import '../common.mjs';
|
|
11
|
+
|
|
12
|
+
declare class AnySignature extends Signature {
|
|
13
|
+
readonly signature: Signature;
|
|
14
|
+
constructor(signature: Signature);
|
|
15
|
+
/**
|
|
16
|
+
* Get the public key in bytes (Uint8Array).
|
|
17
|
+
*
|
|
18
|
+
* @returns Uint8Array representation of the public key
|
|
19
|
+
*/
|
|
20
|
+
toUint8Array(): Uint8Array;
|
|
21
|
+
/**
|
|
22
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
23
|
+
*
|
|
24
|
+
* @returns string representation of the public key
|
|
25
|
+
*/
|
|
26
|
+
toString(): string;
|
|
27
|
+
serialize(serializer: Serializer): void;
|
|
28
|
+
static deserialize(deserializer: Deserializer): AnySignature;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { AnySignature };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../../chunk-QWVR4RCV.mjs";import"../../chunk-62SCW5NH.mjs";import"../../chunk-RYETO74W.mjs";import"../../chunk-EFIYW4WK.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as AnySignature};
|
|
2
|
+
//# sourceMappingURL=anySignature.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { HexInput } from '../../types/index.mjs';
|
|
2
|
+
import { Serializable, Serializer } from '../../bcs/serializer.mjs';
|
|
3
|
+
import '../../utils/apiEndpoints.mjs';
|
|
4
|
+
import '../../types/indexer.mjs';
|
|
5
|
+
import '../../types/generated/operations.mjs';
|
|
6
|
+
import '../../types/generated/types.mjs';
|
|
7
|
+
import '../hex.mjs';
|
|
8
|
+
import '../common.mjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An abstract representation of a public key. All Asymmetric key pairs will use this to
|
|
12
|
+
* verify signatures and for authentication keys.
|
|
13
|
+
*/
|
|
14
|
+
declare abstract class PublicKey extends Serializable {
|
|
15
|
+
/**
|
|
16
|
+
* Verifies that the private key associated with this public key signed the message with the given signature.
|
|
17
|
+
* @param args.message The message that was signed
|
|
18
|
+
* @param args.signature The signature to verify
|
|
19
|
+
*/
|
|
20
|
+
abstract verifySignature(args: {
|
|
21
|
+
message: HexInput;
|
|
22
|
+
signature: Signature;
|
|
23
|
+
}): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the raw public key bytes
|
|
26
|
+
*/
|
|
27
|
+
abstract toUint8Array(): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* Get the public key as a hex string with a 0x prefix e.g. 0x123456...
|
|
30
|
+
*/
|
|
31
|
+
abstract toString(): string;
|
|
32
|
+
abstract serialize(serializer: Serializer): void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* An abstract representation of a private key. This is used to sign transactions and
|
|
36
|
+
* derive the public key associated.
|
|
37
|
+
*/
|
|
38
|
+
declare abstract class PrivateKey extends Serializable {
|
|
39
|
+
/**
|
|
40
|
+
* Sign a message with the key
|
|
41
|
+
* @param message The message to sign
|
|
42
|
+
*/
|
|
43
|
+
abstract sign(message: HexInput): Signature;
|
|
44
|
+
/**
|
|
45
|
+
* Get the raw private key bytes
|
|
46
|
+
*/
|
|
47
|
+
abstract toUint8Array(): Uint8Array;
|
|
48
|
+
/**
|
|
49
|
+
* Get the private key as a hex string with a 0x prefix e.g. 0x123456...
|
|
50
|
+
*/
|
|
51
|
+
abstract toString(): string;
|
|
52
|
+
abstract serialize(serializer: Serializer): void;
|
|
53
|
+
/**
|
|
54
|
+
* Derives the public key associated with the private key
|
|
55
|
+
*/
|
|
56
|
+
abstract publicKey(): PublicKey;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* An abstract representation of a signature. This is the product of signing a
|
|
60
|
+
* message and can be used with the PublicKey to verify the signature.
|
|
61
|
+
*/
|
|
62
|
+
declare abstract class Signature extends Serializable {
|
|
63
|
+
/**
|
|
64
|
+
* Get the raw signature bytes
|
|
65
|
+
*/
|
|
66
|
+
abstract toUint8Array(): Uint8Array;
|
|
67
|
+
/**
|
|
68
|
+
* Get the signature as a hex string with a 0x prefix e.g. 0x123456...
|
|
69
|
+
*/
|
|
70
|
+
abstract toString(): string;
|
|
71
|
+
abstract serialize(serializer: Serializer): void;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { PrivateKey, PublicKey, Signature };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c}from"../../chunk-EFIYW4WK.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{b as PrivateKey,a as PublicKey,c as Signature};
|
|
2
|
+
//# sourceMappingURL=asymmetricCrypto.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|