I’m building a dApp and want to connect my Nami wallet to my website. In the end I want to have something like a login with wallets and want to save these data to request wallet specific data on the blockchain.
For this I want to have the “addr1…” address of the connected wallet but I’m struggling to serialize the address I get to this format.
I get an address in the following format with the Nami injected API and Javascript:
window.cardano.nami.enable().then(api=>{api.getUsedAddresses().then(addy=>{console.log(addy);})})
The address looks like
01237ab60d46df02e075614a699ebc8bba702a039b177e6a49c6ec2b837cf72babf39c10aa4159862f861c383b215c7c7ce7531acd56f6e7a9
(how is this format called?)
I want to serialize it to the following address
addr1qy3h4dsdgm0s9cr4v99xn84u3wa8q2srnvthu6jfcmkzhqmu7u46huuuzz4yzkvx97rpcwpmy9w8cl882vdv64hku75srnalr6
I know that is possible with emurgo’s serialization lib but I would prefer to use pycardano instead for teck stack reasons.
Checked the docu but it’s my first dApp and there are a lot of serialization options but most are transaction related….
Patrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.