Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

nimiq-community/ruby-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nimiq Ruby Client

Ruby implementation of the Nimiq RPC client specs.

This repository is archived: Nimiq PoS has been launched and this RPC client only supports the old PoW RPC specification. As of now, there is no Ruby RPC client implementation. Please contact us if you are interested in implementing and supporting the Nimiq ecosystem for Ruby.

About

This Nimiq Ruby RPC client will allow you to interact with the Nimiq blockchain, manage transactions and balances, and more. This library covers the current Nimiq JSON-RPC specification.

What is Nimiq?

Nimiq is a blockchain that seamlessly runs in your browser. It's fast, easy and fun to use! For more information visit the Nimiq website.

Usage

require "nimiq-client"

options = {
  host: "http://127.0.0.1",
  port: "8648",
  # user: "user",
  # pass: "pass",
  # uri: "http://USER:PASS@IP:PORT",
}
nimiq = Nimiq::Client.new(options)
consensus = nimiq.consensus()
get_balance = nimiq.get_balance("NQ27 B9ED 98G5 3VH7 FY8D BFP0 XNF4 BD8L TN4B")
puts "Consensus #{consensus}"
puts "My account balance #{get_balance}"

Installation

Via the Gem

gem install nimiq-client

or add it to your Gemfile

gem "nimiq-client"

Documentation

To know more about what you can possibly do using this library, check the documentation.

Build

This section is for developments. If you only want to use this client go to the Usage section. After cloning the repo, run bundle to install the required dependencies.

Tests

Run tests with

rspec --format documentation

If you are connecting to a private node that requires username and password, set these on the options object in the configuration spec file.

Note that it requires a running Nimiq RPC node, to connect to.

Contributions

This implementation was originally contributed by jxdv.

Bug reports and pull requests are welcome. Please refer to the issue tracker for ideas.

License

Apache 2.0

About

Ruby implementation of the Nimiq RPC client specs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •