peatio 2.4.3 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a855d75a60ccfbec0f38f79159c52fe38d2364accb962ca8f5435fc5a25e5403
4
- data.tar.gz: 9d651e0f008ad7d21f722557016c690e1e949d5cffc12f25e6c4328124a601de
3
+ metadata.gz: 84b1d411b8dfcd1f8ee2ac2681eaeadc7ad47831a29e6b47c96e27570557a9fe
4
+ data.tar.gz: 5d20b6701264f5c7d9d22228c4711cb2cbaaf5c3e3e19a1298ace9856b9b8f5a
5
5
  SHA512:
6
- metadata.gz: 8b20714e79a658d829a0c2e5d4c53ff8f94c04de098c549854c1cd29059092592caf22e69d05533252914187dd442694acbb26100e0979f897c19706d8657e26
7
- data.tar.gz: bc70c96a616952d8e12dbbd697fd403ba4e611e0b5aa7eb6b07ce003f286c4fb234ed536c6f994034c4c90ec03627a29c2c517f1c7a57be4aeee3f8e72c7a6d3
6
+ metadata.gz: 93cb0f60fa8470e1b442e5161886ded5664815d0be7322f56bd41c0264891f53f8bc526a32b288f9323b4f565e1193c2640b0802fdb9fd25ede501092bd6a1f3
7
+ data.tar.gz: 8d814b72378587412fa3cb1f47882220b76ddeb83f13742ed275f1751ccd0ff047021c2db9439b0e3cb6b2b09db8230677bb17ac0fb6413aa534b83d83d297df
data/.drone.yml ADDED
@@ -0,0 +1,29 @@
1
+ ---
2
+ kind: pipeline
3
+ name: default
4
+
5
+ steps:
6
+ - name: Run rspec for each library
7
+ image: ruby:2.6
8
+ commands:
9
+ - bundle install
10
+ - bundle exec rspec
11
+
12
+ - name: Release gems
13
+ image: ruby:2.6
14
+ environment:
15
+ GEM_CREDENTIALS:
16
+ from_secret: gem_credentials
17
+ commands:
18
+ - mkdir -p ~/.gem
19
+ - echo $GEM_CREDENTIALS | base64 -d > ~/.gem/credentials
20
+ - chmod 0600 ~/.gem/credentials
21
+ - gem build peatio.gemspec
22
+ - gem push peatio-*.gem
23
+ when:
24
+ branch:
25
+ - master
26
+
27
+ trigger:
28
+ event:
29
+ - push
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio (2.4.2)
4
+ peatio (2.6.3)
5
5
  activemodel (> 5.2, <= 6.0.0)
6
6
  amqp
7
7
  bunny
@@ -29,25 +29,25 @@ GEM
29
29
  zeitwerk (~> 2.1, >= 2.1.8)
30
30
  addressable (2.7.0)
31
31
  public_suffix (>= 2.0.2, < 5.0)
32
- amq-protocol (2.3.0)
32
+ amq-protocol (2.3.1)
33
33
  amqp (1.8.0)
34
34
  amq-protocol (>= 2.2.0)
35
35
  eventmachine
36
36
  ast (2.4.0)
37
- bump (0.8.0)
38
- bunny (2.14.3)
39
- amq-protocol (~> 2.3, >= 2.3.0)
37
+ bump (0.9.0)
38
+ bunny (2.15.0)
39
+ amq-protocol (~> 2.3, >= 2.3.1)
40
40
  bunny-mock (1.7.0)
41
41
  bunny (>= 1.7)
42
- byebug (11.0.1)
43
- clamp (1.3.1)
44
- coderay (1.1.2)
42
+ byebug (11.1.3)
43
+ clamp (1.3.2)
44
+ coderay (1.1.3)
45
45
  concurrent-ruby (1.1.6)
46
46
  cookiejar (0.3.3)
47
47
  daemons (1.3.1)
48
48
  diff-lcs (1.3)
49
49
  docile (1.3.2)
50
- em-http-request (1.1.5)
50
+ em-http-request (1.1.7)
51
51
  addressable (>= 2.3.4)
