Secure wallet and development enviroment
Project description
Secure Web3
About
This is a simple, secure command-line wallet for EVM compatible wallets. Additionally, it is a secure framework for developers to manage their private keys with. It contains a setup wizard that encrypts your wallet and saves it into a json file for secure storage. I wrote it because I have a lot of web3 projects and I do not like storing private keys in plaintext on disc.
Use as a wallet
Sw3 is a command line wallet which is compatable with any EVM chain. Currently it supports sending both eth and erc20 tokens. I will be adding more features in time.
usage: Secure Web3 Cli [-h] [-i INIT_WALLET] [-o [OPEN_WALLET]] [-l] [-n {ethereum,polygon,bsc,aurora,goerli}] [-it IMPORT_TOKEN] [-b] [-r BROADCAST_RAW] [-s {eth,erc20}] [-L]
options:
-h, --help show this help message and exit
Wallet managment options.
-i INIT_WALLET, --init INIT_WALLET
Initialize this new wallet
-o [OPEN_WALLET], --open [OPEN_WALLET]
Unlock a wallet, use default wallet if not specified.
-l, --lock Lock all open wallets.
-n {ethereum,polygon,bsc,aurora,goerli}, --network {ethereum,polygon,bsc,aurora,goerli}
Wallet configuration options and functions
-it IMPORT_TOKEN, --import-token IMPORT_TOKEN
Add this token to the specified wallet.
EVM State-Reading functions.
-b, --balance Get wallet balance info.
EVM State-Writing related options.
-r BROADCAST_RAW, --raw BROADCAST_RAW
Load a json tx from this file to sign and broadcast.
-s {eth,erc20}, --send {eth,erc20}
Open interactive shell to send ethereum.
-L, --legacy Use legacy gas protocol.
As a development framework
See main.py for example use.
Installation
To install with pip:
pip3 install secure-web3==1.2.8You can also install from source by cloning this repo, installing the dependencies in requirements.txt, and running `setup.py build` and then `setup.py install`.
Configuration
secure-web3 expects to find your rpc endpoints in the .env file. It will look for these names:
{network}_http_endpoint {network}_ws_endpoint
Example:
ethereum_http_endpoint ethereum_ws_endpoint
If pycryptodome crashes ...
Run $ pip3 install --upgrade pycryptodome
If web3 crashes,
run $pip3 install web3 --upgrade
from secure_web3 import sw3 manager = sw3.wallet_manager.WalletManager(wallet_file) priv_key = manager.decrypt_load_wallet()
Changelog
- January 28th, 2023 -- Added support for flashbots RPC and private transactions.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secure_web3-1.3.2.tar.gz.
File metadata
- Download URL: secure_web3-1.3.2.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd036e099608ceee7bfc24bc0e3206219a71b086ffeff5f78bd24294c9b92d2
|
|
| MD5 |
f3b8f1734b658c53b7f28da430842e8c
|
|
| BLAKE2b-256 |
606e22b93b8f1919b476f4bad768a6d76e91386baf72eaee1b9aedbc44a780a9
|
File details
Details for the file secure_web3-1.3.2-py3-none-any.whl.
File metadata
- Download URL: secure_web3-1.3.2-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e21aff73d00c4a46e3fe3c50348f8f721556552fea94be5c1559a4fd7d38d97b
|
|
| MD5 |
31b239cb7ed7f140c758c8f2987ab7a6
|
|
| BLAKE2b-256 |
5c8f7b9b5cc3802cd0627c77ac6a015824e5964da378b9684018b3cf3934b847
|