summaryrefslogtreecommitdiff
path: root/bip-0075
diff options
context:
space:
mode:
authorLuke-Jr <luke_github1@dashjr.org>2016-08-31 18:46:37 +0000
committerGitHub <noreply@github.com>2016-08-31 18:46:37 +0000
commit40eadef880da1d764491d9e1bef7d2189e21feaa (patch)
treebd0f931ee6b422f2527f65026fd52a26d5574ba7 /bip-0075
parent1501dd99bd12f9e6835f5169d21fd29fb41071db (diff)
parent45f5c56e4517f0d69f3858ba41c10b8a0f3ce814 (diff)
downloadbips-40eadef880da1d764491d9e1bef7d2189e21feaa.tar.xz
Merge pull request #439 from techguy613/master
BIP75 Update: Versioning, Cancellation, Unknown Message Type, New PKI_TYPEs, Status Codes, Motivation
Diffstat (limited to 'bip-0075')
-rw-r--r--bip-0075/paymentrequest.proto51
1 files changed, 27 insertions, 24 deletions
diff --git a/bip-0075/paymentrequest.proto b/bip-0075/paymentrequest.proto
index 3c1ef40..5a08192 100644
--- a/bip-0075/paymentrequest.proto
+++ b/bip-0075/paymentrequest.proto
@@ -48,37 +48,40 @@ message PaymentACK {
// BIP-IR Extensions
message InvoiceRequest {
required bytes sender_public_key = 1; // Sender's DER-Encoded EC Public Key
- optional uint64 amount = 3 [default = 0]; // amount is integer-number-of-satoshis
- optional string pki_type = 4 [default = "none"]; // none / x509+sha256
- optional bytes pki_data = 5; // Depends on pki_type
- optional string memo = 6; // Human-readable description of invoice request for the receiver
- optional string notification_url = 7; // URL to notify on EncryptedPaymentRequest ready
- optional bytes signature = 8; // PKI-dependent signature
+ optional uint64 amount = 2 [default = 0]; // amount is integer-number-of-satoshis
+ optional string pki_type = 3 [default = "none"]; // none / x509+sha256
+ optional bytes pki_data = 4; // Depends on pki_type
+ optional string memo = 5; // Human-readable description of invoice request for the receiver
+ optional string notification_url = 6; // URL to notify on EncryptedPaymentRequest ready
+ optional bytes signature = 7; // PKI-dependent signature
}
enum ProtocolMessageType {
- INVOICE_REQUEST = 0;
- PAYMENT_REQUEST = 1;
- PAYMENT = 2;
- PAYMENT_ACK = 3;
+ UNKNOWN_MESSAGE_TYPE = 0;
+ INVOICE_REQUEST = 1;
+ PAYMENT_REQUEST = 2;
+ PAYMENT = 3;
+ PAYMENT_ACK = 4;
}
message ProtocolMessage {
- required ProtocolMessageType message_type = 1; // Message Type of serialized_message
- required bytes serialized_message = 2; // Serialized Payment Protocol Message
- optional uint64 status_code = 3; // Payment Protocol Status Code
- optional string status_message = 4; // Human-readable Payment Protocol status message
- optional bytes identifier = 5; // Unique key to identify this entire exchange on the server. SHA256 of initial serialized InvoiceRequest SHOULD be used by default
+ required uint64 version = 1 [default = 1]; // Protocol version number
+ required uint64 status_code = 2 [default = 1]; // Payment Protocol Status Code (Default: 1 "OK")
+ required ProtocolMessageType message_type = 3; // Message Type of serialized_message
+ required bytes serialized_message = 4; // Serialized Payment Protocol Message
+ optional string status_message = 5; // Human-readable Payment Protocol status message
+ optional bytes identifier = 6; // Unique key to identify this entire exchange on the server. SHA256 of initial serialized InvoiceRequest SHOULD be used by default
}
message EncryptedProtocolMessage {
- required ProtocolMessageType message_type = 1; // Message Type of Decrypted encrypted_message
- required bytes encrypted_message = 2; // AES-256-GCM Encrypted (as defined in BIP75) Payment Protocol Message
- required bytes receiver_public_key = 3; // Receiver's DER-encoded EC Public Key
- required bytes sender_public_key = 4; // Sender's DER-encoded EC Public Key
- required uint64 nonce = 5; // Microseconds since epoch
- optional bytes signature = 6; // Signature over the full EncryptedProtocolMessage with EC Key Belonging to Sender / Receiver, respectively
- optional bytes identifier = 7; // Unique key to identify this entire exchange on the server. SHA256 of initial serialized InvoiceRequest SHOULD be used by default
- optional uint64 status_code = 8; // Payment Protocol Status Code
- optional string status_message = 9; // Human-readable Payment Protocol status message
+ required uint64 version = 1 [default = 1]; // Protocol version number
+ required uint64 status_code = 2 [default = 1]; // Payment Protocol Status Code (Default: 1 "OK")
+ required ProtocolMessageType message_type = 3; // Message Type of Decrypted encrypted_message
+ required bytes encrypted_message = 4; // AES-256-GCM Encrypted (as defined in BIP75) Payment Protocol Message
+ required bytes receiver_public_key = 5; // Receiver's DER-encoded EC Public Key
+ required bytes sender_public_key = 6; // Sender's DER-encoded EC Public Key
+ required uint64 nonce = 7; // Microseconds since epoch
+ optional bytes identifier = 8; // Unique key to identify this entire exchange on the server. SHA256 of initial serialized InvoiceRequest SHOULD be used by default
+ optional string status_message = 9; // Human-readable Payment Protocol status message
+ optional bytes signature = 10; // Signature over the full EncryptedProtocolMessage with EC Key Belonging to Sender / Receiver, respectively
} \ No newline at end of file