Returns whether the provided signature data matches the provided message and was signed by the account of the provided public key.
Input Arguments
Parameter
Description
Success Response
Parameter
Description
Error Response
Parameter
Description
Example
Request
neoline.verifyMessage({ message:'Hello world', data: 'be506bf7e6851960bfe45968bf5dbbf79a9dc5dc63ee5b88629acfb288c435649c2766e977d4bc76253d8590bb3ca3d9b70efd71d6f7eebdf060dfa58c6601fd',
publicKey:'03ba9524bd7479414be713c3a4f6f3ef35f90bb4b08f0f552211bf734c24415230'}).then(result => {console.log('Signature data matches provided message and public key: '+JSON.stringify(result));}).catch((error) => {const {type,description,data} = error;switch(type) {case'NO_PROVIDER':console.log('No provider available.');break;case'CONNECTION_DENIED':console.log('The user rejected the request to connect with your dApp');break;default:// Not an expected error object. Just write the error to the console.console.error(error);break; }});
Response
{ result:true}
message: string
Salt prefix + original message
data: string
Signed message
publicKey: string
Public key of account that signed message
result: boolean
Whether the provided signature matches the provided message and public key