summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmacwhyte <keatonatron@gmail.com>2016-03-07 18:18:58 -0800
committerjmacwhyte <keatonatron@gmail.com>2016-03-07 18:18:58 -0800
commitc0c7d7f0a101a84523a581bff6edb922b44d560b (patch)
treee7f20f6ca6d97accfa81fbf1aa39c11f8c108bb8
parentdf01620ebc57a921be8c2350c0fc395f4ec87c00 (diff)
downloadbips-c0c7d7f0a101a84523a581bff6edb922b44d560b.tar.xz
Renamed to BIP75, added extensions to BIP70 payment details
-rw-r--r--bip-0070/extensions.mediawiki6
-rw-r--r--bip-0075.mediawiki (renamed from bip-invoicerequest-extension.mediawiki)51
-rw-r--r--bip-0075/bip70-extension.png (renamed from bip-ir/bip70-extension.png)bin88989 -> 88989 bytes
-rw-r--r--bip-0075/encrypted-invoice-request-process.png (renamed from bip-ir/encrypted-invoice-request-process.png)bin164633 -> 164633 bytes
-rw-r--r--bip-0075/invoice-request-process.png (renamed from bip-ir/invoice-request-process.png)bin107506 -> 107506 bytes
-rwxr-xr-xbip-0075/mobile-sf-encrypted-ir-without-payment.png (renamed from bip-ir/mobile-sf-encrypted-ir-without-payment.png)bin106744 -> 106744 bytes
-rwxr-xr-xbip-0075/mobile-sf-ir-with-payment.png (renamed from bip-ir/mobile-sf-ir-with-payment.png)bin113169 -> 113169 bytes
-rwxr-xr-xbip-0075/mobile-sf-ir-without-payment.png (renamed from bip-ir/mobile-sf-ir-without-payment.png)bin92902 -> 92902 bytes
-rw-r--r--bip-0075/paymentrequest.proto (renamed from bip-ir/paymentrequest.proto)0
9 files changed, 47 insertions, 10 deletions
diff --git a/bip-0070/extensions.mediawiki b/bip-0070/extensions.mediawiki
index 51400d8..9e360de 100644
--- a/bip-0070/extensions.mediawiki
+++ b/bip-0070/extensions.mediawiki
@@ -3,7 +3,9 @@
Add your extension below using tags starting at 1000 and submit a pull-req.
{|
-| Field Number || Extension Name || Field Name || Description
+| Field Number || Extension Name || Field Name || Payment Details Version || Description
|-
-| 1000 || [[https://example.com|(unassigned)]] || (unassigned) || (unassigned)
+| 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.
+|-
+| 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.
|}
diff --git a/bip-invoicerequest-extension.mediawiki b/bip-0075.mediawiki
index dd5aec9..ff084e7 100644
--- a/bip-invoicerequest-extension.mediawiki
+++ b/bip-0075.mediawiki
@@ -1,5 +1,5 @@
<pre>
- BIP: TBD
+ BIP: 75
Title: Out of Band Address Exchange using Encrypted PaymentRequests
Authors: Justin Newton <justin@netki.com>
Matt David <mgd@mgddev.com>
@@ -82,7 +82,7 @@ service. In this case, a successful attack against a Store & Forward service wou
or payment information, only delete encrypted messages.
==New Messages==
-Updated [/bip-ir/paymentrequest.proto paymentrequest.proto] contains the existing PaymentRequest Protocol Buffer messages as well as
+Updated [/bip-0075/paymentrequest.proto paymentrequest.proto] contains the existing PaymentRequest Protocol Buffer messages as well as
the messages newly defined in this BIP.
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
# The PaymentRequest is processed according to BIP70, including optional Payment and PaymentACK messages
-<img src="bip-ir/invoice-request-process.png"></img>
+<img src="bip-0075/invoice-request-process.png"></img>
===Encrypted InvoiceRequest Overview===
# Sender retrieves Receiver InvoiceRequest Public Key
@@ -293,7 +293,7 @@ Optionally, the Sender MAY choose to encrypt the InvoiceRequest message and ther
<b>NOTE:</b> See section <b>Initial Public Key Retrieval for InvoiceRequest Encryption</b> below for possible options to retrieve Receiver InvoiceRequest public keys.
-<img src="bip-ir/encrypted-invoice-request-process.png"></img>
+<img src="bip-0075/encrypted-invoice-request-process.png"></img>
==Message Interaction Details==
@@ -437,7 +437,7 @@ A reference client implementation can be found in the InvoiceRequest functional
==BIP70 Extension==
The following flowchart is borrowed from BIP70 and expanded upon in order to visually describe how this BIP is an extension to BIP70.
-<img src="bip-ir/bip70-extension.png"></img>
+<img src="bip-0075/bip70-extension.png"></img>
==Mobile to Mobile Examples==
@@ -446,21 +446,56 @@ The following diagram shows a sample flow in which one mobile client is sending
of an InvoiceRequest, a Store & Forward server, an EncryptedPaymentRequest (with require_payment_message = true), an
EncryptedPayment and an EncryptedPaymentACK. In this case, the Receiver submits the transaction to the bitcoin network.
-<img src="bip-ir/mobile-sf-ir-with-payment.png"></img>
+<img src="bip-0075/mobile-sf-ir-with-payment.png"></img>
===EncryptedPayment NOT Required===
The following diagram shows a sample flow in which one mobile client is sending value to a second mobile client with the use
of an InvoiceRequest, a Store & Forward server, and an EncryptedPaymentRequest (with require_payment_message = false).
In this case, the Sender submits the transaction to the bitcoin network.
-<img src="bip-ir/mobile-sf-ir-without-payment.png"></img>
+<img src="bip-0075/mobile-sf-ir-without-payment.png"></img>
===Using EncryptedInvoiceRequest Message===
The following diagram shows a sample flow in which one mobile client is sending value to a second mobile client with the use
of an EncryptedInvoiceRequest, a Store & Forward server, and an EncryptedPaymentRequest (with require_payment_message = false).
In this case, the Sender submits the transaction to the bitcoin network.
-<img src="bip-ir/mobile-sf-encrypted-ir-without-payment.png"></img>
+<img src="bip-0075/mobile-sf-encrypted-ir-without-payment.png"></img>
+
+==Extending BIP70 PaymentDetails==
+
+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:
+
+
+<pre>
+ message PaymentDetails {
+ optional string network [default = "main"];
+ repeated Output outputs;
+ required uint64 time;
+ optional uint64 expires;
+ optional string memo;
+ optional string payment_url;
+ optional bytes merchant_data;
+ optional bool subtract_fee = 1;
+ }
+</pre>
+
+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:
+
+<pre>
+ message PaymentDetails {
+ ...
+ optional bool replace_by_fee = 2;
+ }
+</pre>
+
+{| class="wikitable"
+! Field Name !! Field Number || Payment Details Version !! Description
+|-
+| 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.
+|-
+| 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.
+|}
==References==
diff --git a/bip-ir/bip70-extension.png b/bip-0075/bip70-extension.png
index d235992..d235992 100644
--- a/bip-ir/bip70-extension.png
+++ b/bip-0075/bip70-extension.png
Binary files differ
diff --git a/bip-ir/encrypted-invoice-request-process.png b/bip-0075/encrypted-invoice-request-process.png
index beb5df1..beb5df1 100644
--- a/bip-ir/encrypted-invoice-request-process.png
+++ b/bip-0075/encrypted-invoice-request-process.png
Binary files differ
diff --git a/bip-ir/invoice-request-process.png b/bip-0075/invoice-request-process.png
index 47a4fac..47a4fac 100644
--- a/bip-ir/invoice-request-process.png
+++ b/bip-0075/invoice-request-process.png
Binary files differ
diff --git a/bip-ir/mobile-sf-encrypted-ir-without-payment.png b/bip-0075/mobile-sf-encrypted-ir-without-payment.png
index af66a4d..af66a4d 100755
--- a/bip-ir/mobile-sf-encrypted-ir-without-payment.png
+++ b/bip-0075/mobile-sf-encrypted-ir-without-payment.png
Binary files differ
diff --git a/bip-ir/mobile-sf-ir-with-payment.png b/bip-0075/mobile-sf-ir-with-payment.png
index c668eac..c668eac 100755
--- a/bip-ir/mobile-sf-ir-with-payment.png
+++ b/bip-0075/mobile-sf-ir-with-payment.png
Binary files differ
diff --git a/bip-ir/mobile-sf-ir-without-payment.png b/bip-0075/mobile-sf-ir-without-payment.png
index ab18d0f..ab18d0f 100755
--- a/bip-ir/mobile-sf-ir-without-payment.png
+++ b/bip-0075/mobile-sf-ir-without-payment.png
Binary files differ
diff --git a/bip-ir/paymentrequest.proto b/bip-0075/paymentrequest.proto
index 8f39c6d..8f39c6d 100644
--- a/bip-ir/paymentrequest.proto
+++ b/bip-0075/paymentrequest.proto