Skip to content

liujuanjuan1984/quorum-mininode-py

Repository files navigation

QuoRum LightNode Python SDK

Python SDK for Quorum LightNode, Without local storage.

Another better choice is quorum-lightnode-py, with local storage.

More about QuoRum:

Install

pip install quorum_mininode_py

Usage

from quorum_mininode_py import MiniNode

seed_url = 'rum://seed?v=1&e=0&n=0&c=apzmbMVtMy6J0sQKwhF...2MwHjpA2E'
pvtkey = "0xd4e9ddc19ec5b...d8c"

bot = MiniNode(seed_url,pvtkey)

# post content to rum group chain
data = {
    "type": "Create",
    "object": {
        "type": "Note",
        "content": "Hello world! Hello quorum!",
        "id": "a1d92233-3801-4295-a3cd-0e594385acc6",
    },
}

resp = bot.api.post_content(data)
print(resp)

# like a post
data = {
    "type": "Like",
    "object": {"type": "Note", "id": "a1d92233-3801-4295-a3cd-0e594385acc6"},
}

resp = bot.api.post_content(data)
print(resp)

# get content from rum group chain
trxs = bot.api.get_content(num=2, reverse=True)
print(trxs)

Source

License

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

About

Python SDK for Quorum LightNode, Without local storage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages