cash-addr 0.1.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 +10 -0
- data/.rspec +3 -0
- data/.rubocop.yml +35 -0
- data/.travis.yml +5 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +53 -0
- data/LICENSE.txt +13 -0
- data/README.md +73 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +6 -0
- data/cash-addr.gemspec +31 -0
- data/circle.yml +7 -0
- data/doc/CashAddr.html +110 -0
- data/doc/CashAddr/Converter.html +277 -0
- data/doc/CashAddr/InvalidAddress.html +103 -0
- data/doc/LICENSE_txt.html +99 -0
- data/doc/README_md.html +175 -0
- data/doc/cash-addr_gemspec.html +125 -0
- data/doc/created.rid +11 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +175 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +229 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +94 -0
- data/lib/cash_addr.rb +59 -0
- data/lib/cash_addr/address.rb +109 -0
- data/lib/cash_addr/crypto.rb +95 -0
- data/lib/cash_addr/version.rb +7 -0
- metadata +182 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class CashAddr::InvalidAddress - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/jquery.js"></script>
|
15
|
+
<script src="../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="class">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
<div id="parent-class-section" class="nav-section">
|
59
|
+
<h3>Parent</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p class="link">StandardError
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
</div>
|
70
|
+
</nav>
|
71
|
+
|
72
|
+
<main role="main" aria-labelledby="class-CashAddr::InvalidAddress">
|
73
|
+
<h1 id="class-CashAddr::InvalidAddress" class="class">
|
74
|
+
class CashAddr::InvalidAddress
|
75
|
+
</h1>
|
76
|
+
|
77
|
+
<section class="description">
|
78
|
+
|
79
|
+
<p>Error class for invalid address errors.</p>
|
80
|
+
|
81
|
+
</section>
|
82
|
+
|
83
|
+
|
84
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
</section>
|
95
|
+
</main>
|
96
|
+
|
97
|
+
|
98
|
+
<footer id="validator-badges" role="contentinfo">
|
99
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
100
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.3.
|
101
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
102
|
+
</footer>
|
103
|
+
|
@@ -0,0 +1,99 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>LICENSE - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="file">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="project-metadata">
|
57
|
+
<div id="fileindex-section" class="nav-section">
|
58
|
+
<h3>Pages</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
63
|
+
|
64
|
+
<li><a href="./README_md.html">README</a>
|
65
|
+
|
66
|
+
<li><a href="./cash-addr_gemspec.html">cash-addr.gemspec</a>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
</nav>
|
73
|
+
|
74
|
+
<main role="main" aria-label="Page LICENSE.txt">
|
75
|
+
|
76
|
+
<p>Copyright 2018 Coinbase</p>
|
77
|
+
|
78
|
+
<p>Licensed under the Apache License, Version 2.0 (the “License”); you may not
|
79
|
+
use this file except in compliance with the License. You may obtain a copy
|
80
|
+
of the License at</p>
|
81
|
+
|
82
|
+
<pre class="ruby"><span class="ruby-identifier">http</span><span class="ruby-value">:/</span><span class="ruby-operator">/</span><span class="ruby-identifier">www</span>.<span class="ruby-identifier">apache</span>.<span class="ruby-identifier">org</span><span class="ruby-operator">/</span><span class="ruby-identifier">licenses</span><span class="ruby-operator">/</span><span class="ruby-constant">LICENSE</span><span class="ruby-value">-2.0</span>
|
83
|
+
</pre>
|
84
|
+
|
85
|
+
<p>Unless required by applicable law or agreed to in writing, software
|
86
|
+
distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
|
87
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
88
|
+
License for the specific language governing permissions and limitations
|
89
|
+
under the License.</p>
|
90
|
+
</main>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<footer id="validator-badges" role="contentinfo">
|
95
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.3.
|
97
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
|
+
</footer>
|
99
|
+
|
data/doc/README_md.html
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>README - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="file">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
<div class="nav-section">
|
56
|
+
<h3>Table of Contents</h3>
|
57
|
+
|
58
|
+
<ul class="link-list" role="directory">
|
59
|
+
<li><a href="#label-CashAddr">CashAddr</a>
|
60
|
+
<li><a href="#label-Installation">Installation</a>
|
61
|
+
<li><a href="#label-Usage">Usage</a>
|
62
|
+
<li><a href="#label-Development">Development</a>
|
63
|
+
<li><a href="#label-Documentation">Documentation</a>
|
64
|
+
<li><a href="#label-Contributing">Contributing</a>
|
65
|
+
<li><a href="#label-License">License</a>
|
66
|
+
</ul>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
|
70
|
+
<div id="project-metadata">
|
71
|
+
<div id="fileindex-section" class="nav-section">
|
72
|
+
<h3>Pages</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
77
|
+
|
78
|
+
<li><a href="./README_md.html">README</a>
|
79
|
+
|
80
|
+
<li><a href="./cash-addr_gemspec.html">cash-addr.gemspec</a>
|
81
|
+
|
82
|
+
</ul>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</div>
|
86
|
+
</nav>
|
87
|
+
|
88
|
+
<main role="main" aria-label="Page README.md">
|
89
|
+
|
90
|
+
<h1 id="label-CashAddr"><a href="CashAddr.html">CashAddr</a><span><a href="#label-CashAddr">¶</a> <a href="#top">↑</a></span></h1>
|
91
|
+
|
92
|
+
<p>Utility to convert between base58 and <a href="CashAddr.html">CashAddr</a>
|
93
|
+
BCH addresses.</p>
|
94
|
+
|
95
|
+
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#top">↑</a></span></h2>
|
96
|
+
|
97
|
+
<p>Add this line to your application's Gemfile:</p>
|
98
|
+
|
99
|
+
<pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">'cash-addr'</span>
|
100
|
+
</pre>
|
101
|
+
|
102
|
+
<p>And then execute:</p>
|
103
|
+
|
104
|
+
<pre>$ bundle</pre>
|
105
|
+
|
106
|
+
<p>Or install it yourself as:</p>
|
107
|
+
|
108
|
+
<pre>$ gem install cash-addr</pre>
|
109
|
+
|
110
|
+
<h2 id="label-Usage">Usage<span><a href="#label-Usage">¶</a> <a href="#top">↑</a></span></h2>
|
111
|
+
|
112
|
+
<p>To convert from a legacy address to CashAddr:</p>
|
113
|
+
|
114
|
+
<pre class="ruby"><span class="ruby-constant">CashAddr</span><span class="ruby-operator">::</span><span class="ruby-constant">Converter</span>.<span class="ruby-identifier">to_cash_address</span>(<span class="ruby-string">'mmRH4e9WW4ekZUP5HvBScfUyaSUjfQRyvD'</span>)
|
115
|
+
</pre>
|
116
|
+
|
117
|
+
<p>To convert from a <a href="CashAddr.html">CashAddr</a> address to legacy:</p>
|
118
|
+
|
119
|
+
<pre class="ruby"><span class="ruby-constant">CashAddr</span><span class="ruby-operator">::</span><span class="ruby-constant">Converter</span>.<span class="ruby-identifier">to_legacy_address</span>(<span class="ruby-string">'bchtest:qpqtmmfpw79thzq5z7s0spcd87uhn6d34uqqem83hf'</span>)
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
<p>To validate a BCH address:</p>
|
123
|
+
|
124
|
+
<pre class="ruby"><span class="ruby-constant">CashAddr</span><span class="ruby-operator">::</span><span class="ruby-constant">Converter</span>.<span class="ruby-identifier">is_valid?</span>(<span class="ruby-string">'bchtest:qpqtmmfpw79thzq5z7s0spcd87uhn6d34uqqem83hf'</span>)
|
125
|
+
</pre>
|
126
|
+
|
127
|
+
<p>To display a BCH <a href="CashAddr.html">CashAddr</a> address without the
|
128
|
+
prefix:</p>
|
129
|
+
|
130
|
+
<pre class="ruby"><span class="ruby-constant">CashAddr</span><span class="ruby-operator">::</span><span class="ruby-constant">Converter</span>.<span class="ruby-identifier">display_address</span>(<span class="ruby-string">'bchtest:qpqtmmfpw79thzq5z7s0spcd87uhn6d34uqqem83hf'</span>)
|
131
|
+
</pre>
|
132
|
+
|
133
|
+
<p>NOTE: Testnet addresses are used as examples, but both testnet and mainnet
|
134
|
+
are supported.</p>
|
135
|
+
|
136
|
+
<h2 id="label-Development">Development<span><a href="#label-Development">¶</a> <a href="#top">↑</a></span></h2>
|
137
|
+
|
138
|
+
<p>After checking out the repo, run <code>bin/setup</code> to install
|
139
|
+
dependencies. Then, run <code>rake spec</code> to run the tests. You can
|
140
|
+
also run <code>bin/console</code> for an interactive prompt that will allow
|
141
|
+
you to experiment.</p>
|
142
|
+
|
143
|
+
<p>To install this gem onto your local machine, run <code>bundle exec rake
|
144
|
+
install</code>. To release a new version, update the version number in
|
145
|
+
<code>version.rb</code>, and then run <code>bundle exec rake
|
146
|
+
release</code>, which will create a git tag for the version, push git
|
147
|
+
commits and tags, and push the <code>.gem</code> file to <a
|
148
|
+
href="https://rubygems.org">rubygems.org</a>.</p>
|
149
|
+
|
150
|
+
<h2 id="label-Documentation">Documentation<span><a href="#label-Documentation">¶</a> <a href="#top">↑</a></span></h2>
|
151
|
+
|
152
|
+
<p>Docs are generated via rdoc and are located in the <code>doc</code>
|
153
|
+
directory. To update the documentation:</p>
|
154
|
+
|
155
|
+
<pre>rdoc --main README.md -x Gemfile -x Rakefile -x setup -x address -x crypto</pre>
|
156
|
+
|
157
|
+
<h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#top">↑</a></span></h2>
|
158
|
+
|
159
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a
|
160
|
+
href="https://github.com/coinbase/cash-addr">github.com/coinbase/cash-addr</a>.</p>
|
161
|
+
|
162
|
+
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h2>
|
163
|
+
|
164
|
+
<p>The gem is available as open source under the terms of the <a
|
165
|
+
href="https://opensource.org/licenses/Apache-2.0">Apache 2.0 License</a>.</p>
|
166
|
+
</main>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<footer id="validator-badges" role="contentinfo">
|
171
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
172
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.3.
|
173
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
174
|
+
</footer>
|
175
|
+
|
@@ -0,0 +1,125 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>cash-addr.gemspec - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="file">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="./index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="project-metadata">
|
57
|
+
<div id="fileindex-section" class="nav-section">
|
58
|
+
<h3>Pages</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
63
|
+
|
64
|
+
<li><a href="./README_md.html">README</a>
|
65
|
+
|
66
|
+
<li><a href="./cash-addr_gemspec.html">cash-addr.gemspec</a>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
</nav>
|
73
|
+
|
74
|
+
<main role="main" aria-label="Page cash-addr.gemspec">
|
75
|
+
|
76
|
+
<p># frozen_string_literal: true</p>
|
77
|
+
|
78
|
+
<p>lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib)
|
79
|
+
unless $LOAD_PATH.include?(lib) require 'cash_addr/version'</p>
|
80
|
+
|
81
|
+
<p>Gem::Specification.new do |spec|</p>
|
82
|
+
|
83
|
+
<pre class="ruby"><span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">'cash-addr'</span>
|
84
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> = <span class="ruby-constant">CashAddr</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
|
85
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">authors</span> = [<span class="ruby-string">'Josh Ellithorpe'</span>]
|
86
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">email</span> = [<span class="ruby-string">'josh.ellithorpe@coinbase.com'</span>]
|
87
|
+
|
88
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">summary</span> = <span class="ruby-string">'Library to convert between base58 and CashAddr BCH addresses'</span>
|
89
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">homepage</span> = <span class="ruby-string">'https://github.com/coinbase/cash-addr'</span>
|
90
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">license</span> = <span class="ruby-string">'Apache-2.0'</span>
|
91
|
+
|
92
|
+
<span class="ruby-comment"># Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'</span>
|
93
|
+
<span class="ruby-comment"># to allow pushing to a single host or delete this section to allow pushing to any host.</span>
|
94
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:metadata</span>)
|
95
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">metadata</span>[<span class="ruby-string">'allowed_push_host'</span>] = <span class="ruby-string">"TODO: Set to 'http://mygemserver.com'"</span>
|
96
|
+
<span class="ruby-keyword">else</span>
|
97
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">'RubyGems 2.0 or newer is required to protect against public gem pushes.'</span>
|
98
|
+
<span class="ruby-keyword">end</span>
|
99
|
+
|
100
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span> = <span class="ruby-string">`git ls-files -z`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\x0"</span>).<span class="ruby-identifier">reject</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
101
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r{^(test|spec|features)/}</span>)
|
102
|
+
<span class="ruby-keyword">end</span>
|
103
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">bindir</span> = <span class="ruby-string">'exe'</span>
|
104
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">grep</span>(<span class="ruby-regexp">%r{^exe/}</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">f</span>) }
|
105
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">require_paths</span> = [<span class="ruby-string">'lib'</span>]
|
106
|
+
|
107
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">'bundler'</span>, <span class="ruby-string">'~> 1.16'</span>
|
108
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">'rake'</span>, <span class="ruby-string">'~> 10.0'</span>
|
109
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">'rspec'</span>, <span class="ruby-string">'~> 3.0'</span>
|
110
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">'rubocop'</span>, <span class="ruby-string">'~> 0.52.1'</span>
|
111
|
+
|
112
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_dependency</span> <span class="ruby-string">'base58'</span>, <span class="ruby-string">'~> 0.2.2'</span>
|
113
|
+
</pre>
|
114
|
+
|
115
|
+
<p>end</p>
|
116
|
+
</main>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<footer id="validator-badges" role="contentinfo">
|
121
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
122
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.3.
|
123
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
124
|
+
</footer>
|
125
|
+
|