Can I reverse-resolve the public key from an address or signature?

39 Views Asked by At

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.

1

There are 1 best solutions below

0
0xaptosj On

My understanding is on Solana, pubkey and address are the same thing. But on Aptos, they are different, when you run aptos init to create a new wallet, you get private_key, public_key and account (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).