kad-py-lib


Namekad-py-lib JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryA package to allow build and execute Kadena transactions in python
upload_time2024-07-20 01:01:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2023 isokoxyz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords kadena
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to kad_py!

This library is intended to provide signing and sending pact commands on the Kadena blockchain

## Setup

### Install Pact CLI + Library
TODO 
---------
You will be required to configure the utility to use your desired wallets for the signing and sending to be successful.  

Follow the below steps to complete the configuration:

* Install Pact CLI at [Pact CLI](`https://github.com/kadena-io/pact?tab=readme-ov-file#installing-pact`)
* Create a .env file in the root folder of your project
* Add 3 variables to your .env file: the **PUBLIC_KEY**, **PRIVATE_KEY** , and **DEFAULT_SENDER** values
`PUBLIC_KEY = <your-public-kda-key>`  
`PRIVATE_KEY = <your-secret-kda-key>`
`DEFAULT_SENDER = <your-k-wallet-address>`
* Create a ***keyset.yaml*** file in the ***config*** folder. 
* Add your public KDA key after **public:** as shown  
`public: <your-public-kda-key>`
* Add your secret key after **secret:** as shown  
`secret: <your-secret-kda-key>`


## Functions 

* `execute_exec_cmd` : Takes in a list of params to construct an exec command, then signs (Using pact-cli) it and sends it. 
* `execute_cont_cmd` : Takes in a list of params to construct a cont command, then signs (Using pact-cli) it and sends it.
* `build_exec_cmd` : Takes in a list of params to construct an exec command, returns the raw exec command.
* `build_cont_cmd` : Takes in a list of params to construct a cont command, returns the raw cont command.
* `pact_build_and_fetch_local` : Takes in a list of params to construct an exec command, then sends it via a local call.
* `sign_cmd` : Takes in a raw exec command, signs it via pact CLI and returns it.  
* `quicksign_cmds` : Takes in a list of raw commands, signs it via pact quick sign CLI and returns it.  
* `send_signed` : Takes a signed command and sends it via send signed to pact signing server.
* `pact_fetch_local` : Takes in an exec command, then sends it via a local pact call.


## Example Usage
[link to Example Usages](./example.py)  
Any quick example of import + using our methods

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kad-py-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Mohannad Ahmad <mohannadwahmad97@gmail.com>",
    "keywords": "kadena",
    "author": null,
    "author_email": "Isoko <admin@isoko.xyz>",
    "download_url": "https://files.pythonhosted.org/packages/2e/ad/c40aae24a2fa53b2df3de21a3c5ef7b0c122bf7ce609da85187a35afc043/kad_py_lib-0.0.3.tar.gz",
    "platform": null,
    "description": "# Welcome to kad_py!\n\nThis library is intended to provide signing and sending pact commands on the Kadena blockchain\n\n## Setup\n\n### Install Pact CLI + Library\nTODO \n---------\nYou will be required to configure the utility to use your desired wallets for the signing and sending to be successful.  \n\nFollow the below steps to complete the configuration:\n\n* Install Pact CLI at [Pact CLI](`https://github.com/kadena-io/pact?tab=readme-ov-file#installing-pact`)\n* Create a .env file in the root folder of your project\n* Add 3 variables to your .env file: the **PUBLIC_KEY**, **PRIVATE_KEY** , and **DEFAULT_SENDER** values\n`PUBLIC_KEY = <your-public-kda-key>`  \n`PRIVATE_KEY = <your-secret-kda-key>`\n`DEFAULT_SENDER = <your-k-wallet-address>`\n* Create a ***keyset.yaml*** file in the ***config*** folder. \n* Add your public KDA key after **public:** as shown  \n`public: <your-public-kda-key>`\n* Add your secret key after **secret:** as shown  \n`secret: <your-secret-kda-key>`\n\n\n## Functions \n\n* `execute_exec_cmd` : Takes in a list of params to construct an exec command, then signs (Using pact-cli) it and sends it. \n* `execute_cont_cmd` : Takes in a list of params to construct a cont command, then signs (Using pact-cli) it and sends it.\n* `build_exec_cmd` : Takes in a list of params to construct an exec command, returns the raw exec command.\n* `build_cont_cmd` : Takes in a list of params to construct a cont command, returns the raw cont command.\n* `pact_build_and_fetch_local` : Takes in a list of params to construct an exec command, then sends it via a local call.\n* `sign_cmd` : Takes in a raw exec command, signs it via pact CLI and returns it.  \n* `quicksign_cmds` : Takes in a list of raw commands, signs it via pact quick sign CLI and returns it.  \n* `send_signed` : Takes a signed command and sends it via send signed to pact signing server.\n* `pact_fetch_local` : Takes in an exec command, then sends it via a local pact call.\n\n\n## Example Usage\n[link to Example Usages](./example.py)  \nAny quick example of import + using our methods\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 isokoxyz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A package to allow build and execute Kadena transactions in python",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/isokoxyz/kad_py",
        "Issues": "https://github.com/isokoxyz/kad_py/issues"
    },
    "split_keywords": [
        "kadena"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f8ffe63560bb191e2a4945d6fe081c0d4ca02140861c4f9c312919f1ea7bca1",
                "md5": "75a008c2c9e8a8a9a5d3b6be1cda6011",
                "sha256": "083310e29cd4c2a43c72149186b80c2d024faefe5f0702722ae347f195aa09aa"
            },
            "downloads": -1,
            "filename": "kad_py_lib-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75a008c2c9e8a8a9a5d3b6be1cda6011",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 32407,
            "upload_time": "2024-07-20T01:01:45",
            "upload_time_iso_8601": "2024-07-20T01:01:45.971167Z",
            "url": "https://files.pythonhosted.org/packages/5f/8f/fe63560bb191e2a4945d6fe081c0d4ca02140861c4f9c312919f1ea7bca1/kad_py_lib-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eadc40aae24a2fa53b2df3de21a3c5ef7b0c122bf7ce609da85187a35afc043",
                "md5": "4f676e4521455867277e81948949cb05",
                "sha256": "4f57b07fc52d3cc190ca53f862d7342d99779b3925aacb7f4870a3f0f1e5eae3"
            },
            "downloads": -1,
            "filename": "kad_py_lib-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "4f676e4521455867277e81948949cb05",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 24482,
            "upload_time": "2024-07-20T01:01:47",
            "upload_time_iso_8601": "2024-07-20T01:01:47.120710Z",
            "url": "https://files.pythonhosted.org/packages/2e/ad/c40aae24a2fa53b2df3de21a3c5ef7b0c122bf7ce609da85187a35afc043/kad_py_lib-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-20 01:01:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "isokoxyz",
    "github_project": "kad_py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "kad-py-lib"
}
        
Elapsed time: 9.41022s