Skip to content

Commit c0c7d7f

Browse files
committed
Renamed to BIP75, added extensions to BIP70 payment details
1 parent df01620 commit c0c7d7f

9 files changed

+47
-10
lines changed

bip-0070/extensions.mediawiki

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
Add your extension below using tags starting at 1000 and submit a pull-req.
44

55
{|
6-
| Field Number || Extension Name || Field Name || Description
6+
| Field Number || Extension Name || Field Name || Payment Details Version || Description
77
|-
8-
| 1000 || [[https://example.com|(unassigned)]] || (unassigned) || (unassigned)
8+
| 1000 || [[https://github.com/bitcoin/bips/blob/master/bip-0075.mediawiki|BIP0075]] || subtract_fee || 1 || If "true," indicates the sender can subtract the transaction fee from the requested amount. Otherwise, the transaction fee must be included separately from the requested amount.
9+
|-
10+
| 1001 || [[https://github.com/bitcoin/bips/blob/master/bip-0075.mediawiki|BIP0075]] || replace_by_fee || 2 || If "true," indicates the sender can enable the Replace By Fee flag for this transaction and the receiver will still consider it accepted with zero confirmations. Otherwise, RBF transactions will not be accepted by the receiver until they are confirmed.
911
|}
Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<pre>
2-
BIP: TBD
2+
BIP: 75
33
Title: Out of Band Address Exchange using Encrypted PaymentRequests
44
Authors: Justin Newton <[email protected]>
55
Matt David <[email protected]>
@@ -82,7 +82,7 @@ service. In this case, a successful attack against a Store & Forward service wou
8282
or payment information, only delete encrypted messages.
8383

8484
==New Messages==
85-
Updated [/bip-ir/paymentrequest.proto paymentrequest.proto] contains the existing PaymentRequest Protocol Buffer messages as well as
85+
Updated [/bip-0075/paymentrequest.proto paymentrequest.proto] contains the existing PaymentRequest Protocol Buffer messages as well as
8686
the messages newly defined in this BIP.
8787

8888
Note: Public keys from both parties must be known to each other in order to facilitate encrypted communication. Although including both public keys in every message may get redundant, it provides the most flexibility as each message is completely self-contained.
@@ -273,7 +273,7 @@ Optionally, the Sender MAY choose to encrypt the InvoiceRequest message and ther
273273
# The PaymentRequest is processed according to BIP70, including optional Payment and PaymentACK messages
274274
275275

276-
<img src="bip-ir/invoice-request-process.png"></img>
276+
<img src="bip-0075/invoice-request-process.png"></img>
277277

278278
===Encrypted InvoiceRequest Overview===
279279
# Sender retrieves Receiver InvoiceRequest Public Key
@@ -293,7 +293,7 @@ Optionally, the Sender MAY choose to encrypt the InvoiceRequest message and ther
293293
294294
<b>NOTE:</b> See section <b>Initial Public Key Retrieval for InvoiceRequest Encryption</b> below for possible options to retrieve Receiver InvoiceRequest public keys.
295295

296-
<img src="bip-ir/encrypted-invoice-request-process.png"></img>
296+
<img src="bip-0075/encrypted-invoice-request-process.png"></img>
297297

298298
==Message Interaction Details==
299299

@@ -437,7 +437,7 @@ A reference client implementation can be found in the InvoiceRequest functional
437437
==BIP70 Extension==
438438
The following flowchart is borrowed from BIP70 and expanded upon in order to visually describe how this BIP is an extension to BIP70.
439439

440-
<img src="bip-ir/bip70-extension.png"></img>
440+
<img src="bip-0075/bip70-extension.png"></img>
441441

442442
==Mobile to Mobile Examples==
443443

@@ -446,21 +446,56 @@ The following diagram shows a sample flow in which one mobile client is sending
446446
of an InvoiceRequest, a Store & Forward server, an EncryptedPaymentRequest (with require_payment_message = true), an
447447
EncryptedPayment and an EncryptedPaymentACK. In this case, the Receiver submits the transaction to the bitcoin network.
448448

449-
<img src="bip-ir/mobile-sf-ir-with-payment.png"></img>
449+
<img src="bip-0075/mobile-sf-ir-with-payment.png"></img>
450450

451451
===EncryptedPayment NOT Required===
452452
The following diagram shows a sample flow in which one mobile client is sending value to a second mobile client with the use
453453
of an InvoiceRequest, a Store & Forward server, and an EncryptedPaymentRequest (with require_payment_message = false).
454454
In this case, the Sender submits the transaction to the bitcoin network.
455455

456-
<img src="bip-ir/mobile-sf-ir-without-payment.png"></img>
456+
<img src="bip-0075/mobile-sf-ir-without-payment.png"></img>
457457

458458
===Using EncryptedInvoiceRequest Message===
459459
The following diagram shows a sample flow in which one mobile client is sending value to a second mobile client with the use
460460
of an EncryptedInvoiceRequest, a Store & Forward server, and an EncryptedPaymentRequest (with require_payment_message = false).
461461
In this case, the Sender submits the transaction to the bitcoin network.
462462

463-
<img src="bip-ir/mobile-sf-encrypted-ir-without-payment.png"></img>
463+
<img src="bip-0075/mobile-sf-encrypted-ir-without-payment.png"></img>
464+
465+
==Extending BIP70 PaymentDetails==
466+
467+
To keep up with recent advancements in transaction type, two optional fields will be added to the BIP 70 PaymentDetails message. subtract_fee will be added to the current version 1 fields, making the complete list look like the following:
468+
469+
470+
<pre>
471+
message PaymentDetails {
472+
optional string network [default = "main"];
473+
repeated Output outputs;
474+
required uint64 time;
475+
optional uint64 expires;
476+
optional string memo;
477+
optional string payment_url;
478+
optional bytes merchant_data;
479+
optional bool subtract_fee = 1;
480+
}
481+
</pre>
482+
483+
replace_by_fee will be added as a version 2 field, meaning it is only available if payment_details_version is set to 2 or higher in the PaymentRequest message:
484+
485+
<pre>
486+
message PaymentDetails {
487+
...
488+
optional bool replace_by_fee = 2;
489+
}
490+
</pre>
491+
492+
{| class="wikitable"
493+
! Field Name !! Field Number || Payment Details Version !! Description
494+
|-
495+
| subtract_fee || 1000 || 1 || If "true," indicates the sender can subtract the transaction fee from the requested amount. Otherwise, the transaction fee must be included separately from the requested amount.
496+
|-
497+
| replace_by_fee || 1001 || 2 || If "true," indicates the sender can enable the Replace By Fee flag for this transaction and the receiver will still consider it accepted with zero confirmations. Otherwise, RBF transactions will not be accepted by the receiver until they are confirmed.
498+
|}
464499

465500
==References==
466501

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)