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

Public Member Functions

 EthereumLikeTransactionApi (const api::Currency &currency)
 
 EthereumLikeTransactionApi (const std::shared_ptr< OperationApi > &operation)
 
std::string getHash () override
 
int32_t getNonce () override
 
std::shared_ptr< api::AmountgetGasPrice () override
 
std::shared_ptr< api::AmountgetGasLimit () override
 
std::shared_ptr< api::AmountgetGasUsed () override
 
std::shared_ptr< api::EthereumLikeAddressgetReceiver () override
 
std::shared_ptr< api::EthereumLikeAddressgetSender () override
 
std::shared_ptr< api::AmountgetValue () override
 
std::experimental::optional< std::vector< uint8_t > > getData () override
 
int32_t getStatus () override
 
std::vector< uint8_t > serialize () override
 
std::chrono::system_clock::time_point getDate () override
 
std::shared_ptr< api::EthereumLikeBlockgetBlock () override
 
void setSignature (const std::vector< uint8_t > &vSignature, const std::vector< uint8_t > &rSignature, const std::vector< uint8_t > &sSignature) override
 
void setDERSignature (const std::vector< uint8_t > &signature) override
 
void setVSignature (const std::vector< uint8_t > &vSignature) override
 
EthereumLikeTransactionApisetGasPrice (const std::shared_ptr< BigInt > &gasPrice)
 
EthereumLikeTransactionApisetGasLimit (const std::shared_ptr< BigInt > &gasLimit)
 
EthereumLikeTransactionApisetNonce (const std::shared_ptr< BigInt > &nonce)
 
EthereumLikeTransactionApisetValue (const std::shared_ptr< BigInt > &value)
 
EthereumLikeTransactionApisetData (const std::vector< uint8_t > &data)
 
EthereumLikeTransactionApisetStatus (int32_t status)
 
EthereumLikeTransactionApisetReceiver (const std::string &receiver)
 
EthereumLikeTransactionApisetSender (const std::string &sender)
 

Member Function Documentation

◆ getBlock()

std::shared_ptr< api::EthereumLikeBlock > ledger::core::EthereumLikeTransactionApi::getBlock ( )
overridevirtual

Get block to which transaction belongs (was mined in).

Implements ledger::core::api::EthereumLikeTransaction.

◆ getData()

std::experimental::optional< std::vector< uint8_t > > ledger::core::EthereumLikeTransactionApi::getData ( )
overridevirtual

Get binary data payload.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getDate()

std::chrono::system_clock::time_point ledger::core::EthereumLikeTransactionApi::getDate ( )
overridevirtual

Get the time when the transaction was issued or the time of the block including this transaction.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getGasLimit()

std::shared_ptr< api::Amount > ledger::core::EthereumLikeTransactionApi::getGasLimit ( )
overridevirtual

Get start gas (in wei) : maximum amount of gas the originator is willing to pay.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getGasPrice()

std::shared_ptr< api::Amount > ledger::core::EthereumLikeTransactionApi::getGasPrice ( )
overridevirtual

Get Gas price (in wei).

Implements ledger::core::api::EthereumLikeTransaction.

◆ getGasUsed()

std::shared_ptr< api::Amount > ledger::core::EthereumLikeTransactionApi::getGasUsed ( )
overridevirtual

Effective used gas.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getHash()

std::string ledger::core::EthereumLikeTransactionApi::getHash ( )
overridevirtual

Get the hash of the transaction.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getNonce()

int32_t ledger::core::EthereumLikeTransactionApi::getNonce ( )
overridevirtual

Get the nonce of the transaction : sequence number issued by originating EOA.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getReceiver()

std::shared_ptr< api::EthereumLikeAddress > ledger::core::EthereumLikeTransactionApi::getReceiver ( )
overridevirtual

Get destination ETH address.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getSender()

std::shared_ptr< api::EthereumLikeAddress > ledger::core::EthereumLikeTransactionApi::getSender ( )
overridevirtual

Get ETH sender address.

Implements ledger::core::api::EthereumLikeTransaction.

◆ getStatus()

int32_t ledger::core::EthereumLikeTransactionApi::getStatus ( )
overridevirtual

Get status of transaction: equals to 1 if succeeded, 0 otherwise

Implements ledger::core::api::EthereumLikeTransaction.

◆ getValue()

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

Get amount of ether to send.

Implements ledger::core::api::EthereumLikeTransaction.

◆ serialize()

std::vector< uint8_t > ledger::core::EthereumLikeTransactionApi::serialize ( )
overridevirtual

Serialize the transaction to its raw format.

Implements ledger::core::api::EthereumLikeTransaction.

◆ setSignature()

void ledger::core::EthereumLikeTransactionApi::setSignature ( const std::vector< uint8_t > &  vSignature,
const std::vector< uint8_t > &  rSignature,
const std::vector< uint8_t > &  sSignature 
)
overridevirtual

Set signature of transaction, when a signature is set serialize method gives back serialized Tx.

Implements ledger::core::api::EthereumLikeTransaction.


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