52
52
  cookiejar (!= 0.3.1)
53
53
  em-socksify (>= 0.3)
@@ -59,102 +59,112 @@ GEM
59
59
  eventmachine
60
60
  em-synchrony (1.0.6)
61
61
  eventmachine (>= 1.0.0.beta.1)
62
- em-websocket (0.5.1)
62
+ em-websocket (0.5.2)
63
63
  eventmachine (>= 0.12.9)
64
64
  http_parser.rb (~> 0.6.0)
65
65
  em-websocket-client (0.1.2)
66
66
  eventmachine
67
67
  websocket
68
68
  eventmachine (1.2.7)
69
- faraday (0.17.3)
69
+ faraday (0.17.4)
70
70
  multipart-post (>= 1.2, < 3)
71
71
  faraday_middleware (0.13.1)
72
72
  faraday (>= 0.7.4, < 1.0)
73
- faye (1.2.4)
73
+ faye (1.4.0)
74
74
  cookiejar (>= 0.3.0)
75
- em-http-request (>= 0.3.0)
75
+ em-http-request (>= 1.1.6)
76
76
  eventmachine (>= 0.12.0)
77
- faye-websocket (>= 0.9.1)
77
+ faye-websocket (>= 0.11.0)
78
78
  multi_json (>= 1.0.0)
79
79
  rack (>= 1.0.0)
80
80
  websocket-driver (>= 0.5.1)
81
- faye-websocket (0.10.9)
81
+ faye-websocket (0.11.0)
82
82
  eventmachine (>= 0.12.0)
83
83
  websocket-driver (>= 0.5.1)
84
84
  http_parser.rb (0.6.0)
85
- i18n (1.8.2)
85
+ i18n (1.8.3)
86
86
  concurrent-ruby (~> 1.0)
87
- irb (1.0.0)
87
+ io-console (0.5.6)
88
+ irb (1.2.4)
89
+ reline (>= 0.0.1)
88
90
  jaro_winkler (1.5.4)
89
- json (2.2.0)
90
- jwt (2.2.1)
91
- method_source (0.9.2)
92
- minitest (5.14.0)
93
- multi_json (1.14.1)
91
+ json (2.3.0)
92
+ jwt (2.2.2)
93
+ method_source (1.0.0)
94
+ minitest (5.14.1)
95
+ multi_json (1.15.0)
94
96
  multipart-post (2.1.1)
95
97
  mysql2 (0.5.3)
96
- parallel (1.19.0)
97
- parser (2.6.5.0)
98
+ parallel (1.19.1)
99
+ parser (2.7.1.3)
98
100
  ast (~> 2.4.0)
99
- prometheus-client (2.0.0)
100
- pry (0.12.2)
101
- coderay (~> 1.1.0)
102
- method_source (~> 0.9.0)
103
- pry-byebug (3.7.0)
101
+ prometheus-client (2.1.0)
102
+ pry (0.13.1)
103
+ coderay (~> 1.1)
104
+ method_source (~> 1.0)
105
+ pry-byebug (3.9.0)
104
106
  byebug (~> 11.0)
105
- pry (~> 0.10)
106
- public_suffix (4.0.3)
107
+ pry (~> 0.13.0)
108
+ public_suffix (4.0.6)
107
109
  rack (2.2.2)
108
110
  rainbow (3.0.0)
109
111
  rake (13.0.1)
112
+ reline (0.1.4)
113
+ io-console (~> 0.5)
114
+ rexml (3.2.4)
110
115
  rspec (3.9.0)
111
116
  rspec-core (~> 3.9.0)
112
117
  rspec-expectations (~> 3.9.0)
113
118
  rspec-mocks (~> 3.9.0)
114
- rspec-core (3.9.0)
115
- rspec-support (~> 3.9.0)
116
- rspec-expectations (3.9.0)
119
+ rspec-core (3.9.2)
120
+ rspec-support (~> 3.9.3)
121
+ rspec-expectations (3.9.2)
117
122
  diff-lcs (>= 1.2.0, < 2.0)
118
123
  rspec-support (~> 3.9.0)
