https://github.com/chaintope/tapyrusrb
The ruby library for Tapyrus
https://github.com/chaintope/tapyrusrb
ruby tapyrus
Last synced: 12 months ago
JSON representation
The ruby library for Tapyrus
- Host: GitHub
- URL: https://github.com/chaintope/tapyrusrb
- Owner: chaintope
- License: mit
- Created: 2019-12-04T04:33:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T04:02:50.000Z (over 1 year ago)
- Last Synced: 2025-06-06T04:11:41.465Z (about 1 year ago)
- Topics: ruby, tapyrus
- Language: Ruby
- Homepage:
- Size: 1.9 MB
- Stars: 5
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Tapyrusrb [](https://github.com/chaintope/tapyrusrb/actions/workflows/ruby.yml) [](https://badge.fury.io/rb/tapyrus) [](LICENSE)
Tapyrusrb is a Ruby implementation of [Tapyrus](https://github.com/chaintope/tapyrus-core) Protocol.
NOTE: Tapyrusrb work in progress, and there is a possibility of incompatible change.
## Features
Tapyrusrb supports following feature:
- Tapyrus script interpreter
- De/serialization of Tapyrus protocol network messages
- De/serialization of blocks and transactions
- Key generation and verification for Schnorr and ECDSA (including [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) and [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) supports).
- ECDSA signature(RFC6979 -Deterministic ECDSA, LOW-S, LOW-R support)
- [WIP] SPV node
- [WIP] 0ff-chain protocol
## Requirements
### use Node implementation
If you use node features, please install level DB as follows.
#### install LevelDB
- for Ubuntu
$ sudo apt-get install libleveldb-dev
* for Mac
$ brew install leveldb
and put `leveldb-native` in your Gemfile and run bundle install.
```
gem leveldb-native
```
## Installation
Add this line to your application's Gemfile:
```ruby
gem "tapyrus"
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install tapyrus
And then add to your .rb file:
require 'tapyrus'
## Usage
### Chain selection
The parameters of the blockchain are managed by `Tapyrus::ChainParams`. Switch chain parameters as follows:
- prod
```ruby
Tapyrus.chain_params = :prod
```
This parameter is described in https://github.com/chaintope/tapyrusrb/blob/master/lib/tapyrus/chainparams/prod.yml.
- dev
```ruby
Tapyrus.chain_params = :dev
```
This parameter is described in https://github.com/chaintope/tapyrusrb/blob/master/lib/tapyrus/chainparams/dev.yml.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tapyrusrb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).