ledger-core
Public Member Functions | List of all members
ledger::core::BitcoinLikeOutputApi Class Reference
+ Inheritance diagram for ledger::core::BitcoinLikeOutputApi:
+ Collaboration diagram for ledger::core::BitcoinLikeOutputApi:

Public Member Functions

 BitcoinLikeOutputApi (const std::shared_ptr< OperationApi > &operation, int32_t outputIndex)
 
 BitcoinLikeOutputApi (const BitcoinLikeBlockchainExplorerOutput &output, const api::Currency &currency)
 
 BitcoinLikeOutputApi (const BitcoinLikeBlockchainExplorerOutput &output, const api::Currency &currency, const std::shared_ptr< api::DerivationPath > &path)
 
std::string getTransactionHash () override
 
int32_t getOutputIndex () override
 
std::shared_ptr< api::AmountgetValue () override
 
std::vector< uint8_t > getScript () override
 
optional< std::string > getAddress () override
 
std::shared_ptr< api::BitcoinLikeScriptparseScript () override
 
std::shared_ptr< api::DerivationPathgetDerivationPath () override
 
std::experimental::optional< int64_t > getBlockHeight () override
 
const BigIntvalue ()
 

Member Function Documentation

◆ getAddress()

optional< std::string > ledger::core::BitcoinLikeOutputApi::getAddress ( )
overridevirtual

Get address that spent the output.

Returns
Optional String, address that spent

Implements ledger::core::api::BitcoinLikeOutput.

◆ getOutputIndex()

int32_t ledger::core::BitcoinLikeOutputApi::getOutputIndex ( )
overridevirtual

Get index of output in list of all outputs contained in same transaction.

Returns
32 bits integer, index of output

Implements ledger::core::api::BitcoinLikeOutput.

◆ getScript()

std::vector< uint8_t > ledger::core::BitcoinLikeOutputApi::getScript ( )
overridevirtual

Get script (witness script) cryptographic puzzle that determines the conditions to spend the output.

Returns
in Bytes (variable size depending on type of script P2PKH, P2SH), locking script to spend UTXO

Implements ledger::core::api::BitcoinLikeOutput.

◆ getTransactionHash()

std::string ledger::core::BitcoinLikeOutputApi::getTransactionHash ( )
overridevirtual

Get transaction hash in which output was 'created'.

Returns
String, transaction hash containing output

Implements ledger::core::api::BitcoinLikeOutput.

◆ getValue()

std::shared_ptr< api::Amount > ledger::core::BitcoinLikeOutputApi::getValue ( )
overridevirtual

Get amount of output.

Returns
Amount object, amount of output

Implements ledger::core::api::BitcoinLikeOutput.


The documentation for this class was generated from the following files: