Git Product home page Git Product logo

scale_rb's Introduction

ScaleRb

WARNING: UNDER DEVELOPMENT

Installation

Add this line to your application's Gemfile:

gem 'scale_rb'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install scale_rb

Usage

TODO: Write usage instructions here

Development

After 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.

To 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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wuminzhe/scale_rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the ScaleRb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

scale_rb's People

Contributors

wuminzhe avatar

Stargazers

Luke Schoen avatar  avatar Oskar Gargas avatar

Watchers

 avatar  avatar

scale_rb's Issues

Namespace all classes

Hi! First of all thanks for your work. It's much appreciated. If it's ok, I'll raise few issues as I try to incorporate your library into my codebase.

First thing I noticed are classes outside ScaleRb namespace. In my project I have Address class which represents regular street addresses. After adding this gem it was extended with cryptoaddress methods. This might lead to name collision and other problems.

Unsure how to use `AbstractWsClient`

@wuminzhe @itering recently i presented this repository at a BlockspaceDevRel event as part of Consensus 2024, as I was interested in encouraging its use. Here are the slides https://hackmd.io/@ltfschoen/Hy25QTH40#/.
I have a question, is it possible to use this scale_rb library to connect to a local Substrate-based node using Ws instead of Http? If so how?
There is a AbstractWsClient here https://github.com/wuminzhe/scale_rb/blob/main/lib/client/abstract_ws_client.rb#L6, but could you please share an example of how to use it?
Or if the Ws capability is incomplete, do you have any tips on how I could add that capability?
Should it be added similar to the deprecated repository https://github.com/itering/substrate_client.rb?tab=readme-ov-file#supported-rpc-methods where it was possible to connect using Ws using:

require "substrate_client"
client = SubstrateClient.new("wss://kusama-rpc.polkadot.io/")

I was only able to connect using Http in my fork of this repo in this example https://github.com/ltfschoen/scale_rb/blob/easya/example01/main.rb#L3 based on reviewing the code in this repository.
The reason why I want to connect using Websockets is because most of the available parachain endpoints are Ws endpoints, I'd only use Http for connecting to a Substrate-based node running on localhost.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.