ledger-core
|
Public Member Functions | |
BitcoinLikeTransactionApi (const api::Currency ¤cy, const std::string &keychainEngine=api::KeychainEngines::BIP32_P2PKH, uint64_t currentBlockHeight=0) | |
BitcoinLikeTransactionApi (const std::shared_ptr< OperationApi > &operation) | |
std::vector< std::shared_ptr< api::BitcoinLikeInput > > | getInputs () override |
std::vector< std::shared_ptr< api::BitcoinLikeOutput > > | getOutputs () override |
std::shared_ptr< api::BitcoinLikeBlock > | getBlock () override |
int64_t | getLockTime () override |
std::shared_ptr< api::Amount > | getFees () override |
std::string | getHash () override |
std::chrono::system_clock::time_point | getTime () override |
optional< int32_t > | getTimestamp () override |
std::vector< uint8_t > | serialize () override |
optional< std::vector< uint8_t > > | getWitness () override |
api::EstimatedSize | getEstimatedSize () override |
std::vector< uint8_t > | serializeOutputs () override |
int32_t | getVersion () override |
api::BitcoinLikeSignatureState | setSignatures (const std::vector< api::BitcoinLikeSignature > &signatures, bool override=false) override |
api::BitcoinLikeSignatureState | setDERSignatures (const std::vector< std::vector< uint8_t >> &signatures, bool override=false) override |
BitcoinLikeTransactionApi & | addInput (const std::shared_ptr< BitcoinLikeWritableInputApi > &input) |
BitcoinLikeTransactionApi & | addOutput (const std::shared_ptr< api::BitcoinLikeOutput > &output) |
BitcoinLikeTransactionApi & | setLockTime (uint32_t lockTime) |
BitcoinLikeTransactionApi & | setVersion (uint32_t version) |
BitcoinLikeTransactionApi & | setTimestamp (uint32_t timestamp) |
BitcoinLikeTransactionApi & | setHash (const std::string &hash) |
![]() | |
virtual BitcoinLikeSignatureState | setSignatures (const std::vector< BitcoinLikeSignature > &signatures, bool override)=0 |
Static Public Member Functions | |
static std::shared_ptr< api::BitcoinLikeTransaction > | parseRawTransaction (const api::Currency ¤cy, const std::vector< uint8_t > &rawTransaction, std::experimental::optional< int32_t > currentBlockHeight, bool isSigned) |
static std::shared_ptr< api::BitcoinLikeTransaction > | parseRawSignedTransaction (const api::Currency ¤cy, const std::vector< uint8_t > &rawTransaction, std::experimental::optional< int32_t > currentBlockHeight) |
static api::EstimatedSize | estimateSize (std::size_t inputCount, std::size_t outputCount, const api::Currency ¤cy, const std::string &keychainEngine) |
|
overridevirtual |
Get the block in which the transaction is inserted if the transaction is confirmed.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Estimate the size of the raw transaction in bytes. This method returns a minimum estimated size and a maximum estimated size.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the amount of fees of the transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the hash of the transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the input of the transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the lock time of the transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the output of the transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the time when the transaction was issued or the time of the block including this transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the timestamps serialized in the raw transaction if the underlying currency handles it.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get Transaction version.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Get the witness if the underlying transaction is a segwit transaction.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Serialize the transaction to its raw format.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Serialize outputs of the raw transaction into a byte array using the bitcoin transaction format.
Implements ledger::core::api::BitcoinLikeTransaction.
|
overridevirtual |
Sign all inputs for given transaction.
Implements ledger::core::api::BitcoinLikeTransaction.