peatio-dash 2.4.0 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c3a565d9a2084d3b55f10c6682e6d4acbf258670766c9360cfaf66ae5768ee6
4
- data.tar.gz: 65c093151dd1b7e667a4e0a89a502b506a95bc7dfd454dc60a195b656a29d9c1
3
+ metadata.gz: c9302f74327e656926f93fa1e314998d6c2922d11ee7345cd4d7855f9c6ede51
4
+ data.tar.gz: a764fd26782ffbd2c57771c5fb3fcde856a150388b6af109a668729d1aa523fe
5
5
  SHA512:
6
- metadata.gz: 92efce7a22485c0c7566a87e87eaea7c29aaace61bf526802ce8bdc45124ec78fc0cd45cb29b9714627e1b5545751f039d0ee4d8eb31792d9be702b85a813a3e
7
- data.tar.gz: de728f33a2f7aac283d6c88a13c2feaec61e7c40f4e782376b335f7ff909b840047166032da0599c02bb3fced86c3d0a97ce753b965fc203daec9ea8724a4b84
6
+ metadata.gz: 4cb1114f8927e6b59551fdbe1932cd4bfd7c26c42384c2669595f480428ce674dffa6e077dbf9f40a901bb148806185c79bd45db8a37c314e8fe588c56c78d6a
7
+ data.tar.gz: 50f1025396f81353ad2d0cf7e7b86a1c279dbf3df8c3c9eef2b20bb1f75f402cb5db2848e1fee4d0e8467b0e98085a91eabe642eec8182cec72497d5f5a1f0be
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-dash (2.4.0)
4
+ peatio-dash (2.5.4)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
- faraday (~> 0.15.4)
7
+ faraday (~> 0.17)
8
8
  memoist (~> 0.16.0)
9
9
  net-http-persistent (~> 3.0.1)
10
10
  peatio (>= 0.6.3)
@@ -12,16 +12,16 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activemodel (5.2.3)
16
- activesupport (= 5.2.3)
17
- activesupport (5.2.3)
15
+ activemodel (5.2.4.3)
16
+ activesupport (= 5.2.4.3)
17
+ activesupport (5.2.4.3)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
21
21
  tzinfo (~> 1.1)
22
22
  addressable (2.7.0)
23
23
  public_suffix (>= 2.0.2, < 5.0)
24
- amq-protocol (2.3.0)
24
+ amq-protocol (2.3.1)
25
25
  amqp (1.8.0)
26
26
  amq-protocol (>= 2.2.0)
27
27
  eventmachine
@@ -29,102 +29,141 @@ GEM
29
29
  better-faraday (1.0.8)
30
30
  activesupport (>= 4.0, < 6.0)
31
31
  faraday (~> 0.12)
32
- bunny (2.14.3)
33
- amq-protocol (~> 2.3, >= 2.3.0)
34
- byebug (11.0.1)
32
+ bunny (2.15.0)
33
+ amq-protocol (~> 2.3, >= 2.3.1)
34
+ byebug (11.1.1)
35
35
  clamp (1.3.1)
36
36
  coderay (1.1.2)
37
- concurrent-ruby (1.1.5)
38
- connection_pool (2.2.2)
37
+ concurrent-ruby (1.1.6)
38
+ connection_pool (2.2.3)
39
+ cookiejar (0.3.3)
39
40
  crack (0.4.3)
40
41
  safe_yaml (~> 1.0.0)
42
+ daemons (1.3.1)
41
43
  diff-lcs (1.3)
42
44
  docile (1.3.2)
45
+ em-http-request (1.1.6)
46
+ addressable (>= 2.3.4)
47
+ cookiejar (!= 0.3.1)
48
+ em-socksify (>= 0.3)
49
+ eventmachine (>= 1.0.3)
50
+ http_parser.rb (>= 0.6.0)
51
+ em-socksify (0.3.2)
52
+ eventmachine (>= 1.0.0.beta.4)
53
+ em-synchrony (1.0.6)
54
+ eventmachine (>= 1.0.0.beta.1)
43
55
  em-websocket (0.5.1)
44
56
  eventmachine (>= 0.12.9)
45
57
  http_parser.rb (~> 0.6.0)
46
58
  eventmachine (1.2.7)
47
- faraday (0.15.4)
59
+ faraday (0.17.3)
48
60
  multipart-post (>= 1.2, < 3)
