Dash Core  0.12.2.1
P2P Digital Currency
paymentrequestplus.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2015 The Bitcoin developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_PAYMENTREQUESTPLUS_H
6 #define BITCOIN_QT_PAYMENTREQUESTPLUS_H
7 
8 #include "paymentrequest.pb.h"
9 
10 #include "base58.h"
11 
12 #include <openssl/x509.h>
13 
14 #include <QByteArray>
15 #include <QList>
16 #include <QString>
17 
18 static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
19 
20 //
21 // Wraps dumb protocol buffer paymentRequest
22 // with extra methods
23 //
24 
26 {
27 public:
29 
30  bool parse(const QByteArray& data);
31  bool SerializeToString(std::string* output) const;
32 
33  bool IsInitialized() const;
34  // Returns true if merchant's identity is authenticated, and
35  // returns human-readable merchant identity in merchant
36  bool getMerchant(X509_STORE* certStore, QString& merchant) const;
37 
38  // Returns list of outputs, amount
39  QList<std::pair<CScript,CAmount> > getPayTo() const;
40 
41  const payments::PaymentDetails& getDetails() const { return details; }
42 
43 private:
46 };
47 
48 #endif // BITCOIN_QT_PAYMENTREQUESTPLUS_H
bool parse(const QByteArray &data)
static const bool DEFAULT_SELFSIGNED_ROOTCERTS
bool SerializeToString(std::string *output) const
bool getMerchant(X509_STORE *certStore, QString &merchant) const
payments::PaymentRequest paymentRequest
QList< std::pair< CScript, CAmount > > getPayTo() const
payments::PaymentDetails details
const payments::PaymentDetails & getDetails() const