An adapter between thor-restful and eth-rpc.
Project description
Web3-gear
Proxy Thor's RESTful API to Eth JSON-RPC, to support Remix, Truffle and more (You should give priority to using Thor's RESTful API).
Working with Thor Builtins will make Web3-Gear more usable.
Quick Start
Installation
On OS X
- Python 3.7+ support
-
Install the system-dependecies
brew install openssl export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS" export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS"
-
Installation of Web3-Gear and it's dependent Python packages via PyPI
pip3 install web3-gear
On Ubuntu
- Python 3.7+ support
-
Install the system-dependecies
sudo apt-get install build-essential libssl-dev python-dev
-
Use a virtual environment to isolate your web3-gear project
python3 -m venv thor-venv source thor-venv/bin/activate
-
Installation of Web3-Gear and it's dependent Python packages via PyPI
pip3 install web3-gear
Note that you can activate and deactivate your virtual environment now
source thor-venv/bin/activate
deactivate
See https://docs.python.org/3/library/venv.html for more information
On Windows
- Python 3.7+ support
-
Install Visual C++ Build Tools.
-
Install scrypt-py use the precompiled wheels.
-
Installation of Web3-Gear and it's dependent Python packages via PyPI
pip3 install web3-gear
Run
Installing through pip will make the web3-gear
command available on your machine (a running thor client is required)
web3-gear
This will run web3-gear on 127.0.0.1:8545
.
You can change its default behavior with the following parameters:
- host: rpc service host, eg:
--host 127.0.0.1
- port: rpc service port, eg:
--port 8545
- endpoint: thor restful service endpoint, eg:
--endpoint http://127.0.0.1:8669
- keystore: keystore file path, eg:
--keystore /Users/(username)/keystore)
, default=thor stand-alone(solo) built-in accounts - passcode: passcode of keystore, eg:
--passcode xxxxxxxx
- debug: bool default=false, whether to display debug logs, eg:
--debug true
- log: bool default=false, whether to display rpc logs, eg:
--log false
Work with Remix
Change the Remix environment to Web3 provide.
Work with Truffle
- Truffle 4.0.6+ support
Modify the configuration of truffle first(truffle.js
):
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
}
}
};
Then you can use truffle's command line tool.
There are some projects based on truffle, can use them for testing:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file web3-gear-2.1.1.tar.gz
.
File metadata
- Download URL: web3-gear-2.1.1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52046233e716e5cc89fb6b2917892374c6433b32e38590aa3598cf5b698a3513 |
|
MD5 | c6c3c9ce512717ce16226492d8454f0b |
|
BLAKE2b-256 | d5ed65267b3fb603639b11810af32484ab42bc45008e2d24912afa1a9027d1b8 |
File details
Details for the file web3_gear-2.1.1-py36-none-any.whl
.
File metadata
- Download URL: web3_gear-2.1.1-py36-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3.6
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 853fbe4f3ba4519d80c6bacacd45b7fb0cba314c6f980f7a0bc8920fa2d6ece5 |
|
MD5 | c558909cb8fcaee14bbe81264e19557b |
|
BLAKE2b-256 | bb8ae877d7620d5ce5290c02a32bacec570aeb11c13c35eb8a56418991f20206 |