steem-ruby 0.9.1 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -1
- data/README.md +83 -10
- data/Rakefile +128 -31
- data/lib/steem.rb +49 -0
- data/lib/steem/api.rb +38 -36
- data/lib/steem/base_error.rb +32 -11
- data/lib/steem/block_api.rb +23 -3
- data/lib/steem/broadcast.rb +165 -2
- data/lib/steem/marshal.rb +231 -0
- data/lib/steem/mixins/jsonable.rb +37 -0
- data/lib/steem/mixins/retriable.rb +22 -13
- data/lib/steem/mixins/serializable.rb +45 -0
- data/lib/steem/operation.rb +141 -0
- data/lib/steem/operation/account_create.rb +10 -0
- data/lib/steem/operation/account_create_with_delegation.rb +12 -0
- data/lib/steem/operation/account_update.rb +8 -0
- data/lib/steem/operation/account_witness_proxy.rb +4 -0
- data/lib/steem/operation/account_witness_vote.rb +5 -0
- data/lib/steem/operation/cancel_transfer_from_savings.rb +4 -0
- data/lib/steem/operation/challenge_authority.rb +5 -0
- data/lib/steem/operation/change_recovery_account.rb +5 -0
- data/lib/steem/operation/claim_account.rb +5 -0
- data/lib/steem/operation/claim_reward_balance.rb +6 -0
- data/lib/steem/operation/comment.rb +9 -0
- data/lib/steem/operation/comment_options.rb +10 -0
- data/lib/steem/operation/convert.rb +5 -0
- data/lib/steem/operation/create_claimed_account.rb +10 -0
- data/lib/steem/operation/custom.rb +5 -0
- data/lib/steem/operation/custom_binary.rb +8 -0
- data/lib/steem/operation/custom_json.rb +6 -0
- data/lib/steem/operation/decline_voting_rights.rb +4 -0
- data/lib/steem/operation/delegate_vesting_shares.rb +5 -0
- data/lib/steem/operation/delete_comment.rb +4 -0
- data/lib/steem/operation/escrow_approve.rb +8 -0
- data/lib/steem/operation/escrow_dispute.rb +7 -0
- data/lib/steem/operation/escrow_release.rb +10 -0
- data/lib/steem/operation/escrow_transfer.rb +12 -0
- data/lib/steem/operation/feed_publish.rb +4 -0
- data/lib/steem/operation/limit_order_cancel.rb +4 -0
- data/lib/steem/operation/limit_order_create.rb +8 -0
- data/lib/steem/operation/limit_order_create2.rb +8 -0
- data/lib/steem/operation/prove_authority.rb +4 -0
- data/lib/steem/operation/recover_account.rb +6 -0
- data/lib/steem/operation/report_over_production.rb +5 -0
- data/lib/steem/operation/request_account_recovery.rb +6 -0
- data/lib/steem/operation/reset_account.rb +5 -0
- data/lib/steem/operation/set_reset_account.rb +5 -0
- data/lib/steem/operation/set_withdraw_vesting_route.rb +6 -0
- data/lib/steem/operation/transfer.rb +6 -0
- data/lib/steem/operation/transfer_from_savings.rb +7 -0
- data/lib/steem/operation/transfer_to_savings.rb +6 -0
- data/lib/steem/operation/transfer_to_vesting.rb +5 -0
- data/lib/steem/operation/vote.rb +6 -0
- data/lib/steem/operation/withdraw_vesting.rb +4 -0
- data/lib/steem/operation/witness_set_properties.rb +5 -0
- data/lib/steem/operation/witness_update.rb +7 -0
- data/lib/steem/rpc/base_client.rb +14 -2
- data/lib/steem/rpc/http_client.rb +17 -1
- data/lib/steem/stream.rb +385 -0
- data/lib/steem/transaction.rb +96 -0
- data/lib/steem/transaction_builder.rb +77 -70
- data/lib/steem/type/amount.rb +6 -0
- data/lib/steem/version.rb +1 -1
- data/steem-ruby.gemspec +9 -4
- metadata +203 -56
- data/Gemfile.lock +0 -73
@@ -0,0 +1,96 @@
|
|
1
|
+
module Steem
|
2
|
+
class Transaction
|
3
|
+
include JSONable
|
4
|
+
include Utils
|
5
|
+
|
6
|
+
ATTRIBUTES = %i(id ref_block_num ref_block_prefix expiration operations
|
7
|
+
extensions signatures)
|
8
|
+
|
9
|
+
attr_accessor *ATTRIBUTES
|
10
|
+
|
11
|
+
def initialize(options = {})
|
12
|
+
if !!(hex = options.delete(:hex))
|
13
|
+
marshal = Marshal.new(hex: hex)
|
14
|
+
marshal.transaction(trx: self)
|
15
|
+
end
|
16
|
+
|
17
|
+
options.each do |k, v|
|
18
|
+
raise Steem::ArgumentError, "Invalid option specified: #{k}" unless ATTRIBUTES.include?(k.to_sym)
|
19
|
+
|
20
|
+
send("#{k}=", v)
|
21
|
+
end
|
22
|
+
|
23
|
+
self.operations ||= []
|
24
|
+
self.extensions ||= []
|
25
|
+
self.signatures ||= []
|
26
|
+
|
27
|
+
self.expiration = case @expiration
|
28
|
+
when String then Time.parse(@expiration + 'Z')
|
29
|
+
else; @expiration
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def inspect
|
34
|
+
properties = ATTRIBUTES.map do |prop|
|
35
|
+
unless (v = instance_variable_get("@#{prop}")).nil?
|
36
|
+
v = if v.respond_to? :strftime
|
37
|
+
v.strftime('%Y-%m-%dT%H:%M:%S')
|
38
|
+
else
|
39
|
+
v
|
40
|
+
end
|
41
|
+
|
42
|
+
"@#{prop}=#{v}"
|
43
|
+
end
|
44
|
+
end.compact.join(', ')
|
45
|
+
|
46
|
+
"#<#{self.class.name} [#{properties}]>"
|
47
|
+
end
|
48
|
+
|
49
|
+
def expiration
|
50
|
+
if @expiration.respond_to? :strftime
|
51
|
+
@expiration.strftime('%Y-%m-%dT%H:%M:%S')
|
52
|
+
else
|
53
|
+
@expiration
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def expired?
|
58
|
+
@expiration.nil? || @expiration < Time.now
|
59
|
+
end
|
60
|
+
|
61
|
+
def [](key)
|
62
|
+
key = key.to_sym
|
63
|
+
send(key) if self.class.attributes.include?(key)
|
64
|
+
end
|
65
|
+
|
66
|
+
def []=(key, value)
|
67
|
+
key = key.to_sym
|
68
|
+
send("#{key}=", value) if self.class.attributes.include?(key)
|
69
|
+
end
|
70
|
+
|
71
|
+
def ==(other_trx)
|
72
|
+
return true if self.equal? other_trx
|
73
|
+
return false unless self.class == other_trx.class
|
74
|
+
|
75
|
+
begin
|
76
|
+
return false if self[:ref_block_num].to_i != other_trx[:ref_block_num].to_i
|
77
|
+
return false if self[:ref_block_prefix].to_i != other_trx[:ref_block_prefix].to_i
|
78
|
+
return false if self[:expiration].to_i != other_trx[:expiration].to_i
|
79
|
+
return false if self[:operations].size != other_trx[:operations].size
|
80
|
+
|
81
|
+
op_values = self[:operations].map do |type, value|
|
82
|
+
[type.to_s, value.values.map{|v| v.to_s.gsub(/[^a-zA-Z0-9-]/, '')}]
|
83
|
+
end.flatten.sort
|
84
|
+
|
85
|
+
other_op_values = other_trx[:operations].map do |type, value|
|
86
|
+
[type.to_s, value.values.map{|v| v.to_s.gsub(/[^a-zA-Z0-9-]/, '')}]
|
87
|
+
end.flatten.sort
|
88
|
+
# binding.pry unless op_values == other_op_values
|
89
|
+
op_values == other_op_values
|
90
|
+
rescue => e
|
91
|
+
# binding.pry
|
92
|
+
false
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -28,9 +28,11 @@ module Steem
|
|
28
28
|
|
29
29
|
attr_accessor :app_base, :database_api, :block_api, :expiration, :operations
|
30
30
|
attr_writer :wif
|
31
|
-
attr_reader :signed
|
31
|
+
attr_reader :signed, :testnet, :force_serialize
|
32
32
|
|
33
33
|
alias app_base? app_base
|
34
|
+
alias testnet? testnet
|
35
|
+
alias force_serialize? force_serialize
|
34
36
|
|
35
37
|
def initialize(options = {})
|
36
38
|
@app_base = !!options[:app_base] # default false
|
@@ -47,6 +49,8 @@ module Steem
|
|
47
49
|
|
48
50
|
@wif = [options[:wif]].flatten
|
49
51
|
@signed = false
|
52
|
+
@testnet = !!options[:testnet]
|
53
|
+
@force_serialize = !!options[:force_serialize]
|
50
54
|
|
51
55
|
if !!(trx = options[:trx])
|
52
56
|
trx = case trx
|
@@ -54,44 +58,28 @@ module Steem
|
|
54
58
|
else; trx
|
55
59
|
end
|
56
60
|
|
57
|
-
|
58
|
-
ref_block_num: trx['ref_block_num'],
|
59
|
-
ref_block_prefix: trx['ref_block_prefix'],
|
60
|
-
extensions: (trx['extensions']),
|
61
|
-
operations: trx['operations'],
|
62
|
-
signatures: (trx['signatures']),
|
63
|
-
}
|
64
|
-
|
65
|
-
trx_options[:expiration] = case trx['expiration']
|
66
|
-
when String then Time.parse(trx['expiration'] + 'Z')
|
67
|
-
else; trx['expiration']
|
68
|
-
end
|
69
|
-
|
70
|
-
options = options.merge(trx_options)
|
61
|
+
@trx = Transaction.new(trx)
|
71
62
|
end
|
72
63
|
|
73
|
-
@
|
74
|
-
@ref_block_prefix = options[:ref_block_prefix]
|
75
|
-
@operations = options[:operations] || []
|
76
|
-
@expiration = options[:expiration]
|
77
|
-
@extensions = options[:extensions] || []
|
78
|
-
@signatures = options[:signatures] || []
|
64
|
+
@trx ||= Transaction.new
|
79
65
|
@chain = options[:chain] || :steem
|
80
66
|
@error_pipe = options[:error_pipe] || STDERR
|
81
|
-
@chain_id =
|
67
|
+
@chain_id = options[:chain_id]
|
68
|
+
@chain_id ||= case @chain
|
82
69
|
when :steem then NETWORKS_STEEM_CHAIN_ID
|
83
70
|
when :test then NETWORKS_TEST_CHAIN_ID
|
84
71
|
else; raise UnsupportedChainError, "Unsupported chain: #{@chain}"
|
85
72
|
end
|
73
|
+
|
74
|
+
if testnet? && @chain_id == NETWORKS_STEEM_CHAIN_ID
|
75
|
+
raise UnsupportedChainError, "Unsupported testnet chain id: #{@chain_id}"
|
76
|
+
end
|
86
77
|
end
|
87
78
|
|
88
79
|
def inspect
|
89
|
-
properties = %w(
|
90
|
-
ref_block_num ref_block_prefix expiration operations extensions
|
91
|
-
signatures
|
92
|
-
).map do |prop|
|
80
|
+
properties = %w(trx).map do |prop|
|
93
81
|
if !!(v = instance_variable_get("@#{prop}"))
|
94
|
-
"@#{prop}=#{v}"
|
82
|
+
"@#{prop}=#{v.inspect}"
|
95
83
|
end
|
96
84
|
end.compact.join(', ')
|
97
85
|
|
@@ -99,21 +87,12 @@ module Steem
|
|
99
87
|
end
|
100
88
|
|
101
89
|
def reset
|
102
|
-
@
|
103
|
-
@ref_block_prefix = nil
|
104
|
-
@expiration = nil
|
105
|
-
@operations = []
|
106
|
-
@extensions = []
|
107
|
-
@signatures = []
|
90
|
+
@trx = Transaction.new
|
108
91
|
@signed = false
|
109
92
|
|
110
93
|
self
|
111
94
|
end
|
112
95
|
|
113
|
-
def expired?
|
114
|
-
@expiration.nil? || @expiration < Time.now
|
115
|
-
end
|
116
|
-
|
117
96
|
# If the transaction can be prepared, this method will do so and set the
|
118
97
|
# expiration. Once the expiration is set, it will not re-prepare. If you
|
119
98
|
# call {#put}, the expiration is set {::Nil} so that it can be re-prepared.
|
@@ -122,7 +101,7 @@ module Steem
|
|
122
101
|
#
|
123
102
|
# @return {TransactionBuilder}
|
124
103
|
def prepare
|
125
|
-
if expired?
|
104
|
+
if @trx.expired?
|
126
105
|
catch :prepare_header do; begin
|
127
106
|
@database_api.get_dynamic_global_properties do |properties|
|
128
107
|
block_number = properties.last_irreversible_block_num
|
@@ -139,9 +118,9 @@ module Steem
|
|
139
118
|
result
|
140
119
|
end
|
141
120
|
|
142
|
-
@ref_block_num = (block_number - 1) & 0xFFFF
|
143
|
-
@ref_block_prefix = unhexlify(header.previous[8..-1]).unpack('V*')[0]
|
144
|
-
@expiration ||= (Time.parse(properties.time + 'Z') + EXPIRE_IN_SECS).utc
|
121
|
+
@trx.ref_block_num = (block_number - 1) & 0xFFFF
|
122
|
+
@trx.ref_block_prefix = unhexlify(header.previous[8..-1]).unpack('V*')[0]
|
123
|
+
@trx.expiration ||= (Time.parse(properties.time + 'Z') + EXPIRE_IN_SECS).utc
|
145
124
|
end
|
146
125
|
end
|
147
126
|
rescue => e
|
@@ -159,9 +138,9 @@ module Steem
|
|
159
138
|
|
160
139
|
# Sets operations all at once, then prepares.
|
161
140
|
def operations=(operations)
|
162
|
-
@operations = operations.map{ |op| normalize_operation(op) }
|
141
|
+
@trx.operations = operations.map{ |op| normalize_operation(op) }
|
163
142
|
prepare
|
164
|
-
@operations
|
143
|
+
@trx.operations
|
165
144
|
end
|
166
145
|
|
167
146
|
# A quick and flexible way to append a new operation to the transaction.
|
@@ -187,8 +166,8 @@ module Steem
|
|
187
166
|
# builder.put(vote: vote1).put(vote: vote2)
|
188
167
|
# @return {TransactionBuilder}
|
189
168
|
def put(type, op = nil)
|
190
|
-
@expiration = nil
|
191
|
-
@operations << normalize_operation(type, op)
|
169
|
+
@trx.expiration = nil
|
170
|
+
@trx.operations << normalize_operation(type, op)
|
192
171
|
prepare
|
193
172
|
self
|
194
173
|
end
|
@@ -211,9 +190,17 @@ module Steem
|
|
211
190
|
# ]],
|
212
191
|
# :signatures => ["1c45b65740b4b2c17c4bcf6bcc3f8d90ddab827d50532729fc3b8f163f2c465a532b0112ae4bf388ccc97b7c2e0bc570caadda78af48cf3c261037e65eefcd941e"]
|
213
192
|
# }
|
214
|
-
def transaction
|
215
|
-
prepare
|
216
|
-
sign
|
193
|
+
def transaction(options = {prepare: true, sign: true})
|
194
|
+
options[:prepare] = true unless options.has_key? :prepare
|
195
|
+
options[:sign] = true unless options.has_key? :sign
|
196
|
+
|
197
|
+
prepare if !!options[:prepare]
|
198
|
+
|
199
|
+
if !!options[:sign]
|
200
|
+
sign
|
201
|
+
else
|
202
|
+
@trx
|
203
|
+
end
|
217
204
|
end
|
218
205
|
|
219
206
|
# Appends to the `signatures` array of the transaction, built from a
|
@@ -222,39 +209,42 @@ module Steem
|
|
222
209
|
# @return {Hash | TransactionBuilder} The fully signed transaction if a `wif` is provided or the instance of the {TransactionBuilder} if a `wif` has not yet been provided.
|
223
210
|
def sign
|
224
211
|
return self if @wif.empty?
|
225
|
-
return self if expired?
|
226
|
-
|
227
|
-
trx = {
|
228
|
-
ref_block_num: @ref_block_num,
|
229
|
-
ref_block_prefix: @ref_block_prefix,
|
230
|
-
expiration: @expiration.strftime('%Y-%m-%dT%H:%M:%S'),
|
231
|
-
operations: @operations,
|
232
|
-
extensions: @extensions,
|
233
|
-
signatures: @signatures
|
234
|
-
}
|
212
|
+
return self if @trx.expired?
|
235
213
|
|
236
214
|
unless @signed
|
237
215
|
catch :serialize do; begin
|
238
|
-
|
239
|
-
{trx: trx}
|
240
|
-
else
|
241
|
-
trx
|
242
|
-
end
|
243
|
-
|
244
|
-
@database_api.get_transaction_hex(transaction_hex_args) do |result|
|
216
|
+
transaction_hex.tap do |result|
|
245
217
|
hex = if app_base?
|
246
218
|
result.hex
|
247
219
|
else
|
248
220
|
result
|
249
221
|
end
|
222
|
+
|
223
|
+
unless force_serialize?
|
224
|
+
derrived_trx = Transaction.new(hex: hex)
|
225
|
+
derrived_ops = derrived_trx.operations
|
226
|
+
derrived_trx.operations = derrived_ops.map do |op|
|
227
|
+
op_name = if app_base?
|
228
|
+
op[:type].to_sym
|
229
|
+
else
|
230
|
+
op[:type].to_s.sub(/_operation$/, '').to_sym
|
231
|
+
end
|
232
|
+
|
233
|
+
normalize_operation op_name, JSON[op[:value].to_json]
|
234
|
+
end
|
235
|
+
|
236
|
+
raise SerializationMismatchError unless @trx == derrived_trx
|
237
|
+
end
|
250
238
|
|
251
|
-
hex =
|
239
|
+
hex = hex[0..-4] # drop empty signature array
|
240
|
+
@trx.id = Digest::SHA256.hexdigest(unhexlify(hex))[0..39]
|
241
|
+
|
242
|
+
hex = @chain_id + hex
|
252
243
|
digest = unhexlify(hex)
|
253
244
|
digest_hex = Digest::SHA256.digest(digest)
|
254
245
|
private_keys = @wif.map{ |wif| Bitcoin::Key.from_base58 wif }
|
255
246
|
ec = Bitcoin::OpenSSL_EC
|
256
247
|
count = 0
|
257
|
-
sigs = []
|
258
248
|
|
259
249
|
private_keys.each do |private_key|
|
260
250
|
sig = nil
|
@@ -269,11 +259,10 @@ module Steem
|
|
269
259
|
break if canonical? sig
|
270
260
|
end
|
271
261
|
|
272
|
-
@signatures << hexlify(sig)
|
262
|
+
@trx.signatures << hexlify(sig)
|
273
263
|
end
|
274
264
|
|
275
265
|
@signed = true
|
276
|
-
trx[:signatures] = @signatures
|
277
266
|
end
|
278
267
|
rescue => e
|
279
268
|
if can_retry? e
|
@@ -285,7 +274,25 @@ module Steem
|
|
285
274
|
end; end
|
286
275
|
end
|
287
276
|
|
288
|
-
|
277
|
+
@trx
|
278
|
+
end
|
279
|
+
|
280
|
+
def transaction_hex
|
281
|
+
trx = transaction(prepare: true, sign: false)
|
282
|
+
|
283
|
+
transaction_hex_args = if app_base?
|
284
|
+
{trx: trx}
|
285
|
+
else
|
286
|
+
trx
|
287
|
+
end
|
288
|
+
|
289
|
+
@database_api.get_transaction_hex(transaction_hex_args) do |result|
|
290
|
+
if app_base?
|
291
|
+
result[:hex]
|
292
|
+
else
|
293
|
+
result
|
294
|
+
end
|
295
|
+
end
|
289
296
|
end
|
290
297
|
|
291
298
|
# @return [Array] All public keys that could possibly sign for a given transaction.
|
data/lib/steem/type/amount.rb
CHANGED
@@ -13,6 +13,10 @@ module Steem
|
|
13
13
|
new(amount).to_s
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.to_bytes(amount)
|
17
|
+
new(amount).to_bytes
|
18
|
+
end
|
19
|
+
|
16
20
|
def initialize(value)
|
17
21
|
super(:amount, value)
|
18
22
|
|
@@ -51,6 +55,8 @@ module Steem
|
|
51
55
|
when 'STEEM' then 3
|
52
56
|
when 'VESTS' then 6
|
53
57
|
when 'SBD' then 3
|
58
|
+
when 'TESTS' then 3
|
59
|
+
when 'TBD' then 3
|
54
60
|
else; raise TypeError, "Asset #{@asset} unknown."
|
55
61
|
end
|
56
62
|
end
|
data/lib/steem/version.rb
CHANGED
data/steem-ruby.gemspec
CHANGED
@@ -17,21 +17,26 @@ 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
|
21
|
-
spec.add_development_dependency 'rake', '~>
|
20
|
+
spec.add_development_dependency 'bundler', '~> 2.1', '>= 1.16.1'
|
21
|
+
spec.add_development_dependency 'rake', '~> 13.0', '>= 12.3.0'
|
22
22
|
spec.add_development_dependency 'minitest', '~> 5.10', '>= 5.10.3'
|
23
23
|
spec.add_development_dependency 'minitest-line', '~> 0.6', '>= 0.6.4'
|
24
24
|
spec.add_development_dependency 'minitest-proveit', '~> 1.0', '>= 1.0.0'
|
25
25
|
spec.add_development_dependency 'webmock', '~> 3.3', '>= 3.3.0'
|
26
26
|
spec.add_development_dependency 'simplecov', '~> 0.15', '>= 0.15.1'
|
27
|
-
spec.add_development_dependency 'vcr', '~>
|
27
|
+
spec.add_development_dependency 'vcr', '~> 6.0', '>= 4.0.0'
|
28
28
|
spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.12'
|
29
29
|
spec.add_development_dependency 'pry', '~> 0.11', '>= 0.11.3'
|
30
30
|
spec.add_development_dependency 'awesome_print', '~> 1.8', '>= 1.8.0'
|
31
|
+
spec.add_development_dependency 'rb-readline', '~> 0.5', '>= 0.5.5'
|
32
|
+
spec.add_development_dependency 'irb', '~> 1.0', '>= 1.0.0'
|
33
|
+
spec.add_development_dependency 'highline', '~> 2.0', '>= 2.0.3'
|
31
34
|
|
32
35
|
spec.add_dependency 'json', '~> 2.1', '>= 2.1.0'
|
33
36
|
spec.add_dependency 'logging', '~> 2.2', '>= 2.2.0'
|
34
|
-
spec.add_dependency 'hashie', '~>
|
37
|
+
spec.add_dependency 'hashie', '~> 4.1', '>= 3.5.7'
|
35
38
|
spec.add_dependency 'bitcoin-ruby', '~> 0.0', '>= 0.0.18'
|
36
39
|
spec.add_dependency 'ffi', '~> 1.9', '>= 1.9.23'
|
40
|
+
spec.add_dependency 'bindata', '~> 2.4', '>= 2.4.4'
|
41
|
+
spec.add_dependency 'base58', '~> 0.2', '>= 0.2.3'
|
37
42
|
end
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steem-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Martin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.16'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 1.16.1
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.1'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.16'
|
30
27
|
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 1.16.1
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '12.3'
|
40
37
|
- - ">="
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: 12.3.0
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '13.0'
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '12.3'
|
50
47
|
- - ">="
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: 12.3.0
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '13.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: minitest
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,42 +94,42 @@ dependencies:
|
|
94
94
|
name: minitest-proveit
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - "~>"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '1.0'
|
100
97
|
- - ">="
|
101
98
|
- !ruby/object:Gem::Version
|
102
99
|
version: 1.0.0
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.0'
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '1.0'
|
110
107
|
- - ">="
|
111
108
|
- !ruby/object:Gem::Version
|
112
109
|
version: 1.0.0
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '1.0'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: webmock
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - "~>"
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '3.3'
|
120
117
|
- - ">="
|
121
118
|
- !ruby/object:Gem::Version
|
122
119
|
version: 3.3.0
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '3.3'
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '3.3'
|
130
127
|
- - ">="
|
131
128
|
- !ruby/object:Gem::Version
|
132
129
|
version: 3.3.0
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '3.3'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: simplecov
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,22 +154,22 @@ dependencies:
|
|
154
154
|
name: vcr
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '4.0'
|
160
157
|
- - ">="
|
161
158
|
- !ruby/object:Gem::Version
|
162
159
|
version: 4.0.0
|
160
|
+
- - "~>"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '6.0'
|
163
163
|
type: :development
|
164
164
|
prerelease: false
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- - "~>"
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
version: '4.0'
|
170
167
|
- - ">="
|
171
168
|
- !ruby/object:Gem::Version
|
172
169
|
version: 4.0.0
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '6.0'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: yard
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,82 +214,142 @@ dependencies:
|
|
214
214
|
name: awesome_print
|
215
215
|
requirement: !ruby/object:Gem::Requirement
|
216
216
|
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: 1.8.0
|
217
220
|
- - "~>"
|
218
221
|
- !ruby/object:Gem::Version
|
219
222
|
version: '1.8'
|
223
|
+
type: :development
|
224
|
+
prerelease: false
|
225
|
+
version_requirements: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
220
227
|
- - ">="
|
221
228
|
- !ruby/object:Gem::Version
|
222
229
|
version: 1.8.0
|
230
|
+
- - "~>"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: '1.8'
|
233
|
+
- !ruby/object:Gem::Dependency
|
234
|
+
name: rb-readline
|
235
|
+
requirement: !ruby/object:Gem::Requirement
|
236
|
+
requirements:
|
237
|
+
- - "~>"
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: '0.5'
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: 0.5.5
|
223
243
|
type: :development
|
224
244
|
prerelease: false
|
225
245
|
version_requirements: !ruby/object:Gem::Requirement
|
226
246
|
requirements:
|
227
247
|
- - "~>"
|
228
248
|
- !ruby/object:Gem::Version
|
229
|
-
version: '
|
249
|
+
version: '0.5'
|
230
250
|
- - ">="
|
231
251
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
252
|
+
version: 0.5.5
|
233
253
|
- !ruby/object:Gem::Dependency
|
234
|
-
name:
|
254
|
+
name: irb
|
235
255
|
requirement: !ruby/object:Gem::Requirement
|
236
256
|
requirements:
|
257
|
+
- - ">="
|
258
|
+
- !ruby/object:Gem::Version
|
259
|
+
version: 1.0.0
|
237
260
|
- - "~>"
|
238
261
|
- !ruby/object:Gem::Version
|
239
|
-
version: '
|
262
|
+
version: '1.0'
|
263
|
+
type: :development
|
264
|
+
prerelease: false
|
265
|
+
version_requirements: !ruby/object:Gem::Requirement
|
266
|
+
requirements:
|
240
267
|
- - ">="
|
241
268
|
- !ruby/object:Gem::Version
|
242
|
-
version:
|
243
|
-
|
269
|
+
version: 1.0.0
|
270
|
+
- - "~>"
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
version: '1.0'
|
273
|
+
- !ruby/object:Gem::Dependency
|
274
|
+
name: highline
|
275
|
+
requirement: !ruby/object:Gem::Requirement
|
276
|
+
requirements:
|
277
|
+
- - "~>"
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
version: '2.0'
|
280
|
+
- - ">="
|
281
|
+
- !ruby/object:Gem::Version
|
282
|
+
version: 2.0.3
|
283
|
+
type: :development
|
244
284
|
prerelease: false
|
245
285
|
version_requirements: !ruby/object:Gem::Requirement
|
246
286
|
requirements:
|
287
|
+
- - "~>"
|
288
|
+
- !ruby/object:Gem::Version
|
289
|
+
version: '2.0'
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: 2.0.3
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: json
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: 2.1.0
|
247
300
|
- - "~>"
|
248
301
|
- !ruby/object:Gem::Version
|
249
302
|
version: '2.1'
|
303
|
+
type: :runtime
|
304
|
+
prerelease: false
|
305
|
+
version_requirements: !ruby/object:Gem::Requirement
|
306
|
+
requirements:
|
250
307
|
- - ">="
|
251
308
|
- !ruby/object:Gem::Version
|
252
309
|
version: 2.1.0
|
310
|
+
- - "~>"
|
311
|
+
- !ruby/object:Gem::Version
|
312
|
+
version: '2.1'
|
253
313
|
- !ruby/object:Gem::Dependency
|
254
314
|
name: logging
|
255
315
|
requirement: !ruby/object:Gem::Requirement
|
256
316
|
requirements:
|
257
|
-
- - "~>"
|
258
|
-
- !ruby/object:Gem::Version
|
259
|
-
version: '2.2'
|
260
317
|
- - ">="
|
261
318
|
- !ruby/object:Gem::Version
|
262
319
|
version: 2.2.0
|
320
|
+
- - "~>"
|
321
|
+
- !ruby/object:Gem::Version
|
322
|
+
version: '2.2'
|
263
323
|
type: :runtime
|
264
324
|
prerelease: false
|
265
325
|
version_requirements: !ruby/object:Gem::Requirement
|
266
326
|
requirements:
|
267
|
-
- - "~>"
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
version: '2.2'
|
270
327
|
- - ">="
|
271
328
|
- !ruby/object:Gem::Version
|
272
329
|
version: 2.2.0
|
330
|
+
- - "~>"
|
331
|
+
- !ruby/object:Gem::Version
|
332
|
+
version: '2.2'
|
273
333
|
- !ruby/object:Gem::Dependency
|
274
334
|
name: hashie
|
275
335
|
requirement: !ruby/object:Gem::Requirement
|
276
336
|
requirements:
|
277
|
-
- - "~>"
|
278
|
-
- !ruby/object:Gem::Version
|
279
|
-
version: '3.5'
|
280
337
|
- - ">="
|
281
338
|
- !ruby/object:Gem::Version
|
282
339
|
version: 3.5.7
|
340
|
+
- - "~>"
|
341
|
+
- !ruby/object:Gem::Version
|
342
|
+
version: '4.1'
|
283
343
|
type: :runtime
|
284
344
|
prerelease: false
|
285
345
|
version_requirements: !ruby/object:Gem::Requirement
|
286
346
|
requirements:
|
287
|
-
- - "~>"
|
288
|
-
- !ruby/object:Gem::Version
|
289
|
-
version: '3.5'
|
290
347
|
- - ">="
|
291
348
|
- !ruby/object:Gem::Version
|
292
349
|
version: 3.5.7
|
350
|
+
- - "~>"
|
351
|
+
- !ruby/object:Gem::Version
|
352
|
+
version: '4.1'
|
293
353
|
- !ruby/object:Gem::Dependency
|
294
354
|
name: bitcoin-ruby
|
295
355
|
requirement: !ruby/object:Gem::Requirement
|
@@ -330,6 +390,46 @@ dependencies:
|
|
330
390
|
- - ">="
|
331
391
|
- !ruby/object:Gem::Version
|
332
392
|
version: 1.9.23
|
393
|
+
- !ruby/object:Gem::Dependency
|
394
|
+
name: bindata
|
395
|
+
requirement: !ruby/object:Gem::Requirement
|
396
|
+
requirements:
|
397
|
+
- - "~>"
|
398
|
+
- !ruby/object:Gem::Version
|
399
|
+
version: '2.4'
|
400
|
+
- - ">="
|
401
|
+
- !ruby/object:Gem::Version
|
402
|
+
version: 2.4.4
|
403
|
+
type: :runtime
|
404
|
+
prerelease: false
|
405
|
+
version_requirements: !ruby/object:Gem::Requirement
|
406
|
+
requirements:
|
407
|
+
- - "~>"
|
408
|
+
- !ruby/object:Gem::Version
|
409
|
+
version: '2.4'
|
410
|
+
- - ">="
|
411
|
+
- !ruby/object:Gem::Version
|
412
|
+
version: 2.4.4
|
413
|
+
- !ruby/object:Gem::Dependency
|
414
|
+
name: base58
|
415
|
+
requirement: !ruby/object:Gem::Requirement
|
416
|
+
requirements:
|
417
|
+
- - "~>"
|
418
|
+
- !ruby/object:Gem::Version
|
419
|
+
version: '0.2'
|
420
|
+
- - ">="
|
421
|
+
- !ruby/object:Gem::Version
|
422
|
+
version: 0.2.3
|
423
|
+
type: :runtime
|
424
|
+
prerelease: false
|
425
|
+
version_requirements: !ruby/object:Gem::Requirement
|
426
|
+
requirements:
|
427
|
+
- - "~>"
|
428
|
+
- !ruby/object:Gem::Version
|
429
|
+
version: '0.2'
|
430
|
+
- - ">="
|
431
|
+
- !ruby/object:Gem::Version
|
432
|
+
version: 0.2.3
|
333
433
|
description: Client for accessing the Steem blockchain.
|
334
434
|
email:
|
335
435
|
- anthony@steem.com
|
@@ -340,7 +440,6 @@ files:
|
|
340
440
|
- ".gitignore"
|
341
441
|
- CONTRIBUTING.md
|
342
442
|
- Gemfile
|
343
|
-
- Gemfile.lock
|
344
443
|
- LICENSE
|
345
444
|
- README.md
|
346
445
|
- Rakefile
|
@@ -354,10 +453,59 @@ files:
|
|
354
453
|
- lib/steem/chain_config.rb
|
355
454
|
- lib/steem/formatter.rb
|
356
455
|
- lib/steem/jsonrpc.rb
|
456
|
+
- lib/steem/marshal.rb
|
457
|
+
- lib/steem/mixins/jsonable.rb
|
357
458
|
- lib/steem/mixins/retriable.rb
|
459
|
+
- lib/steem/mixins/serializable.rb
|
460
|
+
- lib/steem/operation.rb
|
461
|
+
- lib/steem/operation/account_create.rb
|
462
|
+
- lib/steem/operation/account_create_with_delegation.rb
|
463
|
+
- lib/steem/operation/account_update.rb
|
464
|
+
- lib/steem/operation/account_witness_proxy.rb
|
465
|
+
- lib/steem/operation/account_witness_vote.rb
|
466
|
+
- lib/steem/operation/cancel_transfer_from_savings.rb
|
467
|
+
- lib/steem/operation/challenge_authority.rb
|
468
|
+
- lib/steem/operation/change_recovery_account.rb
|
469
|
+
- lib/steem/operation/claim_account.rb
|
470
|
+
- lib/steem/operation/claim_reward_balance.rb
|
471
|
+
- lib/steem/operation/comment.rb
|
472
|
+
- lib/steem/operation/comment_options.rb
|
473
|
+
- lib/steem/operation/convert.rb
|
474
|
+
- lib/steem/operation/create_claimed_account.rb
|
475
|
+
- lib/steem/operation/custom.rb
|
476
|
+
- lib/steem/operation/custom_binary.rb
|
477
|
+
- lib/steem/operation/custom_json.rb
|
478
|
+
- lib/steem/operation/decline_voting_rights.rb
|
479
|
+
- lib/steem/operation/delegate_vesting_shares.rb
|
480
|
+
- lib/steem/operation/delete_comment.rb
|
481
|
+
- lib/steem/operation/escrow_approve.rb
|
482
|
+
- lib/steem/operation/escrow_dispute.rb
|
483
|
+
- lib/steem/operation/escrow_release.rb
|
484
|
+
- lib/steem/operation/escrow_transfer.rb
|
485
|
+
- lib/steem/operation/feed_publish.rb
|
486
|
+
- lib/steem/operation/limit_order_cancel.rb
|
487
|
+
- lib/steem/operation/limit_order_create.rb
|
488
|
+
- lib/steem/operation/limit_order_create2.rb
|
489
|
+
- lib/steem/operation/prove_authority.rb
|
490
|
+
- lib/steem/operation/recover_account.rb
|
491
|
+
- lib/steem/operation/report_over_production.rb
|
492
|
+
- lib/steem/operation/request_account_recovery.rb
|
493
|
+
- lib/steem/operation/reset_account.rb
|
494
|
+
- lib/steem/operation/set_reset_account.rb
|
495
|
+
- lib/steem/operation/set_withdraw_vesting_route.rb
|
496
|
+
- lib/steem/operation/transfer.rb
|
497
|
+
- lib/steem/operation/transfer_from_savings.rb
|
498
|
+
- lib/steem/operation/transfer_to_savings.rb
|
499
|
+
- lib/steem/operation/transfer_to_vesting.rb
|
500
|
+
- lib/steem/operation/vote.rb
|
501
|
+
- lib/steem/operation/withdraw_vesting.rb
|
502
|
+
- lib/steem/operation/witness_set_properties.rb
|
503
|
+
- lib/steem/operation/witness_update.rb
|
358
504
|
- lib/steem/rpc/base_client.rb
|
359
505
|
- lib/steem/rpc/http_client.rb
|
360
506
|
- lib/steem/rpc/thread_safe_http_client.rb
|
507
|
+
- lib/steem/stream.rb
|
508
|
+
- lib/steem/transaction.rb
|
361
509
|
- lib/steem/transaction_builder.rb
|
362
510
|
- lib/steem/type/amount.rb
|
363
511
|
- lib/steem/type/base_type.rb
|
@@ -368,7 +516,7 @@ homepage: https://github.com/steem/steem-ruby
|
|
368
516
|
licenses:
|
369
517
|
- MIT
|
370
518
|
metadata: {}
|
371
|
-
post_install_message:
|
519
|
+
post_install_message:
|
372
520
|
rdoc_options: []
|
373
521
|
require_paths:
|
374
522
|
- lib
|
@@ -383,9 +531,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
383
531
|
- !ruby/object:Gem::Version
|
384
532
|
version: '0'
|
385
533
|
requirements: []
|
386
|
-
|
387
|
-
|
388
|
-
signing_key:
|
534
|
+
rubygems_version: 3.0.8
|
535
|
+
signing_key:
|
389
536
|
specification_version: 4
|
390
537
|
summary: Steem Ruby Client
|
391
538
|
test_files: []
|