GithubHelp home page GithubHelp logo

tgrospic / rnode-http-js Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 207 KB

HTTP client support for RNode

Home Page: https://tgrospic.github.io/rnode-http-js

License: MIT License

TypeScript 100.00%
rchain blockchain rnode rnode-http

rnode-http-js's Introduction

RNode Web API client

This library is a thin layer around RNode HTTP API with helper functions to create, sign and validate deploy, pull deploy result until block is proposed and Ethereum signature support to enable use of Metamask with hardware wallet.

In the browser connection to RNode can be done with RNode Web API. Web API has defined schema only in Scala source, for the new info please check RChain issue 2974.

For gRPC connection from nodejs please check @tgrospic/rnode-grpc-js.

Example of single page wallet can be found in this repository tgrospic/rnode-client-js.

RNode connection to Metamask (with hardware wallet)

Helper functions are in eth-wrapper.ts which contains the code for communication with Metamask, getting selected ETH address and sending deploys for signing. In eth-sign.ts are functions to verify deploy signature and to extract public key.
This is all that is needed for communication with Metamask and also for connected hardware wallets (Ledger, Trezor). How to use these functions and send deploys to RNode is in rnode-web.ts.

Install

The package includes TypeScript definitions.

npm install @tgrospic/rnode-http-js

rnode-http-js's People

Contributors

tgrospic avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

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.