2024-06-26 20:19:26 +02:00
|
|
|
// Copyright (c) 2016 BitPay, Inc.
|
|
|
|
// Copyright (c) 2024 The Dash Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_RPC_INDEX_UTIL_H
|
|
|
|
#define BITCOIN_RPC_INDEX_UTIL_H
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <amount.h>
|
|
|
|
|
|
|
|
class CTxMemPool;
|
|
|
|
class uint160;
|
|
|
|
class uint256;
|
|
|
|
struct CAddressIndexKey;
|
|
|
|
struct CAddressUnspentKey;
|
|
|
|
struct CAddressUnspentValue;
|
|
|
|
struct CSpentIndexKey;
|
|
|
|
struct CSpentIndexValue;
|
|
|
|
|
|
|
|
enum class AddressType : uint8_t;
|
|
|
|
|
2024-06-27 20:57:01 +02:00
|
|
|
bool GetAddressIndex(const uint160& addressHash, const AddressType type,
|
2024-06-26 20:19:26 +02:00
|
|
|
std::vector<std::pair<CAddressIndexKey, CAmount>>& addressIndex,
|
2024-06-27 20:57:01 +02:00
|
|
|
const int32_t start = 0, const int32_t end = 0);
|
|
|
|
bool GetAddressUnspentIndex(const uint160& addressHash, const AddressType type,
|
2024-06-26 20:19:26 +02:00
|
|
|
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue>>& unspentOutputs);
|
2024-06-27 20:57:01 +02:00
|
|
|
bool GetSpentIndex(const CTxMemPool& mempool, const CSpentIndexKey& key, CSpentIndexValue& value);
|
2024-06-26 20:19:26 +02:00
|
|
|
bool GetTimestampIndex(const uint32_t high, const uint32_t low, std::vector<uint256>& hashes);
|
|
|
|
|
|
|
|
#endif // BITCOIN_RPC_CLIENT_H
|