Solana has the following solution, does Aptos have a similar one?
const Web3 = require('@solana/web3.js')
const pk = new Web3.PublicKey('HBL3WxvMBivZwwMFvMXXcX3haa13FJdscB8CTsZsuzXX')
console.log('pk=====', pk.toString())
Get pubkey by address or signature.
My understanding is on Solana, pubkey and address are the same thing. But on Aptos, they are different, when you run
aptos initto create a new wallet, you getprivate_key,public_keyandaccount(aka address), you can use private key to generate the other two.When you work with Aptos contracts, you always deal with user's address instead of pubkey (e.g. when you send APT to another user, you send to his/her address).