peatio-bitgo-jruby 2.5.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4518108ef76833e80e357fe01abdaf861585df04f2d3bd9199be7ab3530c89d1
4
+ data.tar.gz: b9cbaa09634d83ef6c3bf5c67b07cd72f4354877423bbee98fd7834b046c5784
5
+ SHA512:
6
+ metadata.gz: 1a66bafb956bc1123a8b7b2300ee27d368729408f87a391d8ce48524fc78557fb3de0671e6d8e282353b53c8240f40d9f171e16d7dd66c3af5e91d4280bc96a2
7
+ data.tar.gz: c02fab2697e66245e18f695579e7f025f1d97c9c2aee880a6d71be4683bf1ed83083c1aa17c9e209b97432ccb072e05ca2ec879502be2d80f5325ab73d7c197f
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,8 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ - 2.6.2
8
+ before_install: gem install bundler -v 1.16.3
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in peatio-bitgo.gemspec
6
+ gemspec
@@ -0,0 +1,160 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ peatio-bitgo-jruby (2.5.1)
5
+ activesupport (~> 5.2.3)
6
+ better-faraday (~> 1.0.5)
7
+ faraday (~> 0.17)
8
+ memoist (~> 0.16.0)
9
+ net-http-persistent (~> 3.0.1)
10
+ peatio-jruby (>= 2.6.0)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activemodel (5.2.4.4)
16
+ activesupport (= 5.2.4.4)
17
+ activerecord (5.2.4.4)
18
+ activemodel (= 5.2.4.4)
19
+ activesupport (= 5.2.4.4)
20
+ arel (>= 9.0)
21
+ activerecord-jdbc-adapter (50.0)
22
+ activerecord (>= 2.2)
23
+ activerecord-jdbcmysql-adapter (50.0)
24
+ activerecord-jdbc-adapter (~> 50.0)
25
+ jdbc-mysql (~> 5.1.36)
26
+ activesupport (5.2.4.4)
27
+ concurrent-ruby (~> 1.0, >= 1.0.2)
28
+ i18n (>= 0.7, < 2)
29
+ minitest (~> 5.1)
30
+ tzinfo (~> 1.1)
31
+ addressable (2.7.0)
32
+ public_suffix (>= 2.0.2, < 5.0)
33
+ amq-protocol (2.3.2)
34
+ amqp (1.8.0)
35
+ amq-protocol (>= 2.2.0)
36
+ eventmachine
37
+ arel (9.0.0)
38
+ better-faraday (1.0.8)
39
+ activesupport (>= 4.0, < 6.0)
40
+ faraday (~> 0.12)
41
+ bunny (2.17.0)
42
+ amq-protocol (~> 2.3, >= 2.3.1)
43
+ clamp (1.3.2)
44
+ concurrent-ruby (1.1.8)
45
+ connection_pool (2.2.3)
46
+ cookiejar (0.3.3)
47
+ crack (0.4.3)
48
+ safe_yaml (~> 1.0.0)
49
+ diff-lcs (1.4.4)
50
+ em-http-request (1.1.7)
51
+ addressable (>= 2.3.4)
52
+ cookiejar (!= 0.3.1)
53
+ em-socksify (>= 0.3)
54
+ eventmachine (>= 1.0.3)
55
+ http_parser.rb (>= 0.6.0)
56
+ em-socksify (0.3.2)
57
+ eventmachine (>= 1.0.0.beta.4)
58
+ em-synchrony (1.0.6)
59
+ eventmachine (>= 1.0.0.beta.1)
60
+ em-websocket (0.5.2)
61
+ eventmachine (>= 0.12.9)
62
+ http_parser.rb (~> 0.6.0)
63
+ eventmachine (1.2.7)
64
+ eventmachine (1.2.7-java)
65
+ faraday (0.17.3)
66
+ multipart-post (>= 1.2, < 3)
67
+ faraday_middleware (0.13.1)
68
+ faraday (>= 0.7.4, < 1.0)
69
+ faye (1.4.0)
70
+ cookiejar (>= 0.3.0)
71
+ em-http-request (>= 1.1.6)
72
+ eventmachine (>= 0.12.0)
73
+ faye-websocket (>= 0.11.0)
74
+ multi_json (>= 1.0.0)
75
+ rack (>= 1.0.0)
76
+ websocket-driver (>= 0.5.1)
77
+ faye-websocket (0.11.0)
78
+ eventmachine (>= 0.12.0)
79
+ websocket-driver (>= 0.5.1)
80
+ hashdiff (1.0.1)
81
+ http_parser.rb (0.6.0)
82
+ http_parser.rb (0.6.0-java)
83
+ i18n (1.8.7)
84
+ concurrent-ruby (~> 1.0)
85
+ jdbc-mysql (5.1.47)
86
+ jruby-rack (1.1.21)
87
+ jwt (2.2.2)
88
+ memoist (0.16.2)
89
+ minitest (5.14.3)
90
+ mocha (1.11.2)
91
+ multi_json (1.15.0)
92
+ multipart-post (2.1.1)
93
+ net-http-persistent (3.0.1)
94
+ connection_pool (~> 2.2)
95
+ peatio-jruby (2.6.2)
96
+ activemodel (> 5.2, <= 6.0.0)
97
+ activerecord-jdbc-adapter
98
+ activerecord-jdbcmysql-adapter
99
+ amqp
100
+ bunny
101
+ clamp
102
+ em-synchrony (~> 1.0)
103
+ em-websocket
104
+ eventmachine
105
+ faraday_middleware (~> 0.13.1)
106
+ faye (~> 1.2)
107
+ jdbc-mysql
108
+ jwt
109
+ prometheus-client
110
+ trinidad
111
+ prometheus-client (2.1.0)
112
+ public_suffix (4.0.5)
113
+ rack (2.2.3)
114
+ rake (13.0.1)
115
+ rspec (3.9.0)
116
+ rspec-core (~> 3.9.0)
117
+ rspec-expectations (~> 3.9.0)
118
+ rspec-mocks (~> 3.9.0)
119
+ rspec-core (3.9.2)
120
+ rspec-support (~> 3.9.3)
121
+ rspec-expectations (3.9.2)
122
+ diff-lcs (>= 1.2.0, < 2.0)
123
+ rspec-support (~> 3.9.0)
124
+ rspec-mocks (3.9.1)
125
+ diff-lcs (>= 1.2.0, < 2.0)
126
+ rspec-support (~> 3.9.0)
127
+ rspec-support (3.9.3)
128
+ safe_yaml (1.0.5)
129
+ thread_safe (0.3.6)
130
+ thread_safe (0.3.6-java)
131
+ trinidad (1.4.6)
132
+ jruby-rack (~> 1.1.13)
133
+ trinidad_jars (>= 1.3.0, < 1.5.0)
134
+ trinidad_jars (1.4.2)
135
+ tzinfo (1.2.9)
136
+ thread_safe (~> 0.1)
137
+ webmock (3.8.3)
138
+ addressable (>= 2.3.6)
139
+ crack (>= 0.3.2)
140
+ hashdiff (>= 0.4.0, < 2.0.0)
141
+ websocket-driver (0.7.3)
142
+ websocket-extensions (>= 0.1.0)
143
+ websocket-driver (0.7.3-java)
144
+ websocket-extensions (>= 0.1.0)
145
+ websocket-extensions (0.1.5)
146
+
147
+ PLATFORMS
148
+ java
149
+ ruby
150
+
151
+ DEPENDENCIES
152
+ bundler (~> 1.16)
153
+ mocha (~> 1.8)
154
+ peatio-bitgo-jruby!
155
+ rake (~> 13.0)
156
+ rspec (~> 3.0)
157
+ webmock (~> 3.5)
158
+
159
+ BUNDLED WITH
160
+ 1.17.3
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Naichuk Maksym
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,67 @@
1
+ # Peatio::bitgo
2
+
3
+ Peatio bitgo plugin for Rubykube stack
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'peatio-bitgo'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install peatio-bitgo
20
+
21
+ ## Usage
22
+
23
+ For Peatio bitgo plugin integration you need to do the following steps:
24
+
25
+ ### Image Build.
26
+
27
+ 1. Add peatio-bitgo gem into your Gemfile.plugin
28
+ ```ruby
29
+ gem 'peatio-bitgo', '~> 0.2.0'
30
+ ```
31
+
32
+ 2. Run `bundle install` for updating Gemfile.lock
33
+
34
+ 3. Build custom Peatio [docker image with bitgo plugin](https://github.com/rubykube/peatio/blob/master/docs/plugins.md#build)
35
+
36
+ 4. Push your image using `docker push`
37
+
38
+ 5. Update your deployment to use image with peatio-bitgo gem
39
+
40
+ ### Peatio Configuration.
41
+
42
+ 1. Create bitgo Blockchain [config example](../config/blockchains.yml).
43
+ * No additional steps are needed
44
+
45
+ 2. Create bitgo Currency [config example](../config/currencies.yml).
46
+ * No additional steps are needed
47
+
48
+ 3. Create bitgo Wallets [config example](../config/wallets.yml)(deposit and hot wallets are required).
49
+ * No additional steps are needed
50
+
51
+
52
+ ## Development
53
+
54
+ Plugin development [example](https://github.com/rubykube/peatio/blob/master/docs/coins/development.md).
55
+
56
+ ## Contributing
57
+
58
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rubykube/peatio-bitgo.
59
+
60
+ ## License
61
+
62
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
63
+
64
+ ## Consulting
65
+
66
+ You can contact Openware for finding certified vendors:
67
+ [Openware.com](https://www.openware.com)
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "peatio/bitgo"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
File without changes
@@ -0,0 +1,140 @@
1
+ - id: ltc
2
+ name: Litecoin
3
+ blockchain_key: ltc-testnet
4
+ symbol: 'Ł'
5
+ type: coin
6
+ precision: 8
7
+ base_factor: 100_000_000
8
+ enabled: true
9
+ # Deposits with less amount are skipped during blockchain synchronization.
10
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
11
+ min_deposit_amount: 0.0004488
12
+ min_collection_amount: 0.0004488
13
+ withdraw_limit_24h: 0.5
14
+ withdraw_limit_72h: 1.2
15
+ deposit_fee: 0
16
+ withdraw_fee: 0
17
+ position: 1
18
+ options: {}
19
+
20
+ - id: xrp
21
+ name: Ripple
22
+ blockchain_key: xrp-testnet
23
+ symbol: 'ꭆ'
24
+ type: coin
25
+ precision: 8
26
+ base_factor: 1_000_000
27
+ enabled: true
28
+ # Deposits with less amount are skipped during blockchain synchronization.
29
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
30
+ min_deposit_amount: 0.0001
31
+ min_collection_amount: 0.0001
32
+ withdraw_limit_24h: 100
33
+ withdraw_limit_72h: 200
34
+ deposit_fee: 0
35
+ withdraw_fee: 0
36
+ position: 2
37
+ options: {}
38
+
39
+ - id: bch
40
+ name: Bitcoin Cash
41
+ blockchain_key: bch-testnet
42
+ symbol: '฿'
43
+ type: coin
44
+ precision: 8
45
+ base_factor: 100_000_000
46
+ enabled: true
47
+ # Deposits with less amount are skipped during blockchain synchronization.
48
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
49
+ min_deposit_amount: 0.0000748
50
+ min_collection_amount: 0.0000748
51
+ withdraw_limit_24h: 0.1
52
+ withdraw_limit_72h: 0.2
53
+ deposit_fee: 0
54
+ withdraw_fee: 0
55
+ position: 3
56
+ options: {}
57
+
58
+ - id: btc
59
+ name: Bitcoin
60
+ blockchain_key: btc-testnet
61
+ symbol: '฿'
62
+ type: coin
63
+ precision: 8
64
+ base_factor: 100_000_000
65
+ visible: true
66
+ deposit_enabled: true
67
+ withdrawal_enabled: true
68
+ # Deposits with less amount are skipped during blockchain synchronization.
69
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
70
+ min_deposit_amount: 0.0000356
71
+ min_collection_amount: 0.0000356
72
+ withdraw_limit_24h: 0.1
73
+ withdraw_limit_72h: 0.2
74
+ deposit_fee: 0
75
+ withdraw_fee: 0
76
+ position: 4
77
+ options: {}
78
+
79
+ - id: eth
80
+ name: Ethereum
81
+ blockchain_key: eth-rinkeby
82
+ symbol: 'Ξ'
83
+ type: coin
84
+ precision: 8
85
+ base_factor: 1_000_000_000_000_000_000
86
+ visible: true
87
+ deposit_enabled: true
88
+ withdrawal_enabled: true
89
+ # Deposits with less amount are skipped during blockchain synchronization.
90
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
91
+ min_deposit_amount: 0.00021
92
+ min_collection_amount: 0.00021
93
+ withdraw_limit_24h: 0.2
94
+ withdraw_limit_72h: 0.5
95
+ deposit_fee: 0
96
+ withdraw_fee: 0
97
+ position: 5
98
+ options:
99
+ # ETH tx fees configurations.
100
+ #
101
+ # Maximum amount of gas you're willing to spend on a particular transaction.
102
+ gas_limit: 21_000
103
+ # Internal price that is paid for running a transaction on the Ethereum network.
104
+ gas_price: 1_000_000_000
105
+
106
+ - id: eos
107
+ name: EOS
108
+ blockchain_key: eos-testnet
109
+ symbol: 'E'
110
+ type: coin
111
+ precision: 4
112
+ base_factor: 10_000
113
+ enabled: true
114
+ # Deposits with less amount are skipped during blockchain synchronization.
115
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
116
+ min_deposit_amount: 0.0001
117
+ min_collection_amount: 0.0001
118
+ withdraw_limit_24h: 100.0
119
+ withdraw_limit_72h: 500.0
120
+ deposit_fee: 0
121
+ withdraw_fee: 0
122
+ position: 6
123
+
124
+ - id: dash
125
+ name: Dash
126
+ blockchain_key: dash-testnet
127
+ symbol: 'D'
128
+ type: coin
129
+ precision: 8
130
+ base_factor: 100_000_000
131
+ enabled: true
132
+ # Deposits with less amount are skipped during blockchain synchronization.
133
+ # We advise to set value 10 times bigger than the network fee to prevent losses.
134
+ min_deposit_amount: 0.0001
135
+ min_collection_amount: 0.0001
136
+ withdraw_limit_24h: 100.0
137
+ withdraw_limit_72h: 500.0
138
+ deposit_fee: 0
139
+ withdraw_fee: 0
140
+ position: 7