New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

thor-jsonrpc-server

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thor-jsonrpc-server

An Eth JSON-RPC server for the VeChain Thor protocol

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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();
// Add private key
wallet.import(key);

const srv = new ThorJsonRPCServer(
  url, // Node url, e.g., 
       // Solo node: 	http://127.0.0.1:8669
       // Main net: 	https://sync-mainnet.veblocks.net/	
       // Test net: 	https://sync-testnet.veblocks.net/
  wallet
);

// start the server with a given port
srv.start(port);

Example

  • Request:
{
  "id":1,
  "jsonrpc": "2.0",
  "method":"eth_blockNumber"
}
  • Response
{
  "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.

FAQs

Package last updated on 28 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc