I am building an eosdapp using nodejs code.I got the wallet api from the developers portal,but when i run the code i get the following error.
{"code":500,"message":"Internal Service Error","error":{"code":7,"name":"bad_cast_exception","what":"Bad Cast","details":[]}}
The nodejs code with input data(payload11) given below.
payload11 =
[{
"ref_block_num": blockno,
"ref_block_prefix": ref_block,
"expiration": timestamp,
"actions": [{
"account": "certcontract",
"name": "issue",
"authorization": [
{
"actor": "terminatoroo",
"permission": "active"
}],
"data": bindata
}],
"signatures": []
},
[
requiredkey
],
"e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473"
]
var biz = JSON.stringify(payload11);
console.log(biz);
console.log("")
//console.log(payload1)
var options = { method: 'POST',
url: 'http://127.0.0.1:8888/v1/wallet/sign_transaction',
headers: { 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8' },body:biz};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});