Bitcoin ABC 0.34.2
P2P Digital Currency
txid.h
Go to the documentation of this file.
1// Copyright (c) 2018-2019 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_PRIMITIVES_TXID_H
6#define BITCOIN_PRIMITIVES_TXID_H
7
8#include <uint256.h>
9
14struct TxId : public uint256 {
15 explicit TxId() : uint256() {}
16 explicit TxId(const uint256 &b) : uint256(b) {}
17
18 static std::optional<TxId> FromHex(std::string_view str) {
19 return detail::FromHex<TxId>(str);
20 }
21};
22
26struct TxHash : public uint256 {
27 explicit TxHash() : uint256() {}
28 explicit TxHash(const uint256 &b) : uint256(b) {}
29};
30
31#endif // BITCOIN_PRIMITIVES_TXID_H
256-bit opaque blob.
Definition: uint256.h:199
A TxHash is the double sha256 hash of the full transaction data.
Definition: txid.h:26
TxHash(const uint256 &b)
Definition: txid.h:28
TxHash()
Definition: txid.h:27
A TxId is the identifier of a transaction.
Definition: txid.h:14
static std::optional< TxId > FromHex(std::string_view str)
Definition: txid.h:18
TxId()
Definition: txid.h:15
TxId(const uint256 &b)
Definition: txid.h:16