Python library to create and submit Ethereum transactions to custodians connected with MetaMask Institutional; the most trusted DeFi wallet and Web3 gateway for organizations.
Project description
MMI Custodian SDK
Python library to create and submit Ethereum transactions to custodians connected with MetaMask Institutional; the most trusted DeFi wallet and Web3 gateway for organizations.
Contents
Usage
Use this SDK to programmatically create Ethereum transactions, and submit them to custodians connected with MetaMask Institutional. Automate trading strategies on your wallets under custody, and still benefit from the institutional-grade security of your favorite qualified custodian and custody provider.
Getting started
pip3 install mmisdk
from mmisdk import CustodianFactory
factory = CustodianFactory()
custodian = factory.create_for("qredo", "YOUR-REFRESH-TOKEN")
transaction = custodian.create_transaction(qredo_tx_details, tx_params)
custodian.get_transaction(transaction.id)
For a complete documentation on how to use the library, visit the page MetaMask Institutional SDK, or check the GitLab repository. You can also explore various usage examples in the directory ./examples
.
Supported custodians
Custodian | Supported | As of version | Factory name param |
---|---|---|---|
Qredo | ✅ | 0.0.0 | "qredo" |
All others | ❌ |
Developer documentation
The commands we list below use python
and pip
. Depending on your local setup, you might need to replace them by python3
and pip3
.
Requirements
- Python 3.7 or above
Installing dependencies
To install mmisdk
, along with the tools you need to develop and run tests, run the following:
pip install -e .[dev]
Unit tests
Run all unit tests with:
pytest
Releasing automatically
To release a new version, follow these steps:
-
Make sur you're on branch
main
-
This template provides a basic bumpversion configuration. To bump the version, run:
bumpversion patch
to increase version from1.0.0
to1.0.1
.bumpversion minor
to increase version from1.0.0
to1.1.0
.bumpversion major
to increase version from1.0.0
to2.0.0
.
Use Semantic Versioning 2.0.0 standard to bump versions.
-
Push the changes and the tags:
git push --follow-tags origin main
Releasing manually
Building
Before building dists make sure you got a clean build area:
rm -rf build
rm -rf src/*.egg-info
Note:
Dirty
build
oregg-info
dirs can cause problems: missing or stale files in the resulting dist or strange and confusing errors. Avoid having them around.
Then you should check that you got no packaging issues:
tox -e check
When checking with tox -e check
, you might receive warnings from isort
that imports are not properly ordered. To automatically sort your imports with isort
, run the following:
pip install isort
isort .
To run a complete QA analysis, including unit tests again multiple Python versions, manifest check, and imports order check, run:
tox
And then you can build the sdist
, and if possible, the bdist_wheel
too:
python setup.py clean --all sdist bdist_wheel
Publishing to PyPI
To make a release of the project on PyPI, assuming you got some distributions in dist/
, the most simple usage is:
twine upload --skip-existing dist/*.whl dist/*.gz dist/*.zip
In ZSH you can use this to upload everything in dist/
that ain't a linux-specific wheel (you may need setopt extended_glob
):
twine upload --skip-existing dist/*.(whl|gz|zip)~dist/*linux*.whl
Contributing
See CONTRIBUTING.rst.
Changelog
See CHANGELOG.md.
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 mmisdk-0.1.2.tar.gz
.
File metadata
- Download URL: mmisdk-0.1.2.tar.gz
- Upload date:
- Size: 215.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7d44f2210ced7693afa39844570eae1097402450c4b0a8989f1fc25f05816c3 |
|
MD5 | 6958ccc2c93e32cce00e2f270094ce08 |
|
BLAKE2b-256 | 48d66ca58c9302f387c8867c205dfcdfc7ff1b408a9f5875465d812459bf0268 |
File details
Details for the file mmisdk-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: mmisdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4abea8ac2fbb5994e104b931ccb384a1cd7e6d2f16a0168c5aaf5de2f5df0e87 |
|
MD5 | 305211e54c754e7e007470aaf6f4b9b5 |
|
BLAKE2b-256 | 229cefd6dab7c7dd0a2567ab8ce7a5c9639d705a41006cea462d56f759a404ee |