-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49c2524
commit 72e5452
Showing
17 changed files
with
593 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2016-2025 Knuth Project developers. | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef KTH_DOMAIN_CHAIN_COIN_SELECTION_HPP | ||
#define KTH_DOMAIN_CHAIN_COIN_SELECTION_HPP | ||
|
||
namespace kth::domain::chain { | ||
|
||
enum class coin_selection_algorithm { | ||
smallest_first, // Prioriza UTXOs más pequeños | ||
largest_first, // Prioriza UTXOs más grandes | ||
// knapsack, // Algoritmo de la mochila para optimizar | ||
// fifo, // Primero en entrar, primero en salir | ||
// branch_and_bound, // Branch and Bound para optimización global | ||
manual, // Mantiene el orden original de los UTXOs | ||
// privacy, // Prioriza privacidad (mismo tamaño de UTXOs) | ||
send_all // Usa todos los UTXOs disponibles | ||
}; | ||
|
||
} // namespace kth::domain::chain | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (c) 2016-2025 Knuth Project developers. | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef KTH_DOMAIN_CHAIN_UTXO_HPP | ||
#define KTH_DOMAIN_CHAIN_UTXO_HPP | ||
|
||
#include <cstdint> | ||
|
||
#include <kth/domain/chain/output_point.hpp> | ||
#include <kth/domain/define.hpp> | ||
|
||
namespace kth::domain::chain { | ||
|
||
class KD_API utxo { | ||
public: | ||
utxo() = default; | ||
|
||
utxo(output_point const& point, uint64_t amount); | ||
utxo(output_point&& point, uint64_t amount); | ||
|
||
// Getters | ||
output_point& point(); | ||
output_point const& point() const; | ||
uint64_t amount() const; | ||
|
||
// Setters | ||
void set_point(output_point const& point); | ||
void set_amount(uint64_t amount); | ||
|
||
private: | ||
output_point point_; | ||
uint64_t amount_; | ||
}; | ||
|
||
} // namespace kth::domain::chain | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.