kaspanet/rusty-kaspa

wasm can't get address from ECDSA public key

Closed this issue · 2 comments

Describe the bug
Unable to get the ECDSA address from a public key. works with a private key, but does not work if you direct get it by using a public key.

To Reproduce

const publicKey = new PublicKey('...'); 
publicKey.toAddressECDSA(NetworkType.Mainnet).toString()

the code will panic

problem appears to be here. instead using xonly_public_key, it should try use self.public_key.

@drunkirishcoder thanks for reporting this. The next drink is on me!

Cheers!

thank you