How to decode bech32

I try to use the library to generate Base Address from Account Public Keys with the format acct_xvk+data+chksum but It keeps saying it’s Uncaught Failed to parse bech32, invalid data format.
if I use the bech tool to change the header acct_xvk to xpub it changes it and then I can use it in the cardano-serialization-lib or if I decode the address and use it
Cardano.Bip32PublicKey.from_bytes(Buffer.from(hex));
I have notice that only think that change when I use different headers its the checksum the data its the same
is there a way to do it with this lib? or I have to implement a bech32 decoder btw I’m using JS if you have a implementation that works with cardano address formats would be great.

1 Like

Hi!

Still a question?

Yes, I don’t get how you get a Yoroi Public Key from bech32 or why the lib doesn´t accept other headers other than xpub for public key