bit_wallet 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +1 -1
- data/Gemfile +6 -0
- data/README.md +1 -0
- data/bit_wallet.gemspec +1 -1
- data/lib/bit_wallet/account.rb +20 -0
- data/lib/bit_wallet/transaction.rb +9 -8
- data/lib/bit_wallet/version.rb +1 -1
- data/spec/bit_wallet/account_spec.rb +16 -0
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_balance/should_be_able_to_override_the_min_conf.yml +87 -13
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_balance/should_default_to_the_config_min_conf.yml +87 -13
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_balance/should_return_the_balance_of_the_account.yml +93 -19
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_recent_transactions/should_default_to_list_10_transactions.yml +146 -72
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_recent_transactions/when_transaction_limit_is_6/should_list_the_6_most_recent_transactions.yml +119 -45
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_amount/_to_is_a_BitWallet_Address/should_send_it_to_the_address_of_the_given_BitWallet_Address.yml +101 -27
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_amount/account_does_not_have_enough_money/should_fail_with_the_InsufficientFunds_error.yml +96 -22
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_amount/should_send_money_to_the_given_address.yml +98 -24
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_many/should_send_the_amounts_of_money_to_the_specified_accounts.yml +262 -0
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_total_received/should_return_the_total_amount_received_by_the_address.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/addresses/.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/on_initialization/should_be_assigned_that_name.yml +87 -13
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/on_initialization/should_have_a_default_name.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/on_initialization/when_the_account_name_already_exists/should_return_that_same_address.yml +87 -13
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/wallet/.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/_includes_account_name_account_/should_return_true_if_the_array_includes_the_account.yml +121 -10
- data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/_new/should_create_a_new_BitWallet_Account_with_a_default_address.yml +121 -10
- data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/_with_balance/should_return_accounts_with_a_balance_0.yml +480 -36
- data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/wallet/.yml +118 -7
- data/spec/fixtures/vcr_cassettes/BitWallet_Address/_total_received/should_return_the_total_amount_received_by_the_address.yml +8 -8
- data/spec/fixtures/vcr_cassettes/BitWallet_Address/account/.yml +8 -8
- data/spec/fixtures/vcr_cassettes/BitWallet_Address/on_initialization/address_given_already_exists/should_not_create_an_address.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Address/on_initialization/no_address_is_given/should_create_an_address.yml +8 -8
- data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/_new/with_address_string_given/should_return_an_Address_with_the_given_address_string.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/_new/without_any_address_string_given/should_return_an_Address_that_points_to_the_same_account.yml +8 -8
- data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/account/.yml +4 -4
- data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/new/.yml +8 -8
- data/spec/fixtures/vcr_cassettes/BitWallet_Transaction/on_initialization/should_be_able_to_take_a_bitcoind_hash.yml +235 -13
- data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_accounts/should_return_array_of_BitWallet_Accounts.yml +268 -9
- data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_recent_transactions/should_allow_overriding_of_the_transaction_limit.yml +280 -58
- data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_recent_transactions/should_return_the_most_recent_transactions_of_all_accounts_defaulting_to_10_transactions.yml +297 -75
- metadata +8 -8
- data/spec/fixtures/vcr_cassettes/BitWallet_Account/_recent_transactions/when_transaction_limit_is_5/should_list_the_5_most_recent_transactions.yml +0 -447
data/.gitmodules
CHANGED
data/Gemfile
CHANGED
@@ -2,3 +2,9 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in bit_wallet.gemspec
|
4
4
|
gemspec
|
5
|
+
|
6
|
+
# Override what gem is included until dcd70a686162fad41e5bd4bddc0ee67565227ec6
|
7
|
+
# is released in rubygems
|
8
|
+
gem('bitcoin-client',
|
9
|
+
git: 'git@github.com:sinisterchipmunk/bitcoin-client.git',
|
10
|
+
ref: 'dcd70a686162fad41e5bd4bddc0ee67565227ec6')
|
data/README.md
CHANGED
@@ -27,6 +27,7 @@ Or install it yourself as:
|
|
27
27
|
address.address # 8hdsakdjh82d9327ccb64642c - the address hash
|
28
28
|
account.send_amount 5.5, to: '8hdsakdjh82d9327ccb64642c' # sends 5.5 bitcoin to the address
|
29
29
|
account.send_amount 5.5, to: address # sends 5.5 bitcoin to the BitWallet::Address#address
|
30
|
+
account.send_many '8hdsakdjh82d9327ccb64642c' => 2.21, address => 0.332
|
30
31
|
account.total_received # returns the total amount received by the account
|
31
32
|
account.transactions # returns array of 10 BitWallet::Transaction
|
32
33
|
account.transactions(limit: 5) # returns array of 5 BitWallet::Transaction
|
data/bit_wallet.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_dependency 'bitcoin-client'
|
20
|
+
gem.add_dependency 'bitcoin-client'
|
21
21
|
gem.add_dependency 'activesupport', '~> 3.0'
|
22
22
|
gem.add_development_dependency 'rspec', '2.12.0'
|
23
23
|
gem.add_development_dependency 'pry'
|
data/lib/bit_wallet/account.rb
CHANGED
@@ -48,6 +48,26 @@ module BitWallet
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
def send_many(account_values={})
|
52
|
+
addresses_values = {}
|
53
|
+
account_values.each do |key, value|
|
54
|
+
address = key.respond_to?(:address) ? key.address : key
|
55
|
+
addresses_values[address] = value
|
56
|
+
end
|
57
|
+
|
58
|
+
txid = client.send_many(self.name,
|
59
|
+
addresses_values,
|
60
|
+
BitWallet.config.min_conf)
|
61
|
+
txid
|
62
|
+
rescue => e
|
63
|
+
error_message = JSON.parse(e.response).with_indifferent_access
|
64
|
+
if error_message[:error][:code] == -6
|
65
|
+
fail InsufficientFunds, "'#{self.name}' does not have enough funds"
|
66
|
+
else
|
67
|
+
raise e
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
51
71
|
private
|
52
72
|
|
53
73
|
def parse_error(response)
|
@@ -1,14 +1,15 @@
|
|
1
1
|
module BitWallet
|
2
2
|
class Transaction
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
READER_ATTRS = [:account,
|
5
|
+
:amount,
|
6
|
+
:category,
|
7
|
+
:confirmations,
|
8
|
+
:id,
|
9
|
+
:occurred_at,
|
10
|
+
:received_at,
|
11
|
+
:address_str]
|
12
|
+
attr_reader *READER_ATTRS
|
12
13
|
|
13
14
|
def initialize(wallet, args)
|
14
15
|
args = args.with_indifferent_access
|
data/lib/bit_wallet/version.rb
CHANGED
@@ -130,4 +130,20 @@ describe BitWallet::Account, vcr: true do
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
+
describe '#send_many' do
|
134
|
+
it 'should send the amounts of money to the specified accounts' do
|
135
|
+
default_account = wallet.accounts.new('')
|
136
|
+
account_1 = wallet.accounts.new('account_1')
|
137
|
+
account_1_address_str = account_1.addresses.first.address
|
138
|
+
account_2 = wallet.accounts.new('account_2')
|
139
|
+
account_2_address = account_2.addresses.first
|
140
|
+
|
141
|
+
default_account.send_many(account_1_address_str => 0.4,
|
142
|
+
account_2_address => 2.323)
|
143
|
+
|
144
|
+
account_1.balance.should == 0.4
|
145
|
+
account_2.balance.should == 2.323
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
133
149
|
end
|
@@ -4,7 +4,7 @@ http_interactions:
|
|
4
4
|
method: post
|
5
5
|
uri: http://admin1:123@localhost:19001/
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: US-ASCII
|
8
8
|
string: ! '{"method":"listaccounts","params":[1],"id":"jsonrpc"}'
|
9
9
|
headers:
|
10
10
|
Accept:
|
@@ -21,27 +21,27 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Sun, 07 Apr 2013 10:00:51 +0000
|
25
25
|
Connection:
|
26
26
|
- keep-alive
|
27
27
|
Content-Length:
|
28
|
-
- '
|
28
|
+
- '109'
|
29
29
|
Content-Type:
|
30
30
|
- application/json
|
31
31
|
Server:
|
32
32
|
- bitcoin-json-rpc/v0.7.2-beta
|
33
33
|
body:
|
34
34
|
encoding: US-ASCII
|
35
|
-
string: ! '{"result":{"":
|
35
|
+
string: ! '{"result":{"":8502.99850000,"1":0.00000000,"name":0.00000000,"nona":0.00000000},"error":null,"id":"jsonrpc"}
|
36
36
|
|
37
37
|
'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Sun, 07 Apr 2013 10:00:51 GMT
|
40
40
|
- request:
|
41
41
|
method: post
|
42
42
|
uri: http://admin1:123@localhost:19001/
|
43
43
|
body:
|
44
|
-
encoding:
|
44
|
+
encoding: US-ASCII
|
45
45
|
string: ! '{"method":"getnewaddress","params":[""],"id":"jsonrpc"}'
|
46
46
|
headers:
|
47
47
|
Accept:
|
@@ -58,7 +58,44 @@ http_interactions:
|
|
58
58
|
message: OK
|
59
59
|
headers:
|
60
60
|
Date:
|
61
|
-
-
|
61
|
+
- Sun, 07 Apr 2013 10:00:51 +0000
|
62
|
+
Connection:
|
63
|
+
- keep-alive
|
64
|
+
Content-Length:
|
65
|
+
- '76'
|
66
|
+
Content-Type:
|
67
|
+
- application/json
|
68
|
+
Server:
|
69
|
+
- bitcoin-json-rpc/v0.7.2-beta
|
70
|
+
body:
|
71
|
+
encoding: US-ASCII
|
72
|
+
string: ! '{"result":"n23DGsJT8vnsU8B4phPNj2RGdZZGmG8BLq","error":null,"id":"jsonrpc"}
|
73
|
+
|
74
|
+
'
|
75
|
+
http_version:
|
76
|
+
recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: http://admin1:123@localhost:19001/
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: ! '{"method":"getnewaddress","params":["1"],"id":"jsonrpc"}'
|
83
|
+
headers:
|
84
|
+
Accept:
|
85
|
+
- ! '*/*; q=0.5, application/xml'
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip, deflate
|
88
|
+
Content-Length:
|
89
|
+
- '56'
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
response:
|
93
|
+
status:
|
94
|
+
code: 200
|
95
|
+
message: OK
|
96
|
+
headers:
|
97
|
+
Date:
|
98
|
+
- Sun, 07 Apr 2013 10:00:52 +0000
|
62
99
|
Connection:
|
63
100
|
- keep-alive
|
64
101
|
Content-Length:
|
@@ -69,16 +106,53 @@ http_interactions:
|
|
69
106
|
- bitcoin-json-rpc/v0.7.2-beta
|
70
107
|
body:
|
71
108
|
encoding: US-ASCII
|
72
|
-
string: ! '{"result":"
|
109
|
+
string: ! '{"result":"moKwpivcfe6ZLixVdxKhF66EFgp829Hawg","error":null,"id":"jsonrpc"}
|
73
110
|
|
74
111
|
'
|
75
112
|
http_version:
|
76
|
-
recorded_at:
|
113
|
+
recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
|
77
114
|
- request:
|
78
115
|
method: post
|
79
116
|
uri: http://admin1:123@localhost:19001/
|
80
117
|
body:
|
81
|
-
encoding:
|
118
|
+
encoding: US-ASCII
|
119
|
+
string: ! '{"method":"getnewaddress","params":["name"],"id":"jsonrpc"}'
|
120
|
+
headers:
|
121
|
+
Accept:
|
122
|
+
- ! '*/*; q=0.5, application/xml'
|
123
|
+
Accept-Encoding:
|
124
|
+
- gzip, deflate
|
125
|
+
Content-Length:
|
126
|
+
- '59'
|
127
|
+
User-Agent:
|
128
|
+
- Ruby
|
129
|
+
response:
|
130
|
+
status:
|
131
|
+
code: 200
|
132
|
+
message: OK
|
133
|
+
headers:
|
134
|
+
Date:
|
135
|
+
- Sun, 07 Apr 2013 10:00:52 +0000
|
136
|
+
Connection:
|
137
|
+
- keep-alive
|
138
|
+
Content-Length:
|
139
|
+
- '76'
|
140
|
+
Content-Type:
|
141
|
+
- application/json
|
142
|
+
Server:
|
143
|
+
- bitcoin-json-rpc/v0.7.2-beta
|
144
|
+
body:
|
145
|
+
encoding: US-ASCII
|
146
|
+
string: ! '{"result":"mkxFkuJ8ZTumdGhD4tE81ty7GjSXTWJP11","error":null,"id":"jsonrpc"}
|
147
|
+
|
148
|
+
'
|
149
|
+
http_version:
|
150
|
+
recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
|
151
|
+
- request:
|
152
|
+
method: post
|
153
|
+
uri: http://admin1:123@localhost:19001/
|
154
|
+
body:
|
155
|
+
encoding: US-ASCII
|
82
156
|
string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
|
83
157
|
headers:
|
84
158
|
Accept:
|
@@ -95,7 +169,7 @@ http_interactions:
|
|
95
169
|
message: OK
|
96
170
|
headers:
|
97
171
|
Date:
|
98
|
-
-
|
172
|
+
- Sun, 07 Apr 2013 10:00:52 +0000
|
99
173
|
Connection:
|
100
174
|
- keep-alive
|
101
175
|
Content-Length:
|
@@ -106,9 +180,9 @@ http_interactions:
|
|
106
180
|
- bitcoin-json-rpc/v0.7.2-beta
|
107
181
|
body:
|
108
182
|
encoding: US-ASCII
|
109
|
-
string: ! '{"result":"
|
183
|
+
string: ! '{"result":"msGD3CP21pssyDqzQhZvfSNZGnuZBHC5m2","error":null,"id":"jsonrpc"}
|
110
184
|
|
111
185
|
'
|
112
186
|
http_version:
|
113
|
-
recorded_at:
|
187
|
+
recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
|
114
188
|
recorded_with: VCR 2.4.0
|
@@ -4,7 +4,7 @@ http_interactions:
|
|
4
4
|
method: post
|
5
5
|
uri: http://admin1:123@localhost:19001/
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: US-ASCII
|
8
8
|
string: ! '{"method":"listaccounts","params":[1],"id":"jsonrpc"}'
|
9
9
|
headers:
|
10
10
|
Accept:
|
@@ -21,27 +21,27 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Sun, 07 Apr 2013 10:00:46 +0000
|
25
25
|
Connection:
|
26
26
|
- keep-alive
|
27
27
|
Content-Length:
|
28
|
-
- '
|
28
|
+
- '109'
|
29
29
|
Content-Type:
|
30
30
|
- application/json
|
31
31
|
Server:
|
32
32
|
- bitcoin-json-rpc/v0.7.2-beta
|
33
33
|
body:
|
34
34
|
encoding: US-ASCII
|
35
|
-
string: ! '{"result":{"":
|
35
|
+
string: ! '{"result":{"":8502.99850000,"1":0.00000000,"name":0.00000000,"nona":0.00000000},"error":null,"id":"jsonrpc"}
|
36
36
|
|
37
37
|
'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
|
40
40
|
- request:
|
41
41
|
method: post
|
42
42
|
uri: http://admin1:123@localhost:19001/
|
43
43
|
body:
|
44
|
-
encoding:
|
44
|
+
encoding: US-ASCII
|
45
45
|
string: ! '{"method":"getnewaddress","params":[""],"id":"jsonrpc"}'
|
46
46
|
headers:
|
47
47
|
Accept:
|
@@ -58,7 +58,44 @@ http_interactions:
|
|
58
58
|
message: OK
|
59
59
|
headers:
|
60
60
|
Date:
|
61
|
-
-
|
61
|
+
- Sun, 07 Apr 2013 10:00:46 +0000
|
62
|
+
Connection:
|
63
|
+
- keep-alive
|
64
|
+
Content-Length:
|
65
|
+
- '76'
|
66
|
+
Content-Type:
|
67
|
+
- application/json
|
68
|
+
Server:
|
69
|
+
- bitcoin-json-rpc/v0.7.2-beta
|
70
|
+
body:
|
71
|
+
encoding: US-ASCII
|
72
|
+
string: ! '{"result":"mzExDTWuKRwMBchjMDhc6G8DtGWw9u1Xn3","error":null,"id":"jsonrpc"}
|
73
|
+
|
74
|
+
'
|
75
|
+
http_version:
|
76
|
+
recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: http://admin1:123@localhost:19001/
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: ! '{"method":"getnewaddress","params":["1"],"id":"jsonrpc"}'
|
83
|
+
headers:
|
84
|
+
Accept:
|
85
|
+
- ! '*/*; q=0.5, application/xml'
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip, deflate
|
88
|
+
Content-Length:
|
89
|
+
- '56'
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
response:
|
93
|
+
status:
|
94
|
+
code: 200
|
95
|
+
message: OK
|
96
|
+
headers:
|
97
|
+
Date:
|
98
|
+
- Sun, 07 Apr 2013 10:00:46 +0000
|
62
99
|
Connection:
|
63
100
|
- keep-alive
|
64
101
|
Content-Length:
|
@@ -69,16 +106,53 @@ http_interactions:
|
|
69
106
|
- bitcoin-json-rpc/v0.7.2-beta
|
70
107
|
body:
|
71
108
|
encoding: US-ASCII
|
72
|
-
string: ! '{"result":"
|
109
|
+
string: ! '{"result":"mx1o3s4pwQEZGo7Tn4gnK6Yc7ssEWE7Ts6","error":null,"id":"jsonrpc"}
|
73
110
|
|
74
111
|
'
|
75
112
|
http_version:
|
76
|
-
recorded_at:
|
113
|
+
recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
|
77
114
|
- request:
|
78
115
|
method: post
|
79
116
|
uri: http://admin1:123@localhost:19001/
|
80
117
|
body:
|
81
|
-
encoding:
|
118
|
+
encoding: US-ASCII
|
119
|
+
string: ! '{"method":"getnewaddress","params":["name"],"id":"jsonrpc"}'
|
120
|
+
headers:
|
121
|
+
Accept:
|
122
|
+
- ! '*/*; q=0.5, application/xml'
|
123
|
+
Accept-Encoding:
|
124
|
+
- gzip, deflate
|
125
|
+
Content-Length:
|
126
|
+
- '59'
|
127
|
+
User-Agent:
|
128
|
+
- Ruby
|
129
|
+
response:
|
130
|
+
status:
|
131
|
+
code: 200
|
132
|
+
message: OK
|
133
|
+
headers:
|
134
|
+
Date:
|
135
|
+
- Sun, 07 Apr 2013 10:00:46 +0000
|
136
|
+
Connection:
|
137
|
+
- keep-alive
|
138
|
+
Content-Length:
|
139
|
+
- '76'
|
140
|
+
Content-Type:
|
141
|
+
- application/json
|
142
|
+
Server:
|
143
|
+
- bitcoin-json-rpc/v0.7.2-beta
|
144
|
+
body:
|
145
|
+
encoding: US-ASCII
|
146
|
+
string: ! '{"result":"n35X4Gno3GUzhSdoWaLtbGFCMKJ4pxrzZW","error":null,"id":"jsonrpc"}
|
147
|
+
|
148
|
+
'
|
149
|
+
http_version:
|
150
|
+
recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
|
151
|
+
- request:
|
152
|
+
method: post
|
153
|
+
uri: http://admin1:123@localhost:19001/
|
154
|
+
body:
|
155
|
+
encoding: US-ASCII
|
82
156
|
string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
|
83
157
|
headers:
|
84
158
|
Accept:
|
@@ -95,7 +169,7 @@ http_interactions:
|
|
95
169
|
message: OK
|
96
170
|
headers:
|
97
171
|
Date:
|
98
|
-
-
|
172
|
+
- Sun, 07 Apr 2013 10:00:46 +0000
|
99
173
|
Connection:
|
100
174
|
- keep-alive
|
101
175
|
Content-Length:
|
@@ -106,9 +180,9 @@ http_interactions:
|
|
106
180
|
- bitcoin-json-rpc/v0.7.2-beta
|
107
181
|
body:
|
108
182
|
encoding: US-ASCII
|
109
|
-
string: ! '{"result":"
|
183
|
+
string: ! '{"result":"mtWxCLZY62c8twij3DKX5cCy1ye5znvEv6","error":null,"id":"jsonrpc"}
|
110
184
|
|
111
185
|
'
|
112
186
|
http_version:
|
113
|
-
recorded_at:
|
187
|
+
recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
|
114
188
|
recorded_with: VCR 2.4.0
|
@@ -4,7 +4,7 @@ http_interactions:
|
|
4
4
|
method: post
|
5
5
|
uri: http://admin1:123@localhost:19001/
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: US-ASCII
|
8
8
|
string: ! '{"method":"listaccounts","params":[1],"id":"jsonrpc"}'
|
9
9
|
headers:
|
10
10
|
Accept:
|
@@ -21,27 +21,27 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
25
25
|
Connection:
|
26
26
|
- keep-alive
|
27
27
|
Content-Length:
|
28
|
-
- '
|
28
|
+
- '109'
|
29
29
|
Content-Type:
|
30
30
|
- application/json
|
31
31
|
Server:
|
32
32
|
- bitcoin-json-rpc/v0.7.2-beta
|
33
33
|
body:
|
34
34
|
encoding: US-ASCII
|
35
|
-
string: ! '{"result":{"":
|
35
|
+
string: ! '{"result":{"":8502.99850000,"1":0.00000000,"name":0.00000000,"nona":0.00000000},"error":null,"id":"jsonrpc"}
|
36
36
|
|
37
37
|
'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
40
40
|
- request:
|
41
41
|
method: post
|
42
42
|
uri: http://admin1:123@localhost:19001/
|
43
43
|
body:
|
44
|
-
encoding:
|
44
|
+
encoding: US-ASCII
|
45
45
|
string: ! '{"method":"getnewaddress","params":[""],"id":"jsonrpc"}'
|
46
46
|
headers:
|
47
47
|
Accept:
|
@@ -58,7 +58,44 @@ http_interactions:
|
|
58
58
|
message: OK
|
59
59
|
headers:
|
60
60
|
Date:
|
61
|
-
-
|
61
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
62
|
+
Connection:
|
63
|
+
- keep-alive
|
64
|
+
Content-Length:
|
65
|
+
- '76'
|
66
|
+
Content-Type:
|
67
|
+
- application/json
|
68
|
+
Server:
|
69
|
+
- bitcoin-json-rpc/v0.7.2-beta
|
70
|
+
body:
|
71
|
+
encoding: US-ASCII
|
72
|
+
string: ! '{"result":"mgNQxibg2tv1wzPXwDqKAjHe7zKYa8ewJ3","error":null,"id":"jsonrpc"}
|
73
|
+
|
74
|
+
'
|
75
|
+
http_version:
|
76
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: http://admin1:123@localhost:19001/
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: ! '{"method":"getnewaddress","params":["1"],"id":"jsonrpc"}'
|
83
|
+
headers:
|
84
|
+
Accept:
|
85
|
+
- ! '*/*; q=0.5, application/xml'
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip, deflate
|
88
|
+
Content-Length:
|
89
|
+
- '56'
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
response:
|
93
|
+
status:
|
94
|
+
code: 200
|
95
|
+
message: OK
|
96
|
+
headers:
|
97
|
+
Date:
|
98
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
62
99
|
Connection:
|
63
100
|
- keep-alive
|
64
101
|
Content-Length:
|
@@ -69,16 +106,53 @@ http_interactions:
|
|
69
106
|
- bitcoin-json-rpc/v0.7.2-beta
|
70
107
|
body:
|
71
108
|
encoding: US-ASCII
|
72
|
-
string: ! '{"result":"
|
109
|
+
string: ! '{"result":"mn47vCDmgjiwmozz8LL1pYxBAptSfoax9R","error":null,"id":"jsonrpc"}
|
73
110
|
|
74
111
|
'
|
75
112
|
http_version:
|
76
|
-
recorded_at:
|
113
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
77
114
|
- request:
|
78
115
|
method: post
|
79
116
|
uri: http://admin1:123@localhost:19001/
|
80
117
|
body:
|
81
|
-
encoding:
|
118
|
+
encoding: US-ASCII
|
119
|
+
string: ! '{"method":"getnewaddress","params":["name"],"id":"jsonrpc"}'
|
120
|
+
headers:
|
121
|
+
Accept:
|
122
|
+
- ! '*/*; q=0.5, application/xml'
|
123
|
+
Accept-Encoding:
|
124
|
+
- gzip, deflate
|
125
|
+
Content-Length:
|
126
|
+
- '59'
|
127
|
+
User-Agent:
|
128
|
+
- Ruby
|
129
|
+
response:
|
130
|
+
status:
|
131
|
+
code: 200
|
132
|
+
message: OK
|
133
|
+
headers:
|
134
|
+
Date:
|
135
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
136
|
+
Connection:
|
137
|
+
- keep-alive
|
138
|
+
Content-Length:
|
139
|
+
- '76'
|
140
|
+
Content-Type:
|
141
|
+
- application/json
|
142
|
+
Server:
|
143
|
+
- bitcoin-json-rpc/v0.7.2-beta
|
144
|
+
body:
|
145
|
+
encoding: US-ASCII
|
146
|
+
string: ! '{"result":"mu71WJfrTwMhtVrdxF7XyXvaMu6GajM2dE","error":null,"id":"jsonrpc"}
|
147
|
+
|
148
|
+
'
|
149
|
+
http_version:
|
150
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
151
|
+
- request:
|
152
|
+
method: post
|
153
|
+
uri: http://admin1:123@localhost:19001/
|
154
|
+
body:
|
155
|
+
encoding: US-ASCII
|
82
156
|
string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
|
83
157
|
headers:
|
84
158
|
Accept:
|
@@ -95,7 +169,7 @@ http_interactions:
|
|
95
169
|
message: OK
|
96
170
|
headers:
|
97
171
|
Date:
|
98
|
-
-
|
172
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
99
173
|
Connection:
|
100
174
|
- keep-alive
|
101
175
|
Content-Length:
|
@@ -106,16 +180,16 @@ http_interactions:
|
|
106
180
|
- bitcoin-json-rpc/v0.7.2-beta
|
107
181
|
body:
|
108
182
|
encoding: US-ASCII
|
109
|
-
string: ! '{"result":"
|
183
|
+
string: ! '{"result":"mtaZYCccVT9QUGBPR59qewtTg9r4DaXV9U","error":null,"id":"jsonrpc"}
|
110
184
|
|
111
185
|
'
|
112
186
|
http_version:
|
113
|
-
recorded_at:
|
187
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
114
188
|
- request:
|
115
189
|
method: post
|
116
190
|
uri: http://admin1:123@localhost:19001/
|
117
191
|
body:
|
118
|
-
encoding:
|
192
|
+
encoding: US-ASCII
|
119
193
|
string: ! '{"method":"getbalance","params":["nona",0],"id":"jsonrpc"}'
|
120
194
|
headers:
|
121
195
|
Accept:
|
@@ -132,7 +206,7 @@ http_interactions:
|
|
132
206
|
message: OK
|
133
207
|
headers:
|
134
208
|
Date:
|
135
|
-
-
|
209
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
136
210
|
Connection:
|
137
211
|
- keep-alive
|
138
212
|
Content-Length:
|
@@ -147,12 +221,12 @@ http_interactions:
|
|
147
221
|
|
148
222
|
'
|
149
223
|
http_version:
|
150
|
-
recorded_at:
|
224
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
151
225
|
- request:
|
152
226
|
method: post
|
153
227
|
uri: http://admin1:123@localhost:19001/
|
154
228
|
body:
|
155
|
-
encoding:
|
229
|
+
encoding: US-ASCII
|
156
230
|
string: ! '{"method":"getbalance","params":["nona",0],"id":"jsonrpc"}'
|
157
231
|
headers:
|
158
232
|
Accept:
|
@@ -169,7 +243,7 @@ http_interactions:
|
|
169
243
|
message: OK
|
170
244
|
headers:
|
171
245
|
Date:
|
172
|
-
-
|
246
|
+
- Sun, 07 Apr 2013 10:00:39 +0000
|
173
247
|
Connection:
|
174
248
|
- keep-alive
|
175
249
|
Content-Length:
|
@@ -184,5 +258,5 @@ http_interactions:
|
|
184
258
|
|
185
259
|
'
|
186
260
|
http_version:
|
187
|
-
recorded_at:
|
261
|
+
recorded_at: Sun, 07 Apr 2013 10:00:39 GMT
|
188
262
|
recorded_with: VCR 2.4.0
|