CKB Python SDK

CKB Python SDK

The CKB Python SDK is a SDK to interact with Nervos CKB.

Team and Background

Nirvana Dev (https://nirvanadev.com) is a dev team focusing on blockchain applications and machine Leanings. Our technical team have 10+ years R&D experiences in the fields of machine learning, and have 5+ years blockchain developing experience.

Tocial(https://tocial.io) is one of the projects of NirvanaDev, which is also a CKB Labs project. This SDK is from the process when we develop on chain functions of Tocial on Nervos.

Project and Justification

During the development of Tocial App, for we need to integrate CKB into our system. We found that CKB’s python development tools were extremely scarce, which created some resistance to the promotion of CKB in other developer community.

The existing backend development tools are not particularly user-friendly, which creates a certain barrier for developers who are just trying to join CKB development.

So, we want to create a developer friendly Python SDK for CKB community, make Python development for CKB has never been easier.

Technical Specification and Implementation

The SDK will be easy to use:

>>> import ckb
>>> my = ckb(“ckb-node-url”)
>>> my.new_key() # Generate a new address
>>> my.address() # Show address
>>> my.get_balance() # Get balance
>>> my.send(address, amount)
>>> my.createCell(data)

And the SDK will support direct RPC request to CKB node:

>>> my.rpc.get_block(blockhash)
>>> my.rpc.get_block_by_number(block_number)
>>> my.rpc.get_transaction(block hash)
>>> my.rpc.get_block_hash(block_number)

Timeline / Roadmap

This project will be completed in four months, and we will continue to update our development progress on GitHub. We also welcome requests and changes from others in the community.

Milestone 1: Till the end of 1st Month

The RPC API implementation.

Milestone 2: Till the end of 4th Month

Final SDK released.

2 Likes