NAME

CryptoTron::GetAccount - Perl extension for use with the blockchain of the crypto coin Tron.

SYNOPSIS

use CryptoTron::GetAccount;

# Declare the public keys.
my $PublicKeyBase58 = 'TQHgMpVzWkhSsRB4BzZgmV8uW4cFL8eaBr';

# Set the output format flag.
my $OutputFlag = ["RAW"|"STR"];

# Get the account info as JSON string.
my $account_info = GetAccount({
    address => $PublicKeyBase58,
    [flag    => $OutputFlag]
});

# Print the account info into the terminal window.
print $account_info;

DESCRIPTION

The module requests the account information of a Tron account from the Tron blockchain using the so-called full-node HTTP API from Tron. Requests can be of type POST or GET. The Tron method is using POST. The switch visible is set to True in the request, which means that Base58 Tron addresses are used. A request results in a response in JSON format. The module is able to return raw JSON data as well as string formated JSON data.

SEE ALSO

Try::Catch;

POSIX;

URI;

LWP::UserAgent;

JSON::PP;

AUTHOR

Dr. Peter Netz, <ztenretep@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2022 by Dr. Peter Netz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.30.0 or, at your option, any later version of Perl 5 you may have available.