File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ Promise.all(keyRequests).then(() => {
104
104
if ( err ) {
105
105
return reject ( err ) ;
106
106
}
107
- // console.log(km.pgp.key(km.pgp.primary).get_fingerprint().toString('hex'));
108
107
importedPgpKeys [ km . pgp . key ( km . pgp . primary ) . get_fingerprint ( ) . toString ( 'hex' ) ] = km ;
109
108
return resolve ( ) ;
110
109
} ) ;
@@ -170,7 +169,8 @@ Promise.all(keyRequests).then(() => {
170
169
console . log ( '----\nValid keymap for use in bitcoinRpc example:' ) ;
171
170
172
171
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
174
174
let a = crypto . createHash ( 'sha256' ) . update ( pubkey , 'hex' ) . digest ( ) ;
175
175
let b = crypto . createHash ( 'rmd160' ) . update ( a ) . digest ( 'hex' ) ;
176
176
let c = '00' + b ; // This is assuming livenet
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " json-payment-protocol" ,
3
- "version" : " 0.1 .0" ,
3
+ "version" : " 0.2 .0" ,
4
4
"description" : " Simple interface for retrieving JSON payment requests and submitting payments" ,
5
5
"main" : " index.js" ,
6
6
"dependencies" : {
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ and verifying against that. By only sending a hash of the public key the wallet
142
142
143
143
### Key Distribution
144
144
The JSON payment protocol provider will make keys available via the route:
145
- * < paymentRequestDomain > /signingKeys/paymentProtocol.json
145
+ * [ paymentRequestDomain] /signingKeys/paymentProtocol.json
146
146
147
147
This route will serve a JSON payload which conforms to the format:
148
148
@@ -177,7 +177,7 @@ An example of this fully completed:
177
177
178
178
### Key Signature Distribution
179
179
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
181
181
182
182
The SHA256 should be performed on the raw body of the keys sent down by the server.
183
183
You can’t perform that action at this time.
0 commit comments