money-tree 0.10.0 → 0.11.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 +4 -4
- data/{donation_btc_qr_code.gif → .github/donation_btc_qr_code.gif} +0 -0
- data/.github/workflows/spec.yml +33 -0
- data/Gemfile +15 -3
- data/README.md +14 -4
- data/Rakefile +2 -2
- data/checksum/money-tree-0.11.0.gem.sha512 +1 -0
- data/checksum/money-tree-0.9.0.gem.sha512 +1 -1
- data/lib/money-tree/address.rb +16 -6
- data/lib/money-tree/key.rb +32 -25
- data/lib/money-tree/networks.rb +16 -15
- data/lib/money-tree/node.rb +49 -39
- data/lib/money-tree/support.rb +59 -34
- data/lib/money-tree/version.rb +1 -1
- data/lib/money-tree.rb +6 -7
- data/lib/openssl_extensions.rb +11 -54
- data/money-tree.gemspec +22 -30
- data/spec/{lib/money-tree → money-tree}/address_spec.rb +42 -8
- data/spec/money-tree/money_tree_spec.rb +9 -0
- data/spec/{lib/money-tree → money-tree}/node_spec.rb +425 -15
- data/spec/money-tree/openssl_extensions_spec.rb +71 -0
- data/spec/{lib/money-tree → money-tree}/private_key_spec.rb +27 -27
- data/spec/{lib/money-tree → money-tree}/public_key_spec.rb +81 -40
- data/spec/{lib/money-tree → money-tree}/support_spec.rb +4 -4
- data/spec/spec_helper.rb +15 -3
- metadata +37 -150
- checksums.yaml.gz.sig +0 -0
- data/.simplecov +0 -7
- data/.travis.yml +0 -3
- data/spec/lib/money-tree/openssl_extensions_spec.rb +0 -23
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
@@ -1,10 +1,10 @@
|
|
1
|
-
require
|
1
|
+
require "spec_helper"
|
2
2
|
|
3
3
|
describe MoneyTree::PrivateKey do
|
4
4
|
before do
|
5
5
|
@key = MoneyTree::PrivateKey.new key: "5eae5375fb5f7a0ea650566363befa2830ef441bdcb19198adf318faee86d64b"
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
describe "to_hex" do
|
9
9
|
it "has 64 characters" do
|
10
10
|
# must always be 64 characters - leading zeroes need to be preserved!
|
@@ -15,81 +15,81 @@ describe MoneyTree::PrivateKey do
|
|
15
15
|
master = MoneyTree::Master.new seed_hex: "9cf6b6e8451c7d551cb402e2997566e5c7c258543eadb184f9f39322b2e6959b"
|
16
16
|
expect(master.node_for_path("m/427").private_key.to_hex.length).to eql(64)
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
it "is a valid hex" do
|
20
|
-
expect(@key.to_hex).to eql(
|
20
|
+
expect(@key.to_hex).to eql("5eae5375fb5f7a0ea650566363befa2830ef441bdcb19198adf318faee86d64b")
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
describe "to_wif" do
|
25
25
|
it "is a 52 character base58 key" do
|
26
26
|
expect(@key.to_wif.length).to eql(52)
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
it "starts with K or L" do
|
30
30
|
expect(%w(K L)).to include(@key.to_wif[0])
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
it "is a valid compressed wif" do
|
34
|
-
expect(@key.to_wif).to eql(
|
34
|
+
expect(@key.to_wif).to eql("KzPkwAXJ4wtXHnbamTaJqoMrzwCUUJaqhUxnqYhnZvZH6KhgmDPK")
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
describe "to_wif(compressed: false)" do
|
39
39
|
it "is a 51 character base58 key" do
|
40
40
|
expect(@key.to_wif(compressed: false).length).to eql(51)
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
it "starts with 5" do
|
44
|
-
expect(@key.to_wif(compressed: false)[0]).to eql(
|
44
|
+
expect(@key.to_wif(compressed: false)[0]).to eql("5")
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
it "is valid" do
|
48
|
-
expect(@key.to_wif(compressed: false)).to eql(
|
48
|
+
expect(@key.to_wif(compressed: false)).to eql("5JXz5ZyFk31oHVTQxqce7yitCmTAPxBqeGQ4b7H3Aj3L45wUhoa")
|
49
49
|
end
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
describe "from_wif(wif)" do
|
53
53
|
it "returns the key from a wif" do
|
54
|
-
expect(@key.from_wif("5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ")).to eql(
|
54
|
+
expect(@key.from_wif("5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ")).to eql("0c28fca386c7a227600b2fe50b7cae11ec86d3bf1fbe471be89827e19d72aa1d")
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
it "raises an error on bad checksum" do
|
58
58
|
expect { @key.from_wif("5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTBADTJ") }.to raise_error(MoneyTree::Key::InvalidWIFFormat)
|
59
59
|
end
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
describe "to_base64" do
|
63
63
|
it "has 44 characters" do
|
64
64
|
expect(@key.to_base64.length).to eql(44)
|
65
65
|
end
|
66
|
-
|
66
|
+
|
67
67
|
it "is a valid base64" do
|
68
|
-
expect(@key.to_base64).to eql(
|
68
|
+
expect(@key.to_base64).to eql("Xq5Tdftfeg6mUFZjY776KDDvRBvcsZGYrfMY+u6G1ks=")
|
69
69
|
end
|
70
70
|
end
|
71
|
-
|
71
|
+
|
72
72
|
describe "from_base64(base64_key)" do
|
73
73
|
it "parses base64 key" do
|
74
74
|
@key = MoneyTree::PrivateKey.new(key: "Xq5Tdftfeg6mUFZjY776KDDvRBvcsZGYrfMY+u6G1ks=")
|
75
75
|
expect(@key.to_hex).to eql("5eae5375fb5f7a0ea650566363befa2830ef441bdcb19198adf318faee86d64b")
|
76
76
|
end
|
77
|
-
|
77
|
+
|
78
78
|
it "returns the key from base64 encoding" do
|
79
|
-
expect(@key.from_base64("Xq5Tdftfeg6mUFZjY776KDDvRBvcsZGYrfMY+u6G1ks=")).to eql(
|
79
|
+
expect(@key.from_base64("Xq5Tdftfeg6mUFZjY776KDDvRBvcsZGYrfMY+u6G1ks=")).to eql("5eae5375fb5f7a0ea650566363befa2830ef441bdcb19198adf318faee86d64b")
|
80
80
|
end
|
81
|
-
|
81
|
+
|
82
82
|
it "raises an error on bad encoding" do
|
83
83
|
expect { @key.from_base64("Xq5Tdftfeg6mUFZjY776KD&%#BbadBADrfMY+u6G1ks=") }.to raise_error(MoneyTree::Key::InvalidBase64Format)
|
84
84
|
end
|
85
85
|
end
|
86
|
-
|
86
|
+
|
87
87
|
describe "valid?(eckey)" do
|
88
88
|
it "checks for a valid key" do
|
89
89
|
expect(@key.valid?).to be_truthy
|
90
90
|
end
|
91
91
|
end
|
92
|
-
|
92
|
+
|
93
93
|
describe "parse_raw_key" do
|
94
94
|
it "returns error if key is not Bignum, hex, base64, or wif formatted" do
|
95
95
|
expect { @key = MoneyTree::PrivateKey.new(key: "Thisisnotakey") }.to raise_error(MoneyTree::Key::KeyFormatNotFound)
|
@@ -109,12 +109,12 @@ describe MoneyTree::PrivateKey do
|
|
109
109
|
|
110
110
|
context "testnet" do
|
111
111
|
before do
|
112
|
-
@key = MoneyTree::PrivateKey.new key:
|
112
|
+
@key = MoneyTree::PrivateKey.new key: "cRhes8SBnsF6WizphaRKQKZZfDniDa9Bxcw31yKeEC1KDExhxFgD"
|
113
113
|
end
|
114
114
|
|
115
115
|
describe "to_wif" do
|
116
116
|
it "returns same wif" do
|
117
|
-
expect(@key.to_wif(network: :bitcoin_testnet)).to eql(
|
117
|
+
expect(@key.to_wif(network: :bitcoin_testnet)).to eql("cRhes8SBnsF6WizphaRKQKZZfDniDa9Bxcw31yKeEC1KDExhxFgD")
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
@@ -1,111 +1,140 @@
|
|
1
|
-
require
|
1
|
+
require "spec_helper"
|
2
2
|
|
3
3
|
describe MoneyTree::PublicKey do
|
4
|
-
|
5
4
|
describe "with a private key" do
|
6
5
|
before do
|
7
6
|
@private_key = MoneyTree::PrivateKey.new key: "5eae5375fb5f7a0ea650566363befa2830ef441bdcb19198adf318faee86d64b"
|
8
7
|
@key = MoneyTree::PublicKey.new @private_key
|
9
8
|
end
|
10
|
-
|
9
|
+
|
11
10
|
describe "to_hex(compressed: false)" do
|
12
11
|
it "has 65 bytes" do
|
13
12
|
expect(@key.uncompressed.to_hex.length).to eql(130)
|
14
13
|
end
|
15
|
-
|
14
|
+
|
16
15
|
it "is a valid hex" do
|
17
|
-
expect(@key.uncompressed.to_hex).to eql(
|
16
|
+
expect(@key.uncompressed.to_hex).to eql("042dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b11203096f1a1c5276a73f91b9465357004c2103cc42c63d6d330df589080d2e4")
|
18
17
|
end
|
19
18
|
end
|
20
|
-
|
19
|
+
|
21
20
|
describe "to_hex" do
|
22
21
|
it "has 33 bytes" do
|
23
22
|
expect(@key.to_hex.length).to eql(66)
|
24
23
|
end
|
25
|
-
|
24
|
+
|
26
25
|
it "is a valid compressed hex" do
|
27
|
-
expect(@key.to_hex).to eql(
|
26
|
+
expect(@key.to_hex).to eql("022dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b")
|
28
27
|
end
|
29
28
|
end
|
30
|
-
|
29
|
+
|
31
30
|
describe "to_fingerprint" do
|
32
31
|
it "returns a valid fingerprint" do
|
33
32
|
expect(@key.to_fingerprint).to eql("1fddf42e")
|
34
33
|
end
|
35
34
|
end
|
36
|
-
|
35
|
+
|
37
36
|
describe "to_address(compressed: false)" do
|
38
37
|
it "has 34 characters" do
|
39
38
|
expect(@key.uncompressed.to_address.length).to eql(34)
|
40
39
|
end
|
41
|
-
|
40
|
+
|
41
|
+
it "is a valid bitcoin address" do
|
42
|
+
expect(@key.uncompressed.to_address).to eql("133bJA2xoVqBUsiR3uSkciMo5r15fLAaZg")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "to_bech32_address" do
|
47
|
+
it "has 42 characters" do
|
48
|
+
expect(@key.to_bech32_address.length).to eql(42)
|
49
|
+
end
|
50
|
+
|
42
51
|
it "is a valid bitcoin address" do
|
43
|
-
expect(@key.
|
52
|
+
expect(@key.to_bech32_address).to eql("bc1qrlwlgt5d0sdtq882qvk3jc0sywucn76fwcmqma")
|
44
53
|
end
|
45
54
|
end
|
46
|
-
|
55
|
+
|
47
56
|
describe "to_compressed_address" do
|
48
57
|
it "has 34 characters" do
|
49
58
|
expect(@key.to_address.length).to eql(34)
|
50
59
|
end
|
51
|
-
|
60
|
+
|
52
61
|
it "is a valid compressed bitcoin address" do
|
53
|
-
expect(@key.to_address).to eql(
|
62
|
+
expect(@key.to_address).to eql("13uVqa35BMo4mYq9LiZrXVzoz9EFZ6aoXe")
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe "to_p2wpkh_p2sh" do
|
67
|
+
it "has 34 characters" do
|
68
|
+
expect(@key.to_p2wpkh_p2sh.length).to eql(34)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "is a valid p2wpkh_p2sh bitcoin address" do
|
72
|
+
expect(@key.to_p2wpkh_p2sh).to eql("31vNN7WVDxjvc5XZVKW3qV4B3nFLxsRPnE")
|
54
73
|
end
|
55
74
|
end
|
56
75
|
end
|
57
|
-
|
76
|
+
|
58
77
|
describe "without a private key" do
|
59
78
|
before do
|
60
|
-
@key = MoneyTree::PublicKey.new
|
79
|
+
@key = MoneyTree::PublicKey.new "042dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b11203096f1a1c5276a73f91b9465357004c2103cc42c63d6d330df589080d2e4"
|
61
80
|
end
|
62
|
-
|
81
|
+
|
63
82
|
describe "to_hex(compressed: false)" do
|
64
83
|
it "has 65 bytes" do
|
65
84
|
expect(@key.uncompressed.to_hex.length).to eql(130)
|
66
85
|
end
|
67
|
-
|
86
|
+
|
68
87
|
it "is a valid hex" do
|
69
|
-
expect(@key.uncompressed.to_hex).to eql(
|
88
|
+
expect(@key.uncompressed.to_hex).to eql("042dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b11203096f1a1c5276a73f91b9465357004c2103cc42c63d6d330df589080d2e4")
|
70
89
|
end
|
71
90
|
end
|
72
|
-
|
91
|
+
|
73
92
|
describe "to_hex" do
|
74
93
|
it "has 33 bytes" do
|
75
94
|
expect(@key.compressed.to_hex.length).to eql(66)
|
76
95
|
end
|
77
|
-
|
96
|
+
|
78
97
|
it "is a valid compressed hex" do
|
79
|
-
expect(@key.compressed.to_hex).to eql(
|
98
|
+
expect(@key.compressed.to_hex).to eql("022dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b")
|
80
99
|
end
|
81
100
|
end
|
82
|
-
|
101
|
+
|
83
102
|
describe "to_fingerprint" do
|
84
103
|
it "returns a valid fingerprint" do
|
85
104
|
expect(@key.compressed.to_fingerprint).to eql("1fddf42e")
|
86
105
|
end
|
87
106
|
end
|
88
|
-
|
107
|
+
|
89
108
|
describe "to_address(compressed: false)" do
|
90
109
|
it "has 34 characters" do
|
91
110
|
expect(@key.uncompressed.to_address.length).to eql(34)
|
92
111
|
end
|
93
|
-
|
112
|
+
|
94
113
|
it "is a valid bitcoin address" do
|
95
|
-
expect(@key.uncompressed.to_address).to eql(
|
114
|
+
expect(@key.uncompressed.to_address).to eql("133bJA2xoVqBUsiR3uSkciMo5r15fLAaZg")
|
96
115
|
end
|
97
116
|
end
|
98
|
-
|
117
|
+
|
99
118
|
describe "to_compressed_address" do
|
100
119
|
it "has 34 characters" do
|
101
120
|
expect(@key.compressed.to_address.length).to eql(34)
|
102
121
|
end
|
103
|
-
|
122
|
+
|
104
123
|
it "is a valid compressed bitcoin address" do
|
105
|
-
expect(@key.compressed.to_address).to eql(
|
124
|
+
expect(@key.compressed.to_address).to eql("13uVqa35BMo4mYq9LiZrXVzoz9EFZ6aoXe")
|
106
125
|
end
|
107
126
|
end
|
108
|
-
|
127
|
+
|
128
|
+
describe "to_p2wpkh_p2sh" do
|
129
|
+
it "has 34 characters" do
|
130
|
+
expect(@key.to_p2wpkh_p2sh.length).to eql(34)
|
131
|
+
end
|
132
|
+
|
133
|
+
it "is a valid p2wpkh_p2sh bitcoin address" do
|
134
|
+
expect(@key.to_p2wpkh_p2sh).to eql("3JUBTtepUbTZgUtjbde7UANs5cey8N57xa")
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
109
138
|
describe "#compression" do
|
110
139
|
it "returns current compression setting" do
|
111
140
|
@key.compression = :uncompressed
|
@@ -115,18 +144,18 @@ describe MoneyTree::PublicKey do
|
|
115
144
|
end
|
116
145
|
end
|
117
146
|
end
|
118
|
-
|
147
|
+
|
119
148
|
describe "with a bad key" do
|
120
149
|
it "raises KeyFormatNotFound" do
|
121
|
-
expect { @key = MoneyTree::PublicKey.new
|
150
|
+
expect { @key = MoneyTree::PublicKey.new "THISISNOTAVALIDKEY" }.to raise_error(MoneyTree::Key::KeyFormatNotFound)
|
122
151
|
end
|
123
152
|
end
|
124
153
|
|
125
154
|
describe "recalcuating public key" do
|
126
155
|
it "produces same results" do
|
127
156
|
results = []
|
128
|
-
100.times do
|
129
|
-
results << MoneyTree::PublicKey.new(
|
157
|
+
100.times do
|
158
|
+
results << MoneyTree::PublicKey.new("042dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b11203096f1a1c5276a73f91b9465357004c2103cc42c63d6d330df589080d2e4").to_s
|
130
159
|
end
|
131
160
|
expect(results.uniq.length).to eql(1)
|
132
161
|
end
|
@@ -134,7 +163,7 @@ describe MoneyTree::PublicKey do
|
|
134
163
|
|
135
164
|
describe "#uncompressed" do
|
136
165
|
before do
|
137
|
-
@key = MoneyTree::PublicKey.new(
|
166
|
+
@key = MoneyTree::PublicKey.new("022dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b")
|
138
167
|
end
|
139
168
|
|
140
169
|
it "does not mutate key" do
|
@@ -147,7 +176,7 @@ describe MoneyTree::PublicKey do
|
|
147
176
|
|
148
177
|
describe "#compressed" do
|
149
178
|
before do
|
150
|
-
@key = MoneyTree::PublicKey.new(
|
179
|
+
@key = MoneyTree::PublicKey.new("042dfc2557a007c93092c2915f11e8aa70c4f399a6753e2e908330014091580e4b11203096f1a1c5276a73f91b9465357004c2103cc42c63d6d330df589080d2e4")
|
151
180
|
end
|
152
181
|
|
153
182
|
it "does not mutate key" do
|
@@ -158,8 +187,20 @@ describe MoneyTree::PublicKey do
|
|
158
187
|
end
|
159
188
|
end
|
160
189
|
|
190
|
+
context "wobine's blackboard 101 series" do
|
191
|
+
# ref https://github.com/wobine/blackboard101/blob/e991ea0b98fd26059bf3806e5749b5e5f737e791/EllipticCurvesPart4-PrivateKeyToPublicKey.py
|
192
|
+
subject(:wobine) { MoneyTree::PrivateKey.new key: "A0DC65FFCA799873CBEA0AC274015B9526505DAAAED385155425F7337704883E" }
|
193
|
+
|
194
|
+
it "always recovers wobine's public keys" do
|
195
|
+
expect(wobine.key).to eq "a0dc65ffca799873cbea0ac274015b9526505daaaed385155425f7337704883e"
|
196
|
+
public_key = MoneyTree::PublicKey.new wobine
|
197
|
+
expect(public_key.key).to eq "020791dc70b75aa995213244ad3f4886d74d61ccd3ef658243fcad14c9ccee2b0a"
|
198
|
+
expect(public_key.uncompressed.to_hex).to eq "040791dc70b75aa995213244ad3f4886d74d61ccd3ef658243fcad14c9ccee2b0aa762fbc6ac0921b8f17025bb8458b92794ae87a133894d70d7995fc0b6b5ab90"
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
161
202
|
context "testnet" do
|
162
|
-
context
|
203
|
+
context "with private key" do
|
163
204
|
before do
|
164
205
|
@private_key = MoneyTree::PrivateKey.new
|
165
206
|
@key = MoneyTree::PublicKey.new(@private_key)
|
@@ -174,9 +215,9 @@ describe MoneyTree::PublicKey do
|
|
174
215
|
end
|
175
216
|
end
|
176
217
|
|
177
|
-
context
|
218
|
+
context "without private key" do
|
178
219
|
before do
|
179
|
-
@key = MoneyTree::PublicKey.new(
|
220
|
+
@key = MoneyTree::PublicKey.new("0297b033ba894611345a0e777861237ef1632370fbd58ebe644eb9f3714e8fe2bc")
|
180
221
|
end
|
181
222
|
|
182
223
|
it "should have an address starting with m or n" do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "spec_helper"
|
2
2
|
|
3
3
|
describe MoneyTree::Support do
|
4
4
|
include MoneyTree::Support
|
@@ -10,20 +10,20 @@ describe MoneyTree::Support do
|
|
10
10
|
expect(sha256("8147786c4d15106333bf278d71dadaf1079ef2d2440a4dde37d747ded5403592")).to eql("507a5b8dfed0fc6fe8801743720cedec06aa5c6fca72b07c49964492fb98a714")
|
11
11
|
end
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
describe "ripemd160(str)" do
|
15
15
|
it "properly calculates ripemd160 hash" do
|
16
16
|
expect(ripemd160("abc", ascii: true)).to eql("8eb208f7e05d987a9b044a8e98c6b087f15a0bfc")
|
17
17
|
expect(ripemd160("e8026715af68676e0287ec9aa774f8103e4bddd5505b209263a8ff97c6ea29cc")).to eql("166db6510884918f31a9d246404760db8154bf84")
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
describe "hmac_sha512_hex(key, message)" do
|
22
22
|
it "properly calculates hmac sha512" do
|
23
23
|
expect(hmac_sha512_hex("Jefe", "what do ya want for nothing?")).to eql("164b7a7bfcf819e2e395fbe73b56e0a387bd64222e831fd610270cd7ea2505549758bf75c05a994a6d034f65f8f0e6fdcaeab1a34d4a6b4b636e070a38bce737")
|
24
24
|
end
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
describe "hex_to_int" do
|
28
28
|
it "converts hex to integer" do
|
29
29
|
expect(hex_to_int("abcdef0123456789")).to eql(12379813738877118345)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# use the local version of the code instead of a globally installed gem
|
2
|
+
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
|
3
|
+
|
4
|
+
# only run coverage reports on github actions
|
5
|
+
if ENV["COVERAGE"]
|
6
|
+
require "simplecov"
|
7
|
+
SimpleCov.start
|
8
|
+
require "codecov"
|
9
|
+
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
10
|
+
end
|
11
|
+
|
12
|
+
require "money-tree"
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
end
|
metadata
CHANGED
@@ -1,156 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money-tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Winkelspecht
|
8
|
-
|
8
|
+
- Afri Schoedon
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
|
13
|
-
MIIEHDCCAoSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAcMRowGAYDVQQDDBFtYXR0
|
14
|
-
L0RDPWdlbS9EQz1jbzAeFw0xODA1MzAyMTQwNDZaFw0xOTA1MzAyMTQwNDZaMBwx
|
15
|
-
GjAYBgNVBAMMEW1hdHQvREM9Z2VtL0RDPWNvMIIBojANBgkqhkiG9w0BAQEFAAOC
|
16
|
-
AY8AMIIBigKCAYEAxfbjMHFlxA2P+4YWPagKoGAMi4078imgXdFbD3Rloe6cGfYp
|
17
|
-
IMUQitiHrKi6fhSE0UjXmoP3qnYFddm1enN9zUAFRhHWv7xpINqSqss4PYAb5Anl
|
18
|
-
RYZu3jromop5aVodi15HUfu5z27MvBm4rAaN/dDRfh/rT2hDbTTh0HmvEaPUDfX6
|
19
|
-
TyflAttfabFvtY4qsD+ao8tks0DytqyuEWZ0tvQ6upOgHRNNuYDwDZB1T9v2dq2w
|
20
|
-
3goJFmOKBMMn7UH8WMjD3HiOuRD4tWhq5xWLjBqjzFlVPlZPgdCNyXeMMnLXER98
|
21
|
-
NY35cVWFFuqG+kZwy4MFKdE9WFTocLZxLFo0VVTNSpPara9HirbHtIo9jZNuop4S
|
22
|
-
g4JTf1F8dIWYii3sXoAYZfkl6rHVRP0G/OV5LcTfSS3QkmI5hNltz5FZzc+qI6S1
|
23
|
-
rTR1ZwTy1rRI3coFY7vDRaFWBoMbbo/DytgCE3+rfbVDxQrJa4aZ0iYDhu8LXEA1
|
24
|
-
VTtpf1EWYCOsYE1TAgMBAAGjaTBnMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0G
|
25
|
-
A1UdDgQWBBQ6QoDNre7LFgOukH2Cv+RqZyfUzjAWBgNVHREEDzANgQttYXR0QGdl
|
26
|
-
bS5jbzAWBgNVHRIEDzANgQttYXR0QGdlbS5jbzANBgkqhkiG9w0BAQsFAAOCAYEA
|
27
|
-
kOxYnOsB+NwHwLc2lHEZ8ubxanq2qIZDhvVQ4M31gwmba43xO7vq0ktFxYRvozs4
|
28
|
-
74dQ6bmY2e7njoFgeutyJwxulA+BC71mDQA1s4WsZo7Z2TRgB0GViVqHrzq+jY+M
|
29
|
-
p9mTHQqKH+2j0P9T4DXSzq4qOaBA3YROAwAzYI9N8MObeWkRt2pZ4zYQrAniP2nd
|
30
|
-
wzXs/G5lWbbntVcvQOfAAXBipSJ3X5P2EGpUytP9ZpGdezY5HZzuiJFcmCf1CM3t
|
31
|
-
VX4NZjbJak9gOY0AFD0Aw497sYenm0VBExclOmeRuZLffpWteTTL//utpG3bbFPl
|
32
|
-
jQ78uzsrexYTYW5IshjfSIf3TZxm50Z45pyOTow5EOP1Nd7OmKOcI8hrLGv5+AlD
|
33
|
-
hCnomUTUNsM4Rjwl5rzQiIn3ezv6+0tlg4rWJmVTuOGwcHk/oj1In2sPjCqm0pgx
|
34
|
-
TLnMa8gr6aUpuHR5s2N4ZH0Q2YIsaD6cv7DYXt+G4MRut3njOYHfkqsSVykO6hvr
|
35
|
-
-----END CERTIFICATE-----
|
36
|
-
date: 2018-05-30 00:00:00.000000000 Z
|
37
|
-
dependencies:
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: ffi
|
40
|
-
requirement: !ruby/object:Gem::Requirement
|
41
|
-
requirements:
|
42
|
-
- - ">="
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '0'
|
45
|
-
type: :runtime
|
46
|
-
prerelease: false
|
47
|
-
version_requirements: !ruby/object:Gem::Requirement
|
48
|
-
requirements:
|
49
|
-
- - ">="
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
version: '0'
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: bundler
|
54
|
-
requirement: !ruby/object:Gem::Requirement
|
55
|
-
requirements:
|
56
|
-
- - "~>"
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: '1.3'
|
59
|
-
type: :development
|
60
|
-
prerelease: false
|
61
|
-
version_requirements: !ruby/object:Gem::Requirement
|
62
|
-
requirements:
|
63
|
-
- - "~>"
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '1.3'
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: rake
|
68
|
-
requirement: !ruby/object:Gem::Requirement
|
69
|
-
requirements:
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: '0'
|
73
|
-
type: :development
|
74
|
-
prerelease: false
|
75
|
-
version_requirements: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
- - ">="
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: '0'
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: rspec
|
82
|
-
requirement: !ruby/object:Gem::Requirement
|
83
|
-
requirements:
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '0'
|
87
|
-
type: :development
|
88
|
-
prerelease: false
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
requirements:
|
91
|
-
- - ">="
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: simplecov
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
requirements:
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '0'
|
101
|
-
type: :development
|
102
|
-
prerelease: false
|
103
|
-
version_requirements: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '0'
|
108
|
-
- !ruby/object:Gem::Dependency
|
109
|
-
name: coveralls
|
110
|
-
requirement: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: '0'
|
115
|
-
type: :development
|
116
|
-
prerelease: false
|
117
|
-
version_requirements: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0'
|
122
|
-
- !ruby/object:Gem::Dependency
|
123
|
-
name: pry
|
124
|
-
requirement: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
129
|
-
type: :development
|
130
|
-
prerelease: false
|
131
|
-
version_requirements: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - ">="
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '0'
|
11
|
+
cert_chain: []
|
12
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
136
14
|
description: A Ruby Gem implementation of Bitcoin HD Wallets
|
137
15
|
email:
|
138
16
|
- winkelspecht@gmail.com
|
17
|
+
- gems@q9f.cc
|
139
18
|
executables: []
|
140
19
|
extensions: []
|
141
20
|
extra_rdoc_files: []
|
142
21
|
files:
|
22
|
+
- ".github/donation_btc_qr_code.gif"
|
23
|
+
- ".github/workflows/spec.yml"
|
143
24
|
- ".gitignore"
|
144
25
|
- ".rspec"
|
145
|
-
- ".simplecov"
|
146
|
-
- ".travis.yml"
|
147
26
|
- Gemfile
|
148
27
|
- LICENSE.txt
|
149
28
|
- README.md
|
150
29
|
- Rakefile
|
151
30
|
- certs/mattatgemco.pem
|
31
|
+
- checksum/money-tree-0.11.0.gem.sha512
|
152
32
|
- checksum/money-tree-0.9.0.gem.sha512
|
153
|
-
- donation_btc_qr_code.gif
|
154
33
|
- lib/money-tree.rb
|
155
34
|
- lib/money-tree/address.rb
|
156
35
|
- lib/money-tree/key.rb
|
@@ -160,18 +39,23 @@ files:
|
|
160
39
|
- lib/money-tree/version.rb
|
161
40
|
- lib/openssl_extensions.rb
|
162
41
|
- money-tree.gemspec
|
163
|
-
- spec/
|
164
|
-
- spec/
|
165
|
-
- spec/
|
166
|
-
- spec/
|
167
|
-
- spec/
|
168
|
-
- spec/
|
42
|
+
- spec/money-tree/address_spec.rb
|
43
|
+
- spec/money-tree/money_tree_spec.rb
|
44
|
+
- spec/money-tree/node_spec.rb
|
45
|
+
- spec/money-tree/openssl_extensions_spec.rb
|
46
|
+
- spec/money-tree/private_key_spec.rb
|
47
|
+
- spec/money-tree/public_key_spec.rb
|
48
|
+
- spec/money-tree/support_spec.rb
|
169
49
|
- spec/spec_helper.rb
|
170
|
-
homepage: https://github.com/
|
50
|
+
homepage: https://github.com/GemHQ/money-tree
|
171
51
|
licenses:
|
172
52
|
- MIT
|
173
|
-
metadata:
|
174
|
-
|
53
|
+
metadata:
|
54
|
+
homepage_uri: https://github.com/GemHQ/money-tree
|
55
|
+
source_code_uri: https://github.com/GemHQ/money-tree
|
56
|
+
github_repo: https://github.com/GemHQ/money-tree
|
57
|
+
bug_tracker_uri: https://github.com/GemHQ/money-tree/issues
|
58
|
+
post_install_message:
|
175
59
|
rdoc_options: []
|
176
60
|
require_paths:
|
177
61
|
- lib
|
@@ -179,23 +63,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
63
|
requirements:
|
180
64
|
- - ">="
|
181
65
|
- !ruby/object:Gem::Version
|
182
|
-
version: '
|
66
|
+
version: '2.6'
|
67
|
+
- - "<"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '4.0'
|
183
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
71
|
requirements:
|
185
72
|
- - ">="
|
186
73
|
- !ruby/object:Gem::Version
|
187
74
|
version: '0'
|
188
75
|
requirements: []
|
189
|
-
|
190
|
-
|
191
|
-
signing_key:
|
76
|
+
rubygems_version: 3.3.23
|
77
|
+
signing_key:
|
192
78
|
specification_version: 4
|
193
79
|
summary: Bitcoin Hierarchical Deterministic Wallets in Ruby! (Bitcoin standard BIP0032)
|
194
80
|
test_files:
|
195
|
-
- spec/
|
196
|
-
- spec/
|
197
|
-
- spec/
|
198
|
-
- spec/
|
199
|
-
- spec/
|
200
|
-
- spec/
|
81
|
+
- spec/money-tree/address_spec.rb
|
82
|
+
- spec/money-tree/money_tree_spec.rb
|
83
|
+
- spec/money-tree/node_spec.rb
|
84
|
+
- spec/money-tree/openssl_extensions_spec.rb
|
85
|
+
- spec/money-tree/private_key_spec.rb
|
86
|
+
- spec/money-tree/public_key_spec.rb
|
87
|
+
- spec/money-tree/support_spec.rb
|
201
88
|
- spec/spec_helper.rb
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data/.simplecov
DELETED
data/.travis.yml
DELETED