ark-mainsail


Nameark-mainsail JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/Moustikitos/python-mainsail
SummaryInteract with ARK blockchain trough mainsail framework
upload_time2024-04-27 07:08:53
maintainerToons
docs_urlNone
authorToons
requires_pythonNone
licenseCopyright 2024, MIT licence
keywords api ark blockchain
VCS
bugtrack_url
requirements requests base58 pyaes blspy cSecp256k1
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-mainsail

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

```python
>>> 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 = {"ip": "49.13.30.19", "ports": {"api-development": 4003}}
>>> # 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](https://github.com/openssl/openssl/issues/16994)
`hashlib.ripemd160` is disabled within `python3`. To enable it back, get the
installation folder...

```bash
openssl version -d
```

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

```conf
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
```

## Validator pool managment tools

### Ubuntu installation

First read [installation script](https://bit.ly/3U6BI8v), then:

```bash
~$ bash <(wget -qO- https://bit.ly/3U6BI8v)
```

### Deploy pool server

```bash
~$ mnsl_deploy # use ip address 0.0.0.0 with  port #5000
```

If you plan to deploy pool server behind a proxy, it is possible to customize
`ip` and `port`:

```bash
~$ mnsl_deploy host=127.0.0.1 port=7542 # use localhost address with port #7542
```

Setup a pool using validator public key:

```bash
~$ add_pool puk=02968e862011738ac185e87f47dec61b32c842fd8e24fab625c02a15ad7e2d0f65
```

Configure pool options:

```bash
~$ set_pool ?key=value?
```

Check the logs:

```bash
~$ log_mnsl_pool
~$ log_mnsl_bg
```

## Available transactions

* [x] Transfer
* [x] ValidatorRegistration
* [x] Vote
* [x] MultiSignature
* [x] MultiPayment
* [x] ValidatorResignation
* [x] UsernameRegistration
* [x] UsernameResignation

## Features

* [x] secured private keys storage
* [x] secured webhook subscriptions storage
* [x] offline network configuration available
* [x] pool server with remote managment tool
* [x] `cmd` command line `set_validator` for windows platform
* [x] pool installation and update using pip

## Support this project

<!-- [![Liberapay receiving](https://img.shields.io/liberapay/goal/Toons?logo=liberapay)](https://liberapay.com/Toons/donate) -->
[![Paypal me](https://img.shields.io/badge/PayPal-toons-00457C?logo=paypal&logoColor=white)](https://paypal.me/toons)
[![Bitcoin](https://img.shields.io/badge/Donate-bc1q6aqr0hfq6shwlaux8a7ydvncw53lk2zynp277x-ff9900?logo=bitcoin)](https://github.com/Moustikitos/python-mainsail/blob/master/docs/img/bc1q6aqr0hfq6shwlaux8a7ydvncw53lk2zynp277x.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Moustikitos/python-mainsail",
    "name": "ark-mainsail",
    "maintainer": "Toons",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "moustikitos@gmail.com",
    "keywords": "api, ark, blockchain",
    "author": "Toons",
    "author_email": "moustikitos@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b3/ca/b8077af53adee9919b131209e03ec7bb4ae5d9e19af1de36c8ca0b070ec6/ark-mainsail-1.2.0.tar.gz",
    "platform": null,
    "description": "# python-mainsail\r\n\r\nThis package provides a simple implementation to interact with `Ark` blockchain\r\nAPI and managment tools for validators aiming to run a pool.\r\n\r\n```python\r\n>>> from mainsail.tx.v1 import Transfer\r\n>>> from mainsail import rest\r\n>>> # http://xxx.xxx.xxx.xxx:4006/api/wallets/toons\r\n>>> wallet = rest.GET.api.wallets.toons()\r\n>>> wallet[\"address\"]\r\n'D5Ha4o3UTuTd59vjDw1F26mYhaRdXh7YPv'\r\n>>> rest.GET.api.wallets()[\"meta\"][\"totalCount\"]\r\n89\r\n>>> # use a custop peer\r\n>>> custom_peer = {\"ip\": \"49.13.30.19\", \"ports\": {\"api-development\": 4003}}\r\n>>> # http://49.13.30.19:4003/api/transactions?type=4\r\n>>> [t[\"blockId\"] for t in rest.GET.api.transactions(type=4, peer=custom_peer)[\"data\"]]\r\n['41afebd995473aab76e8dd7415ab742a6882a08f4c0e0a7305d1a48c551c955c', 'aff37ad0288fadc9d5fdec584d1affab2df0021e86cde3ecb2ba263d6deba3cc']\r\n>>> t = Transfer(1, 'D5Ha4o3UTuTd59vjDw1F26mYhaRdXh7YPv', 'message \\U0001f919')\r\n>>> t.sign()\r\nType or paste your passphrase >\r\n>>> t.send()\r\n{'data': {'accept': [0], 'broadcast': [0], 'excess': [], 'invalid': []}}\r\n```\r\n\r\n## Linux distributions\r\n\r\nDue to [RIPEMD160 issue with OpenSSL v>=3](https://github.com/openssl/openssl/issues/16994)\r\n`hashlib.ripemd160` is disabled within `python3`. To enable it back, get the\r\ninstallation folder...\r\n\r\n```bash\r\nopenssl version -d\r\n```\r\n\r\n... and make sure that the openssl config file contains following lines:\r\n\r\n```conf\r\nopenssl_conf = openssl_init\r\n\r\n[openssl_init]\r\nproviders = provider_sect\r\n\r\n[provider_sect]\r\ndefault = default_sect\r\nlegacy = legacy_sect\r\n\r\n[default_sect]\r\nactivate = 1\r\n\r\n[legacy_sect]\r\nactivate = 1\r\n```\r\n\r\n## Validator pool managment tools\r\n\r\n### Ubuntu installation\r\n\r\nFirst read [installation script](https://bit.ly/3U6BI8v), then:\r\n\r\n```bash\r\n~$ bash <(wget -qO- https://bit.ly/3U6BI8v)\r\n```\r\n\r\n### Deploy pool server\r\n\r\n```bash\r\n~$ mnsl_deploy # use ip address 0.0.0.0 with  port #5000\r\n```\r\n\r\nIf you plan to deploy pool server behind a proxy, it is possible to customize\r\n`ip` and `port`:\r\n\r\n```bash\r\n~$ mnsl_deploy host=127.0.0.1 port=7542 # use localhost address with port #7542\r\n```\r\n\r\nSetup a pool using validator public key:\r\n\r\n```bash\r\n~$ add_pool puk=02968e862011738ac185e87f47dec61b32c842fd8e24fab625c02a15ad7e2d0f65\r\n```\r\n\r\nConfigure pool options:\r\n\r\n```bash\r\n~$ set_pool ?key=value?\r\n```\r\n\r\nCheck the logs:\r\n\r\n```bash\r\n~$ log_mnsl_pool\r\n~$ log_mnsl_bg\r\n```\r\n\r\n## Available transactions\r\n\r\n* [x] Transfer\r\n* [x] ValidatorRegistration\r\n* [x] Vote\r\n* [x] MultiSignature\r\n* [x] MultiPayment\r\n* [x] ValidatorResignation\r\n* [x] UsernameRegistration\r\n* [x] UsernameResignation\r\n\r\n## Features\r\n\r\n* [x] secured private keys storage\r\n* [x] secured webhook subscriptions storage\r\n* [x] offline network configuration available\r\n* [x] pool server with remote managment tool\r\n* [x] `cmd` command line `set_validator` for windows platform\r\n* [x] pool installation and update using pip\r\n\r\n## Support this project\r\n\r\n<!-- [![Liberapay receiving](https://img.shields.io/liberapay/goal/Toons?logo=liberapay)](https://liberapay.com/Toons/donate) -->\r\n[![Paypal me](https://img.shields.io/badge/PayPal-toons-00457C?logo=paypal&logoColor=white)](https://paypal.me/toons)\r\n[![Bitcoin](https://img.shields.io/badge/Donate-bc1q6aqr0hfq6shwlaux8a7ydvncw53lk2zynp277x-ff9900?logo=bitcoin)](https://github.com/Moustikitos/python-mainsail/blob/master/docs/img/bc1q6aqr0hfq6shwlaux8a7ydvncw53lk2zynp277x.png)\r\n",
    "bugtrack_url": null,
    "license": "Copyright 2024, MIT licence",
    "summary": "Interact with ARK blockchain trough mainsail framework",
    "version": "1.2.0",
    "project_urls": {
        "Bug Reports": "https://github.com/Moustikitos/python-mainsail/issues",
        "Funding": "https://github.com/Moustikitos/python-mainsail?tab=readme-ov-file#support-this-project",
        "Homepage": "https://github.com/Moustikitos/python-mainsail",
        "Source": "https://github.com/Moustikitos/python-mainsail/"
    },
    "split_keywords": [
        "api",
        " ark",
        " blockchain"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3cab8077af53adee9919b131209e03ec7bb4ae5d9e19af1de36c8ca0b070ec6",
                "md5": "f48b2c6f49d5b0bd10a572d6a214bb06",
                "sha256": "a870ba7d6eb2d4dcd79d00484ea07072e6c4e172910cb5adac59c8c3ea1eab4d"
            },
            "downloads": -1,
            "filename": "ark-mainsail-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f48b2c6f49d5b0bd10a572d6a214bb06",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26812,
            "upload_time": "2024-04-27T07:08:53",
            "upload_time_iso_8601": "2024-04-27T07:08:53.367523Z",
            "url": "https://files.pythonhosted.org/packages/b3/ca/b8077af53adee9919b131209e03ec7bb4ae5d9e19af1de36c8ca0b070ec6/ark-mainsail-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-27 07:08:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Moustikitos",
    "github_project": "python-mainsail",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "base58",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "pyaes",
            "specs": [
                [
                    "==",
                    "1.6.1"
                ]
            ]
        },
        {
            "name": "blspy",
            "specs": [
                [
                    "==",
                    "2.0.3"
                ]
            ]
        },
        {
            "name": "cSecp256k1",
            "specs": [
                [
                    "==",
                    "1.1.2"
                ]
            ]
        }
    ],
    "lcname": "ark-mainsail"
}
        
Elapsed time: 0.29758s