sgns::GeniusUTXO¶
Immutable-style UTXO value object containing ownership, token, amount, and outpoint metadata.
#include <GeniusUTXO.hpp>
Public Functions¶
| Name | |
|---|---|
| GeniusUTXO() Constructs an empty UTXO placeholder. |
|
| GeniusUTXO(const base::Hash256 & hash, uint32_t previous_index, uint64_t amount, TokenID token_id) Constructs a UTXO without an owner address. |
|
| GeniusUTXO(const base::Hash256 & hash, uint32_t previous_index, uint64_t amount, TokenID token_id, std::string owner_address) Constructs a fully specified UTXO. |
|
| void | SetOwnerAddress(std::string owner_address) Sets the owner address associated with this UTXO. |
| const std::string & | GetOwnerAddress() const Returns the owner address associated with this UTXO. |
| OutPoint | GetOutPoint() const Returns the full outpoint descriptor. |
| base::Hash256 | GetTxID() const Returns the originating transaction id. |
| uint32_t | GetOutputIdx() const Returns the output index within the originating transaction. |
| uint64_t | GetAmount() const Returns the unencrypted amount represented by the UTXO. |
| TokenID | GetTokenID() const Returns the token identifier associated with the UTXO. |
Public Functions Documentation¶
function GeniusUTXO¶
Constructs an empty UTXO placeholder.
The placeholder has a default outpoint, zero amount, default token identifier, and no owner address.
function GeniusUTXO¶
inline GeniusUTXO(
const base::Hash256 & hash,
uint32_t previous_index,
uint64_t amount,
TokenID token_id
)
Constructs a UTXO without an owner address.
Parameters:
- hash Hash of the transaction that produced this output.
- previous_index Output index within the producing transaction.
- amount Amount carried by the output.
- token_id Token identifier carried by the output.
function GeniusUTXO¶
inline GeniusUTXO(
const base::Hash256 & hash,
uint32_t previous_index,
uint64_t amount,
TokenID token_id,
std::string owner_address
)
Constructs a fully specified UTXO.
Parameters:
- hash Hash of the transaction that produced this output.
- previous_index Output index within the producing transaction.
- amount Amount carried by the output.
- token_id Token identifier carried by the output.
- owner_address Address that owns or can spend the output.
function SetOwnerAddress¶
Sets the owner address associated with this UTXO.
Parameters:
- owner_address Address that owns or can spend the output.
function GetOwnerAddress¶
Returns the owner address associated with this UTXO.
Return: Address that owns or can spend the output; empty when not set.
function GetOutPoint¶
Returns the full outpoint descriptor.
Return: Outpoint containing the producing transaction hash and output index.
function GetTxID¶
Returns the originating transaction id.
Return: Hash of the transaction that produced this output.
function GetOutputIdx¶
Returns the output index within the originating transaction.
Return: Output index within the producing transaction.
function GetAmount¶
Returns the unencrypted amount represented by the UTXO.
Return: Amount carried by the output.
function GetTokenID¶
Returns the token identifier associated with the UTXO.
Return: Token identifier carried by the output.
Updated on 2026-06-05 at 17:22:18 -0700