Skip to content

liujuanjuan1984/quorum-fullnode-py

Repository files navigation

quorum_fullnode_py

Python SDK for Quorum FullNode.

More about QuoRum:

Install

pip install quorum_fullnode_py

Usage

from quorum_fullnode_py import FullNode

url = "http://127.0.0.1:11002"
jwt = "eyJhbGciO...VCJ9.eyJhbGxvd0...pbiJ9.FeyMWvzweE...o66QZ735nsrU"

# connect to a quorum fullnode with api url and chain jwt_token
client = FullNode(api_base=url, jwt_token=jwt)

# check node_status is online.
client.api.node_info().get("node_status") == "NODE_ONLINE"

# create a group chain for test
info = client.api.create_group("test_group")
client.group_id = info["group_id"]

# send a new post to the group chain
data = {
    "type": "Create",
    "object": {
        "type": "Note",
        "content": "nice to meet u!",
        "name": "hi",
        "id": "efb14f14-f849-4cf3-bcb6-c3598e857adb",
    },
}
resp = client.api.post_content(data)

# get trx from group chain
trx = client.api.trx(resp['trx_id'])

# get content:
trxs = client.api.get_content()

Source

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

Releases

No releases published

Packages

No packages published

Languages