◆ addChangePath()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::addChangePath |
( |
const std::string & |
path | ) |
|
|
pure virtual |
If needed the transaction will send its change to the given path. It is possible to add multiple change path.
- Returns
- A reference on the same builder in order to chain calls.
Implemented in ledger::core::BitcoinLikeTransactionBuilder.
◆ addInput()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::addInput |
( |
const std::string & |
transactionHash, |
|
|
int32_t |
index, |
|
|
int32_t |
sequence |
|
) |
| |
|
pure virtual |
Add the given input to the final transaction.
- Parameters
-
transactionhash | The hash of the transaction in where the UTXO can be located. index Index of the UTXO in the previous transaction sequence Sequence number to add at the end of the input serialization. This can be used for RBF transaction |
- Returns
- A reference on the same builder in order to chain calls.
Implemented in ledger::core::BitcoinLikeTransactionBuilder.
◆ addOutput()
Add the given output to the final transaction.
- Returns
- A reference on the same builder in order to chain calls.
◆ build()
Build a transaction from the given builder parameters.
◆ clone()
◆ excludeUtxo()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::excludeUtxo |
( |
const std::string & |
transactionHash, |
|
|
int32_t |
outputIndex |
|
) |
| |
|
pure virtual |
Exclude UTXO from the coin selection (alias UTXO picking). You can call this method multiple times to exclude multiple UTXO.
- Parameters
-
transactionHash | The hash of the transaction in which this UTXO can be found. |
outputIndex | The position of the output in the previous transaction, |
- Returns
- A reference on the same builder in order to chain calls.
Implemented in ledger::core::BitcoinLikeTransactionBuilder.
◆ parseRawUnsignedTransaction()
Parsing unsigned transaction. parsing a tx might change depending on block height we are on (if an update is effective starting from a given hight)
◆ pickInputs()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::pickInputs |
( |
BitcoinLikePickingStrategy |
strategy, |
|
|
int32_t |
sequence |
|
) |
| |
|
pure virtual |
Set the UTXO picking strategy (see [[BitcoinLikePickingStrategy]]).
- Parameters
-
strategy | The strategy to adopt in order to select which input to use in the transaction. |
sequence | The sequence value serialized at the end of the raw transaction. If you don't know what to put here just use 0xFFFFFF |
- Returns
- A reference on the same builder in order to chain calls.
Implemented in ledger::core::BitcoinLikeTransactionBuilder.
◆ reset()
virtual void ledger::core::api::BitcoinLikeTransactionBuilder::reset |
( |
| ) |
|
|
pure virtual |
◆ sendToAddress()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::sendToAddress |
( |
const std::shared_ptr< Amount > & |
amount, |
|
|
const std::string & |
address |
|
) |
| |
|
pure virtual |
Send funds to the given address. This method can be called multiple times to send to multiple addresses.
- Parameters
-
amount | The value to send |
address | Address of the recipient |
- Returns
- A reference on the same builder in order to chain calls.
◆ setFeesPerByte()
Set the amount of fees per byte (of the raw transaction).
- Returns
- A reference on the same builder in order to chain calls.
◆ setMaxAmountOnChange()
Set the maximum amount per change output. By default there is no max amount.
- Returns
- A reference on the same builder in order to chain calls.
◆ setMinAmountOnChange()
Set the minimum amount per change output. By default this value is the dust value of the currency.
- Returns
- A reference on the same builder in order to chain calls.
◆ setNumberOfChangeAddresses()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::setNumberOfChangeAddresses |
( |
int32_t |
count | ) |
|
|
pure virtual |
◆ wipeToAddress()
virtual std::shared_ptr<BitcoinLikeTransactionBuilder> ledger::core::api::BitcoinLikeTransactionBuilder::wipeToAddress |
( |
const std::string & |
address | ) |
|
|
pure virtual |
The documentation for this class was generated from the following files: