IoTeX client
Public Member Functions | Protected Member Functions | List of all members
iotex::api::IWallets Class Referenceabstract

Interface for the Wallets API. More...

#include <wallets.h>

Inheritance diagram for iotex::api::IWallets:
iotex::api::Base iotex::api::Wallets

Public Member Functions

virtual ResultCode getAccount (const char *const address, ResponseTypes::AccountMeta &metadata)=0
 Gets the account metadata from the blockchain. More...
 
virtual ResultCode getBalance (const char *const address, IotexString &balance)=0
 Gets the account balance from the blockchain. More...
 
virtual ResultCode getTransactionByHash (const char *const hash, ResponseTypes::ActionInfo_Transfer &actionInfo)=0
 Gets the action info for a transaction action hash from the blockchain. More...
 
virtual ResultCode getExecutionByHash (const char *const hash, ResponseTypes::ActionInfo_Execution &actionInfo)=0
 Gets the action info for a execution action hash from the blockchain. More...
 
virtual ResultCode sendTokenTransfer (const uint8_t senderPubKey[IOTEX_PUBLIC_KEY_SIZE], const uint8_t signature[IOTEX_SIGNATURE_SIZE], const ResponseTypes::ActionCore_Transfer &transfer, uint8_t hash[IOTEX_HASH_SIZE])=0
 Sends a token transfer action to the blockchain. More...
 
virtual ResultCode sendExecution (const uint8_t senderPubKey[IOTEX_PUBLIC_KEY_SIZE], const uint8_t signature[IOTEX_SIGNATURE_SIZE], const ResponseTypes::ActionCore_Execution &transfer, uint8_t hash[IOTEX_HASH_SIZE])=0
 Sends an execution action to the blockchain. More...
 

Protected Member Functions

 IWallets (Host &host, IHTTP &http)
 
- Protected Member Functions inherited from iotex::api::Base
template<typename HTTPType >
 Base (Host &host, HTTPType &http)
 

Additional Inherited Members

- Protected Attributes inherited from iotex::api::Base
Hosthost_
 
IHTTPhttp_
 

Detailed Description

Interface for the Wallets API.

Member Function Documentation

◆ getAccount()

virtual ResultCode iotex::api::IWallets::getAccount ( const char *const  address,
ResponseTypes::AccountMeta metadata 
)
pure virtual

Gets the account metadata from the blockchain.

Parameters
addressThe IoTeX address as a null terminated string
[out]metadataThe account metadata if successful
Returns
ResultCode Success or an error code

Implemented in iotex::api::Wallets.

◆ getBalance()

virtual ResultCode iotex::api::IWallets::getBalance ( const char *const  address,
IotexString &  balance 
)
pure virtual

Gets the account balance from the blockchain.

Parameters
addressThe IoTeX address as a null terminated string
[out]balanceThe account balance if successful
Returns
ResultCode Success or an error code

Implemented in iotex::api::Wallets.

◆ getExecutionByHash()

virtual ResultCode iotex::api::IWallets::getExecutionByHash ( const char *const  hash,
ResponseTypes::ActionInfo_Execution actionInfo 
)
pure virtual

Gets the action info for a execution action hash from the blockchain.

Parameters
hashThe hash as a null terminated string
[out]actionInfoThe action data if successful
Returns
ResultCode Success or an error code

Implemented in iotex::api::Wallets.

◆ getTransactionByHash()

virtual ResultCode iotex::api::IWallets::getTransactionByHash ( const char *const  hash,
ResponseTypes::ActionInfo_Transfer actionInfo 
)
pure virtual

Gets the action info for a transaction action hash from the blockchain.

Parameters
hashThe hash null terminated string
[out]actionInfoThe action data if successful
Returns
ResultCode Success or an error code

Implemented in iotex::api::Wallets.

◆ sendExecution()

virtual ResultCode iotex::api::IWallets::sendExecution ( const uint8_t  senderPubKey[IOTEX_PUBLIC_KEY_SIZE],
const uint8_t  signature[IOTEX_SIGNATURE_SIZE],
const ResponseTypes::ActionCore_Execution transfer,
uint8_t  hash[IOTEX_HASH_SIZE] 
)
pure virtual

Sends an execution action to the blockchain.

Parameters
senderPubKeyThe public key of the sender address as a byte array
signatureThe execution action core signature as a byte array
transferThe execution action core
[out]hashThe hash for the action returned by the blockchain if successful
Returns
ResultCode Success or an error code

Implemented in iotex::api::Wallets.

◆ sendTokenTransfer()

virtual ResultCode iotex::api::IWallets::sendTokenTransfer ( const uint8_t  senderPubKey[IOTEX_PUBLIC_KEY_SIZE],
const uint8_t  signature[IOTEX_SIGNATURE_SIZE],
const ResponseTypes::ActionCore_Transfer transfer,
uint8_t  hash[IOTEX_HASH_SIZE] 
)
pure virtual

Sends a token transfer action to the blockchain.

Parameters
senderPubKeyThe public key of the sender address as a byte array
signatureThe transfer action core signature as a byte array
transferThe transfer action core
[out]hashThe hash for the action returned by the blockchain if successful
Returns
ResultCode Success or an error code

Implemented in iotex::api::Wallets.


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