how can I make this call blocking (using, for example, the async/await)?
testMethod(message) {
let signature;
eccrypto.sign(this.privateKey, msg)
.then(function (sig) {
console.log("Signature in DER format:", sig);
signature = sig;
});
return signature;
}
I'd like testMethod to return signature
, right now return (of course) undefined
! I've been playing with async/await
with no success ...
any help?