The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

  use CryptoTron::GetReward;

  # Set the public key as Base58 address.
  my $PublicKeyBase58 = "TY2fJ7AcsnQhfW3UJ1cjEUak5vkM87KC6R";

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

  # Set the visible switch.
  my $VisibleSwitch = ["True"|"False"|""];

  # Get the account info from the blockchain.
  my $account_info = GetReward({
      PublicAddr => $PublicKeyBase58
      [, OutputFlag => $OutputFlag]
      [, VisibleSwitch => $VisibleSwitch]
  });

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

DESCRIPTION

The module requests the account information of an account from the Tron blockchain using the so-called FULL-NODE HTTP API from the Tron network. For HTTP requests the methods POST or GET used in general. For the method GetAccount the used method is POST. The switch visible can be set to True or False. If the switch is set to True a Base58 address is used. If the switch is set to False a Hex address is used. A request results in a response in JSON format. The module returns formated string JSON data as well as unformated raw JSON data.

MODULE METHOD

  GetReward()

SEE ALSO

CryptoTron::JsonHttp

CryptoTron:AddressConvert

CryptoTron:AddressCheck

AUTHOR

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

COPYRIGHT AND LICENSE

Copyright (C) 2022 by Dr. Peter Netz

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.