A Solana RPC Client for Ruby. This gem provides a wrapper methods for Solana RPC JSON API https://docs.solana.com/developing/clients/jsonrpc-api.
This gem requires Ruby 2.6+ and h Rails 6.0+. It MIGHT work with lower versions, but was not tested againt them. Add the following line to your Gemfile:
Next, you need to run the generator:
rails g solana_rpc_ruby:install
The latter command will generate a new config file
config/initializers/solana_rpc_ruby_config.rb looking like this:
require 'solana_rpc_ruby' . do |c| c.cluster = 'https://api.testnet.solana.com' c.json_rpc_version = '2.0' # ...other options end
You can customize it to your needs.
# If you set default cluster you don't need to pass it every time. method_wrapper = ::.(cluster: 'https://api.testnet.solana.com') response = method_wrapper.get_account_info(account_pubkey) puts response
All info about methods you can find in the docs on: FILL THE ADDRESS!!! Also, as a reference you can use docs from solana: https://docs.solana.com/developing/clients/jsonrpc-api
Copyright (c) [Block Logic Team]. License type is MIT.