I am using Dc Sparks multi-platform-lib to build my transaction.I want to add a required signer in my transaction. There is a add_required_signer method in the TransactionBuilder class and it takes in a parameter of type Ed25519KeyHash. Right now I am creating a new Ed25519KeyHash like this
const walletConnection = await window.cardano.nami.enable();
const raw = await walletConnection.getChangeAddress();
const changeAddress = WASM.Address.from_bytes(
Buffer.from(raw, 'hex')
).to_bech32();
let signer = WASM.Ed25519KeyHash.from_bech32(changeAddress);
This is the error that it returns.
Deserialization failed in Ed25519KeyHash because: Invalid cbor: expected tuple 'hash length' of length 28 but got length Len(57).
What is the correct value I need to pass to create a new Ed25519KeyHash