paypro: example - remove some comments.

This commit is contained in:
Christopher Jeffrey 2014-08-18 14:08:04 -07:00
parent 253d66994c
commit 1e57a6d874
2 changed files with 3 additions and 7 deletions

View File

@ -5,7 +5,7 @@
The node payment protocol demonstration will run automatically via:
``` bash
$ node examples/PayPro`
$ node examples/PayPro
```
You will see the server and customer logs output in the terminal.

View File

@ -147,23 +147,19 @@ app.get('/-/request', function(req, res, next) {
// Instead of creating it ourselves:
// if (!argv.pubkey && !argv.privkey && !argv.address) {
// argv.pubkey = '3730febcba04bad0cd476cfb820f9c37d7466fd9';
// //argv.pubkey = '3730febcba04bad0cd476cfb820f9c37d7466fd9';
// argv.pubkey = 'd96f46d7379c0f82fb6c47cdd0ba04babcfe3037'
// }
if (argv.pubkey || argv.privkey || argv.address) {
var pubKey;
if (argv.pubkey) {
pubKey = new Buffer(argv.pubkey, 'hex');
// If it were possible:
// pubKey = bitcore.Script.fromCompressedPubKey(new Buffer(argv.pubkey)).toCompressedPubKey();
} else if (argv.privkey) {
pubKey = bitcore.Key.recoverPubKey(new Buffer(argv.privkey)).toCompressedPubKey();
} else if (argv.address) {
pubKey = bitcore.Base58Check.decode(new Buffer(argv.address));
// pubKey = bitcore.Script.fromUncompressedPubKey(pubKey).toCompressedPubKey();
}
// var pubKeyHash = bitcore.util.sha256ripe160(pubKey);
// var address = new bitcore.Address(111, pubKeyHash);
var address = bitcore.Address.fromPubKey(pubKey, 'testnet');
var scriptPubKey = address.getScriptPubKey();
assert.equal(scriptPubKey.isPubkeyHash(), true);