sr25519 0.1.0

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: 93fc6ca0e55ea4d15ae49a88cb2038384901fec0a71a617a447495f63e178729
4
+ data.tar.gz: affe4dfe032464e979efe50bac31ee4f09e670b979ae2e11ed12d6ea37043e38
5
+ SHA512:
6
+ metadata.gz: 2aab04310f8565ac93f2b805df811fc9410f54605f7d461843c7763321465c169544b88eb7c49f47ddbacc681025a1848b1c0fe4a4a08704be16599407d39ffc
7
+ data.tar.gz: 6a9382481ace7d5daeaa59f5cfd3acf131f9745a5bcbeb2d508b38f8f4b2c2edb89fa539356a9d0efdc57e9542d6268f04bd9e100e16cde22d53a4cfa9cfcb3f
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/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -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 xxh2611@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/Dockerfile ADDED
@@ -0,0 +1,13 @@
1
+ FROM ruby:2.7.1
2
+
3
+ RUN apt-get update
4
+
5
+ WORKDIR /usr/src/app
6
+
7
+ COPY . .
8
+
9
+ RUN gem install bundler:2.2.15 && \
10
+ bundle install && \
11
+ rake install:local
12
+
13
+ CMD ["/bin/bash"]
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in sr25519.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,40 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sr25519 (0.1.0)
5
+ base58
6
+ blake2b
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ base58 (0.2.3)
12
+ blake2b (0.10.0)
13
+ diff-lcs (1.4.4)
14
+ ffi (1.15.4)
15
+ rake (13.0.6)
16
+ rspec (3.10.0)
17
+ rspec-core (~> 3.10.0)
18
+ rspec-expectations (~> 3.10.0)
19
+ rspec-mocks (~> 3.10.0)
20
+ rspec-core (3.10.1)
21
+ rspec-support (~> 3.10.0)
22
+ rspec-expectations (3.10.1)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.10.0)
25
+ rspec-mocks (3.10.2)
26
+ diff-lcs (>= 1.2.0, < 2.0)
27
+ rspec-support (~> 3.10.0)
28
+ rspec-support (3.10.2)
29
+
30
+ PLATFORMS
31
+ x86_64-darwin-19
32
+
33
+ DEPENDENCIES
34
+ ffi (~> 1.15.0)
35
+ rake (~> 13.0)
36
+ rspec (~> 3.0)
37
+ sr25519!
38
+
39
+ BUNDLED WITH
40
+ 2.2.15
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 xuxh
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,110 @@
1
+ # Sr25519
2
+
3
+ This is a ruby libraray for Sr25519.
4
+
5
+ More info at: https://github.com/w3f/schnorrkel
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'sr25519'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install sr25519
22
+
23
+ ## Usage
24
+
25
+ 1. keypair
26
+
27
+ ```ruby
28
+ # seed is priviate key, is a hex string.
29
+ keypaire = SR25519.sr25519_keypair_from_seed(seed)
30
+
31
+ ```
32
+
33
+ 2. public_key
34
+
35
+ ```ruby
36
+ public_key = SR25519.get_public_key_from_seed(seed)
37
+
38
+ # get the hex string
39
+ public_key_str = public_key.to_s
40
+
41
+ ```
42
+
43
+ 3. encode address
44
+ ```ruby
45
+ address = Address.encode(public_key.to_s)
46
+ ```
47
+
48
+ 4. decode address
49
+
50
+ ```ruby
51
+ address = Address.decode(address)
52
+ ```
53
+
54
+ 5. sign
55
+
56
+ ```ruby
57
+ signature_result = SR25519.sign(message, keypair)
58
+
59
+ ```
60
+
61
+ 6. verify
62
+
63
+ ```ruby
64
+ SR25519.verify(address, message, signature_result)
65
+ ```
66
+
67
+ ## Running tests
68
+ 1. Run all tests
69
+
70
+ ```ruby
71
+ rspec
72
+ ```
73
+
74
+
75
+ ## Docker
76
+
77
+ 1. update to latest image
78
+
79
+ `docker pull uni-arts-chain/sr25519:latest`
80
+
81
+ 2. Run image:
82
+
83
+ `docker run -it uni-arts-chain/sr25519:latest`
84
+
85
+ This will enter the container with a linux shell opened.
86
+
87
+ ```shell
88
+ /usr/src/app #
89
+ ```
90
+
91
+ 3. Type `rspec` to run all tests
92
+
93
+ ```shell
94
+ /usr/src/app # rspec
95
+
96
+ ```
97
+
98
+ ## Development
99
+
100
+ 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.
101
+
102
+ 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).
103
+
104
+ ## Contributing
105
+
106
+ Bug reports and pull requests are welcome on GitHub at https://github.com/uni-arts-chain/sr25519. 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/uni-arts-chain/sr25519/blob/master/CODE_OF_CONDUCT.md).
107
+
108
+ ## License
109
+
110
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
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
+ task default: :spec
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 "sr25519"
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
data/lib/address.rb ADDED
@@ -0,0 +1,87 @@
1
+ require 'base58'
2
+ require 'blake2b'
3
+
4
+ # The code is copy from https://github.com/itering/scale.rb/blob/develop/lib/common.rb
5
+ class Address
6
+ SS58_PREFIX = 'SS58PRE'
7
+
8
+ TYPES = [
9
+ # Polkadot Live (SS58, AccountId)
10
+ 0, 1,
11
+ # Polkadot Canary (SS58, AccountId)
12
+ 2, 3,
13
+ # Kulupu (SS58, Reserved)
14
+ 16, 17,
15
+ # Darwinia Live
16
+ 18,
17
+ # Dothereum (SS58, AccountId)
18
+ 20, 21,
19
+ # Generic Substrate wildcard (SS58, AccountId)
20
+ 42, 43,
21
+
22
+ # Schnorr/Ristretto 25519 ("S/R 25519") key
23
+ 48,
24
+ # Edwards Ed25519 key
25
+ 49,
26
+ # ECDSA SECP256k1 key
27
+ 50,
28
+
29
+ # Reserved for future address format extensions.
30
+ *64..255
31
+ ]
32
+
33
+ class << self
34
+
35
+ def array_to_hex_string(arr)
36
+ body = arr.map { |i| i.to_s(16).rjust(2, '0') }.join
37
+ "0x#{body}"
38
+ end
39
+
40
+ def decode(address, addr_type = 42, ignore_checksum = true)
41
+ decoded = Base58.base58_to_binary(address, :bitcoin)
42
+ is_pubkey = decoded.size == 35
43
+
44
+ size = decoded.size - ( is_pubkey ? 2 : 1 )
45
+
46
+ prefix = decoded[0, 1].unpack("C*").first
47
+
48
+ raise "Invalid address type" unless TYPES.include?(addr_type)
49
+
50
+ hash_bytes = make_hash(decoded[0, size])
51
+ if is_pubkey
52
+ is_valid_checksum = decoded[-2].unpack("C*").first == hash_bytes[0] && decoded[-1].unpack("C*").first == hash_bytes[1]
53
+ else
54
+ is_valid_checksum = decoded[-1].unpack("C*").first == hash_bytes[0]
55
+ end
56
+
57
+ raise "Invalid decoded address checksum" unless is_valid_checksum && ignore_checksum
58
+
59
+ decoded[1...size].unpack("H*").first
60
+ end
61
+
62
+
63
+ def encode(pubkey, addr_type = 42)
64
+ pubkey = pubkey[2..-1] if pubkey =~ /^0x/i
65
+ key = [pubkey].pack("H*")
66
+
67
+ u8_array = key.bytes
68
+
69
+ u8_array.unshift(addr_type)
70
+
71
+ bytes = make_hash(u8_array.pack("C*"))
72
+
73
+ checksum = bytes[0, key.size == 32 ? 2 : 1]
74
+
75
+ u8_array.push(*checksum)
76
+
77
+ input = u8_array.pack("C*")
78
+
79
+ Base58.binary_to_base58(input, :bitcoin)
80
+ end
81
+
82
+ def make_hash(body)
83
+ Blake2b.bytes("#{SS58_PREFIX}#{body}", Blake2b::Key.none, 64)
84
+ end
85
+
86
+ end
87
+ end
Binary file
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sr25519
4
+ VERSION = "0.1.0"
5
+ end
data/lib/sr25519.rb ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "sr25519/version"
4
+ require "address"
5
+ require "sr25519_lib"
6
+
7
+ module Sr25519
8
+ class Error < StandardError; end
9
+ end
@@ -0,0 +1,117 @@
1
+ require 'ffi'
2
+ require 'address'
3
+ module SR25519Lib
4
+ extend FFI::Library
5
+
6
+ ffi_lib FFI::Library::LIBC
7
+
8
+ # The library is compile from https://github.com/Warchant/sr25519-crust
9
+ ffi_lib [File.expand_path('lib/libsr25519crust.so')] if RUBY_PLATFORM =~ /linux/
10
+ ffi_lib [File.expand_path('lib/libsr25519crust.dylib')] if RUBY_PLATFORM =~ /darwin/
11
+
12
+ attach_function :sr25519_keypair_from_seed, [:pointer, :pointer], :void
13
+ attach_function :sr25519_verify, [:pointer, :pointer, :uint, :pointer], :bool
14
+ attach_function :sr25519_sign, [:pointer, :pointer, :pointer, :pointer, :uint], :void
15
+
16
+ end
17
+
18
+ class KeyPair < FFI::Struct
19
+ # [32b key | 32b nonce | 32b public]
20
+ layout :String, [:uint8, 96]
21
+
22
+ def public_key
23
+ pub_key = self[:String].to_a[64..96]
24
+ public_key = PublicKey.new
25
+ public_key[:String].to_ptr.write_array_of_uint8(pub_key)
26
+ public_key
27
+ end
28
+
29
+ def to_s
30
+ self[:String].to_a.pack("c*").unpack1("H*")
31
+ end
32
+ end
33
+
34
+ class Seed < FFI::Struct
35
+ layout :String, [:uint8, 32]
36
+ end
37
+
38
+ class PublicKey < FFI::Struct
39
+ layout :String, [:uint8, 32]
40
+
41
+ def to_s
42
+ self[:String].to_a.pack("c*").unpack1("H*")
43
+ end
44
+ end
45
+
46
+ def sercet_key; end
47
+
48
+ def nonce ; end
49
+
50
+
51
+ class Signature < FFI::Struct
52
+ layout :String, [:uint8, 64]
53
+ end
54
+
55
+ class SigMessage < FFI::Struct
56
+ layout :String, [:uint8, 64]
57
+
58
+ def to_s
59
+ self[:String].to_a.pack("c*").unpack1("H*")
60
+ end
61
+ end
62
+
63
+ class SR25519
64
+
65
+ def self.sr25519_sign(message, private_key)
66
+ sig = SigMessage.new
67
+ msg = FFI::MemoryPointer.from_string(message)
68
+ key_pair = self.sr25519_keypair_from_seed(private_key)
69
+ public_key = key_pair.public_key
70
+ SR25519Lib.sr25519_sign(sig, public_key, key_pair, msg, message.length)
71
+ sig.to_s
72
+ end
73
+
74
+
75
+ # Creates a signature for given data
76
+ def self.sign(message, key_pair)
77
+ sig = SigMessage.new
78
+ msg = FFI::MemoryPointer.from_string(message)
79
+ public_key = key_pair.public_key
80
+ SR25519Lib.sr25519_sign(sig, public_key, key_pair, msg, message.length)
81
+ sig.to_s
82
+ end
83
+
84
+ def self.verify(address, message, signature_result)
85
+ pk = PublicKey.new
86
+ public_key = self.decode_address(address)
87
+ public_key = [public_key].pack("H*").unpack("C*")
88
+ pk[:String].to_ptr.write_array_of_uint8(public_key)
89
+
90
+ msg = FFI::MemoryPointer.from_string(message)
91
+ sig = Signature.new
92
+ if signature_result.start_with?("0x")
93
+ signature_result = signature_result.sub(/0x/, "")
94
+ end
95
+ signature_result = [signature_result].pack("H*").unpack("C*")
96
+ sig[:String].to_ptr.write_array_of_uint8(signature_result)
97
+ verify = SR25519Lib.verify(sig, msg, message.size, pk)
98
+ end
99
+
100
+ def self.sr25519_keypair_from_seed(seed)
101
+ seed_array = [seed].pack("H*").unpack("C*")
102
+ seed = Seed.new
103
+ seed[:String].to_ptr.write_array_of_uint8(seed_array)
104
+ key_pair = KeyPair.new
105
+ SR25519Lib.sr25519_keypair_from_seed(key_pair, seed)
106
+ return key_pair
107
+ end
108
+
109
+ def self.get_public_key_from_seed(seed)
110
+ key_pair = self.sr25519_keypair_from_seed(seed)
111
+ key_pair.public_key
112
+ end
113
+
114
+ def self.decode_address(address,addr_type=42)
115
+ public_address = Address.decode(address,addr_type)
116
+ end
117
+ end
data/sr25519.gemspec ADDED
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/sr25519/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "sr25519"
7
+ spec.version = Sr25519::VERSION
8
+ spec.authors = ["xuxh"]
9
+ spec.email = ["xxh2611@gmail.com"]
10
+
11
+ spec.summary = "Ruby Sr25519"
12
+ spec.description = "Sign and verify message with sr25519"
13
+ spec.homepage = "https://github.com/uni-arts-chain/sr25519"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.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"] = "https://github.com/uni-arts-chain/sr25519"
21
+ spec.metadata["changelog_uri"] = "https://github.com/uni-arts-chain/sr25519"
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
+ spec.add_development_dependency "rake", "~> 13.0"
33
+ spec.add_development_dependency "rspec", "~> 3.2"
34
+ spec.add_dependency "blake2b"
35
+ spec.add_dependency "base58"
36
+ spec.add_development_dependency "ffi", "~> 1.15.0"
37
+
38
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sr25519
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - xuxh
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '13.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '13.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.2'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: blake2b
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: base58
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: ffi
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.15.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.15.0
83
+ description: Sign and verify message with sr25519
84
+ email:
85
+ - xxh2611@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - CODE_OF_CONDUCT.md
93
+ - Dockerfile
94
+ - Gemfile
95
+ - Gemfile.lock
96
+ - LICENSE.txt
97
+ - README.md
98
+ - Rakefile
99
+ - bin/console
100
+ - bin/setup
101
+ - lib/address.rb
102
+ - lib/libsr25519crust.dylib
103
+ - lib/libsr25519crust.so
104
+ - lib/sr25519.rb
105
+ - lib/sr25519/version.rb
106
+ - lib/sr25519_lib.rb
107
+ - sr25519.gemspec
108
+ homepage: https://github.com/uni-arts-chain/sr25519
109
+ licenses:
110
+ - MIT
111
+ metadata:
112
+ allowed_push_host: https://rubygems.org
113
+ homepage_uri: https://github.com/uni-arts-chain/sr25519
114
+ source_code_uri: https://github.com/uni-arts-chain/sr25519
115
+ changelog_uri: https://github.com/uni-arts-chain/sr25519
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 2.7.0
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubygems_version: 3.2.15
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: Ruby Sr25519
135
+ test_files: []