@vechain/sdk-rpc-proxy
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.14 • Public • Published

@vechain/sdk-rpc-proxy

Welcome to the RPC Proxy of the VeChain SDK!

Introduction

This project is designed to bridge the gap between Thor's RESTful API and Ethereum's JSON-RPC, for example to support the Remix IDE. By leveraging this proxy, users can seamlessly interact with the VeChainThor blockchain via RPC calls.

Usage

The RPC proxy is very simple to use. To run it:

yarn add @vechain/sdk-rpc-proxy
rpc-proxy

By default the Proxy is configured to be used with a solo node running in your local machine. If you want to change the default behaviour, simply create a config.json file and pass it to the command when launching the RPC Proxy:

rpc-proxy -c <json config file>

Or:

rpc-proxy --config <json config file>

Configuration

The config.json file is used to configure the proxy server. It contains the following fields:

  • url: The URL of the VeChain Thor node.
  • port: The port of the proxy server.
  • accounts: The accounts that the proxy server will use to sign transactions (can be a mnemonic or an array of private keys).
  • verbose: Wheter to enable verbose logging.
  • debug: Whether to enable debug mode.
  • enableDelegation: Whether to enable delegation.

As an example:

{
    "url": "http://127.0.0.1:8669",
    "port": 8545,
    "accounts": {
        "mnemonic": "denial kitchen pet squirrel other broom bar gas better priority spoil cross",
        "count": 10
    },
    "verbose": true,
    "enableDelegation": false
}

Readme

Keywords

Package Sidebar

Install

npm i @vechain/sdk-rpc-proxy

Weekly Downloads

322

Version

1.0.0-beta.14

License

MIT

Unpacked Size

3.77 MB

Total Files

8

Last publish

Collaborators

  • cnealvechain
  • rodolfopietro97
  • fabiorigam
  • davide.carpini
  • darren_vechain
  • vanjat7vechaib
  • freemanzmrojo