const bitcoinMessage = require('bitcoinjs-message');
// The message that was signed
const message = "This is a test message";
// The signature in base64 format
const signature = "H8yAIxMVQfVcY4J//yA8hI3Fy2kL...base64signature...";
// The Bitcoin address of the signer
const address = "1ExampleOnlyDoNotSendToThisAddressDoNotTryToDecodeIt";
// Verify the message
const isValid = bitcoinMessage.verify(message, address, signature);
console.log("Is the signature valid?", isValid);