Giter Club home page Giter Club logo

cat-utils's Introduction

HBSC Chia Python utils

A collection of Python utils to make Chia development easier.

RPC clients

Chia RPC clients are implemented as context managers, and extendable:

Use them like:

from hbsc_utils.rpc import ChiaFullNodeWrapper

async with ChiaFullNodeWrapper() as (wrapper, client):
    await client.do_stuff()  # this is the underlying Chia RPC client, with all the documented methods
    await wrapper.do_stuff()  # this is our custom wrapper which might have additional features

You can pass in your own hostname and port, or set the following environment variables:

CHIA_FULL_NODE_HOSTNAME
CHIA_FULL_NODE_PORT
CHIA_WALLET_HOSTNAME
CHIA_WALLET_PORT

Get CAT original XCH address

Need to send more of a CAT to someone?

async with ChiaFullNodeWrapper() as (wrapper, client):
    cat_record = await client.get_coin_record_by_name(COIN_ID)
    xch_address = await wrapper.get_original_address_for_cat(cat_record, CAT_TAIL)

    # send CAT to xch_address

Contributing

Feel free to contribute anything but please open an issue first.

Want to say thanks? xch18csq9v42nvmdwckkte2cke8vdmrv7ew8xqtqdswyult29gk5p7eqv95nge

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.