Add const to methods that do not modify the object for which it is called
[bitcoinplatinum.git] / src / qt / paymentrequest.proto
blobd2721a34bde8f696417ecc2e46914980383c5712
1 //
2 // Simple Bitcoin Payment Protocol messages
3 //
4 // Use fields 100+ for extensions;
5 // to avoid conflicts, register extensions at:
6 // https://en.bitcoin.it/wiki/Payment_Request
7 //
9 syntax = "proto2";
11 package payments;
12 option java_package = "org.bitcoin.protocols.payments";
13 option java_outer_classname = "Protos";
15 // Generalized form of "send payment to this/these bitcoin addresses"
16 message Output {
17         optional uint64 amount = 1 [default = 0]; // amount is integer-number-of-satoshis
18         required bytes script = 2; // usually one of the standard Script forms
20 message PaymentDetails {
21         optional string network = 1 [default = "main"]; // "main" or "test"
22         repeated Output outputs = 2;        // Where payment should be sent
23         required uint64 time = 3;           // Timestamp; when payment request created
24         optional uint64 expires = 4;        // Timestamp; when this request should be considered invalid
25         optional string memo = 5;           // Human-readable description of request for the customer
26         optional string payment_url = 6;    // URL to send Payment and get PaymentACK
27         optional bytes merchant_data = 7;   // Arbitrary data to include in the Payment message
29 message PaymentRequest {
30         optional uint32 payment_details_version = 1 [default = 1];
31         optional string pki_type = 2 [default = "none"];  // none / x509+sha256 / x509+sha1
32         optional bytes pki_data = 3;                      // depends on pki_type
33         required bytes serialized_payment_details = 4;    // PaymentDetails
34         optional bytes signature = 5;                     // pki-dependent signature
36 message X509Certificates {
37         repeated bytes certificate = 1;    // DER-encoded X.509 certificate chain
39 message Payment {
40         optional bytes merchant_data = 1;  // From PaymentDetails.merchant_data
41         repeated bytes transactions = 2;   // Signed transactions that satisfy PaymentDetails.outputs
42         repeated Output refund_to = 3;     // Where to send refunds, if a refund is necessary
43         optional string memo = 4;          // Human-readable message for the merchant
45 message PaymentACK {
46         required Payment payment = 1;      // Payment message that triggered this ACK
47         optional string memo = 2;          // human-readable message for customer