GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FINANCE::BITCOIN::WALLET (3)

.ds Aq ’

NAME

Finance::Bitcoin::Wallet - a bitcoin wallet

CONTENTS

SYNOPSIS



 use Finance::Bitcoin;

 my $uri     = http://user:password@127.0.0.1:8332/;
 my $wallet  = Finance::Bitcoin::Wallet->new($uri);

 print "Have: " . $wallet->balance . "\n";
 $wallet->pay($destination_address, $amount);
 print "Now have: " . $wallet->balance . "\n";

 foreach my $address ($wallet->addresses)
 {
   print $address->label . "\n";
 }



DESCRIPTION

This module is part of the high-level API for accessing a running Bitcoin instance.
new($endpoint) Constructor. $endpoint may be the JSON RPC endpoint URL, or may be a Finance::Bitcoin::API object.
balance Returns the current balance of the wallet.
pay($dest, $amount) Pays some bitcoins to an account, causing the balance of the wallet to decrease. $dest may be a Finance::Bitcoin::Address, or an address string.
addresses Returns a list of receiving addresses - i.e. addresses that can be used by other people to send money to this wallet. Each item on the list is a Finance::Bitcoin::Address object.

This list may be non-exhaustive!

create_address($label) Creates a new receiving address - i.e. an address that can be used by other people to send money to this wallet. $label is an optional human-friendly name for the address. Returns a Finance::Bitcoin::Address object.
api Retrieve a reference to the Finance::Bitcoin::API object being used.

BUGS

Please report any bugs to <http://rt.cpan.org/>.

SEE ALSO

Finance::Bitcoin, Finance::Bitcoin::Address.

<http://www.bitcoin.org/>.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT

Copyright 2010, 2011, 2013 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FINANCE::BITCOIN::WALLET (3) 2013-06-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.