Skip to main content
Version: 6.0.3

verifyMessageV2

Verify the signature on a plaintext string

The plaintext string can be signed through the signMessageV2 interface, and then the signature can be verified through this interface.

Usage

// Call directly
tronWeb.trx.verifyMessageV2(message, signature)

// Called via the instantiated tronWeb object
tronWeb.trx.verifyMessageV2(message, signature)

Parameters

ParametersParameter DescriptionData Type
messagethe signed stringString
signatureSignature to be verifiedString

Return

String - the signed address in base58 format

Example

var str = "helloworld"; 
var signature = tronWeb.trx.signMessageV2(str);
var base58Address = await tronWeb.trx.verifyMessageV2(str, signature);