blockcypher-ruby 0.2.0 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +31 -2
  3. data/lib/blockcypher/api.rb +112 -51
  4. data/lib/blockcypher-ruby.rb +1 -0
  5. data/spec/blockcypher/api_spec.rb +110 -43
  6. data/spec/config.yml +2 -0
  7. data/spec/config.yml.sample +2 -0
  8. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Asset_Transfer/should_transfer_asset.yml +1349 -0
  9. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Generate_Asset_Address/should_include_private_public_oap_address_original_address_hashes.yml +51 -0
  10. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Issue_Asset/should_issue_asset.yml +156 -0
  11. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_address_final_balance/should_get_the_balance_of_an_address.yml +102 -0
  12. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_address_generate/should_generate_new_addresses.yml +97 -0
  13. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_a_callback.yml +100 -0
  14. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_a_callback_and_confirmation_notifications_enabled.yml +101 -0
  15. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_options.yml +102 -0
  16. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/creates_a_payment_forward.yml +99 -0
  17. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/is_possible_to_use_the_alias_create_payments_forwarding.yml +99 -0
  18. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_delete_forwarding_address/deletes_all_previously_created_forwarding_addresses.yml +269 -0
  19. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_faucet/should_fund_a_bcy_test_address_with_the_faucet.yml +96 -0
  20. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_list_forwarding_addresses/lists_all_forwading_addresses_created_for_a_given_token.yml +119 -0
  21. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_transaction_new/should_call_the_txs/new_api.yml +187 -0
  22. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_transaction_sign_and_send/should_call_txs/send_api.yml +187 -0
  23. data/spec/spec_helper.rb +15 -0
  24. data/spec/support/vcr.rb +10 -0
  25. metadata +80 -5
