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
Finance::Bitcoin::Wallet(3) User Contributed Perl Documentation Finance::Bitcoin::Wallet(3)

Finance::Bitcoin::Wallet - a bitcoin wallet

 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";
 }

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.

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

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

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

Toby Inkster <tobyink@cpan.org>.

Copyright 2010, 2011, 2013, 2014 Toby Inkster

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

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.
2014-03-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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