1 ! Copyright (C) 2010 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs help.markup help.syntax kernel math sequences strings ;
11 "Returns the hostname of the json-rpc server for the bitcoin client. "
12 "This defaults to 'localhost' or the value of the 'bitcoin-server' "
15 { $see-also bitcoin-port bitcoin-user bitcoin-password } ;
22 "Returns the port of the json-rpc server for the bitcoin client. "
23 "This defaults to '8332' or the value of the 'bitcoin-port' "
26 { $see-also bitcoin-server bitcoin-user bitcoin-password } ;
33 "Returns the username required to authenticate with the json-rpc "
34 "server for the bitcoin client. This defaults to empty or the "
35 "value of the 'bitcoin-user' variable."
37 { $see-also bitcoin-port bitcoin-server bitcoin-password } ;
39 HELP: bitcoin-password
44 "Returns the password required to authenticate with the json-rpc "
45 "server for the bitcoin client. This returns the "
46 "value of the 'bitcoin-password' variable."
48 { $see-also bitcoin-port bitcoin-server bitcoin-user } ;
50 HELP: get-addresses-by-label
56 "Returns the list of addresses with the given label."
64 "Returns the server's available balance."
72 "Returns the number of blocks in the longest block chain."
75 HELP: get-block-number
80 "Returns the block number of the latest block in the longest block chain."
83 HELP: get-connection-count
88 "Returns the number of connections to other nodes."
96 "Returns the proof-of-work difficulty as a multiple of the minimum "
105 "Returns true if the server is trying to generate bitcoins, false "
115 "If 'gen' is true, the server starts generating bitcoins. If 'gen' is "
116 "'false' then the server stops generating bitcoins. 'n' is the number "
117 "of CPU's to use while generating. A value of '-1' means use all the "
126 "Returns an assoc containing server information."
135 "Returns the label associated with the given address."
144 "Sets the label associateed with the given address."
152 "Removes the label associated with the given address."
155 HELP: get-new-address
160 "Returns a new bitcoin address for receiving payments."
163 HELP: get-new-labelled-address
169 "Returns a new bitcoin address for receiving payments. The given "
170 "label is associated with the new address."
173 HELP: get-received-by-address
179 "Returns the total amount received by the address in transactions "
180 "with at least one confirmation."
183 HELP: get-confirmed-received-by-address
190 "Returns the total amount received by the address in transactions "
191 "with at least 'minconf' confirmations."
194 HELP: get-received-by-label
200 "Returns the total amount received by addresses with 'label' in transactions "
201 "with at least one confirmation."
204 HELP: get-confirmed-received-by-label
211 "Returns the total amount received by the addresses with 'label' in transactions "
212 "with at least 'minconf' confirmations."
215 HELP: list-received-by-address
218 { "include-empty" boolean }
222 "Return a sequence containing an assoc of data about the payments an "
223 "address has received. 'include-empty' indicates whether addresses that "
224 "haven't received any payments should be included. 'minconf' is the "
225 "minimum number of confirmations before payments are included."
228 HELP: list-received-by-label
231 { "include-empty" boolean }
235 "Return a sequence containing an assoc of data about the payments that "
236 "addresses with the given label have received. 'include-empty' "
237 " indicates whether addresses that "
238 "haven't received any payments should be included. 'minconf' is the "
239 "minimum number of confirmations before payments are included."
242 HELP: send-to-address
249 "Sends 'amount' from the server's available balance to 'address'. "
250 "'amount' is rounded to the nearest 0.01. Returns a boolean indicating "
251 "if the call succeeded."
256 "Stops the bitcoin server."
259 HELP: list-transactions
262 { "include-generated" boolean }
266 "Return's a sequence containing up to 'count' most recent transactions."
267 "This requires a patched bitcoin server so may not work with old or unpatched "