bitcoin-ruby 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -172,7 +172,7 @@ describe 'Bitcoin::Script' do
172
172
 
173
173
  # from tx 274f8be3b7b9b1a220285f5f71f61e2691dd04df9d69bb02a8b3b85f91fb1857, second pubkey has invalid encoding.
174
174
  output = "1 0351efb6e91a31221652105d032a2508275f374cea63939ad72f1b1e02f477da78 00f2b7816db49d55d24df7bdffdbc1e203b424e8cd39f5651ab938e5e4a193569e 2 OP_CHECKMULTISIG"
175
- Bitcoin::Script.from_string(output).get_multisig_addresses.should == ["1NdB761LmTmrJixxp93nz7pEiCx5cKPW44"]
175
+ Bitcoin::Script.from_string(output).get_multisig_addresses.should == ["1NdB761LmTmrJixxp93nz7pEiCx5cKPW44", nil]
176
176
  end
177
177
 
178
178
  it "#get_p2sh_address" do
@@ -15,6 +15,14 @@ describe 'libsecp256k1' do
15
15
  ["\x04"].include?(pub[0]).should == true
16
16
  end
17
17
 
18
+ it 'generate key' do
19
+ key = Bitcoin::Secp256k1.generate_key(compressed = true)
20
+ key.compressed.should == true
21
+
22
+ key = Bitcoin::Secp256k1.generate_key(compressed = false)
23
+ key.compressed.should == false
24
+ end
25
+
18
26
  it 'sign and verify' do
19
27
  priv, pub = Bitcoin::Secp256k1.generate_key_pair
20
28
  signature = Bitcoin::Secp256k1.sign("derp", priv)
@@ -81,7 +81,13 @@ rescue LoadError
81
81
  exit 1
82
82
  end
83
83
  Bacon.summary_on_exit
84
+
85
+ begin
86
+ require 'minitest'
87
+ rescue LoadError
88
+ end
84
89
  require 'minitest/mock'
90
+ include MiniTest
85
91
 
86
92
  class Time
87
93
  class << self
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitcoin-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - lian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-02 00:00:00.000000000 Z
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby library for interacting with the bitcoin protocol/network
14
14
  email:
@@ -51,6 +51,7 @@ files:
51
51
  - lib/bitcoin/protocol/block.rb
52
52
  - lib/bitcoin/protocol/handler.rb
53
53
  - lib/bitcoin/protocol/parser.rb
54
+ - lib/bitcoin/protocol/reject.rb
54
55
  - lib/bitcoin/protocol/tx.rb
55
56
  - lib/bitcoin/protocol/txin.rb
56
57
  - lib/bitcoin/protocol/txout.rb
@@ -213,7 +214,9 @@ files:
213
214
  - spec/bitcoin/protocol/getblocks_spec.rb
214
215
  - spec/bitcoin/protocol/inv_spec.rb
215
216
  - spec/bitcoin/protocol/notfound_spec.rb
217
+ - spec/bitcoin/protocol/parser_spec.rb
216
218
  - spec/bitcoin/protocol/ping_spec.rb
219
+ - spec/bitcoin/protocol/reject.rb
217
220
  - spec/bitcoin/protocol/tx_spec.rb
218
221
  - spec/bitcoin/protocol/txin_spec.rb
219
222
  - spec/bitcoin/protocol/txout_spec.rb
@@ -242,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
245
  version: 1.3.6
243
246
  requirements: []
244
247
  rubyforge_project: bitcoin-ruby
245
- rubygems_version: 2.4.5
248
+ rubygems_version: 2.4.5.1
246
249
  signing_key:
247
250
  specification_version: 4
248
251
  summary: bitcoin utils and protocol in ruby
@@ -402,7 +405,9 @@ test_files:
402
405
  - spec/bitcoin/protocol/getblocks_spec.rb
403
406
  - spec/bitcoin/protocol/inv_spec.rb
404
407
  - spec/bitcoin/protocol/notfound_spec.rb
408
+ - spec/bitcoin/protocol/parser_spec.rb
405
409
  - spec/bitcoin/protocol/ping_spec.rb
410
+ - spec/bitcoin/protocol/reject.rb
406
411
  - spec/bitcoin/protocol/tx_spec.rb
407
412
  - spec/bitcoin/protocol/txin_spec.rb
408
413
  - spec/bitcoin/protocol/txout_spec.rb