IoTeX client
Public Member Functions | List of all members
iotex::api::Wallets Class Reference

A class that represents the Wallets API. More...

#include <wallets.h>

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

Public Member Functions

 Wallets (Host &host, IHTTP &http)
 
virtual ResultCode getAccount (const char *const address, ResponseTypes::AccountMeta &data) override
 Gets the account metadata from the blockchain. More...
 
virtual ResultCode getBalance (const char *const address, IotexString &balance) override
 Gets the account balance from the blockchain. More...
 
virtual ResultCode getTransactionByHash (const char *const address, ResponseTypes::ActionInfo_Transfer &action) override
 Gets the action info for a transaction action hash from the blockchain. More...
 
virtual ResultCode getExecutionByHash (const char *const address, ResponseTypes::ActionInfo_Execution &action) override
 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]) override
 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]) override
 Sends an execution action to the blockchain. More...
 

Additional Inherited Members

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

Detailed Description

A class that represents the Wallets API.

Member Function Documentation

◆ getAccount()

ResultCode Wallets::getAccount ( const char *const  address,
ResponseTypes::AccountMeta metadata 
)
overridevirtual

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

Implements iotex::api::IWallets.

◆ getBalance()

ResultCode Wallets::getBalance ( const char *const  address,
IotexString &  balance 
)
overridevirtual

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

Implements iotex::api::IWallets.

◆ getExecutionByHash()

ResultCode Wallets::getExecutionByHash ( const char *const  hash,
ResponseTypes::ActionInfo_Execution actionInfo 
)
overridevirtual

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

Implements iotex::api::IWallets.

◆ getTransactionByHash()

ResultCode Wallets::getTransactionByHash ( const char *const  hash,
ResponseTypes::ActionInfo_Transfer actionInfo 
)
overridevirtual

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

Implements iotex::api::IWallets.

◆ sendExecution()

ResultCode Wallets::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] 
)
overridevirtual

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

Implements iotex::api::IWallets.

◆ sendTokenTransfer()

ResultCode Wallets::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] 
)
overridevirtual

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

Implements iotex::api::IWallets.


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