|
OpenCBDC Transaction Processor
|
Namespaces | |
| namespace | validation |
Data Structures | |
| struct | compact_tx |
| A condensed, hash-only transaction representation. More... | |
| struct | compact_tx_hasher |
| struct | full_tx |
| A complete transaction. More... | |
| struct | input |
| An input for a new transaction. More... | |
| struct | out_point |
| The unique identifier of a specific output from a transaction. More... | |
| struct | output |
| An output of a transaction. More... | |
| class | wallet |
| Cryptographic wallet for digital currency assets and secrets. More... | |
Typedefs | |
| using | sentinel_attestation = std::pair<pubkey_t, signature_t> |
| Sentinel attestation type. | |
Functions | |
| auto | tx_id (const full_tx &tx) noexcept -> hash_t |
| Calculates the unique hash of a full transaction. | |
| auto | input_from_output (const full_tx &tx, size_t i, const hash_t &txid) -> std::optional< input > |
| Converts the output at the specified index to an input. | |
| auto | input_from_output (const full_tx &tx, size_t i) -> std::optional< input > |
| Calls input_from_output after calculating the TXID. | |
| auto | uhs_id_from_output (const hash_t &entropy, uint64_t i, const output &output) -> hash_t |
| using cbdc::transaction::sentinel_attestation = std::pair<pubkey_t, signature_t> |
Sentinel attestation type.
Public key of the sentinel and signature of a compact transaction hash.
Definition at line 111 of file transaction.hpp.
| auto cbdc::transaction::input_from_output | ( | const full_tx & | tx, |
| size_t | i ) -> std::optional< input > |
Calls input_from_output after calculating the TXID.
| tx | the transaction from which to read outputs |
| i | index of the target output |
Definition at line 99 of file transaction.cpp.
References input_from_output(), and tx_id().

| auto cbdc::transaction::input_from_output | ( | const full_tx & | tx, |
| size_t | i, | ||
| const hash_t & | txid ) -> std::optional< input > |
Converts the output at the specified index to an input.
| tx | the transaction from which to read outputs |
| i | index of the target output |
| txid | the txid of the transaction |
Definition at line 87 of file transaction.cpp.
References cbdc::transaction::out_point::m_index, cbdc::transaction::input::m_prevout, cbdc::transaction::input::m_prevout_data, and cbdc::transaction::out_point::m_tx_id.
Referenced by cbdc::transaction::wallet::confirm_transaction(), cbdc::transaction::wallet::export_send_inputs(), and input_from_output().
Calculates the unique hash of a full transaction.
Returns a cryptographic hash of the inputs concatenated with the outputs (which are first transformed into inputs). Because output owners cannot reuse outputs across different transactions, this method will always generate a unique identifier for valid transactions.
| tx | the full_tx to hash |
Definition at line 72 of file transaction.cpp.
References cbdc::make_buffer().
Referenced by cbdc::transaction::validation::check_p2pk_witness_signature(), cbdc::transaction::compact_tx::compact_tx(), cbdc::transaction::wallet::confirm_transaction(), cbdc::sentinel::controller::execute_transaction(), cbdc::sentinel_2pc::controller::execute_transaction(), input_from_output(), mint_command(), print_tx_result(), cbdc::client::send_transaction(), and cbdc::transaction::wallet::sign().

| auto cbdc::transaction::uhs_id_from_output | ( | const hash_t & | entropy, |
| uint64_t | i, | ||
| const output & | output ) -> hash_t |
Definition at line 105 of file transaction.cpp.
References cbdc::make_buffer().
Referenced by cbdc::transaction::compact_tx::compact_tx().
