1

i want yours help

stamp.js

var CoinStack = require('coinstack-sdk-js')
const crypto = require('crypto');


var client = new CoinStack('c7dbfacbdf1510889b38c01b8440b1', 
'10e88e9904f29c98356fd2d12b26de');


var privateKeyWIF = CoinStack.ECKey.createKey(); //개인키 생성
console.log('개인키 : '+ privateKeyWIF)


const message = "Hello, world";
var data = new Array();
data = Buffer.byteLength(message, 'utf8')
const hash = crypto.createHmac('sha256', data.toString()).digest('hex');
console.log("hash : ", hash)
console.log('')


var stampId = client.stampDocument(privateKeyWIF, hash);
console.log(stampId)
console.log('')[enter image description here][1]

Error 1

Error 2

I don't know what to do,

i want your ideas

Zoe
  • 27,060
  • 21
  • 118
  • 148
김락근
  • 41
  • 2
  • 7
  • You can get more information about the promise by listening to `unhandledRejection`. This will help you find where exactly the code is breaking. https://stackoverflow.com/questions/43834559/how-to-find-which-promises-is-unhandled-in-nodejs-unhandledpromiserejectionwarni – abskmj Oct 03 '17 at 15:56
  • 1
    It seems like some of the methods you are calling expect a callback function to be provided. I can't see anything other than the stampDocument function, which is not documented on the coinstack-sdk-js npm repo. If a function expects a callback parameter, it needs to pass it in, else by default it will be undefined. – Neeraj Sharma Oct 03 '17 at 16:10

0 Answers0