dark-gateway


Namedark-gateway JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/dark-pid/dark-web3-lib
SummarydARK Gateway libs
upload_time2024-06-18 18:49:44
maintainerNone
docs_urlNone
authorThiago Nóbrega
requires_pythonNone
licenseNone
keywords ark dark pid web3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# dark-gateway

dARK Web3 Core Lib

## How to use

We created a [notebook](./docs/example_notebooks/basic_dark_usage.ipynb) to ilustrate how to use the dark-gateway lib


## Main components

### DarkGateway

The DarkGateway class is a Python class that provides a simple interface to interact with the dARK blockchain. The class is initialized with the name of the blockchain network and the configuration file. The configuration file specifies the URL of the blockchain node, the chain ID, and the minimum gas price.

Once the class is initialized, you can use it to send transactions, query the blockchain state, and interact with smart contracts. To send a transaction, you need to specify the smart contract, the method to call, and the arguments to pass to the method. The class will then sign the transaction and send it to the blockchain.

To query the blockchain state, you can use the get_balance method to get the balance of an address, or the get_transaction_receipt method to get the receipt of a transaction.

To interact with smart contracts, you can use the call method to call a function on a smart contract, or the transact method to send a transaction to a smart contract.

The DarkGateway class is a powerful tool that can be used to interact with the Darkweb blockchain. It provides a simple and easy-to-use interface that makes it easy to send transactions, query the blockchain state, and interact with smart contracts.

Here are some of the specific things that the DarkGateway class can do:

- Send transactions
- Query the blockchain state
- Interact with smart contracts
- Get the balance of an address
- Get the receipt of a transaction
- Call a function on a smart contract
- Send a transaction to a smart contract


### DarkMap
A Python class that provides a simple interface to interact with the Darkweb blockchain. It inherits from the `DarkGateway` class and adds some additional methods for interacting with the blockchain.

#### Methods

The `DarkMap` class has two main types of methods:

* **Sync methods:** These methods block until the operation is complete.
* **Async methods:** These methods return a future object that can be used to get the result of the operation.

The `DarkMap` class also has some utility methods for converting between different types of identifiers, such as the hash value of a PID and its ARK identifier.

### Examples

```python
>>> from darkmap import DarkMap
>>> darkmap = DarkMap(dark_gateway)
>>> darkmap.request_pid_hash()
'0x1234567890abcdef'
>>> darkmap.get_pid_by_hash('0x1234567890abcdef')
```


### Differences from DarkGateway

The main difference between the `DarkMap` class and the `DarkGateway` class is that the `DarkMap` class provides some additional methods for interacting with the blockchain, such as the ability to request a PID and convert between different types of identifiers.

Here is a table that summarizes the differences between the two classes:

