Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
cryptoadvance.spectrum
Advanced tools
This is a electrum-adapter. It exposes a Bitcoin-Core style API while using an electron API in the backend. It might be useful in specific usecases, e.g. having better performance when connecting to a electrum-server via Tor. In order to do that, it needs a Database. Quite easily you can use a kind of builtin SQLite. Depending on your usecase, you might want to use an external DB.
This can be used either in standalone mode or as a specter-extension. The second option is probably the main use-case.
Get this to work with something like that:
python3 --version # Make sure you have at least 3.8. Might also work with lower versions though
virtualenv --python=python3 .env
. ./.env/bin/activate
pip3 install -e .
# If you have a electrum server running on localhost:
python3 -m cryptoadvance.spectrum server --config cryptoadvance.spectrum.config.NigiriLocalElectrumLiteConfig
# If you want to run on mainnet and use emzy's Server
python3 -m cryptoadvance.spectrum server --config cryptoadvance.spectrum.config.EmzyElectrumLiteConfig
# Using Emzy's server but with a postgres
export DB_USERNAME=bla
export DB_PASSWORD=blub
python3 -m cryptoadvance.spectrum server --config cryptoadvance.spectrum.config.EmzyElectrumPostgresConfig
Check the config.py
for the env-vars which need to be exported in order to connect to something different than localhost.
In order to get a development environment:
virtualenv --python=python3 .env
. ./.env/bin/activate
pip3 install -e .
pip3 install cryptoadvance.specter
python3 -m cryptoadvance.specter server --config DevelopmentConfig --debug
debug=True
flag creates two electrum sockets that notify twice - this causes duplications in the databasepip3 install -e ".[test]"
pytest
Before your create a PR, make sure to blackify all your changes. In order to automate that, there is a git pre-commit hook which you can simply install like this:
pre-commit install
FAQs
Implements A Bitcoin Core API which querying an Electrum
We found that cryptoadvance.spectrum demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.