Skip to main content

python-mainsail

This package provides a simple implementation to interact with Ark blockchain API and managment tools for validators aiming to run a pool.

>>> from mainsail.tx.v1 import Transfer
>>> from mainsail import rest
>>> # http://xxx.xxx.xxx.xxx:4006/api/wallets/toons
>>> wallet = rest.GET.api.wallets.toons()
>>> wallet["address"]
'D5Ha4o3UTuTd59vjDw1F26mYhaRdXh7YPv'
>>> rest.GET.api.wallets()["meta"]["totalCount"]
89
>>> # use a custop peer
>>> custom_peer = rest.Peer("http://49.13.30.19:4006", port_name="api-development")
>>> custom_peer
{'ip': '49.13.30.19', 'ports': {'api-development': 4006}}
>>> # http://49.13.30.19:4003/api/transactions?type=4
>>> [t["blockId"] for t in rest.GET.api.transactions(type=4, peer=custom_peer)["data"]]
['41afebd995473aab76e8dd7415ab742a6882a08f4c0e0a7305d1a48c551c955c', 'aff37ad0288fadc9d5fdec584d1affab2df0021e86cde3ecb2ba263d6deba3cc']
>>> t = Transfer(1, 'D5Ha4o3UTuTd59vjDw1F26mYhaRdXh7YPv', 'message \U0001f919')
>>> t.sign()
Type or paste your passphrase >
>>> t.send()
{'data': {'accept': [0], 'broadcast': [0], 'excess': [], 'invalid': []}}

Linux distributions

Due to RIPEMD160 issue with OpenSSL v>=3, hashlib.ripemd160 is disabled within python3. To enable it back, get the installation folder...

openssl version -d

... and make sure that the openssl config file contains following lines:

openssl_conf = openssl_init

[openssl_init]
providers = provider_sect

[provider_sect]
default = default_sect
legacy = legacy_sect

[default_sect]
activate = 1

[legacy_sect]
activate = 1

Available transactions

  • Transfer
  • ValidatorRegistration
  • Vote
  • MultiSignature
  • MultiPayment
  • ValidatorResignation
  • UsernameRegistration
  • UsernameResignation

Features

  • secured private keys storage
  • secured webhook subscriptions storage
  • offline network configuration available
  • pool server with remote managment tool
  • cmd command line set_pool and dump_prk for windows platform
  • pool installation and update using pip

Support this project

Paypal me Bitcoin

Metadata

Release files for ark-mainsail 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ark-mainsail 1.2.1
File Size Uploaded
ark-mainsail-1.2.1.tar.gz 29.0 kB Details

Release files / ark-mainsail-1.2.1.tar.gz

Download URL ark-mainsail-1.2.1.tar.gz
Size 29.0 kB
Tags Source
SHA-256 checksum
How to use checksums
842423fc94a7aef92daa57760bbeea9101f30f9ae4694f5154de39064fbea9aa
BLAKE2b-256 checksum
How to use checksums
ef6d99c523f6009ff2880e830f7a506671292871e16c6638ee4ad299c8f72535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.7

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file

1.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page