闪电网络的verifymessage api不返回布尔值以确保有效性

时间:2019-03-19 11:58:27

标签: rest signature bitcoind lightning

闪电网络的verifymessage api应该返回一个布尔值以验证签名是否有效以及节点的公钥,但不返回布尔值。它仅返回公钥。

var fs = require('fs');
var request = require('request');
var macaroon=fs.readFileSync('/home/sahana/lndNodes/nodeB/data/chain/bitcoin/regtest/admin.macaroon').toString('hex');
var requestBody = { 
msg: Buffer.from("sahana").toString("base64"),
signature:  'ryk63mh434e193abhubxfrxej8bpezbdb8spjwdpmx9tjwa48dx1cfzcoydncsaoxbry98ft6ffc6agxft4szcij7qatzsmbou7475nn',};
var options = {
url: 'https://localhost:8180/v1/verifymessage',
// Work-around for self-signed certificates.
rejectUnauthorized: false,
json: true, 
headers: {
  'Grpc-Metadata-macaroon': macaroon,
},
form: JSON.stringify(requestBody),};
request.post(options, function(error, response, body) {
console.log(body); });

,响应为:

{ pubkey:
   '0362c3c5f1b5705d7c61ca68167d1ba33a0916037d54e396225f1da0ffbfab1f8d' }

如何修改它也返回布尔值?

0 个答案:

没有答案