-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get recent transactions for an account #47
Comments
same here |
I found the raw REST API function and that is what I'm using right now. I still haven't found the way to do it with this library:
|
install RestSharp: Sample: |
you could use grpc protocol, public async Task<Protocol.BlockExtention> GetBlockByNumAsync(long blockNumber)
{
var wallet = _walletClient.GetWallet();
var result = await wallet.GetBlockByNum2Async(new Protocol.NumberMessage { Num = blockNumber }, headers: _walletClient.GetHeaders());
return result;
}
public async Task<long> GetBlockByLatestNumAsync()
{
var client = new HttpClient();
var url = $"{_options.Value.ApiUrl}/walletsolidity/getnowblock";
client.DefaultRequestHeaders.Add("TRON-PRO-API-KEY", _options.Value.ApiKey);
var json = await client.GetStringAsync(url);
var result = System.Text.Json.JsonSerializer.Deserialize<SolidityLatestBlockNumber>(json);
//var wallet = _walletClient.GetWallet();
//var result = await wallet.GetNowBlock2Async(new Protocol.EmptyMessage());
return result.BlockHeader.RawData.Number;
} tron's api document: https://developers.tron.network/reference/background |
How to get the last transactions for an account? I'm trying to check if a payment posted I would like a list of the transactions for an account. I haven't been able to figure out how to.
The text was updated successfully, but these errors were encountered: