bitcoin-client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in bitcoind-client.gemspec
4
+ gemspec
@@ -0,0 +1,79 @@
1
+ = bitcoin-client
2
+
3
+ Provides a Ruby library to the complete Bitcoin JSON-RPC API. Implements all methods listed
4
+ at {https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list}[https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list].
5
+ Also supports customizing the host and port number to connect to.
6
+
7
+
8
+ == Usage
9
+
10
+ As with most Ruby gems, you first need to require the library into your project:
11
+
12
+ require 'bitcoin'
13
+
14
+ After doing this, the simplest possible usage looks like this:
15
+
16
+ Bitcoin('username', 'password').balance
17
+ # => 0.001
18
+
19
+ Or, if you prefer a somewhat more explicit representation, the following code performs the exact
20
+ same task:
21
+
22
+ client = Bitcoin::Client.new('username', 'password')
23
+ client.balance
24
+ # => 0.001
25
+
26
+ The third and final way to use the library is by taking advantage of a simple DSL:
27
+
28
+ include Bitcoin
29
+
30
+ # set up credentials
31
+ username 'username'
32
+ password 'password'
33
+
34
+ balance
35
+ # => 0.001
36
+
37
+ accounts
38
+ # => {"account" => 0.001}
39
+
40
+ The RPC method names available to you are exactly the same as those listed on the Bitcoin wiki
41
+ (again, that's {https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list}[https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list]). Some aliases
42
+ have been added to make them more "ruby-ish," but none of the original names have been changed.
43
+
44
+
45
+ == Host, Port and SSL
46
+
47
+ Here are several examples of how you can change the host information:
48
+
49
+ Bitcoin('username', 'password', :host => 'example.com', :port => 38332, :ssl => true)
50
+
51
+ client = Bitcoin::Client.new('username', 'password', :host => 'example.com')
52
+ client.port = 38332
53
+ client.ssl = true
54
+ client.ssl?
55
+ # => true
56
+
57
+ include Bitcoin
58
+ host 'example.com'
59
+ port 38332
60
+ ssl?
61
+ # => false
62
+ ssl true
63
+ ssl?
64
+ # => true
65
+
66
+ You should see the Bitcoin::Client class documentation if you'd like to see the other options and methods
67
+ that are made available.
68
+
69
+
70
+ == Donations
71
+
72
+ If you found this library useful and feel inclined to compensate me for my trouble, I'm certainly not going to turn you down!
73
+
74
+ Bitcoin donations can be sent to:
75
+
76
+ 1HawYer58J9Vy3iju1w7jsRVci5tzaxkwn
77
+
78
+ Thanks!
79
+
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ gem 'rdoc', '~> 3.9.2'
4
+ require 'rdoc/task'
5
+
6
+ RDoc::Task.new do |t|
7
+ t.main = "README.rdoc"
8
+ t.rdoc_files.include "README.rdoc", "lib/**/*.rb"
9
+ end
@@ -0,0 +1,28 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "bitcoin/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "bitcoin-client"
7
+ s.version = Bitcoin::VERSION
8
+ s.authors = ["Colin MacKenzie IV"]
9
+ s.email = ["sinisterchipmunk@gmail.com"]
10
+ s.homepage = "http://github.com/sinisterchipmunk/bitcoin-client"
11
+ s.summary = %q{Provides a Ruby library to the complete Bitcoin JSON-RPC API.}
12
+ s.description = "Provides a Ruby library to the complete Bitcoin JSON-RPC API. "+
13
+ "Implements all methods listed at "+
14
+ "https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list and "+
15
+ "lets you set options such as the host and port number, and whether to use SSL."
16
+
17
+ s.rubyforge_project = "bitcoin-client"
18
+
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.require_paths = ["lib"]
23
+
24
+ # specify any dependencies here; for example:
25
+ s.add_development_dependency "rspec", '2.6.0'
26
+ s.add_development_dependency "fakeweb", '1.3.0'
27
+ s.add_runtime_dependency "rest-client", '1.6.3'
28
+ end
@@ -0,0 +1 @@
1
+ require File.expand_path("bitcoin", File.dirname(__FILE__))
@@ -0,0 +1,19 @@
1
+ module Bitcoin
2
+ autoload :Client, 'bitcoin/client'
3
+ autoload :API, 'bitcoin/api'
4
+ autoload :Request,'bitcoin/request'
5
+ autoload :RPC, 'bitcoin/rpc'
6
+ autoload :Errors, 'bitcoin/errors'
7
+ autoload :Version,'bitcoin/version'
8
+ autoload :VERSION,'bitcoin/version'
9
+ autoload :DSL, 'bitcoin/dsl'
10
+
11
+ def self.included(base)
12
+ base.send(:include, Bitcoin::DSL)
13
+ base.send(:extend, Bitcoin::DSL)
14
+ end
15
+ end
16
+
17
+ def Bitcoin(user, pass, options = {})
18
+ ::Bitcoin::Client.new(user, pass, options)
19
+ end
@@ -0,0 +1,33 @@
1
+ class Bitcoin::API
2
+ attr_reader :options
3
+ attr_reader :params
4
+
5
+ def user; options[:user]; end
6
+ def pass; options[:pass]; end
7
+ def host; options[:host]; end
8
+ def port; options[:port]; end
9
+ def ssl; options[:ssl]; end
10
+ def ssl?; options[:ssl]; end
11
+ def user=(a); options[:user] = a; end
12
+ def pass=(a); options[:pass] = a; end
13
+ def host=(a); options[:host] = a; end
14
+ def port=(a); options[:port] = a; end
15
+ def ssl=(a); options[:ssl] = a; end
16
+
17
+ def initialize(options = {})
18
+ @options = {
19
+ :host => 'localhost',
20
+ :port => 8332,
21
+ :ssl => false
22
+ }.merge(options)
23
+ end
24
+
25
+ def to_hash
26
+ @options.dup
27
+ end
28
+
29
+ def request(service_name, *params)
30
+ req = Bitcoin::Request.new(service_name, params)
31
+ Bitcoin::RPC.new(to_hash).dispatch(req)
32
+ end
33
+ end
@@ -0,0 +1,227 @@
1
+ class Bitcoin::Client
2
+ attr_reader :api
3
+ def user; api.user; end
4
+ def pass; api.pass; end
5
+ def host; api.host; end
6
+ def port; api.port; end
7
+ def ssl; api.ssl; end
8
+ def ssl?; api.ssl?; end
9
+ def user=(a); api.user = a; end
10
+ def pass=(a); api.pass = a; end
11
+ def host=(a); api.host = a; end
12
+ def port=(a); api.port = a; end
13
+ def ssl=(a); api.ssl = a; end
14
+
15
+ def options
16
+ api.options
17
+ end
18
+
19
+ def initialize(user, pass, options = {})
20
+ @api = Bitcoin::API.new({ :user => user, :pass => pass }.merge(options))
21
+ end
22
+
23
+ # Safely copies wallet.dat to destination, which can be a directory or a path with filename.
24
+ def backupwallet(destination)
25
+ @api.request 'backupwallet', destination
26
+ end
27
+
28
+ # Returns the account associated with the given address.
29
+ def getaccount(bitcoinaddress)
30
+ @api.request 'getaccount', bitcoinaddress
31
+ end
32
+
33
+ # Returns the current bitcoin address for receiving payments to this account.
34
+ def getaccountaddress(account)
35
+ @api.request 'getaccountaddress', account
36
+ end
37
+
38
+ # Returns the list of addresses for the given account.
39
+ def getaddressesbyaccount(account)
40
+ @api.request 'getaddressesbyaccount', account
41
+ end
42
+
43
+ # If +account+ is not specified, returns the server's total available balance.
44
+ # If +account+ is specified, returns the balance in the account.
45
+ def getbalance(account = nil, minconf = 1)
46
+ @api.request 'getbalance', account, minconf
47
+ end
48
+
49
+ # Dumps the block existing at specified height.
50
+ # Note: this is not available in the official release
51
+ def getblockbycount(height)
52
+ @api.request 'getblockbycount', height
53
+ end
54
+
55
+ # Returns the number of blocks in the longest block chain.
56
+ def getblockcount
57
+ @api.request 'getblockcount'
58
+ end
59
+
60
+ # Returns the block number of the latest block in the longest block chain.
61
+ def getblocknumber
62
+ @api.request 'getblocknumber'
63
+ end
64
+
65
+ # Returns the number of connections to other nodes.
66
+ def getconnectioncount
67
+ @api.request 'getconnectioncount'
68
+ end
69
+
70
+ # Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
71
+ def getdifficulty
72
+ @api.request 'getdifficulty'
73
+ end
74
+
75
+ # Returns true or false whether bitcoind is currently generating hashes
76
+ def getgenerate
77
+ @api.request 'getgenerate'
78
+ end
79
+
80
+ # Returns a recent hashes per second performance measurement while generating.
81
+ def gethashespersec
82
+ @api.request 'gethashespersec'
83
+ end
84
+
85
+ # Returns an object containing various state info.
86
+ def getinfo
87
+ @api.request 'getinfo'
88
+ end
89
+
90
+ # Returns a new bitcoin address for receiving payments. If +account+ is specified (recommended),
91
+ # it is added to the address book so payments received with the address will be credited to +account+.
92
+ def getnewaddress(account = nil)
93
+ @api.request 'getnewaddress', account
94
+ end
95
+
96
+ # Returns the total amount received by addresses with +account+ in transactions
97
+ # with at least +minconf+ confirmations.
98
+ def getreceivedbyaccount(account, minconf = 1)
99
+ @api.request 'getreceivedbyaccount', account, minconf
100
+ end
101
+
102
+ # Returns the total amount received by +bitcoinaddress+ in transactions with at least +minconf+ confirmations.
103
+ def getreceivedbyaddress(bitcoinaddress, minconf = 1)
104
+ @api.request 'getreceivedbyaddress', bitcoinaddress, minconf
105
+ end
106
+
107
+ # Get detailed information about +txid+
108
+ def gettransaction(txid)
109
+ @api.request 'gettransaction', txid
110
+ end
111
+
112
+ # If +data+ is not specified, returns formatted hash data to work on:
113
+ #
114
+ # :midstate => precomputed hash state after hashing the first half of the data
115
+ # :data => block data
116
+ # :hash1 => formatted hash buffer for second hash
117
+ # :target => little endian hash target
118
+ #
119
+ # If +data+ is specified, tries to solve the block and returns true if it was successful.
120
+ def getwork(data = nil)
121
+ @api.request 'getwork', data
122
+ end
123
+
124
+ # List commands, or get help for a command.
125
+ def help(command = nil)
126
+ @api.request 'help', command
127
+ end
128
+
129
+ # Returns Object that has account names as keys, account balances as values.
130
+ def listaccounts(minconf = 1)
131
+ @api.request 'listaccounts', minconf
132
+ end
133
+
134
+ # Returns an array of objects containing:
135
+ #
136
+ # :account => the account of the receiving addresses
137
+ # :amount => total amount received by addresses with this account
138
+ # :confirmations => number of confirmations of the most recent transaction included
139
+ #
140
+ def listreceivedbyaccount(minconf = 1, includeempty = false)
141
+ @api.request 'listreceivedbyaccount', minconf, includeempty
142
+ end
143
+
144
+ # Returns an array of objects containing:
145
+ #
146
+ # :address => receiving address
147
+ # :account => the account of the receiving address
148
+ # :amount => total amount received by the address
149
+ # :confirmations => number of confirmations of the most recent transaction included
150
+ #
151
+ # To get a list of accounts on the system, execute bitcoind listreceivedbyaddress 0 true
152
+ def listreceivedbyaddress(minconf = 1, includeempty = false)
153
+ @api.request 'listreceivedbyaddress', minconf, includeempty
154
+ end
155
+
156
+ # Returns up to +count+ most recent transactions for account +account+.
157
+ def listtransactions(account, count = 10)
158
+ @api.request 'listtransactions', account, count
159
+ end
160
+
161
+ # Move from one account in your wallet to another.
162
+ def move(fromaccount, toaccount, amount, minconf = 1, comment = nil)
163
+ @api.request 'move', fromaccount, toaccount, amount, minconf, comment
164
+ end
165
+
166
+ # +amount+ is a real and is rounded to 8 decimal places. Returns the transaction ID if successful.
167
+ def sendfrom(fromaccount, tobitcoinaddress, amount, minconf = 1, comment = nil, comment_to = nil)
168
+ @api.request 'sendfrom', fromaccount, tobitcoinaddress, amount, minconf, comment, comment_to
169
+ end
170
+
171
+ # +amount+ is a real and is rounded to 8 decimal places
172
+ def sendtoaddress(bitcoinaddress, amount, comment = nil, comment_to = nil)
173
+ @api.request 'sendtoaddress', bitcoinaddress, amount, comment, comment_to
174
+ end
175
+
176
+ # Sets the account associated with the given address.
177
+ def setaccount(bitcoinaddress, account)
178
+ @api.request 'setaccoint', bitcoinaddress, account
179
+ end
180
+
181
+ # +generate+ is true or false to turn generation on or off.
182
+ # Generation is limited to +genproclimit+ processors, -1 is unlimited.
183
+ def setgenerate(generate, genproclimit = -1)
184
+ @api.request 'setgenerate', generate, genproclimit
185
+ end
186
+
187
+ # Stop bitcoin server.
188
+ def stop
189
+ @api.request 'stop'
190
+ end
191
+
192
+ # Return information about +bitcoinaddress+.
193
+ def validateaddress(bitcoinaddress)
194
+ @api.request 'validateaddress', bitcoinaddress
195
+ end
196
+
197
+ alias account getaccount
198
+ alias account_address getaccountaddress
199
+ alias addresses_by_account getaddressesbyaccount
200
+ alias balance getbalance
201
+ alias block_by_count getblockbycount
202
+ alias block_count getblockcount
203
+ alias block_number getblocknumber
204
+ alias connection_count getconnectioncount
205
+ alias difficulty getdifficulty
206
+ alias generate? getgenerate
207
+ alias hashes_per_sec gethashespersec
208
+ alias info getinfo
209
+ alias new_address getnewaddress
210
+ alias received_by_account getreceivedbyaccount
211
+ alias received_by_address getreceivedbyaddress
212
+ alias transaction gettransaction
213
+ alias work getwork
214
+ alias get_work getwork
215
+ alias accounts listaccounts
216
+ alias list_received_by_account listreceivedbyaccount
217
+ alias list_received_by_address listreceivedbyaddress
218
+ alias transactions listtransactions
219
+ alias list_transactions listtransactions
220
+ alias send_from sendfrom
221
+ alias send_to_address sendtoaddress
222
+ alias account= setaccount
223
+ alias set_account setaccount
224
+ alias generate= setgenerate
225
+ alias set_generate setgenerate
226
+ alias validate_address validateaddress
227
+ end
@@ -0,0 +1,259 @@
1
+ module Bitcoin::DSL
2
+ def bitcoin
3
+ if self.class.respond_to?(:bitcoin)
4
+ @client ||= Bitcoin::Client.new(self.class.bitcoin.user, self.class.bitcoin.pass, self.class.bitcoin.options)
5
+ else
6
+ @client ||= Bitcoin::Client.new(nil, nil)
7
+ end
8
+ end
9
+
10
+ def username=(value)
11
+ bitcoin.user = value
12
+ end
13
+
14
+ def password=(value)
15
+ bitcoin.pass = value
16
+ end
17
+
18
+ def host=(value)
19
+ bitcoin.host = value
20
+ end
21
+
22
+ def port=(value)
23
+ bitcoin.port = value
24
+ end
25
+
26
+ def ssl=(value)
27
+ bitcoin.ssl = value
28
+ end
29
+
30
+ def username(value = nil)
31
+ value ? bitcoin.user = value : bitcoin.user
32
+ end
33
+
34
+ def password(value = nil)
35
+ value ? bitcoin.pass = value : bitcoin.pass
36
+ end
37
+
38
+ def host(value = nil)
39
+ value ? bitcoin.host = value : bitcoin.host
40
+ end
41
+
42
+ def port(value = nil)
43
+ value ? bitcoin.port = value : bitcoin.port
44
+ end
45
+
46
+ def ssl(value = nil)
47
+ value.nil? ? bitcoin.ssl : bitcoin.ssl = value
48
+ end
49
+
50
+ def ssl?
51
+ bitcoin.ssl?
52
+ end
53
+
54
+
55
+ # Safely copies wallet.dat to destination, which can be a directory or a path with filename.
56
+ def backupwallet(destination)
57
+ bitcoin.backupwallet destination
58
+ end
59
+
60
+ # Returns the account associated with the given address.
61
+ def getaccount(bitcoinaddress)
62
+ bitcoin.getaccount bitcoinaddress
63
+ end
64
+
65
+ # Returns the current bitcoin address for receiving payments to this account.
66
+ def getaccountaddress(account)
67
+ bitcoin.getaccountaddress account
68
+ end
69
+
70
+ # Returns the list of addresses for the given account.
71
+ def getaddressesbyaccount(account)
72
+ bitcoin.getaddressesbyaccount account
73
+ end
74
+
75
+ # If +account+ is not specified, returns the server's total available balance.
76
+ # If +account+ is specified, returns the balance in the account.
77
+ def getbalance(account = nil, minconf = 1)
78
+ bitcoin.getbalance account, minconf
79
+ end
80
+
81
+ # Dumps the block existing at specified height.
82
+ # Note: this is not available in the official release
83
+ def getblockbycount(height)
84
+ bitcoin.getblockbycount height
85
+ end
86
+
87
+ # Returns the number of blocks in the longest block chain.
88
+ def getblockcount
89
+ bitcoin.getblockcount
90
+ end
91
+
92
+ # Returns the block number of the latest block in the longest block chain.
93
+ def getblocknumber
94
+ bitcoin.getblocknumber
95
+ end
96
+
97
+ # Returns the number of connections to other nodes.
98
+ def getconnectioncount
99
+ bitcoin.getconnectioncount
100
+ end
101
+
102
+ # Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
103
+ def getdifficulty
104
+ bitcoin.getdifficulty
105
+ end
106
+
107
+ # Returns true or false whether bitcoind is currently generating hashes
108
+ def getgenerate
109
+ bitcoin.getgenerate
110
+ end
111
+
112
+ # Returns a recent hashes per second performance measurement while generating.
113
+ def gethashespersec
114
+ bitcoin.gethashespersec
115
+ end
116
+
117
+ # Returns an object containing various state info.
118
+ def getinfo
119
+ bitcoin.getinfo
120
+ end
121
+
122
+ # Returns a new bitcoin address for receiving payments. If +account+ is specified (recommended),
123
+ # it is added to the address book so payments received with the address will be credited to +account+.
124
+ def getnewaddress(account = nil)
125
+ bitcoin.getnewaddress account
126
+ end
127
+
128
+ # Returns the total amount received by addresses with +account+ in transactions
129
+ # with at least +minconf+ confirmations.
130
+ def getreceivedbyaccount(account, minconf = 1)
131
+ bitcoin.getreceivedbyaccount account, minconf
132
+ end
133
+
134
+ # Returns the total amount received by +bitcoinaddress+ in transactions with at least +minconf+ confirmations.
135
+ def getreceivedbyaddress(bitcoinaddress, minconf = 1)
136
+ bitcoin.getreceivedbyaddress bitcoinaddress, minconf
137
+ end
138
+
139
+ # Get detailed information about +txid+
140
+ def gettransaction(txid)
141
+ bitcoin.gettransaction txid
142
+ end
143
+
144
+ # If +data+ is not specified, returns formatted hash data to work on:
145
+ #
146
+ # :midstate => precomputed hash state after hashing the first half of the data
147
+ # :data => block data
148
+ # :hash1 => formatted hash buffer for second hash
149
+ # :target => little endian hash target
150
+ #
151
+ # If +data+ is specified, tries to solve the block and returns true if it was successful.
152
+ def getwork(data = nil)
153
+ bitcoin.getwork data
154
+ end
155
+
156
+ # List commands, or get help for a command.
157
+ def help(command = nil)
158
+ bitcoin.help command
159
+ end
160
+
161
+ # Returns Object that has account names as keys, account balances as values.
162
+ def listaccounts(minconf = 1)
163
+ bitcoin.listaccounts minconf
164
+ end
165
+
166
+ # Returns an array of objects containing:
167
+ #
168
+ # :account => the account of the receiving addresses
169
+ # :amount => total amount received by addresses with this account
170
+ # :confirmations => number of confirmations of the most recent transaction included
171
+ #
172
+ def listreceivedbyaccount(minconf = 1, includeempty = false)
173
+ bitcoin.listreceivedbyaccount minconf, includeempty
174
+ end
175
+
176
+ # Returns an array of objects containing:
177
+ #
178
+ # :address => receiving address
179
+ # :account => the account of the receiving address
180
+ # :amount => total amount received by the address
181
+ # :confirmations => number of confirmations of the most recent transaction included
182
+ #
183
+ # To get a list of accounts on the system, execute bitcoind listreceivedbyaddress 0 true
184
+ def listreceivedbyaddress(minconf = 1, includeempty = false)
185
+ bitcoin.listreceivedbyaddress minconf, includeempty
186
+ end
187
+
188
+ # Returns up to +count+ most recent transactions for account +account+.
189
+ def listtransactions(account, count = 10)
190
+ bitcoin.listtransactions account, count
191
+ end
192
+
193
+ # Move from one account in your wallet to another.
194
+ def move(fromaccount, toaccount, amount, minconf = 1, comment = nil)
195
+ bitcoin.move fromaccount, toaccount, amount, minconf, comment
196
+ end
197
+
198
+ # +amount+ is a real and is rounded to 8 decimal places. Returns the transaction ID if successful.
199
+ def sendfrom(fromaccount, tobitcoinaddress, amount, minconf = 1, comment = nil, comment_to = nil)
200
+ bitcoin.sendfrom fromaccount, tobitcoinaddress, amount, minconf, comment, comment_to
201
+ end
202
+
203
+ # +amount+ is a real and is rounded to 8 decimal places
204
+ def sendtoaddress(bitcoinaddress, amount, comment = nil, comment_to = nil)
205
+ bitcoin.sendtoaddress bitcoinaddress, amount, comment, comment_to
206
+ end
207
+
208
+ # Sets the account associated with the given address.
209
+ def setaccount(bitcoinaddress, account)
210
+ bitcoin.setaccount bitcoinaddress, account
211
+ end
212
+
213
+ # +generate+ is true or false to turn generation on or off.
214
+ # Generation is limited to +genproclimit+ processors, -1 is unlimited.
215
+ def setgenerate(generate, genproclimit = -1)
216
+ bitcoin.setgenerate generate, genproclimit
217
+ end
218
+
219
+ # Stop bitcoin server.
220
+ def stop
221
+ bitcoin.stop
222
+ end
223
+
224
+ # Return information about +bitcoinaddress+.
225
+ def validateaddress(bitcoinaddress)
226
+ bitcoin.validateaddress
227
+ end
228
+
229
+ alias account getaccount
230
+ alias account_address getaccountaddress
231
+ alias addresses_by_account getaddressesbyaccount
232
+ alias balance getbalance
233
+ alias block_by_count getblockbycount
234
+ alias block_count getblockcount
235
+ alias block_number getblocknumber
236
+ alias connection_count getconnectioncount
237
+ alias difficulty getdifficulty
238
+ alias generate? getgenerate
239
+ alias hashes_per_sec gethashespersec
240
+ alias info getinfo
241
+ alias new_address getnewaddress
242
+ alias received_by_account getreceivedbyaccount
243
+ alias received_by_address getreceivedbyaddress
244
+ alias transaction gettransaction
245
+ alias work getwork
246
+ alias get_work getwork
247
+ alias accounts listaccounts
248
+ alias list_received_by_account listreceivedbyaccount
249
+ alias list_received_by_address listreceivedbyaddress
250
+ alias transactions listtransactions
251
+ alias list_transactions listtransactions
252
+ alias send_from sendfrom
253
+ alias send_to_address sendtoaddress
254
+ alias account= setaccount
255
+ alias set_account setaccount
256
+ alias generate= setgenerate
257
+ alias set_generate setgenerate
258
+ alias validate_address validateaddress
259
+ end