1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-19 12:08:05 +00:00

- Fix section levels

- Add Message Interaction Details + new mimetypes
This commit is contained in:
Matt David 2015-12-04 13:26:50 -08:00
parent 845f24069b
commit e71e57216b

View File

@ -32,7 +32,7 @@ to facilitate identification for address release.
| Receiver || Entity receiving a value transfer | Receiver || Entity receiving a value transfer
|} |}
===Acronyms=== ==Acronyms==
{| class="wikitable" {| class="wikitable"
! Acronym !! Expanded !! Description ! Acronym !! Expanded !! Description
|- |-
@ -41,9 +41,9 @@ to facilitate identification for address release.
| RPR || ReturnPaymentRequest || A ReturnPaymentRequest returned based on a submitted InvoiceRequest | RPR || ReturnPaymentRequest || A ReturnPaymentRequest returned based on a submitted InvoiceRequest
|} |}
===New Messages=== ==New Messages==
====InvoiceRequest==== ===InvoiceRequest===
The new InvoiceRequest message allows a requestor to send information to the responder such that they can return a ReturnPaymentRequest. The new InvoiceRequest message allows a requestor to send information to the responder such that they can return a ReturnPaymentRequest.
<pre> <pre>
@ -68,12 +68,12 @@ message InvoiceRequest {
|- |-
| pki_data || Depends on pki_type | pki_data || Depends on pki_type
|- |-
| notification_url || URL to notify on ReturnPaymentRequest ready | notification_url || Secure (usually HTTPS) location where a ReturnPaymentRequest (see below) may be sent when ready
|- |-
| signature || PKI-dependent signature | signature || PKI-dependent signature
|} |}
====ReturnPaymentRequest==== ===ReturnPaymentRequest===
The new ReturnPaymentRequest message is an encapsulating message that allows the transmission of an encrypted, serialized PaymentRequest. The new ReturnPaymentRequest message is an encapsulating message that allows the transmission of an encrypted, serialized PaymentRequest.
@ -111,12 +111,28 @@ The new ReturnPaymentRequest message is an encapsulating message that allows the
# Sender validates ReturnPaymentRequest # Sender validates ReturnPaymentRequest
# Sender decrypts and validates encrypted PaymentRequest # Sender decrypts and validates encrypted PaymentRequest
===Message Interaction Details===
====InvoiceRequest====
Sender must transmit InvoiceRequest to Receiver (or Receiver's agent) via TLS-protected HTTP. Sender transmitting InvoiceRequest
messages must set appropriate Content-Type headers as specified here:
<pre>Content-Type: application/bitcoin-invoicerequest</pre>
====ReturnPaymentRequest====
Receiver must transmit ReturnPaymentRequest to Sender (or Sender's agent) via TLS-protected HTTP. Receiver transmitting
ReturnPaymentRequest messages must set appropritate Content-Type headers as specified here:
<pre>Content-Type: application/bitcoin-returnpaymentrequest</pre>
====Message or Communication Errors====
An invalid or unparsable message or communications error must be communicated to the party that initiated the communication. This
should be done through standard HTTP Status Code messaging ([https://tools.ietf.org/html/rfc7231 RFC 7231 Section 6]).
===InvoiceRequest Message Creation=== ===InvoiceRequest Message Creation===
* Create an InvoiceRequest message * Create an InvoiceRequest message
* sender_public_key MUST be set. This is the public key of an EC keypair using secp256k1. * sender_public_key MUST be set to the public key of an EC keypair.
* Set amount if desired * Amount is optional
* Set notification_url to URL that Receiver will submit completed ReturnPaymentRequest to * Set notification_url to URL that the Receiver will submit completed ReturnPaymentRequest to
* If NOT including certificate, set pki_type to "none" * If NOT including certificate, set pki_type to "none"
* If including certificate: * If including certificate:
** Set pki_type to "x509+sha256" ** Set pki_type to "x509+sha256"