summaryrefslogtreecommitdiff
path: root/bip-0075/paymentrequest.proto
diff options
context:
space:
mode:
Diffstat (limited to 'bip-0075/paymentrequest.proto')
-rw-r--r--bip-0075/paymentrequest.proto42
1 files changed, 22 insertions, 20 deletions
diff --git a/bip-0075/paymentrequest.proto b/bip-0075/paymentrequest.proto
index 9f170fe..5a08192 100644
--- a/bip-0075/paymentrequest.proto
+++ b/bip-0075/paymentrequest.proto
@@ -48,12 +48,12 @@ 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 {
@@ -65,21 +65,23 @@ enum ProtocolMessageType {
}
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