HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
API Reference

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

ParameterDescriptionData Type
messagethe signed stringString
signatureSignature to be verifiedString

Returns

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);