thor-jsonrpc-server
A local server that implements ETH JSON-RPC APIs for interacting with the VeChain Thor protocol.
Installation
npm i thor-jsonrpc-server
Usage
import { ThorJsonRPCServer } from 'thor-jsonrpc-server';
import { SimpleWallet } from '@vechain/connex-driver';
const wallet = new SimpleWallet();
wallet.import(key);
const srv = new ThorJsonRPCServer(
url,
wallet
);
srv.start(port);
Example
{
"id":1,
"jsonrpc": "2.0",
"method":"eth_blockNumber"
}
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x23"
}
License
This software is licensed under the
GNU Lesser General Public License v3.0, also included
in LICENSE file in repository.