119
- rspec-mocks (3.9.0)
124
+ rspec-mocks (3.9.1)
120
125
  diff-lcs (>= 1.2.0, < 2.0)
121
126
  rspec-support (~> 3.9.0)
122
- rspec-support (3.9.0)
127
+ rspec-support (3.9.3)
123
128
  rspec_junit_formatter (0.4.1)
124
129
  rspec-core (>= 2, < 4, != 2.12.0)
125
- rubocop (0.76.0)
130
+ rubocop (0.82.0)
126
131
  jaro_winkler (~> 1.5.1)
127
132
  parallel (~> 1.10)
128
- parser (>= 2.6)
133
+ parser (>= 2.7.0.1)
129
134
  rainbow (>= 2.2.2, < 4.0)
135
+ rexml
130
136
  ruby-progressbar (~> 1.7)
131
- unicode-display_width (>= 1.4.0, < 1.7)
132
- rubocop-github (0.13.0)
133
- rubocop (~> 0.70)
134
- rubocop-performance (~> 1.3.0)
135
- rubocop-performance (1.3.0)
136
- rubocop (>= 0.68.0)
137
+ unicode-display_width (>= 1.4.0, < 2.0)
138
+ rubocop-github (0.16.0)
139
+ rubocop (<= 0.82.0)
140
+ rubocop-performance (~> 1.0)
141
+ rubocop-rails (~> 2.0)
142
+ rubocop-performance (1.6.1)
143
+ rubocop (>= 0.71.0)
144
+ rubocop-rails (2.6.0)
145
+ activesupport (>= 4.2.0)
146
+ rack (>= 1.1)
147
+ rubocop (>= 0.82.0)
137
148
  ruby-progressbar (1.10.1)
138
- simplecov (0.17.1)
149
+ simplecov (0.18.5)
139
150
  docile (~> 1.1)
140
- json (>= 1.8, < 3)
141
- simplecov-html (~> 0.10.0)
142
- simplecov-html (0.10.2)
143
- simplecov-json (0.2)
151
+ simplecov-html (~> 0.11)
152
+ simplecov-html (0.12.2)
153
+ simplecov-json (0.2.1)
144
154
  json
145
155
  simplecov
146
- thin (1.7.2)
156
+ thin (1.8.0)
147
157
  daemons (~> 1.0, >= 1.0.9)
148
158
  eventmachine (~> 1.0, >= 1.0.4)
149
159
  rack (>= 1, < 3)
150
160
  thread_safe (0.3.6)
151
- tzinfo (1.2.6)
161
+ tzinfo (1.2.7)
152
162
  thread_safe (~> 0.1)
153
- unicode-display_width (1.6.0)
163
+ unicode-display_width (1.7.0)
154
164
  websocket (1.2.8)
155
- websocket-driver (0.7.1)
165
+ websocket-driver (0.7.3)
156
166
  websocket-extensions (>= 0.1.0)
157
- websocket-extensions (0.1.4)
167
+ websocket-extensions (0.1.5)
158
168
  zeitwerk (2.3.0)
159
169
 
160
170
  PLATFORMS
