Skip to content

Commit f7c5fe4

Browse files
Merge branch 'master' of github.com:bitpay/jsonPaymentProtocol into feature/verifyBeforeTransmit
2 parents 27897f2 + 1718427 commit f7c5fe4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/fetchEccKeysAndVerify.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ Promise.all(keyRequests).then(() => {
104104
if (err) {
105105
return reject(err);
106106
}
107-
// console.log(km.pgp.key(km.pgp.primary).get_fingerprint().toString('hex'));
108107
importedPgpKeys[km.pgp.key(km.pgp.primary).get_fingerprint().toString('hex')] = km;
109108
return resolve();
110109
});
@@ -170,7 +169,8 @@ Promise.all(keyRequests).then(() => {
170169
console.log('----\nValid keymap for use in bitcoinRpc example:');
171170

172171
parsedEccPayload.publicKeys.forEach((pubkey) => {
173-
// Here we are just generating the pubkey hash (btc address) of the
172+
// Here we are just generating the pubkey hash (btc address) of each of the public keys received for easy lookup later
173+
// as this is what will be provided by the x-identity header
174174
let a = crypto.createHash('sha256').update(pubkey, 'hex').digest();
175175
let b = crypto.createHash('rmd160').update(a).digest('hex');
176176
let c = '00' + b; // This is assuming livenet

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-payment-protocol",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Simple interface for retrieving JSON payment requests and submitting payments",
55
"main": "index.js",
66
"dependencies": {

specification.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ and verifying against that. By only sending a hash of the public key the wallet
142142

143143
### Key Distribution
144144
The JSON payment protocol provider will make keys available via the route:
145-
* <paymentRequestDomain>/signingKeys/paymentProtocol.json
145+
* [paymentRequestDomain]/signingKeys/paymentProtocol.json
146146

147147
This route will serve a JSON payload which conforms to the format:
148148

@@ -177,7 +177,7 @@ An example of this fully completed:
177177

178178
### Key Signature Distribution
179179
The JSON payment protocol provider will distribute PGP signatures of the distributed keys available via:
180-
* <paymentRequestDomain>/signatures/<sha256HashOfKeyPayload>.json
180+
* [paymentRequestDomain]/signatures/[sha256HashOfKeyPayload].json
181181

182182
The SHA256 should be performed on the raw body of the keys sent down by the server.
183183

0 commit comments

Comments
 (0)