ruby-bitcoin-secp256k1 0.5.2
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 +4 -0
- data/.gitmodules +3 -0
- data/.travis.yml +61 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +25 -0
- data/LICENSE +21 -0
- data/README.md +54 -0
- data/Rakefile +9 -0
- data/install_lib.sh +7 -0
- data/lib/bitcoin_secp256k1/c.rb +107 -0
- data/lib/bitcoin_secp256k1/ecdsa.rb +102 -0
- data/lib/bitcoin_secp256k1/key.rb +252 -0
- data/lib/bitcoin_secp256k1/utils.rb +22 -0
- data/lib/bitcoin_secp256k1/version.rb +4 -0
- data/lib/bitcoin_secp256k1.rb +21 -0
- data/ruby-bitcoin-secp256k1.gemspec +23 -0
- data/test/fixtures/ecdsa_sig.json +999 -0
- data/test/fixtures/pubkey.json +1749 -0
- data/test/secp256k1_test.rb +112 -0
- metadata +121 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding : ascii-8bit -*-
|
2
|
+
require 'bitcoin_secp256k1/version'
|
3
|
+
require 'bitcoin_secp256k1/c'
|
4
|
+
require 'bitcoin_secp256k1/utils'
|
5
|
+
require 'bitcoin_secp256k1/ecdsa'
|
6
|
+
require 'bitcoin_secp256k1/key'
|
7
|
+
|
8
|
+
module BitcoinSecp256k1
|
9
|
+
|
10
|
+
EC_COMPRESSED = C::Constants['SECP256K1_EC_COMPRESSED'].to_i
|
11
|
+
EC_UNCOMPRESSED = C::Constants['SECP256K1_EC_UNCOMPRESSED'].to_i
|
12
|
+
|
13
|
+
FLAG_SIGN = C::Constants['SECP256K1_CONTEXT_SIGN'].to_i
|
14
|
+
FLAG_VERIFY = C::Constants['SECP256K1_CONTEXT_VERIFY'].to_i
|
15
|
+
NO_FLAGS = C::Constants['SECP256K1_CONTEXT_NONE'].to_i
|
16
|
+
ALL_FLAGS = FLAG_SIGN | FLAG_VERIFY
|
17
|
+
|
18
|
+
class AssertError < StandardError; end
|
19
|
+
class LoadModuleError < StandardError; end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
require 'bitcoin_secp256k1/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "ruby-bitcoin-secp256k1"
|
7
|
+
s.version = BitcoinSecp256k1::VERSION
|
8
|
+
s.authors = ["Jan Xie"]
|
9
|
+
s.email = ["jan.h.xie@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/mechanizm/ruby-bitcoin-secp256k1"
|
11
|
+
s.summary = "Ruby binding to bitcoin's secp256k1 implementation."
|
12
|
+
s.description = "Ruby binding to bitcoin's secp256k1 implementation."
|
13
|
+
s.license = 'MIT'
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
|
18
|
+
s.add_dependency('ffi', '>= 1.9.25')
|
19
|
+
|
20
|
+
s.add_development_dependency('rake', '~> 12.3')
|
21
|
+
s.add_development_dependency('minitest', '5.11.3')
|
22
|
+
s.add_development_dependency('yard', '0.9.20')
|
23
|
+
end
|