| Feature | DarkGateway | DarkMap |
|---|---|---|
| Can send transactions | Yes | Yes |
| Can query the blockchain state | Yes | Yes |
| Can interact with smart contracts | Yes | Yes |
| Can request a PID | No | Yes |
| Can convert between different types of identifiers | No | Yes |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dark-pid/dark-web3-lib",
    "name": "dark-gateway",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ARK, dARK, PID, web3",
    "author": "Thiago N\u00f3brega",
    "author_email": "thiagonobrega@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/08/08/b5a7f428fc05e73ba4da1aae80835eea31ef10b94c1c6c2551dfff32f937/dark-gateway-0.1.6.tar.gz",
    "platform": null,
    "description": "\n# dark-gateway\n\ndARK Web3 Core Lib\n\n## How to use\n\nWe created a [notebook](./docs/example_notebooks/basic_dark_usage.ipynb) to ilustrate how to use the dark-gateway lib\n\n\n## Main components\n\n### DarkGateway\n\nThe DarkGateway class is a Python class that provides a simple interface to interact with the dARK blockchain. The class is initialized with the name of the blockchain network and the configuration file. The configuration file specifies the URL of the blockchain node, the chain ID, and the minimum gas price.\n\nOnce the class is initialized, you can use it to send transactions, query the blockchain state, and interact with smart contracts. To send a transaction, you need to specify the smart contract, the method to call, and the arguments to pass to the method. The class will then sign the transaction and send it to the blockchain.\n\nTo query the blockchain state, you can use the get_balance method to get the balance of an address, or the get_transaction_receipt method to get the receipt of a transaction.\n\nTo interact with smart contracts, you can use the call method to call a function on a smart contract, or the transact method to send a transaction to a smart contract.\n\nThe DarkGateway class is a powerful tool that can be used to interact with the Darkweb blockchain. It provides a simple and easy-to-use interface that makes it easy to send transactions, query the blockchain state, and interact with smart contracts.\n\nHere are some of the specific things that the DarkGateway class can do:\n\n- Send transactions\n- Query the blockchain state\n- Interact with smart contracts\n- Get the balance of an address\n- Get the receipt of a transaction\n- Call a function on a smart contract\n- Send a transaction to a smart contract\n\n\n### DarkMap\nA Python class that provides a simple interface to interact with the Darkweb blockchain. It inherits from the `DarkGateway` class and adds some additional methods for interacting with the blockchain.\n\n#### Methods\n\nThe `DarkMap` class has two main types of methods:\n\n* **Sync methods:** These methods block until the operation is complete.\n* **Async methods:** These methods return a future object that can be used to get the result of the operation.\n\nThe `DarkMap` class also has some utility methods for converting between different types of identifiers, such as the hash value of a PID and its ARK identifier.\n\n### Examples\n\n```python\n>>> from darkmap import DarkMap\n>>> darkmap = DarkMap(dark_gateway)\n>>> darkmap.request_pid_hash()\n'0x1234567890abcdef'\n>>> darkmap.get_pid_by_hash('0x1234567890abcdef')\n```\n\n\n### Differences from DarkGateway\n\nThe main difference between the `DarkMap` class and the `DarkGateway` class is that the `DarkMap` class provides some additional methods for interacting with the blockchain, such as the ability to request a PID and convert between different types of identifiers.\n\nHere is a table that summarizes the differences between the two classes:\n\n| Feature | DarkGateway | DarkMap |\n|---|---|---|\n| Can send transactions | Yes | Yes |\n| Can query the blockchain state | Yes | Yes |\n| Can interact with smart contracts | Yes | Yes |\n| Can request a PID | No | Yes |\n| Can convert between different types of identifiers | No | Yes |\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "dARK Gateway libs",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/dark-pid/dark-web3-lib"
    },
    "split_keywords": [
        "ark",
        " dark",
        " pid",
        " web3"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54866c1ebf2379c87cffd3b430a5fbc774ff9b462dbd0a1b230df805b07edd91",
                "md5": "5a839148a6ea13fed2f18d97abdbf25f",
                "sha256": "38d8925ecbced0bd2c35c9b314cc0ca543c5a89f8568a1e142a4d6fd51e07268"
            },
            "downloads": -1,
            "filename": "dark_gateway-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a839148a6ea13fed2f18d97abdbf25f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 29919,
            "upload_time": "2024-06-18T18:49:42",
            "upload_time_iso_8601": "2024-06-18T18:49:42.943250Z",
            "url": "https://files.pythonhosted.org/packages/54/86/6c1ebf2379c87cffd3b430a5fbc774ff9b462dbd0a1b230df805b07edd91/dark_gateway-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0808b5a7f428fc05e73ba4da1aae80835eea31ef10b94c1c6c2551dfff32f937",
                "md5": "49c9c8f1e8f33d63f771a8d06501f180",
                "sha256": "6d1b9bc0bdc8363257e7ee414d6e08ef2e69f1c0f85f2b5c9ad9089cff16174e"
            },
            "downloads": -1,
            "filename": "dark-gateway-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "49c9c8f1e8f33d63f771a8d06501f180",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 28542,
            "upload_time": "2024-06-18T18:49:44",
            "upload_time_iso_8601": "2024-06-18T18:49:44.503485Z",
            "url": "https://files.pythonhosted.org/packages/08/08/b5a7f428fc05e73ba4da1aae80835eea31ef10b94c1c6c2551dfff32f937/dark-gateway-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-18 18:49:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dark-pid",
    "github_project": "dark-web3-lib",
    "github_not_found": true,
    "lcname": "dark-gateway"
}
        
Elapsed time: 0.27590s