Giter Club home page Giter Club logo

quorum-fullnode-py's Introduction

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.

quorum-fullnode-py's People

Contributors

liujuanjuan1984 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.