From c0c7d7f0a101a84523a581bff6edb922b44d560b Mon Sep 17 00:00:00 2001 From: jmacwhyte Date: Mon, 7 Mar 2016 18:18:58 -0800 Subject: [PATCH] Renamed to BIP75, added extensions to BIP70 payment details --- bip-0070/extensions.mediawiki | 6 ++- ...-extension.mediawiki => bip-0075.mediawiki | 51 +++++++++++++++--- {bip-ir => bip-0075}/bip70-extension.png | Bin .../encrypted-invoice-request-process.png | Bin .../invoice-request-process.png | Bin ...mobile-sf-encrypted-ir-without-payment.png | Bin .../mobile-sf-ir-with-payment.png | Bin .../mobile-sf-ir-without-payment.png | Bin {bip-ir => bip-0075}/paymentrequest.proto | 0 9 files changed, 47 insertions(+), 10 deletions(-) rename bip-invoicerequest-extension.mediawiki => bip-0075.mediawiki (92%) rename {bip-ir => bip-0075}/bip70-extension.png (100%) rename {bip-ir => bip-0075}/encrypted-invoice-request-process.png (100%) rename {bip-ir => bip-0075}/invoice-request-process.png (100%) rename {bip-ir => bip-0075}/mobile-sf-encrypted-ir-without-payment.png (100%) rename {bip-ir => bip-0075}/mobile-sf-ir-with-payment.png (100%) rename {bip-ir => bip-0075}/mobile-sf-ir-without-payment.png (100%) rename {bip-ir => bip-0075}/paymentrequest.proto (100%) diff --git a/bip-0070/extensions.mediawiki b/bip-0070/extensions.mediawiki index 51400d88..9e360dea 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 similarity index 92% rename from bip-invoicerequest-extension.mediawiki rename to bip-0075.mediawiki index dd5aec94..ff084e75 100644 --- a/bip-invoicerequest-extension.mediawiki +++ b/bip-0075.mediawiki @@ -1,5 +1,5 @@
-  BIP:     TBD
+  BIP:     75
   Title:   Out of Band Address Exchange using Encrypted PaymentRequests
   Authors: Justin Newton 
            Matt David 
@@ -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
 
 
-
+
 
 ===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
 
 NOTE: See section Initial Public Key Retrieval for InvoiceRequest Encryption below for possible options to retrieve Receiver InvoiceRequest public keys.
 
-
+
 
 ==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.
 
-
+
 
 ==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.
 
-
+
 
 ===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.
 
-
+
 
 ===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.
 
-
+
+
+==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:
+
+
+
+    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;
+    }
+
+ +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: + +
+    message PaymentDetails {
+        ...
+        optional bool replace_by_fee = 2;
+    }
+
+ +{| 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 similarity index 100% rename from bip-ir/bip70-extension.png rename to bip-0075/bip70-extension.png diff --git a/bip-ir/encrypted-invoice-request-process.png b/bip-0075/encrypted-invoice-request-process.png similarity index 100% rename from bip-ir/encrypted-invoice-request-process.png rename to bip-0075/encrypted-invoice-request-process.png diff --git a/bip-ir/invoice-request-process.png b/bip-0075/invoice-request-process.png similarity index 100% rename from bip-ir/invoice-request-process.png rename to bip-0075/invoice-request-process.png diff --git a/bip-ir/mobile-sf-encrypted-ir-without-payment.png b/bip-0075/mobile-sf-encrypted-ir-without-payment.png similarity index 100% rename from bip-ir/mobile-sf-encrypted-ir-without-payment.png rename to bip-0075/mobile-sf-encrypted-ir-without-payment.png diff --git a/bip-ir/mobile-sf-ir-with-payment.png b/bip-0075/mobile-sf-ir-with-payment.png similarity index 100% rename from bip-ir/mobile-sf-ir-with-payment.png rename to bip-0075/mobile-sf-ir-with-payment.png diff --git a/bip-ir/mobile-sf-ir-without-payment.png b/bip-0075/mobile-sf-ir-without-payment.png similarity index 100% rename from bip-ir/mobile-sf-ir-without-payment.png rename to bip-0075/mobile-sf-ir-without-payment.png diff --git a/bip-ir/paymentrequest.proto b/bip-0075/paymentrequest.proto similarity index 100% rename from bip-ir/paymentrequest.proto rename to bip-0075/paymentrequest.proto