Getting a set of wallet transactions with address starting from offset to the number of limit.
1: Address address
2: i64 offset
3: i64 limit
Type of result: TransactionsGetResult
The address field is re-coded: if the address string length is 64 symbols, then we re-code from 16 representation into string, or else we compute the public key hash in respect of the same based on the blake2s algorithm.
We determine an empty array of transactions.
Download pool from storage based on the last block’s hash value. While the amount of block sequence is equal to the required public key amount, we perform the following:
If the number of transactions in a pool is more than zero, then we:
Determine that the current transaction index is equal to the number of transactions (1);
In respect of each transaction in a pool, if the wallet address corresponds to the transaction sender or recipient, then:
If the offset input is equal to 0, then we add a transaction to the array of transactions, or else we reduce the offset parameter;
If the number of transactions in the array is equal to the limit parameter, then we terminate a loop;
If the current transaction index is equal to 0, then we terminate a loop;
Reduce the current transaction index.
If the number of transactions in the array of transactions is equal to the limit parameter, then we terminate a loop;
Download the pool from the block with the previous hash.
We convert the transaction from the csdb::Transaction structure to the api::Transaction structure.
The result status we set is SUCCESS.
The following structures are used for marshalling purposes:
TransactionsGetResult list of transactions get result
i8 code //status code
string message //status communication
result success boolean flag
set of transactions