Finance::Dogechain::Address - class representing addresses in the Dogechain API
use Finance::Dogechain::Address; my $address = Finance::Dogechain::Address->new( address => 'DDMczmdPkpHMCaAJGEno11hMRc46A2uKsj', ); my $balance = $address->balance; my $received = $address->received; my $sent = $address->sent; my $unspent = $address->unspent;
Finance::Dogechain::Address represents addresses in the Dogechain API. It inherits methods from Finance::Dogechain::Base and provides several of its own.
Finance::Dogechain::Address
Finance::Dogechain::Base
Creates a new instance of this object. You must provide a address parameter, which is either a valid address in the Dogecoin public ledger.
address
Other default constructor values are:
ua, a user agent. Defaults to an instance of Mojo::UserAgent.
ua
base_url, the base URL path of the dogechain.info API (or an equivalent).
base_url
These attributes are available by instance methods address(), ua(), and base_url().
address()
ua()
base_url()
Returns a floating point value representing the current balance (number of Dogecoins) that this address contains.
Returns an undefined value (undef in scalar context or an empty list in list context) if the HTTP call did not succeed.
undef
Returns 0 if the HTTP call did succeed but the API returned an unsuccessful payload.
0
Returns a floating point value representing the total number of Dogecoins that this address has received.
Returns a floating point value representing the total number of Dogecoins that this address has sent.
Returns an array reference of values from transaction outputs that this address has not yet spent.
Returns a string representation of this object (its class and address) so that you can serialize this object with JSON.
Copyright 2021 chromatic, some rights reserved.
This program is free software. You can redistribute it and/or modify it under the same terms as Perl 5.32.
To install Finance::Dogechain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::Dogechain
CPAN shell
perl -MCPAN -e shell install Finance::Dogechain
For more information on module installation, please visit the detailed CPAN module installation guide.