49
- hashdiff (1.0.0)
61
+ faraday_middleware (0.13.1)
62
+ faraday (>= 0.7.4, < 1.0)
63
+ faye (1.3.0)
64
+ cookiejar (>= 0.3.0)
65
+ em-http-request (>= 0.3.0)
66
+ eventmachine (>= 0.12.0)
67
+ faye-websocket (>= 0.9.1)
68
+ multi_json (>= 1.0.0)
69
+ rack (>= 1.0.0)
70
+ websocket-driver (>= 0.5.1)
71
+ faye-websocket (0.10.9)
72
+ eventmachine (>= 0.12.0)
73
+ websocket-driver (>= 0.5.1)
74
+ hashdiff (1.0.1)
50
75
  http_parser.rb (0.6.0)
51
- i18n (1.7.0)
76
+ i18n (1.8.3)
52
77
  concurrent-ruby (~> 1.0)
53
- irb (1.0.0)
78
+ io-console (0.5.6)
79
+ irb (1.2.3)
80
+ reline (>= 0.0.1)
54
81
  jaro_winkler (1.5.4)
55
- json (2.2.0)
56
82
  jwt (2.2.1)
57
- memoist (0.16.1)
58
- metaclass (0.0.4)
59
- method_source (0.9.2)
60
- minitest (5.13.0)
61
- mocha (1.9.0)
62
- metaclass (~> 0.0.1)
83
+ memoist (0.16.2)
84
+ method_source (1.0.0)
85
+ minitest (5.14.1)
86
+ mocha (1.11.2)
87
+ multi_json (1.14.1)
63
88
  multipart-post (2.1.1)
64
- mysql2 (0.5.2)
89
+ mysql2 (0.5.3)
65
90
  net-http-persistent (3.0.1)
66
91
  connection_pool (~> 2.2)
67
- parallel (1.19.0)
68
- parser (2.6.5.0)
92
+ parallel (1.19.1)
93
+ parser (2.7.0.5)
69
94
  ast (~> 2.4.0)
70
- peatio (0.6.3)
95
+ peatio (2.6.1)
71
96
  activemodel (> 5.2, <= 6.0.0)
72
97
  amqp
73
98
  bunny
74
99
  clamp
100
+ em-synchrony (~> 1.0)
75
101
  em-websocket
76
102
  eventmachine
103
+ faraday_middleware (~> 0.13.1)
104
+ faye (~> 1.2)
77
105
  jwt
78
106
  mysql2
79
- pry (0.12.2)
80
- coderay (~> 1.1.0)
81
- method_source (~> 0.9.0)
82
- pry-byebug (3.7.0)
107
+ prometheus-client
108
+ thin
109
+ prometheus-client (2.0.0)
110
+ pry (0.13.0)
111
+ coderay (~> 1.1)
112
+ method_source (~> 1.0)
113
+ pry-byebug (3.9.0)
83
114
  byebug (~> 11.0)
84
- pry (~> 0.10)
85
- public_suffix (4.0.1)
115
+ pry (~> 0.13.0)
116
+ public_suffix (4.0.4)
117
+ rack (2.2.2)
86
118
  rainbow (3.0.0)
87
- rake (10.5.0)
119
+ rake (13.0.1)
120
+ reline (0.1.3)
121
+ io-console (~> 0.5)
122
+ rexml (3.2.4)
88
123
  rspec (3.9.0)
89
124
  rspec-core (~> 3.9.0)
90
125
  rspec-expectations (~> 3.9.0)
91
126
  rspec-mocks (~> 3.9.0)
92
- rspec-core (3.9.0)
93
- rspec-support (~> 3.9.0)
94
- rspec-expectations (3.9.0)
127
+ rspec-core (3.9.1)
128
+ rspec-support (~> 3.9.1)
129
+ rspec-expectations (3.9.1)
95
130
  diff-lcs (>= 1.2.0, < 2.0)
96
131
  rspec-support (~> 3.9.0)
97
- rspec-mocks (3.9.0)
132
+ rspec-mocks (3.9.1)
98
133
  diff-lcs (>= 1.2.0, < 2.0)
99
134
  rspec-support (~> 3.9.0)
100
- rspec-support (3.9.0)
101
- rubocop (0.76.0)
135
+ rspec-support (3.9.2)
136
+ rubocop (0.80.1)
102
137
  jaro_winkler (~> 1.5.1)
103
138
  parallel (~> 1.10)
104
- parser (>= 2.6)
139
+ parser (>= 2.7.0.1)
105
140
  rainbow (>= 2.2.2, < 4.0)
141
+ rexml
106
142
  ruby-progressbar (~> 1.7)
107
143
  unicode-display_width (>= 1.4.0, < 1.7)
