A class that represents the Wallets API.
More...
#include <wallets.h>
|
| 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...
|
|
|
| IWallets (Host &host, IHTTP &http) |
|
template<typename HTTPType > |
| Base (Host &host, HTTPType &http) |
|
Host & | host_ |
|
IHTTP * | http_ |
|
A class that represents the Wallets API.
◆ getAccount()
Gets the account metadata from the blockchain.
- Parameters
-
| address | The IoTeX address as a null terminated string |
[out] | metadata | The 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
-
| address | The IoTeX address as a null terminated string |
[out] | balance | The account balance if successful |
- Returns
- ResultCode Success or an error code
Implements iotex::api::IWallets.
◆ getExecutionByHash()
Gets the action info for a execution action hash from the blockchain.
- Parameters
-
| hash | The hash as a null terminated string |
[out] | actionInfo | The action data if successful |
- Returns
- ResultCode Success or an error code
Implements iotex::api::IWallets.
◆ getTransactionByHash()
Gets the action info for a transaction action hash from the blockchain.
- Parameters
-
| hash | The hash null terminated string |
[out] | actionInfo | The 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
-
| senderPubKey | The public key of the sender address as a byte array |
| signature | The execution action core signature as a byte array |
| transfer | The execution action core |
[out] | hash | The 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
-
| senderPubKey | The public key of the sender address as a byte array |
| signature | The transfer action core signature as a byte array |
| transfer | The transfer action core |
[out] | hash | The 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:
- src/api/wallet/wallets.h
- src/api/wallet/wallets.cpp