var ecdh = createECDH('secp256k1');
ecdh.generateKeys();
var privateKey = ecdh.getPrivateKey(null, 'compressed');
const sign = createSign('SHA256');
sign.update('some data to sign');
sign.end();
const signature = sign.sign(privateKey.toString('hex'), 'hex');