ledger-core
Public Member Functions | Static Public Member Functions | List of all members
ledger::core::api::EthereumLikeTransactionBuilder Class Referenceabstract

#include <EthereumLikeTransactionBuilder.hpp>

+ Inheritance diagram for ledger::core::api::EthereumLikeTransactionBuilder:

Public Member Functions

virtual std::shared_ptr< EthereumLikeTransactionBuildersendToAddress (const std::shared_ptr< Amount > &amount, const std::string &address)=0
 
virtual std::shared_ptr< EthereumLikeTransactionBuilderwipeToAddress (const std::string &address)=0
 
virtual std::shared_ptr< EthereumLikeTransactionBuildersetGasPrice (const std::shared_ptr< Amount > &gasPrice)=0
 
virtual std::shared_ptr< EthereumLikeTransactionBuildersetGasLimit (const std::shared_ptr< Amount > &gasLimit)=0
 
virtual std::shared_ptr< EthereumLikeTransactionBuildersetInputData (const std::vector< uint8_t > &data)=0
 
virtual void build (const std::shared_ptr< EthereumLikeTransactionCallback > &callback)=0
 
virtual std::shared_ptr< EthereumLikeTransactionBuilderclone ()=0
 
virtual void reset ()=0
 

Static Public Member Functions

static std::shared_ptr< EthereumLikeTransactionparseRawUnsignedTransaction (const Currency &currency, const std::vector< uint8_t > &rawTransaction)
 
static std::shared_ptr< EthereumLikeTransactionparseRawSignedTransaction (const Currency &currency, const std::vector< uint8_t > &rawTransaction)
 

Detailed Description

Builder for transactions on the Ethereum blockchain.

Use this interface when you want to build a transaction step by step.

Member Function Documentation

◆ build()

virtual void ledger::core::api::EthereumLikeTransactionBuilder::build ( const std::shared_ptr< EthereumLikeTransactionCallback > &  callback)
pure virtual

Build a transaction from the given builder parameters.

◆ clone()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeTransactionBuilder::clone ( )
pure virtual

Create a clone of this builder.

Returns
A copy of the current builder instance.

Implemented in ledger::core::EthereumLikeTransactionBuilder.

◆ parseRawSignedTransaction()

std::shared_ptr< api::EthereumLikeTransaction > ledger::core::api::EthereumLikeTransactionBuilder::parseRawSignedTransaction ( const Currency currency,
const std::vector< uint8_t > &  rawTransaction 
)
static

Create a signed transaction for the Ethereum blockchain out of a raw binary.

◆ parseRawUnsignedTransaction()

std::shared_ptr< api::EthereumLikeTransaction > ledger::core::api::EthereumLikeTransactionBuilder::parseRawUnsignedTransaction ( const Currency currency,
const std::vector< uint8_t > &  rawTransaction 
)
static

Create an unsigned transaction for the Ethereum blockchain out of a raw binary.

◆ reset()

virtual void ledger::core::api::EthereumLikeTransactionBuilder::reset ( )
pure virtual

Reset the current instance to its initial state

Implemented in ledger::core::EthereumLikeTransactionBuilder.

◆ sendToAddress()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeTransactionBuilder::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
amountThe value to send
addressAddress of the recipient
Returns
A reference on the same builder in order to chain calls.

◆ setGasLimit()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeTransactionBuilder::setGasLimit ( const std::shared_ptr< Amount > &  gasLimit)
pure virtual

Set gas limit (in wei) the originator is not willing to exceed.

Returns
A reference on the same builder in order to chain calls.

◆ setGasPrice()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeTransactionBuilder::setGasPrice ( const std::shared_ptr< Amount > &  gasPrice)
pure virtual

Set gas price (in wei) the originator is willing to pay.

Returns
A reference on the same builder in order to chain calls.

◆ setInputData()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeTransactionBuilder::setInputData ( const std::vector< uint8_t > &  data)
pure virtual

Set input data the originator wants to embed in transaction.

Implemented in ledger::core::EthereumLikeTransactionBuilder.

◆ wipeToAddress()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeTransactionBuilder::wipeToAddress ( const std::string &  address)
pure virtual

Send all available funds to the given address.

Parameters
addressAddress of the recipient
Returns
A reference on the same builder in order to chain calls.

Implemented in ledger::core::EthereumLikeTransactionBuilder.


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