radiator 0.2.3b → 0.2.3rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +1 -3
- data/Gemfile.lock +22 -22
- data/README.md +4 -13
- data/lib/radiator/api.rb +16 -93
- data/lib/radiator/broadcast_operations.json +43 -53
- data/lib/radiator/methods.json +6 -12
- data/lib/radiator/stream.rb +1 -5
- data/lib/radiator/type/amount.rb +1 -1
- data/lib/radiator/version.rb +1 -1
- data/radiator.gemspec +4 -4
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56887d373579a7fd261b7bebef0632f2e452583e
|
4
|
+
data.tar.gz: d79bf060be9de2b3b20cdcc26f9fe4d10344126a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5adf735e8a5cb69b063186ee6fbb58604393ef965bbe376c9bcda987f06f7a2b64cd11ad3b897fa5d79b7828c3ef1096a867c52d754c3d6393aa9530fcd5ec58
|
7
|
+
data.tar.gz: 24eb7cbdd6971add9318083ee0f9ecfa8f98e1e51de5e5859ffa26287a25f4adba738a26481f8bf58ceb94bcf7b01fec6eae07f4944799357133aa02ee2d25fc
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
radiator (0.2.
|
5
|
-
bitcoin-ruby (= 0.0.
|
4
|
+
radiator (0.2.3rc1)
|
5
|
+
bitcoin-ruby (= 0.0.10)
|
6
6
|
ffi (= 1.9.18)
|
7
7
|
hashie (~> 3.5, >= 3.5.5)
|
8
|
-
json (~>
|
8
|
+
json (~> 1.8, >= 1.8.6)
|
9
9
|
logging (~> 2.2, >= 2.2.0)
|
10
10
|
net-http-persistent (~> 2.9, >= 2.9.4)
|
11
11
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
addressable (2.5.
|
16
|
-
public_suffix (
|
17
|
-
awesome_print (1.
|
18
|
-
bitcoin-ruby (0.0.
|
15
|
+
addressable (2.5.1)
|
16
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
17
|
+
awesome_print (1.7.0)
|
18
|
+
bitcoin-ruby (0.0.10)
|
19
19
|
codeclimate-test-reporter (0.5.2)
|
20
20
|
simplecov (>= 0.7.1, < 1.0.0)
|
21
|
-
coderay (1.1.
|
21
|
+
coderay (1.1.1)
|
22
22
|
crack (0.4.3)
|
23
23
|
safe_yaml (~> 1.0.0)
|
24
24
|
docile (1.1.5)
|
@@ -27,34 +27,34 @@ GEM
|
|
27
27
|
faraday (0.9.2)
|
28
28
|
multipart-post (>= 1.2, < 3)
|
29
29
|
ffi (1.9.18)
|
30
|
-
hashdiff (0.3.
|
31
|
-
hashie (3.5.
|
32
|
-
json (
|
30
|
+
hashdiff (0.3.4)
|
31
|
+
hashie (3.5.5)
|
32
|
+
json (1.8.6)
|
33
33
|
little-plugger (1.1.4)
|
34
34
|
logging (2.2.2)
|
35
35
|
little-plugger (~> 1.1)
|
36
36
|
multi_json (~> 1.10)
|
37
37
|
method_source (0.8.2)
|
38
|
-
minitest (5.10.
|
39
|
-
minitest-line (0.6.
|
38
|
+
minitest (5.10.2)
|
39
|
+
minitest-line (0.6.3)
|
40
40
|
minitest (~> 5.0)
|
41
|
-
multi_json (1.12.
|
41
|
+
multi_json (1.12.1)
|
42
42
|
multipart-post (2.0.0)
|
43
43
|
net-http-persistent (2.9.4)
|
44
44
|
pry (0.10.4)
|
45
45
|
coderay (~> 1.1.0)
|
46
46
|
method_source (~> 0.8.1)
|
47
47
|
slop (~> 3.4)
|
48
|
-
public_suffix (
|
48
|
+
public_suffix (2.0.5)
|
49
49
|
rake (11.3.0)
|
50
50
|
safe_yaml (1.0.4)
|
51
|
-
simplecov (0.
|
51
|
+
simplecov (0.11.2)
|
52
52
|
docile (~> 1.1.0)
|
53
|
-
json (
|
53
|
+
json (~> 1.8)
|
54
54
|
simplecov-html (~> 0.10.0)
|
55
|
-
simplecov-html (0.10.
|
55
|
+
simplecov-html (0.10.1)
|
56
56
|
slop (3.6.0)
|
57
|
-
typhoeus (1.
|
57
|
+
typhoeus (1.1.2)
|
58
58
|
ethon (>= 0.9.0)
|
59
59
|
vcr (2.9.3)
|
60
60
|
webmock (2.3.2)
|
@@ -68,7 +68,7 @@ PLATFORMS
|
|
68
68
|
|
69
69
|
DEPENDENCIES
|
70
70
|
awesome_print (~> 1.7, >= 1.7.0)
|
71
|
-
bundler (~> 1.
|
71
|
+
bundler (~> 1.14, >= 1.14.6)
|
72
72
|
codeclimate-test-reporter (~> 0.5.2)
|
73
73
|
faraday (~> 0.9.2)
|
74
74
|
minitest (~> 5.9, >= 5.9.0)
|
@@ -76,11 +76,11 @@ DEPENDENCIES
|
|
76
76
|
pry (~> 0.10.3)
|
77
77
|
radiator!
|
78
78
|
rake (~> 11.2, >= 11.2.2)
|
79
|
-
simplecov (~> 0.
|
79
|
+
simplecov (~> 0.11.2)
|
80
80
|
typhoeus (~> 1.0, >= 1.0.2)
|
81
81
|
vcr (~> 2.9, >= 2.9.2)
|
82
82
|
webmock (~> 2.1, >= 2.1.0)
|
83
83
|
yard (~> 0.8.7.6)
|
84
84
|
|
85
85
|
BUNDLED WITH
|
86
|
-
1.
|
86
|
+
1.14.6
|
data/README.md
CHANGED
@@ -9,15 +9,6 @@
|
|
9
9
|
|
10
10
|
Radiator is an API Client for interaction with the STEEM network using Ruby.
|
11
11
|
|
12
|
-
#### Fixes in v0.2.3
|
13
|
-
|
14
|
-
* Gem updates
|
15
|
-
* Added low-level support for persistence and retrying API requests.
|
16
|
-
* Now using exponential back-off for retries.
|
17
|
-
* Detecting presence of `transaction_ids` (if enabled by the node).
|
18
|
-
* Default for `Hashie` warnings now go to `/dev/null`, where they belong.
|
19
|
-
* Added stray methods/operations.
|
20
|
-
|
21
12
|
#### Fixes in v0.2.2
|
22
13
|
|
23
14
|
* Gem updates
|
@@ -203,8 +194,8 @@ Example of the output:
|
|
203
194
|
Transactions are supported:
|
204
195
|
|
205
196
|
```ruby
|
206
|
-
stream.transactions do |tx
|
207
|
-
puts
|
197
|
+
stream.transactions do |tx|
|
198
|
+
puts tx.to_json
|
208
199
|
end
|
209
200
|
```
|
210
201
|
|
@@ -243,8 +234,8 @@ Example of the output:
|
|
243
234
|
Even whole blocks:
|
244
235
|
|
245
236
|
```ruby
|
246
|
-
stream.blocks do |bk
|
247
|
-
puts
|
237
|
+
stream.blocks do |bk|
|
238
|
+
puts bk.to_json
|
248
239
|
end
|
249
240
|
```
|
250
241
|
|
data/lib/radiator/api.rb
CHANGED
@@ -14,13 +14,8 @@ module Radiator
|
|
14
14
|
@debug = !!options[:debug]
|
15
15
|
@net_http_persistent_enabled = true
|
16
16
|
@logger = options[:logger] || Radiator.logger
|
17
|
-
@hashie_logger = options[:hashie_logger] || Logger.new(nil)
|
18
17
|
|
19
|
-
|
20
|
-
@hashie_logger = Logger.new(@hashie_logger)
|
21
|
-
end
|
22
|
-
|
23
|
-
Hashie.logger = @hashie_logger
|
18
|
+
Hashie.logger = @logger
|
24
19
|
@method_names = nil
|
25
20
|
end
|
26
21
|
|
@@ -112,65 +107,14 @@ module Radiator
|
|
112
107
|
id: rpc_id,
|
113
108
|
method: "call"
|
114
109
|
}
|
110
|
+
|
111
|
+
response = request(options)
|
115
112
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
case response.code
|
122
|
-
when '200'
|
123
|
-
response = JSON[response.body]
|
124
|
-
|
125
|
-
return Hashie::Mash.new(response)
|
126
|
-
when '400'
|
127
|
-
@logger.warn('Code 400: Bad Request, retrying ...')
|
128
|
-
backoff
|
129
|
-
when '502'
|
130
|
-
@logger.warn('Code 502: Bad Gateway, retrying ...')
|
131
|
-
backoff
|
132
|
-
when '503'
|
133
|
-
@logger.warn('Code 503: Service Unavailable, retrying ...')
|
134
|
-
backoff
|
135
|
-
when '504'
|
136
|
-
@logger.warn('Code 504: Gateway Timeout, retrying ...')
|
137
|
-
backoff
|
138
|
-
else
|
139
|
-
ap "Unknown code #{response.code}, retrying ..."
|
140
|
-
ap response
|
141
|
-
backoff
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
@logger.error("No response.")
|
146
|
-
break
|
147
|
-
rescue Errno::ECONNREFUSED => e
|
148
|
-
@logger.warn('Connection refused, retrying ...')
|
149
|
-
backoff
|
150
|
-
rescue Errno::EADDRNOTAVAIL => e
|
151
|
-
@logger.warn('Node not available, retrying ...')
|
152
|
-
backoff
|
153
|
-
rescue Net::ReadTimeout => e
|
154
|
-
@logger.warn('Node read timeout, retrying ...')
|
155
|
-
backoff
|
156
|
-
rescue Net::OpenTimeout => e
|
157
|
-
@logger.warn('Node timeout, retrying ...')
|
158
|
-
backoff
|
159
|
-
rescue RangeError => e
|
160
|
-
@logger.warn('Range Error, retrying ...')
|
161
|
-
backoff
|
162
|
-
rescue OpenSSL::SSL::SSLError => e
|
163
|
-
@logger.warn("SSL Error (#{e.message}), retrying ...")
|
164
|
-
backoff
|
165
|
-
rescue SocketError => e
|
166
|
-
@logger.warn("Socket Error (#{e.message}), retrying ...")
|
167
|
-
backoff
|
168
|
-
rescue => e
|
169
|
-
puts "Unknown exception from request ..."
|
170
|
-
ap e
|
171
|
-
backoff
|
172
|
-
end
|
173
|
-
end # loop
|
113
|
+
if !!response
|
114
|
+
response = JSON[response.body]
|
115
|
+
|
116
|
+
Hashie::Mash.new(response)
|
117
|
+
end
|
174
118
|
end
|
175
119
|
|
176
120
|
def shutdown
|
@@ -208,52 +152,31 @@ module Radiator
|
|
208
152
|
end
|
209
153
|
end
|
210
154
|
|
211
|
-
def post_request
|
212
|
-
Net::HTTP::Post.new uri.request_uri, 'Content-Type' => 'application/json'
|
213
|
-
end
|
214
|
-
|
215
155
|
def request(options)
|
216
156
|
if !!@net_http_persistent_enabled
|
217
157
|
begin
|
218
|
-
request =
|
158
|
+
request = Net::HTTP::Post.new uri.request_uri, 'Content-Type' => 'application/json'
|
219
159
|
request.body = JSON[options]
|
220
160
|
|
221
161
|
if (response = http.request(uri, request)).kind_of? Net::HTTPSuccess
|
222
162
|
return response
|
223
163
|
else
|
224
|
-
@logger.warn "Unexpeced response: #{response
|
164
|
+
@logger.warn "Unexpeced response: #{response}"
|
225
165
|
end
|
226
166
|
rescue Net::HTTP::Persistent::Error => e
|
227
|
-
@logger.warn "Unable to perform request: #{request} :: #{e}
|
167
|
+
@logger.warn "Unable to perform request: #{request} :: #{e}: #{e.backtrace}"
|
228
168
|
end
|
229
169
|
|
230
170
|
@net_http_persistent_enabled = false
|
231
171
|
end
|
232
172
|
|
233
173
|
unless @net_http_persistent_enabled
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
request =
|
174
|
+
@http = Net::HTTP.new(uri.host, uri.port)
|
175
|
+
@http.use_ssl = true
|
176
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
177
|
+
request = Net::HTTP::Post.new uri.request_uri, 'Content-Type' => 'application/json'
|
238
178
|
request.body = JSON[options]
|
239
|
-
|
240
|
-
# Try to go back to http persistent on next request.
|
241
|
-
@net_http_persistent_enabled = true
|
242
|
-
|
243
|
-
non_persistent_http.request(request)
|
244
|
-
end
|
245
|
-
end
|
246
|
-
|
247
|
-
def backoff
|
248
|
-
@backoff_at ||= Time.now
|
249
|
-
@backoff_sleep ||= 0.01
|
250
|
-
|
251
|
-
@backoff_sleep *= 2
|
252
|
-
sleep @backoff_sleep
|
253
|
-
|
254
|
-
if Time.now - @backoff_at > 300
|
255
|
-
@backoff_at = nil
|
256
|
-
@backoff_sleep = nil
|
179
|
+
@http.request(request)
|
257
180
|
end
|
258
181
|
end
|
259
182
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
// Copied from:
|
2
|
-
// https://raw.githubusercontent.com/steemit/steem-js/master/src/broadcast/operations.
|
2
|
+
// https://raw.githubusercontent.com/steemit/steem-js/master/src/broadcast/operations.json
|
3
3
|
|
4
4
|
[
|
5
5
|
{
|
6
|
-
"roles": ["posting"
|
6
|
+
"roles": ["posting"],
|
7
7
|
"operation": "vote",
|
8
8
|
"params": [
|
9
9
|
"voter",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
]
|
14
14
|
},
|
15
15
|
{
|
16
|
-
"roles": ["posting"
|
16
|
+
"roles": ["posting"],
|
17
17
|
"operation": "comment",
|
18
18
|
"params": [
|
19
19
|
"parent_author",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
]
|
37
37
|
},
|
38
38
|
{
|
39
|
-
"roles": ["active"
|
39
|
+
"roles": ["active"],
|
40
40
|
"operation": "transfer_to_vesting",
|
41
41
|
"params": [
|
42
42
|
"from",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
]
|
46
46
|
},
|
47
47
|
{
|
48
|
-
"roles": ["active"
|
48
|
+
"roles": ["active"],
|
49
49
|
"operation": "withdraw_vesting",
|
50
50
|
"params": [
|
51
51
|
"account",
|
@@ -53,7 +53,7 @@
|
|
53
53
|
]
|
54
54
|
},
|
55
55
|
{
|
56
|
-
"roles": ["active"
|
56
|
+
"roles": ["active"],
|
57
57
|
"operation": "limit_order_create",
|
58
58
|
"params": [
|
59
59
|
"owner",
|
@@ -65,7 +65,7 @@
|
|
65
65
|
]
|
66
66
|
},
|
67
67
|
{
|
68
|
-
"roles": ["active"
|
68
|
+
"roles": ["active"],
|
69
69
|
"operation": "limit_order_cancel",
|
70
70
|
"params": [
|
71
71
|
"owner",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
]
|
74
74
|
},
|
75
75
|
{
|
76
|
-
"roles": ["active"
|
76
|
+
"roles": ["active"],
|
77
77
|
"operation": "price",
|
78
78
|
"params": [
|
79
79
|
"base",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
]
|
82
82
|
},
|
83
83
|
{
|
84
|
-
"roles": ["active"
|
84
|
+
"roles": ["active"],
|
85
85
|
"operation": "feed_publish",
|
86
86
|
"params": [
|
87
87
|
"publisher",
|
@@ -89,7 +89,7 @@
|
|
89
89
|
]
|
90
90
|
},
|
91
91
|
{
|
92
|
-
"roles": ["active"
|
92
|
+
"roles": ["active"],
|
93
93
|
"operation": "convert",
|
94
94
|
"params": [
|
95
95
|
"owner",
|
@@ -98,7 +98,7 @@
|
|
98
98
|
]
|
99
99
|
},
|
100
100
|
{
|
101
|
-
"roles": ["active"
|
101
|
+
"roles": ["active"],
|
102
102
|
"operation": "account_create",
|
103
103
|
"params": [
|
104
104
|
"fee",
|
@@ -112,7 +112,7 @@
|
|
112
112
|
]
|
113
113
|
},
|
114
114
|
{
|
115
|
-
"roles": ["
|
115
|
+
"roles": ["owner", "active"],
|
116
116
|
"operation": "account_update",
|
117
117
|
"params": [
|
118
118
|
"account",
|
@@ -124,7 +124,7 @@
|
|
124
124
|
]
|
125
125
|
},
|
126
126
|
{
|
127
|
-
"roles": ["active"
|
127
|
+
"roles": ["active"],
|
128
128
|
"operation": "witness_update",
|
129
129
|
"params": [
|
130
130
|
"owner",
|
@@ -135,7 +135,7 @@
|
|
135
135
|
]
|
136
136
|
},
|
137
137
|
{
|
138
|
-
"roles": ["
|
138
|
+
"roles": ["posting"],
|
139
139
|
"operation": "account_witness_vote",
|
140
140
|
"params": [
|
141
141
|
"account",
|
@@ -144,7 +144,7 @@
|
|
144
144
|
]
|
145
145
|
},
|
146
146
|
{
|
147
|
-
"roles": ["
|
147
|
+
"roles": ["posting"],
|
148
148
|
"operation": "account_witness_proxy",
|
149
149
|
"params": [
|
150
150
|
"account",
|
@@ -152,7 +152,7 @@
|
|
152
152
|
]
|
153
153
|
},
|
154
154
|
{
|
155
|
-
"roles": ["active"
|
155
|
+
"roles": ["active"],
|
156
156
|
"operation": "pow",
|
157
157
|
"params": [
|
158
158
|
"worker",
|
@@ -162,7 +162,7 @@
|
|
162
162
|
]
|
163
163
|
},
|
164
164
|
{
|
165
|
-
"roles": ["active"
|
165
|
+
"roles": ["active"],
|
166
166
|
"operation": "custom",
|
167
167
|
"params": [
|
168
168
|
"required_auths",
|
@@ -171,7 +171,7 @@
|
|
171
171
|
]
|
172
172
|
},
|
173
173
|
{
|
174
|
-
"roles": ["posting"
|
174
|
+
"roles": ["posting"],
|
175
175
|
"operation": "delete_comment",
|
176
176
|
"params": [
|
177
177
|
"author",
|
@@ -179,7 +179,7 @@
|
|
179
179
|
]
|
180
180
|
},
|
181
181
|
{
|
182
|
-
"roles": ["posting", "active"
|
182
|
+
"roles": ["posting", "active"],
|
183
183
|
"operation": "custom_json",
|
184
184
|
"params": [
|
185
185
|
"required_auths",
|
@@ -189,7 +189,7 @@
|
|
189
189
|
]
|
190
190
|
},
|
191
191
|
{
|
192
|
-
"roles": ["posting"
|
192
|
+
"roles": ["posting"],
|
193
193
|
"operation": "comment_options",
|
194
194
|
"params": [
|
195
195
|
"author",
|
@@ -203,7 +203,7 @@
|
|
203
203
|
]
|
204
204
|
},
|
205
205
|
{
|
206
|
-
"roles": ["active"
|
206
|
+
"roles": ["active"],
|
207
207
|
"operation": "set_withdraw_vesting_route",
|
208
208
|
"params": [
|
209
209
|
"from_account",
|
@@ -213,7 +213,7 @@
|
|
213
213
|
]
|
214
214
|
},
|
215
215
|
{
|
216
|
-
"roles": ["active"
|
216
|
+
"roles": ["active"],
|
217
217
|
"operation": "limit_order_create2",
|
218
218
|
"params": [
|
219
219
|
"owner",
|
@@ -225,7 +225,7 @@
|
|
225
225
|
]
|
226
226
|
},
|
227
227
|
{
|
228
|
-
"roles": ["posting"
|
228
|
+
"roles": ["posting"],
|
229
229
|
"operation": "challenge_authority",
|
230
230
|
"params": [
|
231
231
|
"challenger",
|
@@ -242,7 +242,7 @@
|
|
242
242
|
]
|
243
243
|
},
|
244
244
|
{
|
245
|
-
"roles": ["active"
|
245
|
+
"roles": ["active"],
|
246
246
|
"operation": "request_account_recovery",
|
247
247
|
"params": [
|
248
248
|
"recovery_account",
|
@@ -251,16 +251,6 @@
|
|
251
251
|
"extensions"
|
252
252
|
]
|
253
253
|
},
|
254
|
-
{
|
255
|
-
"roles": ["owner"],
|
256
|
-
"operation": "recover_account",
|
257
|
-
"params": [
|
258
|
-
"account_to_recover",
|
259
|
-
"new_owner_authority",
|
260
|
-
"recent_owner_authority",
|
261
|
-
"extensions"
|
262
|
-
]
|
263
|
-
},
|
264
254
|
{
|
265
255
|
"roles": ["owner"],
|
266
256
|
"operation": "change_recovery_account",
|
@@ -271,7 +261,7 @@
|
|
271
261
|
]
|
272
262
|
},
|
273
263
|
{
|
274
|
-
"roles": ["active"
|
264
|
+
"roles": ["active"],
|
275
265
|
"operation": "escrow_transfer",
|
276
266
|
"params": [
|
277
267
|
"from",
|
@@ -287,7 +277,7 @@
|
|
287
277
|
]
|
288
278
|
},
|
289
279
|
{
|
290
|
-
"roles": ["active"
|
280
|
+
"roles": ["active"],
|
291
281
|
"operation": "escrow_dispute",
|
292
282
|
"params": [
|
293
283
|
"from",
|
@@ -298,7 +288,7 @@
|
|
298
288
|
]
|
299
289
|
},
|
300
290
|
{
|
301
|
-
"roles": ["active"
|
291
|
+
"roles": ["active"],
|
302
292
|
"operation": "escrow_release",
|
303
293
|
"params": [
|
304
294
|
"from",
|
@@ -312,7 +302,7 @@
|
|
312
302
|
]
|
313
303
|
},
|
314
304
|
{
|
315
|
-
"roles": ["active"
|
305
|
+
"roles": ["active"],
|
316
306
|
"operation": "pow2",
|
317
307
|
"params": [
|
318
308
|
"input",
|
@@ -320,7 +310,7 @@
|
|
320
310
|
]
|
321
311
|
},
|
322
312
|
{
|
323
|
-
"roles": ["active"
|
313
|
+
"roles": ["active"],
|
324
314
|
"operation": "escrow_approve",
|
325
315
|
"params": [
|
326
316
|
"from",
|
@@ -332,7 +322,7 @@
|
|
332
322
|
]
|
333
323
|
},
|
334
324
|
{
|
335
|
-
"roles": ["active"
|
325
|
+
"roles": ["active"],
|
336
326
|
"operation": "transfer_to_savings",
|
337
327
|
"params": [
|
338
328
|
"from",
|
@@ -342,7 +332,7 @@
|
|
342
332
|
]
|
343
333
|
},
|
344
334
|
{
|
345
|
-
"roles": ["active"
|
335
|
+
"roles": ["active"],
|
346
336
|
"operation": "transfer_from_savings",
|
347
337
|
"params": [
|
348
338
|
"from",
|
@@ -353,7 +343,7 @@
|
|
353
343
|
]
|
354
344
|
},
|
355
345
|
{
|
356
|
-
"roles": ["active"
|
346
|
+
"roles": ["active"],
|
357
347
|
"operation": "cancel_transfer_from_savings",
|
358
348
|
"params": [
|
359
349
|
"from",
|
@@ -377,7 +367,7 @@
|
|
377
367
|
]
|
378
368
|
},
|
379
369
|
{
|
380
|
-
"roles": ["active"
|
370
|
+
"roles": ["active"],
|
381
371
|
"operation": "reset_account",
|
382
372
|
"params": [
|
383
373
|
"reset_account",
|
@@ -395,7 +385,7 @@
|
|
395
385
|
]
|
396
386
|
},
|
397
387
|
{
|
398
|
-
"roles": ["posting"
|
388
|
+
"roles": ["posting"],
|
399
389
|
"operation": "claim_reward_balance",
|
400
390
|
"params": [
|
401
391
|
"account",
|
@@ -405,7 +395,7 @@
|
|
405
395
|
]
|
406
396
|
},
|
407
397
|
{
|
408
|
-
"roles": ["active"
|
398
|
+
"roles": ["active"],
|
409
399
|
"operation": "delegate_vesting_shares",
|
410
400
|
"params": [
|
411
401
|
"delegator",
|
@@ -414,7 +404,7 @@
|
|
414
404
|
]
|
415
405
|
},
|
416
406
|
{
|
417
|
-
"roles": ["active"
|
407
|
+
"roles": ["active"],
|
418
408
|
"operation": "account_create_with_delegation",
|
419
409
|
"params": [
|
420
410
|
"fee",
|
@@ -430,7 +420,7 @@
|
|
430
420
|
]
|
431
421
|
},
|
432
422
|
{
|
433
|
-
"roles": ["active"
|
423
|
+
"roles": ["active"],
|
434
424
|
"operation": "fill_convert_request",
|
435
425
|
"params": [
|
436
426
|
"owner",
|
@@ -440,7 +430,7 @@
|
|
440
430
|
]
|
441
431
|
},
|
442
432
|
{
|
443
|
-
"roles": ["posting"
|
433
|
+
"roles": ["posting"],
|
444
434
|
"operation": "comment_reward",
|
445
435
|
"params": [
|
446
436
|
"author",
|
@@ -449,7 +439,7 @@
|
|
449
439
|
]
|
450
440
|
},
|
451
441
|
{
|
452
|
-
"roles": ["active"
|
442
|
+
"roles": ["active"],
|
453
443
|
"operation": "liquidity_reward",
|
454
444
|
"params": [
|
455
445
|
"owner",
|
@@ -457,7 +447,7 @@
|
|
457
447
|
]
|
458
448
|
},
|
459
449
|
{
|
460
|
-
"roles": ["active"
|
450
|
+
"roles": ["active"],
|
461
451
|
"operation": "interest",
|
462
452
|
"params": [
|
463
453
|
"owner",
|
@@ -465,7 +455,7 @@
|
|
465
455
|
]
|
466
456
|
},
|
467
457
|
{
|
468
|
-
"roles": ["active"
|
458
|
+
"roles": ["active"],
|
469
459
|
"operation": "fill_vesting_withdraw",
|
470
460
|
"params": [
|
471
461
|
"from_account",
|
@@ -475,7 +465,7 @@
|
|
475
465
|
]
|
476
466
|
},
|
477
467
|
{
|
478
|
-
"roles": ["posting"
|
468
|
+
"roles": ["posting"],
|
479
469
|
"operation": "fill_order",
|
480
470
|
"params": [
|
481
471
|
"current_owner",
|
@@ -487,7 +477,7 @@
|
|
487
477
|
]
|
488
478
|
},
|
489
479
|
{
|
490
|
-
"roles": ["posting"
|
480
|
+
"roles": ["posting"],
|
491
481
|
"operation": "fill_transfer_from_savings",
|
492
482
|
"params": [
|
493
483
|
"from",
|
data/lib/radiator/methods.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copied from:
|
2
|
-
// https://raw.githubusercontent.com/steemit/steem-js/master/src/api/methods.
|
2
|
+
// https://raw.githubusercontent.com/steemit/steem-js/master/src/api/methods.json
|
3
3
|
|
4
4
|
[
|
5
5
|
{
|
@@ -315,7 +315,7 @@
|
|
315
315
|
{
|
316
316
|
"api": "database_api",
|
317
317
|
"method": "get_content_replies",
|
318
|
-
"params": ["
|
318
|
+
"params": ["parent", "parentPermlink"]
|
319
319
|
},
|
320
320
|
{
|
321
321
|
"api": "database_api",
|
@@ -359,16 +359,6 @@
|
|
359
359
|
"api": "database_api",
|
360
360
|
"method": "get_miner_queue"
|
361
361
|
},
|
362
|
-
{
|
363
|
-
"api": "database_api",
|
364
|
-
"method": "get_reward_fund",
|
365
|
-
"params": ["name"]
|
366
|
-
},
|
367
|
-
{
|
368
|
-
"api": "database_api",
|
369
|
-
"method": "get_vesting_delegations",
|
370
|
-
"params": ["account", "from", "limit"]
|
371
|
-
},
|
372
362
|
{
|
373
363
|
"api": "login_api",
|
374
364
|
"method": "login",
|
@@ -494,5 +484,9 @@
|
|
494
484
|
"api": "market_history_api",
|
495
485
|
"method": "get_market_history_buckets",
|
496
486
|
"params": []
|
487
|
+
},
|
488
|
+
{
|
489
|
+
"api": "database_api",
|
490
|
+
"method": "get_reward_fund"
|
497
491
|
}
|
498
492
|
]
|
data/lib/radiator/stream.rb
CHANGED
@@ -140,11 +140,7 @@ module Radiator
|
|
140
140
|
return _transactions unless !!block
|
141
141
|
|
142
142
|
_transactions.each_with_index do |transaction, index|
|
143
|
-
|
144
|
-
b['transaction_ids'][index]
|
145
|
-
end
|
146
|
-
|
147
|
-
yield transaction, trx_id
|
143
|
+
yield transaction, b['transaction_ids'][index]
|
148
144
|
end
|
149
145
|
end
|
150
146
|
end
|
data/lib/radiator/type/amount.rb
CHANGED
data/lib/radiator/version.rb
CHANGED
data/radiator.gemspec
CHANGED
@@ -17,12 +17,12 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test)/}) }
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.14', '>= 1.14.6'
|
21
21
|
spec.add_development_dependency 'rake', '~> 11.2', '>= 11.2.2'
|
22
22
|
spec.add_development_dependency 'minitest', '~> 5.9', '>= 5.9.0'
|
23
23
|
spec.add_development_dependency 'minitest-line', '~> 0.6.3'
|
24
24
|
spec.add_development_dependency 'webmock', '~> 2.1', '>= 2.1.0'
|
25
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
25
|
+
spec.add_development_dependency 'simplecov', '~> 0.11.2'
|
26
26
|
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.5.2'
|
27
27
|
spec.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.2'
|
28
28
|
spec.add_development_dependency 'faraday', '~> 0.9.2'
|
@@ -34,9 +34,9 @@ Gem::Specification.new do |spec|
|
|
34
34
|
# Maximum for net-http-persistent is 2.9.4, required by ruby-2.0.0-p645, which
|
35
35
|
# is the darwin default at the moment.
|
36
36
|
spec.add_dependency('net-http-persistent', '~> 2.9', '>= 2.9.4')
|
37
|
-
spec.add_dependency('json', '~>
|
37
|
+
spec.add_dependency('json', '~> 1.8', '>= 1.8.6')
|
38
38
|
spec.add_dependency('logging', '~> 2.2', '>= 2.2.0')
|
39
39
|
spec.add_dependency('hashie', '~> 3.5', '>= 3.5.5')
|
40
|
-
spec.add_dependency('bitcoin-ruby', '0.0.
|
40
|
+
spec.add_dependency('bitcoin-ruby', '0.0.10')
|
41
41
|
spec.add_dependency('ffi', '1.9.18')
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.14'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.14.6
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '1.
|
29
|
+
version: '1.14'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
32
|
+
version: 1.14.6
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,14 +110,14 @@ dependencies:
|
|
110
110
|
requirements:
|
111
111
|
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: 0.
|
113
|
+
version: 0.11.2
|
114
114
|
type: :development
|
115
115
|
prerelease: false
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
118
|
- - "~>"
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.
|
120
|
+
version: 0.11.2
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: codeclimate-test-reporter
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,20 +260,20 @@ dependencies:
|
|
260
260
|
requirements:
|
261
261
|
- - "~>"
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version: '
|
263
|
+
version: '1.8'
|
264
264
|
- - ">="
|
265
265
|
- !ruby/object:Gem::Version
|
266
|
-
version:
|
266
|
+
version: 1.8.6
|
267
267
|
type: :runtime
|
268
268
|
prerelease: false
|
269
269
|
version_requirements: !ruby/object:Gem::Requirement
|
270
270
|
requirements:
|
271
271
|
- - "~>"
|
272
272
|
- !ruby/object:Gem::Version
|
273
|
-
version: '
|
273
|
+
version: '1.8'
|
274
274
|
- - ">="
|
275
275
|
- !ruby/object:Gem::Version
|
276
|
-
version:
|
276
|
+
version: 1.8.6
|
277
277
|
- !ruby/object:Gem::Dependency
|
278
278
|
name: logging
|
279
279
|
requirement: !ruby/object:Gem::Requirement
|
@@ -320,14 +320,14 @@ dependencies:
|
|
320
320
|
requirements:
|
321
321
|
- - '='
|
322
322
|
- !ruby/object:Gem::Version
|
323
|
-
version: 0.0.
|
323
|
+
version: 0.0.10
|
324
324
|
type: :runtime
|
325
325
|
prerelease: false
|
326
326
|
version_requirements: !ruby/object:Gem::Requirement
|
327
327
|
requirements:
|
328
328
|
- - '='
|
329
329
|
- !ruby/object:Gem::Version
|
330
|
-
version: 0.0.
|
330
|
+
version: 0.0.10
|
331
331
|
- !ruby/object:Gem::Dependency
|
332
332
|
name: ffi
|
333
333
|
requirement: !ruby/object:Gem::Requirement
|
@@ -410,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
410
410
|
version: 1.3.1
|
411
411
|
requirements: []
|
412
412
|
rubyforge_project:
|
413
|
-
rubygems_version: 2.
|
413
|
+
rubygems_version: 2.4.8
|
414
414
|
signing_key:
|
415
415
|
specification_version: 4
|
416
416
|
summary: STEEM RPC Ruby Client
|