peatio-ndex 0.2.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.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config/blockchains.yml +11 -0
- data/config/currencies.yml +113 -0
- data/config/wallets.yml +363 -0
- data/lib/peatio/ndex.rb +18 -0
- data/lib/peatio/ndex/blockchain.rb +89 -0
- data/lib/peatio/ndex/client.rb +93 -0
- data/lib/peatio/ndex/hooks.rb +42 -0
- data/lib/peatio/ndex/railtie.rb +13 -0
- data/lib/peatio/ndex/version.rb +5 -0
- data/lib/peatio/ndex/wallet.rb +84 -0
- data/peatio-ndex-0.1.0.gem +0 -0
- data/peatio-ndex-0.1.1.gem +0 -0
- data/peatio-ndex-0.1.2.gem +0 -0
- data/peatio-ndex.gemspec +50 -0
- metadata +223 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 900d8cecca4639682cab102f8c534a5a72292ebdcb14b86ceeef12d0f4d934bf
|
4
|
+
data.tar.gz: c701f9e740cdb40ac36c94c92eb41cf8da3f85462518fdf44a32b0b1d9682c49
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8a1197854db04b71cee67a8576869fa58e8f6ac91b579865c989d07730ecc8cc165b3b62923f49601d95398cc12d8a9f252e1012d27b2d25898ce794cacc15c9
|
7
|
+
data.tar.gz: acc4b4d86112f528b472f5d689ac0a84ba65ac253ed12d1feaefe249b8fe2c8f9dd43002c0eb8d55825ad69969fd0dcca53d3c208a85db841c7a438cfd8bb2a3
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Tanvir Rahaman aka BitBD
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Peatio::Ndex
|
2
|
+
|
3
|
+
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/ndex`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'peatio-ndex'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install peatio-ndex
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/peatio-ndex.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "peatio/ndex"
|
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__)
|
data/bin/setup
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
- key: nxt-testnet
|
2
|
+
name: Nxt Testnet
|
3
|
+
client: nxt # API client name.
|
4
|
+
server: http://127.0.0.1:6876 # Public NXT node endpoint.
|
5
|
+
height: 2024646 # Initial block number from which sync will be started.
|
6
|
+
min_confirmations: 1 # Minimal confirmations needed for withdraw and deposit confirmation.
|
7
|
+
explorer:
|
8
|
+
address: https://test.nxtportal.org/accounts/#{address}
|
9
|
+
transaction: https://test.nxtportal.org/transactions/#{txid}
|
10
|
+
status: active
|
11
|
+
<% end %>
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<% if ENV['CURRENCIES_CONFIG'] %>
|
2
|
+
<%= File.read(ENV['CURRENCIES_CONFIG']) %>
|
3
|
+
<% else %>
|
4
|
+
- id: usd
|
5
|
+
symbol: '$'
|
6
|
+
type: fiat
|
7
|
+
precision: 2
|
8
|
+
base_factor: 1
|
9
|
+
enabled: true
|
10
|
+
quick_withdraw_limit: 1000
|
11
|
+
deposit_fee: 0
|
12
|
+
withdraw_fee: 0
|
13
|
+
|
14
|
+
- id: btc
|
15
|
+
blockchain_key: btc-testnet
|
16
|
+
symbol: '฿'
|
17
|
+
type: coin
|
18
|
+
precision: 8
|
19
|
+
base_factor: 100_000_000
|
20
|
+
enabled: true
|
21
|
+
quick_withdraw_limit: 0.1
|
22
|
+
deposit_fee: 0
|
23
|
+
withdraw_fee: 0
|
24
|
+
options: {}
|
25
|
+
|
26
|
+
- id: xrp
|
27
|
+
blockchain_key: xrp-testnet
|
28
|
+
symbol: 'ꭆ'
|
29
|
+
type: coin
|
30
|
+
precision: 8
|
31
|
+
base_factor: 1_000_000
|
32
|
+
enabled: true
|
33
|
+
quick_withdraw_limit: 1000
|
34
|
+
deposit_fee: 0
|
35
|
+
withdraw_fee: 0
|
36
|
+
options: {}
|
37
|
+
|
38
|
+
- id: bch
|
39
|
+
blockchain_key: bch-testnet
|
40
|
+
symbol: '฿'
|
41
|
+
type: coin
|
42
|
+
precision: 8
|
43
|
+
base_factor: 100_000_000
|
44
|
+
enabled: true
|
45
|
+
quick_withdraw_limit: 1
|
46
|
+
deposit_fee: 0
|
47
|
+
withdraw_fee: 0
|
48
|
+
options: {}
|
49
|
+
|
50
|
+
- id: ltc
|
51
|
+
blockchain_key: ltc-testnet
|
52
|
+
symbol: 'Ł'
|
53
|
+
type: coin
|
54
|
+
precision: 8
|
55
|
+
base_factor: 100_000_000
|
56
|
+
enabled: true
|
57
|
+
quick_withdraw_limit: 5
|
58
|
+
deposit_fee: 0
|
59
|
+
withdraw_fee: 0
|
60
|
+
options: {}
|
61
|
+
|
62
|
+
- id: dash
|
63
|
+
blockchain_key: dash-testnet
|
64
|
+
symbol: 'Đ'
|
65
|
+
type: coin
|
66
|
+
precision: 8
|
67
|
+
base_factor: 100_000_000
|
68
|
+
enabled: true
|
69
|
+
quick_withdraw_limit: 2
|
70
|
+
deposit_fee: 0
|
71
|
+
withdraw_fee: 0
|
72
|
+
options: {}
|
73
|
+
|
74
|
+
- id: eth
|
75
|
+
blockchain_key: eth-rinkeby
|
76
|
+
symbol: 'Ξ'
|
77
|
+
type: coin
|
78
|
+
precision: 8
|
79
|
+
base_factor: 1_000_000_000_000_000_000
|
80
|
+
enabled: true
|
81
|
+
quick_withdraw_limit: 2
|
82
|
+
deposit_fee: 0
|
83
|
+
withdraw_fee: 0
|
84
|
+
options: {}
|
85
|
+
|
86
|
+
- id: trst
|
87
|
+
blockchain_key: eth-rinkeby
|
88
|
+
symbol: 'Ξ'
|
89
|
+
type: coin
|
90
|
+
precision: 8
|
91
|
+
base_factor: 1_000_000 # IMPORTANT: Don't forget to update this variable according
|
92
|
+
enabled: true # to your ERC20-based currency requirements
|
93
|
+
quick_withdraw_limit: 3000 # (usually can be found on the official website).
|
94
|
+
deposit_fee: 0
|
95
|
+
withdraw_fee: 0
|
96
|
+
options:
|
97
|
+
#
|
98
|
+
# ERC20 configuration.
|
99
|
+
erc20_contract_address: '0x0000000000000000000000000000000000000000' # Always wrap this value in quotes!
|
100
|
+
|
101
|
+
- id: nxt
|
102
|
+
blockchain_key: nxt-testnet
|
103
|
+
symbol: 'N'
|
104
|
+
type: coin
|
105
|
+
precision: 8
|
106
|
+
base_factor: 100_000_000
|
107
|
+
enabled: true
|
108
|
+
quick_withdraw_limit: 1
|
109
|
+
deposit_fee: 0
|
110
|
+
withdraw_fee: 0
|
111
|
+
options: {}
|
112
|
+
<% end %>
|
113
|
+
|
data/config/wallets.yml
ADDED
@@ -0,0 +1,363 @@
|
|
1
|
+
<% if ENV['WALLETS_CONFIG'] %>
|
2
|
+
<%= File.read(ENV['WALLETS_CONFIG']) %>
|
3
|
+
<% else %>
|
4
|
+
- name: Ethereum Deposit Wallet
|
5
|
+
blockchain_key: eth-rinkeby
|
6
|
+
currency_id: eth
|
7
|
+
# Address where deposits will be collected to.
|
8
|
+
address: '0x2b9fBC10EbAeEc28a8Fc10069C0BC29E45eBEB9C' # IMPORTANT: Always wrap this value in quotes!
|
9
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
10
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
11
|
+
max_balance: 0.0
|
12
|
+
status: active
|
13
|
+
gateway: geth # Gateway client name.
|
14
|
+
settings:
|
15
|
+
#
|
16
|
+
# Geth gateway client settings.
|
17
|
+
uri: http://127.0.0.1:8545
|
18
|
+
secret: 'changeme'
|
19
|
+
|
20
|
+
- name: Ethereum Hot Wallet
|
21
|
+
blockchain_key: eth-rinkeby
|
22
|
+
currency_id: eth
|
23
|
+
# Address where deposits will be collected to.
|
24
|
+
address: '0x270704935783087a01c7a28d8f2d8f01670c8050' # IMPORTANT: Always wrap this value in quotes!
|
25
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
26
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
27
|
+
max_balance: 100.0
|
28
|
+
status: active
|
29
|
+
gateway: geth # Gateway client name.
|
30
|
+
settings:
|
31
|
+
#
|
32
|
+
# Geth gateway client settings.
|
33
|
+
uri: http://127.0.0.1:8545
|
34
|
+
secret: 'test'
|
35
|
+
|
36
|
+
|
37
|
+
- name: Ethereum Warm Wallet
|
38
|
+
blockchain_key: eth-rinkeby
|
39
|
+
currency_id: eth
|
40
|
+
# Address where deposits will be collected to.
|
41
|
+
address: '0x2b9fBC10EbAeEc28a8Fc10069C0BC29E45eBEB9C' # IMPORTANT: Always wrap this value in quotes!
|
42
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
43
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
44
|
+
max_balance: 1000.0
|
45
|
+
status: active
|
46
|
+
gateway: geth # Gateway client name.
|
47
|
+
settings:
|
48
|
+
#
|
49
|
+
# Geth gateway client settings.
|
50
|
+
uri: http://user:password@127.0.0.1:8545
|
51
|
+
secret: 'changeme'
|
52
|
+
|
53
|
+
- name: Bitcoin Deposit Wallet
|
54
|
+
blockchain_key: btc-testnet
|
55
|
+
currency_id: btc
|
56
|
+
# Address where deposits will be collected to.
|
57
|
+
address: '2N4qYjye5yENLEkz4UkLFxzPaxJatF3kRwf' # IMPORTANT: Always wrap this value in quotes!
|
58
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
59
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
60
|
+
max_balance: 0.0
|
61
|
+
status: active
|
62
|
+
gateway: bitcoind # Gateway client name.
|
63
|
+
settings:
|
64
|
+
#
|
65
|
+
# Bitcoind gateway client settings.
|
66
|
+
uri: http://user:password@127.0.0.1:18332
|
67
|
+
|
68
|
+
- name: Bitcoin Hot Wallet
|
69
|
+
blockchain_key: btc-testnet
|
70
|
+
currency_id: btc
|
71
|
+
# Address where deposits will be collected to.
|
72
|
+
address: '2N4qYjye5yENLEkz4UkLFxzPaxJatF3kRwf' # IMPORTANT: Always wrap this value in quotes!
|
73
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
74
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
75
|
+
max_balance: 5.0
|
76
|
+
status: active
|
77
|
+
gateway: bitgo # Gateway client name.
|
78
|
+
settings:
|
79
|
+
#
|
80
|
+
# BitGo gateway client settings.
|
81
|
+
bitgo_test_net: on
|
82
|
+
bitgo_wallet_id: ~
|
83
|
+
bitgo_wallet_passphrase: ~
|
84
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
85
|
+
bitgo_rest_api_access_token: ~
|
86
|
+
|
87
|
+
- name: Bitcoin Warm Wallet
|
88
|
+
blockchain_key: btc-testnet
|
89
|
+
currency_id: btc
|
90
|
+
# Address where deposits will be collected to.
|
91
|
+
address: '2N4qYjye5yENLEkz4UkLFxzPaxJatF3kRwf' # IMPORTANT: Always wrap this value in quotes!
|
92
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
93
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
94
|
+
max_balance: 50.0
|
95
|
+
status: active
|
96
|
+
gateway: bitgo # Gateway client name.
|
97
|
+
settings:
|
98
|
+
#
|
99
|
+
# BitGo gateway client settings.
|
100
|
+
bitgo_test_net: on
|
101
|
+
bitgo_wallet_id: ~
|
102
|
+
bitgo_wallet_passphrase: ~
|
103
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
104
|
+
bitgo_rest_api_access_token: ~
|
105
|
+
|
106
|
+
- name: Bitcoincash Deposit Wallet
|
107
|
+
blockchain_key: bch-testnet
|
108
|
+
currency_id: bch
|
109
|
+
# Address where deposits will be collected to.
|
110
|
+
address: 'n2stP7w1DpSh7N1PzJh7eGjgCk3eTF3DMC' # IMPORTANT: Always wrap this value in quotes!
|
111
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
112
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
113
|
+
max_balance: 0.0
|
114
|
+
status: active
|
115
|
+
gateway: bitcoincashd # Gateway client name.
|
116
|
+
settings:
|
117
|
+
#
|
118
|
+
# Bitcoincashd gateway client settings.
|
119
|
+
uri: http://user:password@127.0.0.1:18332
|
120
|
+
|
121
|
+
- name: Bitcoincash Hot Wallet
|
122
|
+
blockchain_key: bch-testnet
|
123
|
+
currency_id: bch
|
124
|
+
# Address where deposits will be collected to.
|
125
|
+
address: 'n2stP7w1DpSh7N1PzJh7eGjgCk3eTF3DMC' # IMPORTANT: Always wrap this value in quotes!
|
126
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
127
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
128
|
+
max_balance: 5.0
|
129
|
+
status: active
|
130
|
+
gateway: bitgo # Gateway client name.
|
131
|
+
settings:
|
132
|
+
#
|
133
|
+
# BitGo gateway client settings.
|
134
|
+
bitgo_test_net: on
|
135
|
+
bitgo_wallet_id: ~
|
136
|
+
bitgo_wallet_passphrase: ~
|
137
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
138
|
+
bitgo_rest_api_access_token: ~
|
139
|
+
|
140
|
+
- name: Bitcoincash Warm Wallet
|
141
|
+
blockchain_key: bch-testnet
|
142
|
+
currency_id: bch
|
143
|
+
# Address where deposits will be collected to.
|
144
|
+
address: 'n2stP7w1DpSh7N1PzJh7eGjgCk3eTF3DMC' # IMPORTANT: Always wrap this value in quotes!
|
145
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
146
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
147
|
+
max_balance: 50.0
|
148
|
+
status: active
|
149
|
+
gateway: bitgo # Gateway client name.
|
150
|
+
settings:
|
151
|
+
#
|
152
|
+
# BitGo gateway client settings.
|
153
|
+
bitgo_test_net: on
|
154
|
+
bitgo_wallet_id: ~
|
155
|
+
bitgo_wallet_passphrase: ~
|
156
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
157
|
+
bitgo_rest_api_access_token: ~
|
158
|
+
|
159
|
+
|
160
|
+
- name: Litecoin Deposit Wallet
|
161
|
+
blockchain_key: ltc-testnet
|
162
|
+
currency_id: ltc
|
163
|
+
# Address where deposits will be collected to.
|
164
|
+
address: 'Qc2BM7gp8mKgJPPxLAadLAHteNQwhFwwuf' # IMPORTANT: Always wrap this value in quotes!
|
165
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
166
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
167
|
+
max_balance: 0.0
|
168
|
+
status: active
|
169
|
+
gateway: litecoind # Gateway client name.
|
170
|
+
settings:
|
171
|
+
#
|
172
|
+
# Litecoind gateway client settings.
|
173
|
+
uri: http://user:password@127.0.0.1:19332
|
174
|
+
|
175
|
+
- name: Litecoin Hot Wallet
|
176
|
+
blockchain_key: ltc-testnet
|
177
|
+
currency_id: ltc
|
178
|
+
# Address where deposits will be collected to.
|
179
|
+
address: 'Qc2BM7gp8mKgJPPxLAadLAHteNQwhFwwuf' # IMPORTANT: Always wrap this value in quotes!
|
180
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
181
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
182
|
+
max_balance: 5.0
|
183
|
+
status: active
|
184
|
+
gateway: bitgo # Gateway client name.
|
185
|
+
settings:
|
186
|
+
#
|
187
|
+
# BitGo gateway client settings.
|
188
|
+
bitgo_test_net: on
|
189
|
+
bitgo_wallet_id: ~
|
190
|
+
bitgo_wallet_passphrase: ~
|
191
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
192
|
+
bitgo_rest_api_access_token: ~
|
193
|
+
|
194
|
+
- name: Litecoin Warm Wallet
|
195
|
+
blockchain_key: ltc-testnet
|
196
|
+
currency_id: ltc
|
197
|
+
# Address where deposits will be collected to.
|
198
|
+
address: 'Qc2BM7gp8mKgJPPxLAadLAHteNQwhFwwuf' # IMPORTANT: Always wrap this value in quotes!
|
199
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
200
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
201
|
+
max_balance: 50.0
|
202
|
+
status: active
|
203
|
+
gateway: bitgo # Gateway client name.
|
204
|
+
settings:
|
205
|
+
#
|
206
|
+
# BitGo gateway client settings.
|
207
|
+
bitgo_test_net: on
|
208
|
+
bitgo_wallet_id: ~
|
209
|
+
bitgo_wallet_passphrase: ~
|
210
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
211
|
+
bitgo_rest_api_access_token: ~
|
212
|
+
|
213
|
+
|
214
|
+
- name: Dash Deposit Wallet
|
215
|
+
blockchain_key: dash-testnet
|
216
|
+
currency_id: dash
|
217
|
+
# Address where deposits will be collected to.
|
218
|
+
address: 'yVcZM6oUjfwrREm2CDb9G8BMHwwm5o5UsL' # IMPORTANT: Always wrap this value in quotes!
|
219
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
220
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
221
|
+
max_balance: 0.0
|
222
|
+
status: active
|
223
|
+
gateway: dashd # Gateway client name.
|
224
|
+
settings:
|
225
|
+
#
|
226
|
+
# Dashd gateway client settings.
|
227
|
+
uri: http://user:password@127.0.0.1:19998
|
228
|
+
|
229
|
+
- name: Dash Hot Wallet
|
230
|
+
blockchain_key: dash-testnet
|
231
|
+
currency_id: dash
|
232
|
+
# Address where deposits will be collected to.
|
233
|
+
address: 'yVcZM6oUjfwrREm2CDb9G8BMHwwm5o5UsL' # IMPORTANT: Always wrap this value in quotes!
|
234
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
235
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
236
|
+
max_balance: 5.0
|
237
|
+
status: active
|
238
|
+
gateway: bitgo # Gateway client name.
|
239
|
+
settings:
|
240
|
+
#
|
241
|
+
# BitGo gateway client settings.
|
242
|
+
bitgo_test_net: on
|
243
|
+
bitgo_wallet_id: ~
|
244
|
+
bitgo_wallet_passphrase: ~
|
245
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
246
|
+
bitgo_rest_api_access_token: ~
|
247
|
+
|
248
|
+
- name: Dash Warm Wallet
|
249
|
+
blockchain_key: dash-testnet
|
250
|
+
currency_id: dash
|
251
|
+
# Address where deposits will be collected to.
|
252
|
+
address: 'yVcZM6oUjfwrREm2CDb9G8BMHwwm5o5UsL' # IMPORTANT: Always wrap this value in quotes!
|
253
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
254
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
255
|
+
max_balance: 50.0
|
256
|
+
status: active
|
257
|
+
gateway: bitgo # Gateway client name.
|
258
|
+
settings:
|
259
|
+
#
|
260
|
+
# BitGo gateway client settings.
|
261
|
+
bitgo_test_net: on
|
262
|
+
bitgo_wallet_id: ~
|
263
|
+
bitgo_wallet_passphrase: ~
|
264
|
+
bitgo_rest_api_root: https://test.bitgo.com/api/v2
|
265
|
+
bitgo_rest_api_access_token: ~
|
266
|
+
|
267
|
+
- name: Ripple Deposit Wallet
|
268
|
+
blockchain_key: xrp-testnet
|
269
|
+
currency_id: xrp
|
270
|
+
# Address where deposits will be collected to.
|
271
|
+
address: 'r4kpJtnx4goLYXoRdi7mbkRpZ9Xpx2RyPN' # IMPORTANT: Always wrap this value in quotes!
|
272
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
273
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
274
|
+
max_balance: 0.0
|
275
|
+
status: active
|
276
|
+
gateway: rippled # Gateway client name.
|
277
|
+
settings:
|
278
|
+
#
|
279
|
+
# Geth gateway client settings.
|
280
|
+
uri: http://127.0.0.1:5005
|
281
|
+
secret: 'changeme'
|
282
|
+
|
283
|
+
- name: Ripple Hot Wallet
|
284
|
+
blockchain_key: xrp-testnet
|
285
|
+
currency_id: xrp
|
286
|
+
# Address where deposits will be collected to.
|
287
|
+
address: 'r4kpJtnx4goLYXoRdi7mbkRpZ9Xpx2RyPN' # IMPORTANT: Always wrap this value in quotes!
|
288
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
289
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
290
|
+
max_balance: 100.0
|
291
|
+
status: active
|
292
|
+
gateway: rippled # Gateway client name.
|
293
|
+
settings:
|
294
|
+
#
|
295
|
+
# Geth gateway client settings.
|
296
|
+
uri: http://127.0.0.1:5005
|
297
|
+
secret: 'changeme'
|
298
|
+
|
299
|
+
- name: Ripple Warm Wallet
|
300
|
+
blockchain_key: xrp-testnet
|
301
|
+
currency_id: xrp
|
302
|
+
# Address where deposits will be collected to.
|
303
|
+
address: 'r4kpJtnx4goLYXoRdi7mbkRpZ9Xpx2RyPN' # IMPORTANT: Always wrap this value in quotes!
|
304
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
305
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
306
|
+
max_balance: 1000.0
|
307
|
+
status: active
|
308
|
+
gateway: rippled # Gateway client name.
|
309
|
+
settings:
|
310
|
+
#
|
311
|
+
# Geth gateway client settings.
|
312
|
+
uri: http://user:password@127.0.0.1:5005
|
313
|
+
secret: 'changeme'
|
314
|
+
|
315
|
+
- name: Nxt Deposit Wallet
|
316
|
+
blockchain_key: nxt-testnet
|
317
|
+
currency_id: nxt
|
318
|
+
# Address where deposits will be collected to.
|
319
|
+
address: 'NXT-Y9NM-7HBT-7A8B-3YUHS' # IMPORTANT: Always wrap this value in quotes!
|
320
|
+
kind: deposit # Wallet kind (deposit, hot, warm or cold).
|
321
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
322
|
+
max_balance: 0.0
|
323
|
+
status: active
|
324
|
+
gateway: nxt # Gateway client name.
|
325
|
+
settings:
|
326
|
+
#
|
327
|
+
# Geth gateway client settings.
|
328
|
+
uri: http://127.0.0.1:6876
|
329
|
+
secret: 'changeme'
|
330
|
+
|
331
|
+
- name: Nxt Hot Wallet
|
332
|
+
blockchain_key: nxt-testnet
|
333
|
+
currency_id: nxt
|
334
|
+
# Address where deposits will be collected to.
|
335
|
+
address: 'NXT-Y9NM-7HBT-7A8B-3YUHS' # IMPORTANT: Always wrap this value in quotes!
|
336
|
+
kind: hot # Wallet kind (deposit, hot, warm or cold).
|
337
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
338
|
+
max_balance: 100.0
|
339
|
+
status: active
|
340
|
+
gateway: nxt # Gateway client name.
|
341
|
+
settings:
|
342
|
+
#
|
343
|
+
# Geth gateway client settings.
|
344
|
+
uri: http://127.0.0.1:6876
|
345
|
+
secret: 'changeme'
|
346
|
+
|
347
|
+
- name: Nxt Warm Wallet
|
348
|
+
blockchain_key: nxt-testnet
|
349
|
+
currency_id: nxt
|
350
|
+
# Address where deposits will be collected to.
|
351
|
+
address: 'NXT-Y9NM-7HBT-7A8B-3YUHS' # IMPORTANT: Always wrap this value in quotes!
|
352
|
+
kind: warm # Wallet kind (deposit, hot, warm or cold).
|
353
|
+
nsig: 1 # Number of signatures required for performing withdraw.
|
354
|
+
max_balance: 1000.0
|
355
|
+
status: active
|
356
|
+
gateway: nxt # Gateway client name.
|
357
|
+
settings:
|
358
|
+
#
|
359
|
+
# Geth gateway client settings.
|
360
|
+
uri: http://127.0.0.1:6876
|
361
|
+
secret: 'changeme'
|
362
|
+
<% end %>
|
363
|
+
|
data/lib/peatio/ndex.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "active_support/core_ext/object/blank"
|
2
|
+
require "active_support/core_ext/enumerable"
|
3
|
+
require "peatio"
|
4
|
+
|
5
|
+
module Peatio
|
6
|
+
module Ndex
|
7
|
+
require "bigdecimal"
|
8
|
+
require "bigdecimal/util"
|
9
|
+
|
10
|
+
require "peatio/ndex/blockchain"
|
11
|
+
require "peatio/ndex/client"
|
12
|
+
require "peatio/ndex/wallet"
|
13
|
+
|
14
|
+
require "peatio/ndex/hooks"
|
15
|
+
|
16
|
+
require "peatio/ndex/version"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
|
2
|
+
module Peatio
|
3
|
+
module Ndex
|
4
|
+
# TODO: Processing of unconfirmed transactions from mempool isn't supported now.
|
5
|
+
class Blockchain < Peatio::Blockchain::Abstract
|
6
|
+
|
7
|
+
DEFAULT_FEATURES = {case_sensitive: true, cash_addr_format: false}.freeze
|
8
|
+
|
9
|
+
def initialize(*)
|
10
|
+
super
|
11
|
+
@json_rpc_call_id = 0
|
12
|
+
@json_rpc_endpoint = URI.parse(blockchain.server)
|
13
|
+
end
|
14
|
+
|
15
|
+
def endpoint
|
16
|
+
@json_rpc_endpoint
|
17
|
+
end
|
18
|
+
|
19
|
+
def latest_block_number
|
20
|
+
Rails.cache.fetch "latest_#{self.class.name.underscore}_block_number", expires_in: 5.seconds do
|
21
|
+
json_rpc({requestType: 'getBlocks', lastIndex: 0}).fetch('blocks')[0].fetch('height')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_block(block_hash)
|
26
|
+
json_rpc({requestType: 'getBlock', block: block_hash, includeTransactions: true})
|
27
|
+
end
|
28
|
+
|
29
|
+
def get_block_hash(height)
|
30
|
+
current_block = height || 0
|
31
|
+
json_rpc({requestType: 'getBlockId', height: current_block}).fetch('block')
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_unconfirmed_txns
|
35
|
+
json_rpc({ requestType: 'getUnconfirmedTransactions'}).fetch('unconfirmedTransactions')
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_raw_transaction(txid)
|
39
|
+
json_rpc({ requestType: 'getTransaction', transaction: txid})
|
40
|
+
end
|
41
|
+
|
42
|
+
def build_transaction(tx, current_block, currency)
|
43
|
+
{ id: normalize_txid(tx.fetch('transaction')),
|
44
|
+
block_number: current_block,
|
45
|
+
entries: [
|
46
|
+
{
|
47
|
+
amount: convert_from_base_unit(tx.fetch('amountNQT'), currency),
|
48
|
+
address: normalize_address(tx['recipientRS'])
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
def to_address(tx)
|
55
|
+
[normalize_address(tx.fetch('recipientRS'))]
|
56
|
+
end
|
57
|
+
|
58
|
+
def valid_transaction?(tx)
|
59
|
+
[0, '0'].include?(tx['type'])
|
60
|
+
end
|
61
|
+
|
62
|
+
def invalid_transaction?(tx)
|
63
|
+
!valid_transaction?(tx)
|
64
|
+
end
|
65
|
+
|
66
|
+
protected
|
67
|
+
|
68
|
+
def connection
|
69
|
+
Faraday.new(@json_rpc_endpoint).tap do |connection|
|
70
|
+
unless @json_rpc_endpoint.user.blank?
|
71
|
+
connection.basic_auth(@json_rpc_endpoint.user, @json_rpc_endpoint.password)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
memoize :connection
|
76
|
+
|
77
|
+
def json_rpc(params = {})
|
78
|
+
response = connection.post do |req|
|
79
|
+
req.url '/nxt?',
|
80
|
+
req.body = params
|
81
|
+
end
|
82
|
+
response.assert_success!
|
83
|
+
response = JSON.parse(response.body)
|
84
|
+
response['errorDescription'].tap { |error| raise Error, error.inspect if error }
|
85
|
+
response
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'memoist'
|
2
|
+
require 'faraday'
|
3
|
+
require 'better-faraday'
|
4
|
+
|
5
|
+
module Peatio
|
6
|
+
module Ndex
|
7
|
+
class Client
|
8
|
+
Error = Class.new(StandardError)
|
9
|
+
class ConnectionError < Error; end
|
10
|
+
|
11
|
+
class ResponseError < Error
|
12
|
+
def initialize(code, msg)
|
13
|
+
@code = code
|
14
|
+
@msg = msg
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize(*)
|
18
|
+
super
|
19
|
+
@json_rpc_endpoint = URI.parse(wallet.uri)
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_address!(options = {})
|
23
|
+
secret = options.fetch(:secret) { Passgen.generate(length: 64, symbols: true) }
|
24
|
+
{
|
25
|
+
address: normalize_address(json_rpc({requestType: 'getAccountId', secretPhrase: secret}).fetch('accountRS')),
|
26
|
+
secret: secret
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_withdrawal!(issuer, recipient, amount, options = {})
|
31
|
+
withdrawal_request(issuer, recipient, amount, options).fetch('transactionJSON').yield_self do |txn|
|
32
|
+
normalize_txid(txn['transaction'])
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def get_txn_fee(issuer, recipient, amount, options = {})
|
37
|
+
withdrawal_request(issuer, recipient, amount, options).fetch('transactionJSON').yield_self do |txn|
|
38
|
+
convert_from_base_unit(txn['feeNQT'])
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def inspect_address!(address)
|
43
|
+
{ address: normalize_address(address),
|
44
|
+
is_valid: true }
|
45
|
+
end
|
46
|
+
|
47
|
+
def normalize_address(address)
|
48
|
+
address.upcase
|
49
|
+
end
|
50
|
+
|
51
|
+
def normalize_txid(txid)
|
52
|
+
txid.downcase
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
protected
|
57
|
+
|
58
|
+
def connection
|
59
|
+
Faraday.new(@json_rpc_endpoint).tap do |connection|
|
60
|
+
unless @json_rpc_endpoint.user.blank?
|
61
|
+
connection.basic_auth(@json_rpc_endpoint.user, @json_rpc_endpoint.password)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
memoize :connection
|
66
|
+
|
67
|
+
def json_rpc(params = {})
|
68
|
+
response = connection.post do |req|
|
69
|
+
req.url '/nxt?',
|
70
|
+
req.body = params
|
71
|
+
end
|
72
|
+
response.assert_success!
|
73
|
+
response = JSON.parse(response.body)
|
74
|
+
response['errorDescription'].tap { |error| raise Error, error.inspect if error }
|
75
|
+
response
|
76
|
+
end
|
77
|
+
|
78
|
+
def withdrawal_request(issuer, recipient, amount, options = {})
|
79
|
+
json_rpc(
|
80
|
+
{
|
81
|
+
requestType: 'sendMoney',
|
82
|
+
secretPhrase: issuer.fetch(:secret),
|
83
|
+
recipient: normalize_address(recipient.fetch(:address)),
|
84
|
+
amountNQT: convert_to_base_unit!(amount),
|
85
|
+
deadline: 60,
|
86
|
+
feeNQT: options.has_key?(:feeNQT) ? options[:feeNQT] : 0,
|
87
|
+
broadcast: options.has_key?(:broadcast) ? options[:broadcast] : true
|
88
|
+
}
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Peatio
|
2
|
+
module Ndex
|
3
|
+
module Hooks
|
4
|
+
BLOCKCHAIN_VERSION_REQUIREMENT = "~> 1.0.0"
|
5
|
+
WALLET_VERSION_REQUIREMENT = "~> 1.0.0"
|
6
|
+
|
7
|
+
class << self
|
8
|
+
def check_compatibility
|
9
|
+
unless Gem::Requirement.new(BLOCKCHAIN_VERSION_REQUIREMENT)
|
10
|
+
.satisfied_by?(Gem::Version.new(Peatio::Blockchain::VERSION))
|
11
|
+
[
|
12
|
+
"Ndex blockchain version requiremnt was not suttisfied by Peatio::Blockchain.",
|
13
|
+
"Ndex blockchain requires #{BLOCKCHAIN_VERSION_REQUIREMENT}.",
|
14
|
+
"Peatio::Blockchain version is #{Peatio::Blockchain::VERSION}"
|
15
|
+
].join('\n').tap { |s| Kernel.abort s }
|
16
|
+
end
|
17
|
+
|
18
|
+
unless Gem::Requirement.new(WALLET_VERSION_REQUIREMENT)
|
19
|
+
.satisfied_by?(Gem::Version.new(Peatio::Wallet::VERSION))
|
20
|
+
[
|
21
|
+
"Ndex wallet version requiremnt was not suttisfied by Peatio::Wallet.",
|
22
|
+
"Ndex wallet requires #{WALLET_VERSION_REQUIREMENT}.",
|
23
|
+
"Peatio::Wallet version is #{Peatio::Wallet::VERSION}"
|
24
|
+
].join('\n').tap { |s| Kernel.abort s }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def register
|
29
|
+
Peatio::Blockchain.registry[:ndex] = Ndex::Blockchain.new
|
30
|
+
Peatio::Wallet.registry[:ndexd] = Ndex::Wallet.new
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
if defined?(Rails::Railtie)
|
35
|
+
require "peatio/ndex/railtie"
|
36
|
+
else
|
37
|
+
check_compatibility
|
38
|
+
register
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module Peatio
|
2
|
+
module Ndex
|
3
|
+
class Wallet < Peatio::Wallet::Abstract
|
4
|
+
|
5
|
+
def initialize(*)
|
6
|
+
super
|
7
|
+
@json_rpc_call_id = 0
|
8
|
+
@json_rpc_endpoint = URI.parse(blockchain.server)
|
9
|
+
end
|
10
|
+
|
11
|
+
def endpoint
|
12
|
+
@json_rpc_endpoint
|
13
|
+
end
|
14
|
+
|
15
|
+
def latest_block_number
|
16
|
+
Rails.cache.fetch "latest_#{self.class.name.underscore}_block_number", expires_in: 5.seconds do
|
17
|
+
json_rpc({requestType: 'getBlocks', lastIndex: 0}).fetch('blocks')[0].fetch('height')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_block(block_hash)
|
22
|
+
json_rpc({requestType: 'getBlock', block: block_hash, includeTransactions: true})
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_block_hash(height)
|
26
|
+
current_block = height || 0
|
27
|
+
json_rpc({requestType: 'getBlockId', height: current_block}).fetch('block')
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_unconfirmed_txns
|
31
|
+
json_rpc({ requestType: 'getUnconfirmedTransactions'}).fetch('unconfirmedTransactions')
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_raw_transaction(txid)
|
35
|
+
json_rpc({ requestType: 'getTransaction', transaction: txid})
|
36
|
+
end
|
37
|
+
|
38
|
+
def build_transaction(tx, current_block, currency)
|
39
|
+
{ id: normalize_txid(tx.fetch('transaction')),
|
40
|
+
block_number: current_block,
|
41
|
+
entries: [
|
42
|
+
{
|
43
|
+
amount: convert_from_base_unit(tx.fetch('amountNQT'), currency),
|
44
|
+
address: normalize_address(tx['recipientRS'])
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_address(tx)
|
51
|
+
[normalize_address(tx.fetch('recipientRS'))]
|
52
|
+
end
|
53
|
+
|
54
|
+
def valid_transaction?(tx)
|
55
|
+
[0, '0'].include?(tx['type'])
|
56
|
+
end
|
57
|
+
|
58
|
+
def invalid_transaction?(tx)
|
59
|
+
!valid_transaction?(tx)
|
60
|
+
end
|
61
|
+
|
62
|
+
protected
|
63
|
+
|
64
|
+
def connection
|
65
|
+
Faraday.new(@json_rpc_endpoint).tap do |connection|
|
66
|
+
unless @json_rpc_endpoint.user.blank?
|
67
|
+
connection.basic_auth(@json_rpc_endpoint.user, @json_rpc_endpoint.password)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
memoize :connection
|
72
|
+
|
73
|
+
def json_rpc(params = {})
|
74
|
+
response = connection.post do |req|
|
75
|
+
req.url '/nxt?',
|
76
|
+
req.body = params
|
77
|
+
end
|
78
|
+
response.assert_success!
|
79
|
+
response = JSON.parse(response.body)
|
80
|
+
response['errorDescription'].tap { |error| raise Error, error.inspect if error }
|
81
|
+
response
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
data/peatio-ndex.gemspec
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "peatio/ndex/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "peatio-ndex"
|
8
|
+
spec.version = Peatio::Ndex::VERSION
|
9
|
+
spec.authors = ["BitBD"]
|
10
|
+
spec.email = ["developer@nexbit.io"]
|
11
|
+
|
12
|
+
spec.summary = %q{Peatio Blockchain Plugin}
|
13
|
+
spec.description = %q{Peatio Blockchain Plugin for nPro}
|
14
|
+
spec.homepage = "https://www.ndexnetwork.com"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
|
21
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
spec.metadata["source_code_uri"] = "https://github.com/ndexnetwork/peatio-ndex"
|
23
|
+
spec.metadata["changelog_uri"] = "https://github.com/ndexnetwork/peatio-ndex/blob/master/CHANGELOG.md"
|
24
|
+
else
|
25
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
26
|
+
"public gem pushes."
|
27
|
+
end
|
28
|
+
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
+
end
|
34
|
+
spec.bindir = "exe"
|
35
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
|
+
spec.require_paths = ["lib"]
|
37
|
+
spec.add_dependency "activesupport", "~> 5.2.3"
|
38
|
+
spec.add_dependency "better-faraday", "~> 1.0.5"
|
39
|
+
spec.add_dependency "faraday", "~> 0.15.4"
|
40
|
+
spec.add_dependency "memoist", "~> 0.16.0"
|
41
|
+
spec.add_dependency "peatio", "= 2.4.3"
|
42
|
+
|
43
|
+
|
44
|
+
spec.add_development_dependency "bundler", "~> 1.17.3"
|
45
|
+
spec.add_development_dependency "mocha", "~> 1.8"
|
46
|
+
spec.add_development_dependency "pry-byebug", "~> 3.7"
|
47
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
48
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
49
|
+
spec.add_development_dependency "webmock", "~> 3.5"
|
50
|
+
end
|
metadata
ADDED
@@ -0,0 +1,223 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: peatio-ndex
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- BitBD
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-05-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.2.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.2.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: better-faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.15.4
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.15.4
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: memoist
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.16.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.16.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: peatio
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.4.3
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.4.3
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.17.3
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.17.3
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: mocha
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.8'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.8'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-byebug
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.7'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.7'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '10.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '10.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '3.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '3.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.5'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.5'
|
167
|
+
description: Peatio Blockchain Plugin for nPro
|
168
|
+
email:
|
169
|
+
- developer@nexbit.io
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".gitignore"
|
175
|
+
- ".rspec"
|
176
|
+
- ".travis.yml"
|
177
|
+
- Gemfile
|
178
|
+
- LICENSE.txt
|
179
|
+
- README.md
|
180
|
+
- Rakefile
|
181
|
+
- bin/console
|
182
|
+
- bin/setup
|
183
|
+
- config/blockchains.yml
|
184
|
+
- config/currencies.yml
|
185
|
+
- config/wallets.yml
|
186
|
+
- lib/peatio/ndex.rb
|
187
|
+
- lib/peatio/ndex/blockchain.rb
|
188
|
+
- lib/peatio/ndex/client.rb
|
189
|
+
- lib/peatio/ndex/hooks.rb
|
190
|
+
- lib/peatio/ndex/railtie.rb
|
191
|
+
- lib/peatio/ndex/version.rb
|
192
|
+
- lib/peatio/ndex/wallet.rb
|
193
|
+
- peatio-ndex-0.1.0.gem
|
194
|
+
- peatio-ndex-0.1.1.gem
|
195
|
+
- peatio-ndex-0.1.2.gem
|
196
|
+
- peatio-ndex.gemspec
|
197
|
+
homepage: https://www.ndexnetwork.com
|
198
|
+
licenses:
|
199
|
+
- MIT
|
200
|
+
metadata:
|
201
|
+
homepage_uri: https://www.ndexnetwork.com
|
202
|
+
source_code_uri: https://github.com/ndexnetwork/peatio-ndex
|
203
|
+
changelog_uri: https://github.com/ndexnetwork/peatio-ndex/blob/master/CHANGELOG.md
|
204
|
+
post_install_message:
|
205
|
+
rdoc_options: []
|
206
|
+
require_paths:
|
207
|
+
- lib
|
208
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0'
|
213
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - ">="
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '0'
|
218
|
+
requirements: []
|
219
|
+
rubygems_version: 3.0.1
|
220
|
+
signing_key:
|
221
|
+
specification_version: 4
|
222
|
+
summary: Peatio Blockchain Plugin
|
223
|
+
test_files: []
|