data/README.md CHANGED
@@ -1,3 +1,15 @@
1
+ ![Cryptocurrency Exchange Platform - OpenDAX](https://github.com/openware/meta/raw/main/images/github_opendax.png)
2
+
3
+ <h3 align="center">
4
+ <a href="https://www.openware.com/sdk">Guide</a> <span>&vert;</span>
5
+ <a href="https://www.openware.com/sdk/api.html">API Docs</a> <span>&vert;</span>
6
+ <a href="https://www.openware.com/">Consulting</a> <span>&vert;</span>
7
+ <a href="https://t.me/peatio">Community</a>
8
+ </h3>
9
+ <h6 align="center">Peatio is part of <a href="https://github.com/openware/opendax">OpenDAX Trading Platform</a></h6>
10
+
11
+ ---
12
+
1
13
  # Peatio
2
14
 
3
15
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/peatio`. To experiment with that code, run `bin/console` for an interactive prompt.
@@ -40,8 +40,10 @@ module Peatio #:nodoc:
40
40
  # the transaction amount has been successfully transferred
41
41
  #
42
42
  # failed - the transaction is failed in the blockchain.
43
+ #
44
+ # rejected - the transaction is rejected by user.
43
45
 
44
- STATUSES = %w[success pending failed].freeze
46
+ STATUSES = %w[success pending failed rejected].freeze
45
47
 
46
48
  DEFAULT_STATUS = 'pending'.freeze
47
49
 
@@ -53,6 +55,10 @@ module Peatio #:nodoc:
53
55
  # return [Integer] transaction number in send-to-many request
54
56
  attr_accessor :txout
55
57
 
58
+ # @!attribute [rw] from_address
59
+ # return [Array<String>] transaction source addresses
60
+ attr_accessor :from_addresses
61
+
56
62
  # @!attribute [rw] to_address
57
63
  # return [String] transaction recepient address
58
64
  attr_accessor :to_address
@@ -69,6 +75,10 @@ module Peatio #:nodoc:
69
75
  # return [String] transaction currency id
70
76
  attr_accessor :currency_id
71
77
 
78
+ # @!attribute [rw] options
79
+ # return [JSON] transaction options
80
+ attr_accessor :options
81
+
72
82
  validates :to_address,
73
83
  :amount,
74
84
  :currency_id,
@@ -33,6 +33,7 @@ module Peatio
33
33
 
34
34
  @ws.on(:open) do |_e|
35
35
  subscribe_trades(@target, @ws)
36
+ subscribe_orderbook(@target, @ws)
36
37
  logger.info { "Websocket connected" }
37
38
  end
38
39
 
@@ -59,6 +60,10 @@ module Peatio
59
60
  method_not_implemented
60
61
  end
61
62
 
63
+ def subscribe_orderbook(_market, _ws)
64
+ method_not_implemented
65
+ end
66
+
62
67
  def ws_read_public_message(msg)
63
68
  logger.info { "received public message: #{msg}" }
64
69
  end
@@ -88,7 +93,7 @@ module Peatio
88
93
  price: trade[:price],
89
94
  amount: trade[:amount],
90
95
  market_id: @market,
91
- created_at: Time.at(trade[:date]).iso8601,
96
+ created_at: Time.at(trade[:date]).utc.iso8601,
92
97
  taker_type: trade[:taker_type]
93
98
  }
94
99
  end
@@ -1,3 +1,3 @@
1
1
  module Peatio
2
- VERSION = "2.4.3"
2
+ VERSION = "2.6.3"
3
3
  end
@@ -36,6 +36,23 @@ module Peatio
36
36
  # @see #configure
37
37
  SUPPORTED_SETTINGS = %i[wallet currency].freeze
38
38
 
39
+ # Hash of features supported by wallet.
40
+ #
41
+ # @abstract
42
+ #
43
+ # @see Abstract::SUPPORTED_FEATURES for list of features supported by peatio.
44
+ #
45
+ # @!attribute [r] features
46
+ # @return [Hash] list of features supported by wallet.
47
+ attr_reader :features
48
+
49
+ # List of features supported by peatio.
50
+ #
51
+ # @note Features list:
52
+ #
53
+ # skip_deposit_collection - defines if deposit will be collected to
54
+ # hot, warm, cold wallets.
55
+ SUPPORTED_FEATURES = %i[skip_deposit_collection].freeze
39
56
 
40
57
  # Abstract constructor.
41
58
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis B.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-17 00:00:00.000000000 Z
12
+ date: 2021-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -391,6 +391,7 @@ executables:
391
391
  extensions: []
392
392
  extra_rdoc_files: []
393
393
  files:
394
+ - ".drone.yml"
394
395
  - ".gitignore"
395
396
  - ".rspec"
396
397
  - ".rubocop.yml"
@@ -456,7 +457,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
456
457
  - !ruby/object:Gem::Version
457
458
  version: '0'
458
459
  requirements: []
459
- rubygems_version: 3.0.6
460
+ rubygems_version: 3.0.3
460
461
  signing_key:
461
462
  specification_version: 4
462
463
  summary: Peatio is a gem for running critical core services