1

Say I created a multi-sig transaction and I am now gathering signatures using the Cardano-multiplatform-library.

How can I check that the signature is correct for my transaction body, and the signers pub-key ?

1 Answer 1

0

Found it.

In case you find your self coming here to find the answer, you can create an instance of TransactionWitnessSet, using the witness you got from the wallet api.

const witness  =  C.TransactionWitnessSet.from_bytes(hexToBytes(signature))

You can then derive the publicKey of the signer, and use the publicKey method verify() to verify against your transaction.

Const validSignature =   witness.vkeys().get(0).vkey().public_key().verify(tx, witness.vkeys().get(0).signature())) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.