108
- rubocop-github (0.13.0)
109
- rubocop (~> 0.70)
110
- rubocop-performance (~> 1.3.0)
111
- rubocop-performance (1.3.0)
112
- rubocop (>= 0.68.0)
144
+ rubocop-github (0.14.0)
145
+ rubocop (~> 0.59)
113
146
  ruby-progressbar (1.10.1)
114
147
  safe_yaml (1.0.5)
115
- simplecov (0.17.1)
148
+ simplecov (0.18.5)
116
149
  docile (~> 1.1)
117
- json (>= 1.8, < 3)
118
- simplecov-html (~> 0.10.0)
119
- simplecov-html (0.10.2)
150
+ simplecov-html (~> 0.11)
151
+ simplecov-html (0.12.2)
152
+ thin (1.7.2)
153
+ daemons (~> 1.0, >= 1.0.9)
154
+ eventmachine (~> 1.0, >= 1.0.4)
155
+ rack (>= 1, < 3)
120
156
  thread_safe (0.3.6)
121
- tzinfo (1.2.5)
157
+ tzinfo (1.2.7)
122
158
  thread_safe (~> 0.1)
123
- unicode-display_width (1.6.0)
124
- webmock (3.7.6)
159
+ unicode-display_width (1.6.1)
160
+ webmock (3.8.3)
125
161
  addressable (>= 2.3.6)
126
162
  crack (>= 0.3.2)
127
163
  hashdiff (>= 0.4.0, < 2.0.0)
164
+ websocket-driver (0.7.2)
165
+ websocket-extensions (>= 0.1.0)
166
+ websocket-extensions (0.1.5)
128
167
 
129
168
  PLATFORMS
130
169
  ruby
@@ -135,7 +174,7 @@ DEPENDENCIES
135
174
  mocha (~> 1.8)
136
175
  peatio-dash!
137
176
  pry-byebug
138
- rake (~> 10.0)
177
+ rake (~> 13.0)
139
178
  rspec (~> 3.0)
140
179
  rubocop-github
141
180
  simplecov
@@ -51,6 +51,17 @@ module Peatio
51
51
  raise Peatio::Blockchain::ClientError, e
52
52
  end
53
53
 
54
+ def transaction_sources(transaction)
55
+ transaction_hash = client.json_rpc(:getrawtransaction, [transaction.hash, 1])
56
+ transaction_hash['vin'].each_with_object([]) do |vin, source_addresses|
57
+ next if vin['txid'].blank?
58
+
59
+ vin_transaction = client.json_rpc(:getrawtransaction, [vin['txid'], 1])
60
+ source = vin_transaction['vout'].find { |hash| hash['n'] == vin['vout'] }
61
+ source_addresses << source['scriptPubKey']['addresses'][0]
62
+ end.compact.uniq
63
+ end
64
+
54
65
  private
55
66
 
56
67
  def filter_vout(tx_hash)
@@ -28,8 +28,8 @@ module Peatio
28
28
  end
29
29
 
30
30
  def register
31
- Peatio::Blockchain.registry[:dash] = Dash::Blockchain.new
32
- Peatio::Wallet.registry[:dashd] = Dash::Wallet.new
31
+ Peatio::Blockchain.registry[:dash] = Dash::Blockchain
32
+ Peatio::Wallet.registry[:dashd] = Dash::Wallet
33
33
  end
34
34
  end
35
35
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Peatio
4
4
  module Dash
5
- VERSION = "2.4.0"
5
+ VERSION = "2.5.4"
6
6
  end
7
7
  end
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
 
39
39
  spec.add_dependency "activesupport", "~> 5.2.3"
40
40
  spec.add_dependency "better-faraday", "~> 1.0.5"
41
- spec.add_dependency "faraday", "~> 0.15.4"
41
+ spec.add_dependency "faraday", "~> 0.17"
42
42
  spec.add_dependency "memoist", "~> 0.16.0"
43
43
  spec.add_dependency "peatio", ">= 0.6.3"
44
44
  spec.add_dependency 'net-http-persistent', '~> 3.0.1'
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "irb"
48
48
  spec.add_development_dependency "mocha", "~> 1.8"
49
49
  spec.add_development_dependency "pry-byebug"
50
- spec.add_development_dependency "rake", "~> 10.0"
50
+ spec.add_development_dependency "rake", "~> 13.0"
51
51
  spec.add_development_dependency "rspec", "~> 3.0"
52
52
  spec.add_development_dependency "rubocop-github"
53
53
  spec.add_development_dependency "simplecov"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoD
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-16 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.15.4
47
+ version: '0.17'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.15.4
54
+ version: '0.17'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: memoist
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '10.0'
159
+ version: '13.0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '10.0'
166
+ version: '13.0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rspec
169
169
  requirement: !ruby/object:Gem::Requirement