求代码,波场dapp,客户端对消息签名(hello),服务端验签(go 语言)
只需要两端的核心几行代码即可
消息签名与验证:
var messge = 'hello world'; var signature = await tronWeb.trx.signMessageV2(messge); console.log(signature); var base58Address = await tronWeb.trx.verifyMessageV2(messge, signature);
参考: https://developers.tron.network/reference/signmessagev2
https://developers.tron.network/reference/verifymessagev2