6#include "protobuf/pb_api.h"
43 virtual ResultCode
getBalance(
const char*
const address, IotexString& balance) = 0;
77 const uint8_t signature[IOTEX_SIGNATURE_SIZE],
79 uint8_t hash[IOTEX_HASH_SIZE]) = 0;
91 virtual ResultCode
sendExecution(
const uint8_t senderPubKey[IOTEX_PUBLIC_KEY_SIZE],
92 const uint8_t signature[IOTEX_SIGNATURE_SIZE],
94 uint8_t hash[IOTEX_HASH_SIZE]) = 0;
106 const IotexString callerAddress, uint64_t gasLimit,
126 virtual ResultCode
getAccount(
const char*
const address,
129 virtual ResultCode
getBalance(
const char*
const address, IotexString& balance)
override;
137 virtual ResultCode
sendTokenTransfer(
const uint8_t senderPubKey[IOTEX_PUBLIC_KEY_SIZE],
138 const uint8_t signature[IOTEX_SIGNATURE_SIZE],
140 uint8_t hash[IOTEX_HASH_SIZE])
override;
142 virtual ResultCode
sendExecution(
const uint8_t senderPubKey[IOTEX_PUBLIC_KEY_SIZE],
143 const uint8_t signature[IOTEX_SIGNATURE_SIZE],
145 uint8_t hash[IOTEX_HASH_SIZE])
override;
148 const IotexString callerAddress, uint64_t gasLimit,
Interface for the Wallets API.
Definition: wallets.h:20
virtual ResultCode readContract(const responsetypes::Execution &execution, const IotexString callerAddress, uint64_t gasLimit, responsetypes::ReadContractResponse *response)=0
Reads a contract.
virtual ResultCode getBalance(const char *const address, IotexString &balance)=0
Gets the account balance from the blockchain.
virtual ResultCode getExecutionByHash(const char *const hash, responsetypes::ActionInfo_Execution &actionInfo)=0
Gets the action info for a execution action hash from the blockchain.
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.
virtual ResultCode getAccount(const char *const address, responsetypes::AccountMeta &metadata)=0
Gets the account metadata from the blockchain.
virtual ResultCode getTransactionByHash(const char *const hash, responsetypes::ActionInfo_Transfer &actionInfo)=0
Gets the action info for a transaction action hash from the blockchain.
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.
A class that represents the Wallets API.
Definition: wallets.h:120
virtual ResultCode getExecutionByHash(const char *const address, responsetypes::ActionInfo_Execution &action) override
Gets the action info for a execution action hash from the blockchain.
Definition: wallets.cpp:72
virtual ResultCode getTransactionByHash(const char *const address, responsetypes::ActionInfo_Transfer &action) override
Gets the action info for a transaction action hash from the blockchain.
Definition: wallets.cpp:53
virtual ResultCode getBalance(const char *const address, IotexString &balance) override
Gets the account balance from the blockchain.
Definition: wallets.cpp:34
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.
Definition: wallets.cpp:91
virtual ResultCode readContract(const responsetypes::Execution &execution, const IotexString callerAddress, uint64_t gasLimit, responsetypes::ReadContractResponse *response) override
Reads a contract.
Definition: wallets.cpp:139
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.
Definition: wallets.cpp:112
virtual ResultCode getAccount(const char *const address, responsetypes::AccountMeta &data) override
Gets the account metadata from the blockchain.
Definition: wallets.cpp:12