@tgrospic/rnode-http-js
v0.1.7
Published
HTTP client support for RNode
Downloads
27
Maintainers
Readme
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