No commit activity in last 3 years
No release in over 3 years
Light client for Exonum blockchain framework. https://exonum.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Exonum Client Ruby

Light client for Exonum blockchain framework. Exonum homepage

Current state

Pre alpha

Usage

Posting a transaction:

require 'exonum'
require 'rest_client'

keypair = Exonum::Random.generate_keypair

message = Exonum::MessageT.new 0, 2, 128, Exonum::StructT.new([
  { name: 'pub_key', type: Exonum::PublicKeyT },
  { name: 'name', type: Exonum::StringT }
])

data = {
  pub_key: keypair[:public],
  name: 'John Doe'
}

signature = message.sign "#{keypair[:private]}#{keypair[:public]}", data

JSON.parse RestClient.post(
  'http://127.0.0.1:8200/api/services/cryptocurrency/v1/wallets/transaction', 
  {
    protocol_version: 0,
    message_id: 2,
    service_id: 128,
    signature: signature,
    body: data
  }.to_json,
  {content_type: :json, accept: :json}
)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request