Sign message

Example

const { signMessage } = require('obyte/lib/utils');

const signedMessage = signMessage('Hello world', wif);

Returns

{
  version: '1.0',
  signed_message: 'Hello world',
  authors: [
    {
      address: 'TMWNLXR42CKIP4A774BQGNVBZAPHY7GH',
      definition: [
        'sig',
        {
          pubkey: 'AsD2GQ3+CSHfFO9CfX8+gBxmxSm9TGweKjWVie0rt/0p'
        }
      ],
      authentifiers: {
        r: 'Xfw43Kiu+q+L/1b+z+daKe784V3KcvxWXedwcyC/Yvp+ziR1Jomo7Og7ZoPUPUwQeM4UPpIVU/cTtgurH0LzvA=='
      }
    }
  ]
}

Last updated