signMessage()

Sign a message using SECP256K1.

Method Signature:

function signMessage(message, privateKey)

Parameters

NameTypeDescription

message

string

Message that you want to sign. In transactions it must be the TxID.

privateKey

string

Private key in hexadecimal format.

Example

var message = "Hello, World!";
var privatekey = "0x9f1dd25076c04c5139acba458f86cdccd2d322c61d19bc28daa3bbd9450837af";

var signedMessage = CircularProtocolAPI.signMessage(message, privateKey);
console.log(signedMessage);

Result

The result will be of type String

af14525076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd9450837ab

Last updated