Skip to main content
Version: v6.0.0

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 = await tronWeb.trx.signMessageV2(messge);
var base58Address = await tronWeb.trx.verifyMessageV2(messge, signature);