Skip to main content

A Python library to create and submit EVM transactions to custodians connected with MetaMask Institutional.

Project description

MMI Custodian SDK

A Python library to create and submit EVM transactions to custodians connected with MetaMask Institutional.

Usage

For documentation on how to use the library, please visit the page MetaMask Institutional SDK, or visit the GitLab repository.

You can also explore various usage examples in the directory ./examples.

TL;DR:

pip3 install mmisdk
from mmisdk.custodian_factory 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)

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 the library

Before releasing your package on PyPI you should have all the tox environments passing.

Version management

This template provides a basic bumpversion configuration. It's as simple as running:

  • bumpversion patch to increase version from 1.0.0 to 1.0.1.
  • bumpversion minor to increase version from 1.0.0 to 1.1.0.
  • bumpversion major to increase version from 1.0.0 to 2.0.0.

Use Semantic Versioning 2.0.0 standard to bump versions.

Building the library

Before building dists make sure you got a clean build area:

rm -rf build
rm -rf src/*.egg-info

Note:

Dirty build or egg-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mmisdk-0.0.6.tar.gz (142.3 kB view details)

Uploaded Source

Built Distribution

mmisdk-0.0.6-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file mmisdk-0.0.6.tar.gz.

File metadata

  • Download URL: mmisdk-0.0.6.tar.gz
  • Upload date:
  • Size: 142.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for mmisdk-0.0.6.tar.gz
Algorithm Hash digest
SHA256 65588aa2e58e756e571d86b0f87a58910ae403e33768263581cc60f2a83b8ef6
MD5 d320e5559930905af230207e356ac46d
BLAKE2b-256 1c8e3f4a2bb7180ae9236a6744ec6b361d9bda2cd6d637a1dde3262311f2d051

See more details on using hashes here.

File details

Details for the file mmisdk-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: mmisdk-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for mmisdk-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b55b0fb810dfa74ceef7b4ff631c441624bcd0a0043636f3c15a52da38ea62ae
MD5 406fc5b81fd2cd5665cd8a9544547625
BLAKE2b-256 3bffc6fe6868cde881139defd5cd71331fb2193b4187daf158d43c32624e113b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page