peatio-coinpaymentnew 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fcc060d560c129c307da55bda74ce5539cce92cd35632ff952b45fda7510d22d
4
+ data.tar.gz: 8624bf421ddafd03a2cf72e807cd93243a4b263f077a3420fd54804a56f39fdb
5
+ SHA512:
6
+ metadata.gz: 3e8ae68fd0a2b9d9eb4e61fa4c461c105a8df3d380a25a011b83c523ac800da47da5ee0c356ab02b361f5fa5f9e4e004e95f27750276813d9799924f65bcc8cc
7
+ data.tar.gz: 3cedd20b583b49b0a9c1c600f9f6be49b4b0758b06e35d71ec32265973b764e132905029390884b35e25cdd88e67253eaf3c23695d60d35776b09e7ae103e090
@@ -0,0 +1,16 @@
1
+ name: Ruby
2
+
3
+ on: [push,pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 3.0.2
14
+ bundler-cache: true
15
+ - name: Run the default task
16
+ run: bundle exec rake
data/.gitignore ADDED
@@ -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/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
+ </profile>
6
+ </component>
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-3.0.2-p107" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/peatio-coinpaymentnew.iml" filepath="$PROJECT_DIR$/.idea/peatio-coinpaymentnew.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,70 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="ruby-2.6.8-p205" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v5.2.6, ruby-2.6.8-p205) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v5.2.6, ruby-2.6.8-p205) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.0, ruby-2.6.8-p205) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="amq-protocol (v2.3.2, ruby-2.6.8-p205) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="amqp (v1.8.0, ruby-2.6.8-p205) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="better-faraday (v1.0.8, ruby-2.6.8-p205) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.17.2, ruby-2.6.8-p205) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="bunny (v2.19.0, ruby-2.6.8-p205) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="byebug (v11.1.3, ruby-2.6.8-p205) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="clamp (v1.3.2, ruby-2.6.8-p205) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.3, ruby-2.6.8-p205) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="coinpayments (v0.0.4, ruby-2.6.8-p205) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.9, ruby-2.6.8-p205) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="crack (v0.4.5, ruby-2.6.8-p205) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, ruby-2.6.8-p205) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="em-websocket (v0.5.2, ruby-2.6.8-p205) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.7, ruby-2.6.8-p205) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="faraday (v0.15.4, ruby-2.6.8-p205) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="hashdiff (v1.0.1, ruby-2.6.8-p205) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="hashie (v4.1.0, ruby-2.6.8-p205) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="http_parser.rb (v0.6.0, ruby-2.6.8-p205) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="httparty (v0.20.0, ruby-2.6.8-p205) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.8.10, ruby-2.6.8-p205) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="jwt (v2.3.0, ruby-2.6.8-p205) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="memoist (v0.16.2, ruby-2.6.8-p205) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, ruby-2.6.8-p205) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="mime-types (v3.3.1, ruby-2.6.8-p205) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2021.0901, ruby-2.6.8-p205) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.14.4, ruby-2.6.8-p205) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="mocha (v1.13.0, ruby-2.6.8-p205) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, ruby-2.6.8-p205) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="multipart-post (v2.1.1, ruby-2.6.8-p205) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.5.3, ruby-2.6.8-p205) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="peatio (v0.6.3, ruby-2.6.8-p205) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="pry (v0.13.1, ruby-2.6.8-p205) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="pry-byebug (v3.9.0, ruby-2.6.8-p205) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="public_suffix (v4.0.6, ruby-2.6.8-p205) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.6.8-p205) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="rbtree (v0.4.4, ruby-2.6.8-p205) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, ruby-2.6.8-p205) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.10.0, ruby-2.6.8-p205) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.10.1, ruby-2.6.8-p205) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.10.1, ruby-2.6.8-p205) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.10.2, ruby-2.6.8-p205) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.10.2, ruby-2.6.8-p205) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="set (v1.0.1, ruby-2.6.8-p205) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="sorted_set (v1.0.3, ruby-2.6.8-p205) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, ruby-2.6.8-p205) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.9, ruby-2.6.8-p205) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="webmock (v3.14.0, ruby-2.6.8-p205) [gem]" level="application" />
64
+ </component>
65
+ <component name="RakeTasksCache">
66
+ <option name="myRootTask">
67
+ <RakeTaskImpl id="rake" />
68
+ </option>
69
+ </component>
70
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2021-10-05
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at joshirockstar007@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,8 @@
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-coinpaymentnew.gemspec
6
+ gemspec
7
+
8
+ gem 'coinpayments'
data/Gemfile.lock ADDED
@@ -0,0 +1,126 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ peatio-coinpaymentnew (1.0.0)
5
+ activesupport (~> 5.2.3)
6
+ better-faraday (~> 1.0.5)
7
+ faraday (~> 0.15.4)
8
+ memoist (~> 0.16.0)
9
+ peatio (~> 0.6.1)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ activemodel (5.2.6)
15
+ activesupport (= 5.2.6)
16
+ activesupport (5.2.6)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (>= 0.7, < 2)
19
+ minitest (~> 5.1)
20
+ tzinfo (~> 1.1)
21
+ addressable (2.8.0)
22
+ public_suffix (>= 2.0.2, < 5.0)
23
+ amq-protocol (2.3.2)
24
+ amqp (1.8.0)
25
+ amq-protocol (>= 2.2.0)
26
+ eventmachine
27
+ better-faraday (1.0.8)
28
+ activesupport (>= 4.0, < 6.0)
29
+ faraday (~> 0.12)
30
+ bunny (2.19.0)
31
+ amq-protocol (~> 2.3, >= 2.3.1)
32
+ sorted_set (~> 1, >= 1.0.2)
33
+ byebug (11.1.3)
34
+ clamp (1.3.2)
35
+ coderay (1.1.3)
36
+ coinpayments (0.0.4)
37
+ hashie
38
+ httparty
39
+ concurrent-ruby (1.1.9)
40
+ crack (0.4.5)
41
+ rexml
42
+ diff-lcs (1.4.4)
43
+ em-websocket (0.5.2)
44
+ eventmachine (>= 0.12.9)
45
+ http_parser.rb (~> 0.6.0)
46
+ eventmachine (1.2.7-x64-mingw32)
47
+ faraday (0.15.4)
48
+ multipart-post (>= 1.2, < 3)
49
+ hashdiff (1.0.1)
50
+ hashie (4.1.0)
51
+ http_parser.rb (0.6.0)
52
+ httparty (0.20.0)
53
+ mime-types (~> 3.0)
54
+ multi_xml (>= 0.5.2)
55
+ i18n (1.8.10)
56
+ concurrent-ruby (~> 1.0)
57
+ jwt (2.3.0)
58
+ memoist (0.16.2)
59
+ method_source (1.0.0)
60
+ mime-types (3.3.1)
61
+ mime-types-data (~> 3.2015)
62
+ mime-types-data (3.2021.0901)
63
+ minitest (5.14.4)
64
+ mocha (1.13.0)
65
+ multi_xml (0.6.0)
66
+ multipart-post (2.1.1)
67
+ mysql2 (0.5.3-x64-mingw32)
68
+ peatio (0.6.3)
69
+ activemodel (> 5.2, <= 6.0.0)
70
+ amqp
71
+ bunny
72
+ clamp
73
+ em-websocket
74
+ eventmachine
75
+ jwt
76
+ mysql2
77
+ pry (0.13.1)
78
+ coderay (~> 1.1)
79
+ method_source (~> 1.0)
80
+ pry-byebug (3.9.0)
81
+ byebug (~> 11.0)
82
+ pry (~> 0.13.0)
83
+ public_suffix (4.0.6)
84
+ rake (10.5.0)
85
+ rbtree (0.4.4)
86
+ rexml (3.2.5)
87
+ rspec (3.10.0)
88
+ rspec-core (~> 3.10.0)
89
+ rspec-expectations (~> 3.10.0)
90
+ rspec-mocks (~> 3.10.0)
91
+ rspec-core (3.10.1)
92
+ rspec-support (~> 3.10.0)
93
+ rspec-expectations (3.10.1)
94
+ diff-lcs (>= 1.2.0, < 2.0)
95
+ rspec-support (~> 3.10.0)
96
+ rspec-mocks (3.10.2)
97
+ diff-lcs (>= 1.2.0, < 2.0)
98
+ rspec-support (~> 3.10.0)
99
+ rspec-support (3.10.2)
100
+ set (1.0.1)
101
+ sorted_set (1.0.3)
102
+ rbtree
103
+ set (~> 1.0)
104
+ thread_safe (0.3.6)
105
+ tzinfo (1.2.9)
106
+ thread_safe (~> 0.1)
107
+ webmock (3.14.0)
108
+ addressable (>= 2.8.0)
109
+ crack (>= 0.3.2)
110
+ hashdiff (>= 0.4.0, < 2.0.0)
111
+
112
+ PLATFORMS
113
+ x64-mingw32
114
+
115
+ DEPENDENCIES
116
+ bundler (~> 1.16)
117
+ coinpayments
118
+ mocha (~> 1.8)
119
+ peatio-coinpaymentnew!
120
+ pry-byebug
121
+ rake (~> 10.0)
122
+ rspec (~> 3.0)
123
+ webmock (~> 3.5)
124
+
125
+ BUNDLED WITH
126
+ 1.17.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Harishankar Joshi
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,43 @@
1
+ # Peatio::Coinpaymentnew
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/coinpaymentnew`. 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-coinpaymentnew'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install peatio-coinpaymentnew
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 the created tag, 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-coinpaymentnew. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/peatio-coinpaymentnew/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Peatio::Coinpaymentnew project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/peatio-coinpaymentnew/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "peatio/coinpaymentnew"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -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
@@ -0,0 +1,6 @@
1
+ Coinpayments.configure do |config|
2
+ config.merchant_id = '81584a734276162e589fb2a5c19d1114'
3
+ config.public_api_key = '1c68e7c5cd7f03d79325bc63e2985d3dc604847242a22d682673f531af4cadcb'
4
+ config.private_api_key = '13F4855BFDa330B43063F07961CA373CfF3bb141d8ccCdF83B5e92ac2ad0f78b'
5
+ config.secret_phrase = '@hari123'
6
+ end
@@ -0,0 +1,21 @@
1
+
2
+ module Peatio
3
+ module Coinpaymentnew
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(custom_features = {})
10
+ @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
11
+ @settings = {}
12
+ end
13
+
14
+ def configure(settings = {})
15
+ # Clean client state during configure.
16
+ @client = nil
17
+ @settings.merge!(settings.slice(*SUPPORTED_SETTINGS))
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,42 @@
1
+ module Peatio
2
+ module Coinpaymentnew
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
+ "Coinpaymentnew blockchain version requirement was not satisfied by Peatio::Blockchain.",
13
+ "Coinpaymentnew 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
+ "Coinpaymentnew wallet version requirement was not satisfied by Peatio::Wallet.",
22
+ "Coinpaymentnew 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[:coinpaymentnew] = Coinpaymentnew::Blockchain
30
+ Peatio::Wallet.registry[:coinpaymentnewd] = Coinpaymentnew::Wallet
31
+ end
32
+ end
33
+
34
+ if defined?(Rails::Railtie)
35
+ require "peatio/coinpaymentnew/railtie"
36
+ else
37
+ check_compatibility
38
+ register
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,13 @@
1
+ module Peatio
2
+ module Coinpaymentnew
3
+ class Railtie < Rails::Railtie
4
+ config.before_initialize do
5
+ Hooks.check_compatibility
6
+ end
7
+
8
+ config.after_initialize do
9
+ Hooks.register
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Coinpaymentnew
5
+ VERSION = "0.0.1"
6
+ end
7
+ end
@@ -0,0 +1,345 @@
1
+ module Peatio
2
+ module Coinpaymentnew
3
+ class Wallet < Peatio::Wallet::Abstract
4
+ TIME_DIFFERENCE_IN_MINUTES = 10
5
+ # XLM_MEMO_TYPES = { 'memoId': 'id', 'memoText': 'text', 'memoHash': 'hash', 'memoReturn': 'return' }
6
+
7
+ DEFAULT_FEATURES = { skip_deposit_collection: false }.freeze
8
+
9
+ def initialize(custom_features = {})
10
+ @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
11
+ @settings = {}
12
+ end
13
+
14
+ def configure(settings = {})
15
+ # Clean client state during configure.
16
+ @client = nil
17
+
18
+ @settings.merge!(settings.slice(*SUPPORTED_SETTINGS))
19
+
20
+ @wallet = @settings.fetch(:wallet) do
21
+ raise Peatio::Wallet::MissingSettingError, :wallet
22
+ end.slice(:uri, :address, :secret, :access_token, :wallet_id, :testnet)
23
+
24
+ @currency = @settings.fetch(:currency) do
25
+ raise Peatio::Wallet::MissingSettingError, :currency
26
+ end.slice(:id, :base_factor, :code, :options)
27
+ end
28
+
29
+ def create_address!(options = {})
30
+ currency = erc20_currency_id
31
+ options.deep_symbolize_keys!
32
+ response = WalletApi.get_deposit_address(currency.upcase)
33
+ { address: response[:address], secret: coinpayment_wallet_passphrase, details: { address_id: response[:address] }}
34
+ # if options.dig(:pa_details, :address_id).present? &&
35
+ # options.dig(:pa_details, :updated_at).present? &&
36
+ # time_difference_in_minutes(options.dig(:pa_details, :updated_at)) >= TIME_DIFFERENCE_IN_MINUTES
37
+ #
38
+ # response = client.rest_api(:get, "#{currency}/wallet/#{wallet_id}/address/#{options.dig(:pa_details, :address_id)}")
39
+ # { address: response['address'], secret: bitgo_wallet_passphrase }
40
+ # elsif options.dig(:pa_details, :address_id).blank?
41
+ # response = client.rest_api(:post, "#{currency}/wallet/#{wallet_id}/address")
42
+ # { address: response['address'], secret: bitgo_wallet_passphrase, details: { address_id: response['id'] }}
43
+ # end
44
+ rescue Coinpaymentnew::Client::Error => e
45
+ raise Peatio::Wallet::ClientError, e
46
+ end
47
+
48
+ def create_transaction!(transaction, options = {})
49
+ currency_options = @currency.fetch(:options).slice(:gas_limit, :gas_price, :erc20_contract_address)
50
+
51
+ # if currency_options[:gas_limit].present? && currency_options[:gas_price].present?
52
+ # options.merge!(currency_options)
53
+ # create_eth_transaction(transaction, options)
54
+ # else
55
+ amount = convert_to_base_unit(transaction.amount)
56
+
57
+ # if options[:subtract_fee].to_s == 'true'
58
+ # fee = build_raw_transaction(transaction)
59
+ # baseFeeInfo = fee.dig('feeInfo','fee')
60
+ # fee = baseFeeInfo.present? ? baseFeeInfo : fee.dig('txInfo','Fee')
61
+ # amount -= fee.to_i
62
+ # end
63
+ response = WalletApi.createTransaction(transaction.amount.to_s, "USD",currency_id.upcase, transaction.to_address.to_s)
64
+ # response = client.rest_api(:post, "#{currency_id}/wallet/#{wallet_id}/sendcoins", {
65
+ # address: normalize_address(transaction.to_address.to_s),
66
+ # amount: amount.to_s,
67
+ # walletPassphrase: bitgo_wallet_passphrase,
68
+ # memo: xlm_memo(transaction.to_address.to_s)
69
+ # }.compact)
70
+ #
71
+ # if response['feeString'].present?
72
+ # fee = convert_from_base_unit(response['feeString'])
73
+ # transaction.fee = fee
74
+ # end
75
+
76
+ transaction.hash = normalize_txid(response[:txn_id])
77
+ transaction.fee_currency_id = erc20_currency_id
78
+ transaction
79
+ # end
80
+ rescue Coinpaymentnew::Client::Error => e
81
+ raise Peatio::Wallet::ClientError, e
82
+ end
83
+
84
+ #
85
+ # def build_raw_transaction(transaction)
86
+ # client.rest_api(:post, "#{currency_id}/wallet/#{wallet_id}/tx/build", {
87
+ # recipients: [{
88
+ # address: transaction.to_address,
89
+ # amount: convert_to_base_unit(transaction.amount).to_s
90
+ # }]
91
+ # }.compact)
92
+ # end
93
+
94
+ # def create_eth_transaction(transaction, options = {})
95
+ # amount = convert_to_base_unit(transaction.amount)
96
+ # hop = true unless options.slice(:gas_price).present?
97
+ #
98
+ # fee_estimate = fee_estimate(amount.to_s, hop)
99
+ #
100
+ # if transaction.options.present? && transaction.options[:gas_price].present?
101
+ # options[:gas_price] = transaction.options[:gas_price]
102
+ # else
103
+ # options[:gas_price] = fee_estimate['minGasPrice'].to_i
104
+ # end
105
+ #
106
+ # response = client.rest_api(:post, "#{currency_id}/wallet/#{wallet_id}/sendcoins", {
107
+ # address: transaction.to_address.to_s,
108
+ # amount: amount.to_s,
109
+ # walletPassphrase: bitgo_wallet_passphrase,
110
+ # gas: options.fetch(:gas_limit).to_i,
111
+ # gasPrice: options.fetch(:gas_price).to_i,
112
+ # hop: hop
113
+ # }.compact)
114
+ #
115
+ # if response['feeString'].present?
116
+ # fee = convert_from_base_unit(response['feeString'])
117
+ # transaction.fee = fee
118
+ # end
119
+ #
120
+ # transaction.hash = normalize_txid(response['txid'])
121
+ # transaction.fee_currency_id = erc20_currency_id
122
+ # transaction.options = options
123
+ # transaction
124
+ # end
125
+
126
+ def fee_estimate(amount, hop)
127
+ client.rest_api(:get, "#{erc20_currency_id}/tx/fee", { amount: amount, hop: hop }.compact)
128
+ end
129
+
130
+ def load_balance!
131
+ # if @currency.fetch(:options).slice(:erc20_contract_address).present?
132
+ # load_erc20_balance!
133
+ # else
134
+ # response = client.rest_api(:get, "#{currency_id}/wallet/#{wallet_id}")
135
+ response = WalletApi.balance
136
+ response = response.fetch(currency_id)
137
+ convert_from_base_unit(response["balance"])
138
+ # end
139
+ rescue Coinpaymentnew::Client::Error => e
140
+ raise Peatio::Wallet::ClientError, e
141
+ end
142
+
143
+ # def load_erc20_balance!
144
+ # response = client.rest_api(:get, "#{erc20_currency_id}/wallet/#{wallet_id}?allTokens=true")
145
+ # convert_from_base_unit(response.dig('tokens', currency_id, 'balanceString'))
146
+ # rescue Coinpaymentnew::Client::Error => e
147
+ # raise Peatio::Wallet::ClientError, e
148
+ # end
149
+
150
+ def trigger_webhook_event(request)
151
+ currency = @wallet.fetch(:testnet).present? ? 't' + @currency.fetch(:id) : @currency.fetch(:id)
152
+ if request.params['type'] == 'transfer'
153
+ return unless currency == request.params['coin'] &&
154
+ @wallet.fetch(:wallet_id) == request.params['wallet']
155
+ else
156
+ return unless @wallet.fetch(:wallet_id) == request.params['walletId']
157
+ end
158
+
159
+ if request.params['type'] == 'transfer'
160
+ transactions = fetch_transfer!(request.params['transfer'])
161
+ return transactions
162
+ elsif request.params['type'] == 'address_confirmation'
163
+ address_id = fetch_address_id(request.params['address'])
164
+ return { address_id: address_id, address: request.params['address'], currency_id: currency_id }
165
+ end
166
+ end
167
+
168
+ def register_webhooks!(url)
169
+ transfer_webhook(url)
170
+ address_confirmation_webhook(url)
171
+ end
172
+
173
+ # def fetch_address_id(address)
174
+ # currency = erc20_currency_id
175
+ # client.rest_api(:get, "#{currency}/wallet/#{wallet_id}/address/#{address}")
176
+ # .fetch('id')
177
+ # rescue Coinpaymentnew::Client::Error => e
178
+ # raise Peatio::Wallet::ClientError, e
179
+ # end
180
+
181
+ def fetch_transfer!(id)
182
+ response = client.rest_api(:get, "#{currency_id}/wallet/#{wallet_id}/transfer/#{id}")
183
+ parse_entries(response['entries']).map do |entry|
184
+ to_address = if response.dig('coinSpecific', 'memo').present?
185
+ memo = response.dig('coinSpecific', 'memo')
186
+ memo_type = memo.kind_of?(Array) ? memo.first : memo
187
+ build_address(entry['address'], memo_type)
188
+ else
189
+ entry['address']
190
+ end
191
+ state = define_transaction_state(response['state'])
192
+
193
+ if response['outputs'].present?
194
+ output = response['outputs'].find { |out| out['address'] == to_address }
195
+ txout = output['index'] if output.present?
196
+ end
197
+
198
+ if response['feeString'].present?
199
+ fee = convert_from_base_unit(response['feeString']) / response['entries'].count
200
+ end
201
+
202
+ transaction = Peatio::Transaction.new(
203
+ currency_id: @currency.fetch(:id),
204
+ amount: convert_from_base_unit(entry['valueString']),
205
+ fee: fee,
206
+ fee_currency_id: erc20_currency_id,
207
+ hash: normalize_txid(response['txid']),
208
+ to_address: to_address,
209
+ block_number: response['height'],
210
+ txout: txout.to_i,
211
+ status: state
212
+ )
213
+
214
+ transaction if transaction.valid?
215
+ end.compact
216
+ rescue Coinpaymentnew::Client::Error => e
217
+ raise Peatio::Wallet::ClientError, e
218
+ end
219
+
220
+ def transfer_webhook(url)
221
+ client.rest_api(:post, "#{currency_id}/wallet/#{wallet_id}/webhooks", {
222
+ type: 'transfer',
223
+ allToken: true,
224
+ url: url,
225
+ label: "webhook for #{url}",
226
+ listenToFailureStates: false
227
+ })
228
+ end
229
+
230
+ def address_confirmation_webhook(url)
231
+ client.rest_api(:post, "#{currency_id}/wallet/#{wallet_id}/webhooks", {
232
+ type: 'address_confirmation',
233
+ allToken: true,
234
+ url: url,
235
+ label: "webhook for #{url}",
236
+ listenToFailureStates: false
237
+ })
238
+ end
239
+
240
+ def parse_entries(entries)
241
+ entries.map do |e|
242
+ e if e["valueString"].to_i.positive?
243
+ end.compact
244
+ end
245
+
246
+ private
247
+
248
+ def client
249
+ uri = @wallet.fetch(:uri) { raise Peatio::Wallet::MissingSettingError, :uri }
250
+ access_token = @wallet.fetch(:access_token) { raise Peatio::Wallet::MissingSettingError, :access_token }
251
+
252
+ currency_code_prefix = @wallet.fetch(:testnet) ? 't' : ''
253
+ uri = uri.gsub(/\/+\z/, '') + '/' + currency_code_prefix
254
+ @client ||= Client.new(uri, access_token)
255
+ end
256
+
257
+ def build_address(address, memo)
258
+ "#{address}?memoId=#{memo['value']}"
259
+ end
260
+
261
+ # All these functions will have to be done with the coin set to eth or teth
262
+ # since that is the actual coin type being used.
263
+ def erc20_currency_id
264
+ return 'eth' if @currency.fetch(:options).slice(:erc20_contract_address).present?
265
+
266
+ currency_id
267
+ end
268
+
269
+ def xlm_memo(address)
270
+ build_xlm_memo(address) if @currency.fetch(:id) == 'xlm'
271
+ end
272
+
273
+ def build_xlm_memo(address)
274
+ case address.split('?').last.split('=').first
275
+ when 'memoId'
276
+ memo_value_from(address, 'memoId')
277
+ when 'memoText'
278
+ memo_value_from(address, 'memoText')
279
+ when 'memoHash'
280
+ memo_value_from(address, 'memoHash')
281
+ when 'memoReturn'
282
+ memo_value_from(address, 'memoReturn')
283
+ end
284
+ end
285
+
286
+ def memo_value_from(address, type)
287
+ memo_value = address.partition(type + '=').last
288
+ return { type: XLM_MEMO_TYPES[type.to_sym], value: memo_value } if memo_value.present?
289
+ end
290
+
291
+ def currency_id
292
+ @currency.fetch(:id) { raise Peatio::Wallet::MissingSettingError, :id }
293
+ end
294
+
295
+ def coinpayment_wallet_passphrase
296
+ @wallet.fetch(:secret)
297
+ end
298
+
299
+ def wallet_id
300
+ @wallet.fetch(:wallet_id)
301
+ end
302
+
303
+ def normalize_address(address)
304
+ if @currency.fetch(:id) == 'xlm'
305
+ address.split('?').first
306
+ else
307
+ address
308
+ end
309
+ end
310
+
311
+ def normalize_txid(txid)
312
+ txid.downcase
313
+ end
314
+
315
+ def convert_from_base_unit(value)
316
+ value.to_d / @currency.fetch(:base_factor)
317
+ end
318
+
319
+ def convert_to_base_unit(value)
320
+ x = value.to_d * @currency.fetch(:base_factor)
321
+ unless (x % 1).zero?
322
+ raise Peatio::WalletClient::Error,
323
+ "Failed to convert value to base (smallest) unit because it exceeds the maximum precision: " \
324
+ "#{value.to_d} - #{x.to_d} must be equal to zero."
325
+ end
326
+ x.to_i
327
+ end
328
+
329
+ def time_difference_in_minutes(updated_at)
330
+ (Time.now - updated_at)/60
331
+ end
332
+
333
+ def define_transaction_state(state)
334
+ case state
335
+ when 'unconfirmed'
336
+ 'pending'
337
+ when 'confirmed'
338
+ 'success'
339
+ when 'failed','rejected'
340
+ 'failed'
341
+ end
342
+ end
343
+ end
344
+ end
345
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peatio
4
+ module Coinpaymentnew
5
+ class WalletApi
6
+ public
7
+ def self.balance
8
+ Coinpayments.balances
9
+ end
10
+ def self.rate
11
+ Coinpayments.rates
12
+ end
13
+ def self.createTransaction(amount, currency1, currency2, address)
14
+ Coinpayments.create_transaction(amount, currency1, currency2, {address: address, buyer_email: "joshirockstar007@gmail.com"})
15
+ end
16
+ def self.createWithdrawal(amount, currency, address)
17
+ Coinpayments.create_withdrawal(amount, currency, address)
18
+ end
19
+ def self.cancelWithdrawal(id)
20
+ Coinpayments.cancel_withdrawal(id)
21
+ end
22
+ def self.getTxInfo(txid)
23
+ Coinpayments.get_tx_info(txid)
24
+ end
25
+ def self.getCallbackAddress(currency)
26
+ Coinpayments.get_callback_address(currency)
27
+ end
28
+ def self.get_deposit_address(currency, options = {})
29
+ args = { currency: currency }.merge!(options)
30
+ Coinpayments.api_call(args)
31
+ end
32
+ def self.getWithdrawalInfo(id)
33
+ Coinpayments.get_withdrawal_info(id)
34
+ end
35
+ def self.Sign(secretPhrase)
36
+ Coinpayments.sign(secretPhrase)
37
+ end
38
+ end
39
+ end
40
+ end
41
+
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ require 'em/pure_ruby'
3
+ require "peatio"
4
+ require "coinpayments"
5
+ require_relative "../../config/initializers/coinpayments"
6
+ require_relative "coinpaymentnew/version"
7
+
8
+ module Peatio
9
+ module Coinpaymentnew
10
+ class Error < StandardError; end
11
+ # Your code goes here...
12
+ require "bigdecimal"
13
+ require "bigdecimal/util"
14
+
15
+ require_relative "coinpaymentnew/blockchain"
16
+ require_relative "coinpaymentnew/wallet"
17
+
18
+ require_relative "coinpaymentnew/hooks"
19
+
20
+ require_relative "coinpaymentnew/version"
21
+ end
22
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/peatio/coinpaymentnew/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "peatio-coinpaymentnew"
7
+ spec.version = Peatio::Coinpaymentnew::VERSION
8
+ spec.authors = ["Harishankar Joshi"]
9
+ spec.email = ["joshirockstar007@gmail.com"]
10
+
11
+ spec.summary = ""
12
+ spec.description = ""
13
+ spec.homepage = "http://v2app.rokes.exchange/"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.4.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "http://v2app.rokes.exchange/"
21
+ spec.metadata["changelog_uri"] = "http://v2app.rokes.exchange/"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ # spec.add_dependency "example-gem", "~> 1.0"
34
+ spec.add_dependency "activesupport", "~> 5.2.3"
35
+ spec.add_dependency "better-faraday", "~> 1.0.5"
36
+ spec.add_dependency "faraday", "~> 0.15.4"
37
+ spec.add_dependency "memoist", "~> 0.16.0"
38
+ spec.add_dependency "peatio", "~> 0.6.1" # Required.
39
+ #
40
+ spec.add_development_dependency "bundler", "~> 1.16"
41
+ spec.add_development_dependency "mocha", "~> 1.8"
42
+ spec.add_development_dependency "pry-byebug"
43
+ spec.add_development_dependency "rake", "~> 10.0"
44
+ spec.add_development_dependency "rspec", "~> 3.0"
45
+ spec.add_development_dependency "webmock", "~> 3.5"
46
+
47
+ # For more information and examples about making a new gem, checkout our
48
+ # guide at: https://bundler.io/guides/creating_gem.html
49
+ end
metadata ADDED
@@ -0,0 +1,229 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: peatio-coinpaymentnew
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Harishankar Joshi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-10-31 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: 0.6.1
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.6.1
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.16'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.16'
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: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
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: ''
168
+ email:
169
+ - joshirockstar007@gmail.com
170
+ executables: []
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - ".github/workflows/main.yml"
175
+ - ".gitignore"
176
+ - ".idea/.gitignore"
177
+ - ".idea/inspectionProfiles/Project_Default.xml"
178
+ - ".idea/misc.xml"
179
+ - ".idea/modules.xml"
180
+ - ".idea/peatio-coinpaymentnew.iml"
181
+ - ".idea/vcs.xml"
182
+ - ".rspec"
183
+ - ".rubocop.yml"
184
+ - CHANGELOG.md
185
+ - CODE_OF_CONDUCT.md
186
+ - Gemfile
187
+ - Gemfile.lock
188
+ - LICENSE.txt
189
+ - README.md
190
+ - Rakefile
191
+ - bin/console
192
+ - bin/setup
193
+ - config/initializers/coinpayments.rb
194
+ - lib/peatio/coinpaymentnew.rb
195
+ - lib/peatio/coinpaymentnew/blockchain.rb
196
+ - lib/peatio/coinpaymentnew/hooks.rb
197
+ - lib/peatio/coinpaymentnew/railtie.rb
198
+ - lib/peatio/coinpaymentnew/version.rb
199
+ - lib/peatio/coinpaymentnew/wallet.rb
200
+ - lib/peatio/coinpaymentnew/walletApi.rb
201
+ - peatio-coinpaymentnew.gemspec
202
+ homepage: http://v2app.rokes.exchange/
203
+ licenses:
204
+ - MIT
205
+ metadata:
206
+ allowed_push_host: https://rubygems.org/
207
+ homepage_uri: http://v2app.rokes.exchange/
208
+ source_code_uri: http://v2app.rokes.exchange/
209
+ changelog_uri: http://v2app.rokes.exchange/
210
+ post_install_message:
211
+ rdoc_options: []
212
+ require_paths:
213
+ - lib
214
+ required_ruby_version: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: 2.4.0
219
+ required_rubygems_version: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ requirements: []
225
+ rubygems_version: 3.0.3.1
226
+ signing_key:
227
+ specification_version: 4
228
+ summary: ''
229
+ test_files: []