mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-29 20:47:31 -03:00
4b04e32c20
Three categories of modifications: 1) 1 instance of 'The Bitcoin Core developers \n', 1 instance of 'the Bitcoin Core developers\n', 3 instances of 'Bitcoin Core Developers\n', and 12 instances of 'The Bitcoin developers\n' are made uniform with the 443 instances of 'The Bitcoin Core developers\n' 2) 3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6 instances of 'BitPay Inc\.\n' 3) 4 instances where there was no '(c)' between the 'Copyright' and the year where it deviates from the style of the local directory.
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
// Copyright (c) 2011-2015 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_QT_PAYMENTREQUESTPLUS_H
|
|
#define BITCOIN_QT_PAYMENTREQUESTPLUS_H
|
|
|
|
#include "paymentrequest.pb.h"
|
|
|
|
#include "base58.h"
|
|
|
|
#include <openssl/x509.h>
|
|
|
|
#include <QByteArray>
|
|
#include <QList>
|
|
#include <QString>
|
|
|
|
static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
|
|
|
|
//
|
|
// Wraps dumb protocol buffer paymentRequest
|
|
// with extra methods
|
|
//
|
|
|
|
class PaymentRequestPlus
|
|
{
|
|
public:
|
|
PaymentRequestPlus() { }
|
|
|
|
bool parse(const QByteArray& data);
|
|
bool SerializeToString(std::string* output) const;
|
|
|
|
bool IsInitialized() const;
|
|
// Returns true if merchant's identity is authenticated, and
|
|
// returns human-readable merchant identity in merchant
|
|
bool getMerchant(X509_STORE* certStore, QString& merchant) const;
|
|
|
|
// Returns list of outputs, amount
|
|
QList<std::pair<CScript,CAmount> > getPayTo() const;
|
|
|
|
const payments::PaymentDetails& getDetails() const { return details; }
|
|
|
|
private:
|
|
payments::PaymentRequest paymentRequest;
|
|
payments::PaymentDetails details;
|
|
};
|
|
|
|
#endif // BITCOIN_QT_PAYMENTREQUESTPLUS_H
|