NAME

Crypto::NanoRPC - Perl module for interacting with Nano node

SYNOPSIS

 use Crypto::NanoRPC;
 $rpc = NanoRPC->new();
 $rpc = NanoRPC->new( 'http://[::1]:7076' );

 $rpc->set_params(
                       wallet => '000XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
                       account => 'nano_111111111111111111111111111111111111111111111111111111111111',
                 );

 $response = $rpc->account_balance();
 
 printf "Balance: %s\n", $response->{balance} unless defined $response->{error};

DESCRIPTION

    Object Oriented perl class for interacting with a Nano (rai) node

    Implemented RPC calls are defined in the array rpc_actions in NanoRPC.pm. The required arguments can be set using the set_params() method. The most common arguments, "wallet" and "account", have their own set_ methods.

METHODS

See https://docs.nano.org/commands/rpc-protocol/ for a list of RPC calls. This module implements the following RPCs:

Node RPCs

account_balance account_block_count account_get account_history account_info account_key account_representative account_weight accounts_balances accounts_frontiers accounts_pending active_difficulty available_supply block_account block_count block_count_type block_confirm block_create block_hash block_info blocks blocks_info bootstrap bootstrap_any bootstrap_lazy bootstrap_status chain confirmation_active confirmation_height_currently_processing confirmation_history confirmation_info confirmation_quorum database_txn_tracker delegators delegators_count deterministic_key frontier_count frontiers keepalive key_create key_expand ledger node_id node_id_delete peers pending pending_exists process representatives representatives_online republish sign stats stats_clear stop successors validate_account_number version unchecked unchecked_clear unchecked_get unchecked_keys unopened uptime work_cancel work_generate work_peer_add work_peers work_peers_clear work_validate

Wallet RPCs

account_create account_list account_move account_remove account_representative_set accounts_create password_change password_enter password_valid receive receive_minimum receive_minimum_set search_pending search_pending_all send wallet_add wallet_add_watch wallet_balances wallet_change_seed wallet_contains wallet_create wallet_destroy wallet_export wallet_frontiers wallet_history wallet_info wallet_ledger wallet_lock wallet_locked wallet_pending wallet_representative wallet_representative_set wallet_republish wallet_work_get work_get work_set

Unit Conversion RPCs

krai_from_raw krai_to_raw mrai_from_raw mrai_to_raw rai_from_raw rai_to_raw

DEPENDENCIES

These modules are required:

HTTP::Request
LWP::UserAgent
JSON

AUTHOR

Ruben de Groot, ruben at hacktor.com

Git Repository: https://github.com/hacktor/Crypto-NanoRPC

COPYRIGHT AND LICENSE

Copyright (C) 2020 by Ruben de Groot

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