{"id":15454657,"url":"https://github.com/niclin/sygna-ruby","last_synced_at":"2025-03-27T21:49:58.609Z","repository":{"id":59157021,"uuid":"251507870","full_name":"niclin/sygna-ruby","owner":"niclin","description":"This is a Ruby library to help you build servers/services within Sygna Bridge Ecosystem.","archived":false,"fork":false,"pushed_at":"2020-04-17T06:42:46.000Z","size":40,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T06:34:38.471Z","etag":null,"topics":["ruby-library","sygna-bridge"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niclin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-31T05:21:56.000Z","updated_at":"2021-12-14T12:02:10.000Z","dependencies_parsed_at":"2022-09-13T20:03:31.199Z","dependency_job_id":null,"html_url":"https://github.com/niclin/sygna-ruby","commit_stats":null,"previous_names":["niclin/sygna"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niclin%2Fsygna-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niclin%2Fsygna-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niclin%2Fsygna-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niclin%2Fsygna-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niclin","download_url":"https://codeload.github.com/niclin/sygna-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245931768,"owners_count":20695961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby-library","sygna-bridge"],"created_at":"2024-10-01T22:04:41.289Z","updated_at":"2025-03-27T21:49:58.584Z","avatar_url":"https://github.com/niclin.png","language":"Ruby","readme":"# Sygna\n\n[![Gem Version](https://badge.fury.io/rb/sygna.svg)](https://badge.fury.io/rb/sygna)\n[![Build Status](https://travis-ci.org/niclin/sygna-ruby.svg?branch=master)](https://travis-ci.org/niclin/sygna-ruby)\n\nThis is a Ruby library to help you build servers/servies within Sygna Bridge Ecosystem. For more detail information, please see [Sygna Bridge](https://www.sygna.io/).\n\n\n## Installation instructions\n\nIf you are using Mac OS X and Homebrew, run these commands to install required development tools:\n\n```\n$ brew install autoconf automake libtool\n```\n\nThen download and install the library:\n\n```\n$ git clone https://github.com/bitcoin-core/secp256k1.git\n$ cd secp256k1\n$ ./autogen.sh\n$ ./configure\n$ make\n$ sudo make install\n```\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sygna'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sygna\n\n## Usage\n\nYou need prepare private key first, like this\n\n```\n# The private key example:\n# -----BEGIN EC PRIVATE KEY-----\n# ...\n# ...\n# ...\n# -----END EC PRIVATE KEY-----\n```\n\ninitialize configure\n\n```ruby\nSygna.configure do |config|\n  config.private_key = \"Your private key\"\nend\n```\n\n### Private Info\n\n\n#### Encode\n\n```ruby\ndata = { name: \"Nic\" }\npublic_key_hex = \"abcde12345\"\n\nSygna::PrivateInfo.encode(data, public_key_hex)\n# =\u003e encrypted string\n```\n\n#### Decode\n\n```ruby\ndata = \"qazwsxedc1234567890\"\n\nSygna::PrivateInfo.decode(data)\n# =\u003e decrypted string\n```\n\n### Signature\n\n#### Sign\n\n```ruby\nobject = { name: \"Nic\" }\n\nSygna::Signature.sign(object)\n\n# =\u003e signatured string\n```\n\n#### Verify\n\n```ruby\nobject = { name: \"Nic\" }\nsignature = \"abcde12345\"\npublic_key_hex = \"originator public key\"\n\nSygna::Signature.verify(object, signature, public_key_hex)\n\n# =\u003e true or false\n```\n\n## Development\n\nAfter 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.\n\nTo 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/niclin/sygna.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniclin%2Fsygna-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniclin%2Fsygna-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniclin%2Fsygna-ruby/lists"}