You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
After using the bitcore-lib and the bitcore-message
when sign a new message i get this error :: C:\wamp64\www\Transactions\core\node_modules\bitcore-message\node_modules\bitcore-lib\lib\util\preconditions.js:14 throw new errors.InvalidArgument(argumentName, message, docsPath); ^ Invalid Argument: First argument should be an instance of PrivateKey Error at new NodeError (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\node_modules\bitcore-lib\lib\errors\index.js:20:41) at Object.checkArgument (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\node_modules\bitcore-lib\lib\util\preconditions.js:14:13) at Message._sign (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\lib\message.js:43:5) at Message.sign (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\lib\message.js:62:24)
my script code ::
var bitcore = require('bitcore-lib');
+delete global._bitcore;
var Message = require('bitcore-message');
var privateKey = new bitcore.PrivateKey('L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF2BRUVwy');
var message = new Message('This is an example of a signed message.');
var signature = message.sign(privateKey);
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
After using the bitcore-lib and the bitcore-message
when sign a new message i get this error ::
C:\wamp64\www\Transactions\core\node_modules\bitcore-message\node_modules\bitcore-lib\lib\util\preconditions.js:14 throw new errors.InvalidArgument(argumentName, message, docsPath); ^ Invalid Argument: First argument should be an instance of PrivateKey Error at new NodeError (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\node_modules\bitcore-lib\lib\errors\index.js:20:41) at Object.checkArgument (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\node_modules\bitcore-lib\lib\util\preconditions.js:14:13) at Message._sign (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\lib\message.js:43:5) at Message.sign (C:\wamp64\www\Transactions\core\node_modules\bitcore-message\lib\message.js:62:24)
my script code ::
The text was updated successfully, but these errors were encountered: