Module ergo_lib_c_core::transaction
source · Expand description
Ergo transaction
Structs
- CommitmentHint
HintsBag
- ErgoTransaction is an atomic state transition operation. It destroys Boxes from the state and creates new ones. If transaction is spending boxes protected by some non-trivial scripts, its inputs should also contain proof of spending correctness - context extension (user-defined key-value map) and data inputs (links to existing boxes in the state) that may be used during script reduction to crypto, signatures that satisfies the remaining cryptographic protection of the script. Transactions are not encrypted, so it is possible to browse and view every transaction ever collected into a block.
- TransactionHintsBag
- Transaction id
- Unsigned (inputs without proofs) transaction
Functions
- Add commitment hint to the bag
- Empty HintsBag
- Get commitment
- Length of HintsBag
- Extract hints from signed transaction
- Adding hints for input
- Get HintsBag corresponding to input index
- Empty TransactionHintsBag
- Data inputs for transaction
- Parse from JSON. Supports Ergo Node/Explorer API and box values and token amount encoded as strings
- Create Transaction from UnsignedTransaction and an array of proofs in the same order as UnsignedTransaction.inputs with empty proof indicated with empty byte array
- Get id for transaction
- Convert a hex string into a TxId
- Get the tx id as bytes
- Inputs for transaction
- Output candidates for transaction
- Returns ErgoBox’s created from ErgoBoxCandidate’s with tx id and indices
- JSON representation as text (compatible with Ergo Node/Explorer API, numbers are encoded as numbers)
- JSON representation according to EIP-12 https://github.com/ergoplatform/eips/pull/23
- Data inputs for transaction
- Parse from JSON. Supports Ergo Node/Explorer API and box values and token amount encoded as strings
- Get id for transaction
- Inputs for transaction
- Output candidates for transaction
- JSON representation as text (compatible with Ergo Node/Explorer API, numbers are encoded as numbers)
- JSON representation according to EIP-12 https://github.com/ergoplatform/eips/pull/23