@@ -0,0 +1,99 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.blockcypher.com/v1/bcy/test/addrs?token=<api_token>
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ Server:
22
+ - nginx/1.9.12
23
+ Date:
24
+ - Tue, 25 Oct 2016 06:35:47 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '281'
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Headers:
32
+ - Origin, X-Requested-With, Content-Type, Accept
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, PUT, DELETE
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ X-Ratelimit-Remaining:
38
+ - '195'
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ {
43
+ "private": "8b9e2e67691f746a67cbc5bc88af354825a3ec930f5e3109a1e3641e0c68225b",
44
+ "public": "03dc4b03f1be17602841febb2a5d22790273296ca46d596c71ff78253ac4fe132a",
45
+ "address": "C5YjzvfcXhCRfzPCNtHHJ2KKJ3bt9NgA1j",
46
+ "wif": "Bt1RsqAfSoZYHSt9NZnJf8vL5a6nPztkDxT2pYx8N9DMuCsvtr8R"
47
+ }
48
+ http_version:
49
+ recorded_at: Tue, 25 Oct 2016 06:35:48 GMT
50
+ - request:
51
+ method: post
52
+ uri: https://api.blockcypher.com/v1/bcy/test/payments?token=<api_token>
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"destination":"C5YjzvfcXhCRfzPCNtHHJ2KKJ3bt9NgA1j","callback_url":null,"enable_confirmations":false}'
56
+ headers:
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ Accept:
60
+ - "*/*"
61
+ User-Agent:
62
+ - Ruby
63
+ Content-Type:
64
+ - application/json
65
+ response:
66
+ status:
67
+ code: 201
68
+ message: Created
69
+ headers:
70
+ Server:
71
+ - nginx/1.9.12
72
+ Date:
73
+ - Tue, 25 Oct 2016 06:35:48 GMT
74
+ Content-Type:
75
+ - application/json
76
+ Content-Length:
77
+ - '209'
78
+ Connection:
79
+ - keep-alive
80
+ Access-Control-Allow-Headers:
81
+ - Origin, X-Requested-With, Content-Type, Accept
82
+ Access-Control-Allow-Methods:
83
+ - GET, POST, PUT, DELETE
84
+ Access-Control-Allow-Origin:
85
+ - "*"
86
+ X-Ratelimit-Remaining:
87
+ - '194'
88
+ body:
89
+ encoding: UTF-8
90
+ string: |-
91
+ {
92
+ "id": "28947218-5742-42a3-afc8-085028220361",
93
+ "token": "<api_token>",
94
+ "destination": "C5YjzvfcXhCRfzPCNtHHJ2KKJ3bt9NgA1j",
95
+ "input_address": "CC9fcp6E8kDGjn3HcvHNbKaroq88yecqhE"
96
+ }
97
+ http_version:
98
+ recorded_at: Tue, 25 Oct 2016 06:35:49 GMT
99
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,99 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.blockcypher.com/v1/bcy/test/addrs?token=<api_token>
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ Server:
22
+ - nginx/1.9.12
23
+ Date:
24
+ - Tue, 25 Oct 2016 06:35:55 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '281'
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Headers:
32
+ - Origin, X-Requested-With, Content-Type, Accept
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, PUT, DELETE
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ X-Ratelimit-Remaining:
38
+ - '192'
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ {
43
+ "private": "c010b688ab9d8a1029a3a5a5b352d5953dc88cf57d694d1080ef23686a6be22e",
44
+ "public": "03bef1e8e3c27f69cfb0f688a20f0f19c620233f4a7677f4882df22d4afafb8b08",
45
+ "address": "Bsw87oXJeVuwz8VVbR9zQm1i9i39fmy8Pr",
46
+ "wif": "BumP2ZhwCbPvPak1uwv7HpSUVXr74hae3V9zFqpUkSJLDuJEBXdC"
47
+ }
48
+ http_version:
49
+ recorded_at: Tue, 25 Oct 2016 06:35:55 GMT
50
+ - request:
51
+ method: post
52
+ uri: https://api.blockcypher.com/v1/bcy/test/payments?token=<api_token>
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"destination":"Bsw87oXJeVuwz8VVbR9zQm1i9i39fmy8Pr","callback_url":null,"enable_confirmations":false}'
56
+ headers:
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ Accept:
60
+ - "*/*"
61
+ User-Agent:
62
+ - Ruby
63
+ Content-Type:
64
+ - application/json
65
+ response:
66
+ status:
67
+ code: 201
68
+ message: Created
69
+ headers:
70
+ Server:
71
+ - nginx/1.9.12
72
+ Date:
73
+ - Tue, 25 Oct 2016 06:35:57 GMT
74
+ Content-Type:
75
+ - application/json
76
+ Content-Length:
77
+ - '209'
78
+ Connection:
79
+ - keep-alive
80
+ Access-Control-Allow-Headers:
81
+ - Origin, X-Requested-With, Content-Type, Accept
82
+ Access-Control-Allow-Methods:
83
+ - GET, POST, PUT, DELETE
84
+ Access-Control-Allow-Origin:
85
+ - "*"
86
+ X-Ratelimit-Remaining:
87
+ - '191'
88
+ body:
89
+ encoding: UTF-8
90
+ string: |-
91
+ {
92
+ "id": "8e0103af-33c6-4262-9dfa-b29b3e2f6a2f",
93
+ "token": "<api_token>",
94
+ "destination": "Bsw87oXJeVuwz8VVbR9zQm1i9i39fmy8Pr",
95
+ "input_address": "C1nXb9WcayTNHaX5rAPjhxTrsfwGgAym7c"
96
+ }
97
+ http_version:
98
+ recorded_at: Tue, 25 Oct 2016 06:35:57 GMT
99
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,269 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.blockcypher.com/v1/bcy/test/payments?token=<api_token>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx/1.9.12
23
+ Date:
24
+ - Tue, 25 Oct 2016 06:36:01 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Headers:
32
+ - Origin, X-Requested-With, Content-Type, Accept
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, PUT, DELETE
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ X-Ratelimit-Remaining:
38
+ - '189'
39
+ body:
40
+ encoding: ASCII-8BIT
41
+ string: |-
42
+ [
43
+ {
44
+ "id": "28947218-5742-42a3-afc8-085028220361",
45
+ "token": "<api_token>",
46
+ "destination": "C5YjzvfcXhCRfzPCNtHHJ2KKJ3bt9NgA1j",
47
+ "input_address": "CC9fcp6E8kDGjn3HcvHNbKaroq88yecqhE"
48
+ },
49
+ {
50
+ "id": "8e0103af-33c6-4262-9dfa-b29b3e2f6a2f",
51
+ "token": "<api_token>",
52
+ "destination": "Bsw87oXJeVuwz8VVbR9zQm1i9i39fmy8Pr",
53
+ "input_address": "C1nXb9WcayTNHaX5rAPjhxTrsfwGgAym7c"
54
+ },
55
+ {
56
+ "id": "94f44d55-8155-458d-b3b9-142084c1ad5e",
57
+ "token": "<api_token>",
58
+ "destination": "Bz1kdFmvRP3sxw3YTG1iz6Q1xvFSV3taLd",
59
+ "input_address": "CD3jhqqaS8QvaNG7aVzPUGuWbFhdHknRkR",
60
+ "callback_url": "http://test.com/foo"
61
+ },
62
+ {
63
+ "id": "97b0be31-75bf-457f-a3e8-4752250c00b9",
64
+ "token": "<api_token>",
65
+ "destination": "BsR3qRSngCXnyvQ2t4gE6TMPWWjPjFPmTt",
66
+ "input_address": "CAevgagGLaA5Qmgb7tQguZPyf2fSwVRAea",
67
+ "callback_url": "http://test.com/foo"
68
+ }
69
+ ]
70
+ http_version:
71
+ recorded_at: Tue, 25 Oct 2016 06:36:01 GMT
72
+ - request:
73
+ method: delete
74
+ uri: https://api.blockcypher.com/v1/bcy/test/payments/28947218-5742-42a3-afc8-085028220361?token=<api_token>
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept-Encoding:
80
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
81
+ Accept:
82
+ - "*/*"
83
+ User-Agent:
84
+ - Ruby
85
+ response:
86
+ status:
87
+ code: 204
88
+ message: No Content
89
+ headers:
90
+ Server:
91
+ - nginx/1.9.12
92
+ Date:
93
+ - Tue, 25 Oct 2016 06:36:02 GMT
94
+ Content-Type:
95
+ - application/json
96
+ Connection:
97
+ - keep-alive
98
+ Access-Control-Allow-Headers:
99
+ - Origin, X-Requested-With, Content-Type, Accept
100
+ Access-Control-Allow-Methods:
101
+ - GET, POST, PUT, DELETE
102
+ Access-Control-Allow-Origin:
103
+ - "*"
104
+ X-Ratelimit-Remaining:
105
+ - '175'
106
+ body:
107
+ encoding: UTF-8
108
+ string: ''
109
+ http_version:
110
+ recorded_at: Tue, 25 Oct 2016 06:36:02 GMT
111
+ - request:
112
+ method: delete
113
+ uri: https://api.blockcypher.com/v1/bcy/test/payments/8e0103af-33c6-4262-9dfa-b29b3e2f6a2f?token=<api_token>
114
+ body:
115
+ encoding: US-ASCII
116
+ string: ''
117
+ headers:
118
+ Accept-Encoding:
119
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
120
+ Accept:
121
+ - "*/*"
122
+ User-Agent:
123
+ - Ruby
124
+ response:
125
+ status:
126
+ code: 204
127
+ message: No Content
128
+ headers:
129
+ Server:
130
+ - nginx/1.9.12
131
+ Date:
132
+ - Tue, 25 Oct 2016 06:36:03 GMT
133
+ Content-Type:
134
+ - application/json
135
+ Connection:
136
+ - keep-alive
137
+ Access-Control-Allow-Headers:
138
+ - Origin, X-Requested-With, Content-Type, Accept
139
+ Access-Control-Allow-Methods:
140
+ - GET, POST, PUT, DELETE
141
+ Access-Control-Allow-Origin:
142
+ - "*"
143
+ X-Ratelimit-Remaining:
144
+ - '178'
145
+ body:
146
+ encoding: UTF-8
147
+ string: ''
148
+ http_version:
149
+ recorded_at: Tue, 25 Oct 2016 06:36:03 GMT
150
+ - request:
151
+ method: delete
152
+ uri: https://api.blockcypher.com/v1/bcy/test/payments/94f44d55-8155-458d-b3b9-142084c1ad5e?token=<api_token>
153
+ body:
154
+ encoding: US-ASCII
155
+ string: ''
156
+ headers:
157
+ Accept-Encoding:
158
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
159
+ Accept:
160
+ - "*/*"
161
+ User-Agent:
162
+ - Ruby
163
+ response:
164
+ status:
165
+ code: 204
166
+ message: No Content
167
+ headers:
168
+ Server:
169
+ - nginx/1.9.12
170
+ Date:
171
+ - Tue, 25 Oct 2016 06:36:04 GMT
172
+ Content-Type:
173
+ - application/json
174
+ Connection:
175
+ - keep-alive
176
+ Access-Control-Allow-Headers:
177
+ - Origin, X-Requested-With, Content-Type, Accept
178
+ Access-Control-Allow-Methods:
179
+ - GET, POST, PUT, DELETE
180
+ Access-Control-Allow-Origin:
181
+ - "*"
182
+ X-Ratelimit-Remaining:
183
+ - '188'
184
+ body:
185
+ encoding: UTF-8
186
+ string: ''
187
+ http_version:
188
+ recorded_at: Tue, 25 Oct 2016 06:36:04 GMT
189
+ - request:
190
+ method: delete
191
+ uri: https://api.blockcypher.com/v1/bcy/test/payments/97b0be31-75bf-457f-a3e8-4752250c00b9?token=<api_token>
192
+ body:
193
+ encoding: US-ASCII
194
+ string: ''
195
+ headers:
196
+ Accept-Encoding:
197
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
198
+ Accept:
199
+ - "*/*"
200
+ User-Agent:
201
+ - Ruby
202
+ response:
203
+ status:
204
+ code: 204
205
+ message: No Content
206
+ headers:
207
+ Server:
208
+ - nginx/1.11.2
209
+ Date:
210
+ - Tue, 25 Oct 2016 06:36:05 GMT
211
+ Content-Type:
212
+ - application/json
213
+ Connection:
214
+ - keep-alive
215
+ Access-Control-Allow-Headers:
216
+ - Origin, X-Requested-With, Content-Type, Accept
217
+ Access-Control-Allow-Methods:
218
+ - GET, POST, PUT, DELETE
219
+ Access-Control-Allow-Origin:
220
+ - "*"
221
+ X-Ratelimit-Remaining:
222
+ - '184'
223
+ body:
224
+ encoding: UTF-8
225
+ string: ''
226
+ http_version:
227
+ recorded_at: Tue, 25 Oct 2016 06:36:06 GMT
228
+ - request:
229
+ method: get
230
+ uri: https://api.blockcypher.com/v1/bcy/test/payments?token=<api_token>
231
+ body:
232
+ encoding: US-ASCII
233
+ string: ''
234
+ headers:
235
+ Accept-Encoding:
236
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
237
+ Accept:
238
+ - "*/*"
239
+ User-Agent:
240
+ - Ruby
241
+ response:
242
+ status:
243
+ code: 200
244
+ message: OK
245
+ headers:
246
+ Server:
247
+ - nginx/1.11.2
248
+ Date:
249
+ - Tue, 25 Oct 2016 06:36:07 GMT
250
+ Content-Type:
251
+ - application/json
252
+ Content-Length:
253
+ - '2'
254
+ Connection:
255
+ - keep-alive
256
+ Access-Control-Allow-Headers:
257
+ - Origin, X-Requested-With, Content-Type, Accept
258
+ Access-Control-Allow-Methods:
259
+ - GET, POST, PUT, DELETE
260
+ Access-Control-Allow-Origin:
261
+ - "*"
262
+ X-Ratelimit-Remaining:
263
+ - '183'
264
+ body:
265
+ encoding: UTF-8
266
+ string: "[]"
267
+ http_version:
268
+ recorded_at: Tue, 25 Oct 2016 06:36:07 GMT
269
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,96 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.blockcypher.com/v1/bcy/test/addrs?token=<api_token>
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ Server:
22
+ - nginx/1.9.12
23
+ Date:
24
+ - Tue, 25 Oct 2016 06:35:33 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '281'
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Headers:
32
+ - Origin, X-Requested-With, Content-Type, Accept
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, PUT, DELETE
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ X-Ratelimit-Remaining:
38
+ - '196'
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ {
43
+ "private": "b6725f5acfc23fcbe9c20bfe5823d697bbfbfa885149b7d6847f789b8ec36b43",
44
+ "public": "031ecaaedf71f50d2ce9206c518852847cc2a969b18d9dd97f3705a283c05f5a0c",
45
+ "address": "C2SJopG4bZm2kXtYFFoGVfXLrtXvnvdqQk",
46
+ "wif": "BuSgbP1hnPNFoB2ErWURBbu37gDtmsxBao9vb52xHFSw18qTGN4n"
47
+ }
48
+ http_version:
49
+ recorded_at: Tue, 25 Oct 2016 06:35:33 GMT
50
+ - request:
51
+ method: post
52
+ uri: https://api.blockcypher.com/v1/bcy/test/faucet?token=<api_token>
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"address":"C2SJopG4bZm2kXtYFFoGVfXLrtXvnvdqQk","amount":100000}'
56
+ headers:
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ Accept:
60
+ - "*/*"
61
+ User-Agent:
62
+ - Ruby
63
+ Content-Type:
64
+ - application/json
65
+ response:
66
+ status:
67
+ code: 200
68
+ message: OK
69
+ headers:
70
+ Server:
71
+ - nginx/1.9.12
72
+ Date:
73
+ - Tue, 25 Oct 2016 06:35:35 GMT
74
+ Content-Type:
75
+ - application/json
76
+ Content-Length:
77
+ - '82'
78
+ Connection:
79
+ - keep-alive
80
+ Access-Control-Allow-Headers:
81
+ - Origin, X-Requested-With, Content-Type, Accept
82
+ Access-Control-Allow-Methods:
83
+ - GET, POST, PUT, DELETE
84
+ Access-Control-Allow-Origin:
85
+ - "*"
86
+ X-Ratelimit-Remaining:
87
+ - '185'
88
+ body:
89
+ encoding: UTF-8
90
+ string: |-
91
+ {
92
+ "tx_ref": "16ae510fd385405f697954fc0a4f6964304176036857ea7fe6e1f297d3a7c286"
93
+ }
94
+ http_version:
95
+ recorded_at: Tue, 25 Oct 2016 06:35:35 GMT
96
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.blockcypher.com/v1/bcy/test/payments?token=<api_token>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx/1.9.12
23
+ Date:
24
+ - Tue, 25 Oct 2016 06:35:58 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Headers:
32
+ - Origin, X-Requested-With, Content-Type, Accept
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, PUT, DELETE
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ X-Ratelimit-Remaining:
38
+ - '179'
39
+ body:
40
+ encoding: ASCII-8BIT
41
+ string: |-
42
+ [
43
+ {
44
+ "id": "28947218-5742-42a3-afc8-085028220361",
45
+ "token": "<api_token>",
46
+ "destination": "C5YjzvfcXhCRfzPCNtHHJ2KKJ3bt9NgA1j",
47
+ "input_address": "CC9fcp6E8kDGjn3HcvHNbKaroq88yecqhE"
48
+ },
49
+ {
50
+ "id": "8e0103af-33c6-4262-9dfa-b29b3e2f6a2f",
51
+ "token": "<api_token>",
52
+ "destination": "Bsw87oXJeVuwz8VVbR9zQm1i9i39fmy8Pr",
53
+ "input_address": "C1nXb9WcayTNHaX5rAPjhxTrsfwGgAym7c"
54
+ },
55
+ {
56
+ "id": "94f44d55-8155-458d-b3b9-142084c1ad5e",
57
+ "token": "<api_token>",
58
+ "destination": "Bz1kdFmvRP3sxw3YTG1iz6Q1xvFSV3taLd",
59
+ "input_address": "CD3jhqqaS8QvaNG7aVzPUGuWbFhdHknRkR",
60
+ "callback_url": "http://test.com/foo"
61
+ },
62
+ {
63
+ "id": "97b0be31-75bf-457f-a3e8-4752250c00b9",
64
+ "token": "<api_token>",
65
+ "destination": "BsR3qRSngCXnyvQ2t4gE6TMPWWjPjFPmTt",
66
+ "input_address": "CAevgagGLaA5Qmgb7tQguZPyf2fSwVRAea",
67
+ "callback_url": "http://test.com/foo"
68
+ }
69
+ ]
70
+ http_version:
71
+ recorded_at: Tue, 25 Oct 2016 06:35:59 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://api.blockcypher.com/v1/bcy/test/addrs?token=<api_token>
75
+ body:
76
+ encoding: UTF-8
77
+ string: ''
78
+ headers:
79
+ Accept-Encoding:
80
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
81
+ Accept:
82
+ - "*/*"
83
+ User-Agent:
84
+ - Ruby
85
+ response:
86
+ status:
87
+ code: 201
88
+ message: Created
89
+ headers:
90
+ Server:
91
+ - nginx/1.9.12
92
+ Date:
93
+ - Tue, 25 Oct 2016 06:36:00 GMT
94
+ Content-Type:
95
+ - application/json
96
+ Content-Length:
97
+ - '281'
98
+ Connection:
99
+ - keep-alive
100
+ Access-Control-Allow-Headers:
101
+ - Origin, X-Requested-With, Content-Type, Accept
102
+ Access-Control-Allow-Methods:
103
+ - GET, POST, PUT, DELETE
104
+ Access-Control-Allow-Origin:
105
+ - "*"
106
+ X-Ratelimit-Remaining:
107
+ - '190'
108
+ body:
109
+ encoding: UTF-8
110
+ string: |-
111
+ {
112
+ "private": "79b2236ca43a95c5002ade6e787115a5ef2495625a353e857159b956631a83d6",
113
+ "public": "02ff5abdc7da47f6c1b51d377ea765c07c42da0f8b58916b4ccf9c65bd1f53b3df",
114
+ "address": "C6gPm4ECoXn7t1hbMfrf83SbauB21cGPkg",
115
+ "wif": "BsQbGS6VGL6yiV7cD5XdfN7yiPZTKF1fDqaAgUL8N5TT55fGhJQc"
116
+ }
117
+ http_version:
118
+ recorded_at: Tue, 25 Oct 2016 06:36:00 GMT
119
+ recorded_with: VCR 3.0.3