#blockchain #wallet #chia #crypto #bls-signatures

chia-sdk-signer

Calculates the BLS signatures required for coin spends in a transaction

16 releases (breaking)

new 0.19.1 Nov 12, 2024
0.18.0 Nov 8, 2024
0.11.0 Jun 27, 2024

#98 in Magic Beans

Download history 37/week @ 2024-07-22 18/week @ 2024-07-29 13/week @ 2024-08-05 169/week @ 2024-08-12 27/week @ 2024-08-19 341/week @ 2024-08-26 66/week @ 2024-09-02 10/week @ 2024-09-09 46/week @ 2024-09-16 93/week @ 2024-09-23 19/week @ 2024-09-30 491/week @ 2024-10-07 199/week @ 2024-10-14 308/week @ 2024-10-21 304/week @ 2024-10-28 687/week @ 2024-11-04

1,615 downloads per month
Used in 3 crates (2 directly)

Apache-2.0

41KB
792 lines

Chia Wallet SDK

crate documentation minimum rustc 1.75 codecov

This is an unofficial wallet SDK for the Chia blockchain, enabling the development of high-performance wallet applications built with Chia's light wallet protocol.

image

Why do you need an SDK?

If you intend on writing an application that uses the Chia blockchain, be it a dApp, a wallet, or even just tooling on top of it, you will most likely need some code to interact with a Chia wallet. The worst case scenario is that you need to write an entire wallet and all of its driver code from scratch every time. This is very challenging to do, takes a lot of time, and can be error prone if anything is done wrong.

To build driver code, you need libraries like chia-bls and clvmr, for interacting with Chia's native BLS signatures and CLVM runtime. You compose puzzles by currying them, and spend them by constructing solutions. Even with libraries in place to do this (assuming they are tested properly), it can be very tedious and hard to get right. That's what this wallet sdk is aiming to solve.

It's essentially a higher level wrapper over the core primitives that the Chia blockchain provides, and aims to make various things in the lifecycle of wallet development simpler such as state management and signing.

chia_rs and clvm_rs

This SDK is built on top of the primitives developed in the chia_rs and clvm_rs libraries. I help maintain chia_rs to add new core functionality necessary for wallet development as needed. And clvm_rs is a great implementation of the CLVM runtime, especially when combined with the clvm-traits helper library for translating Rust types to CLVM and vice versa.

Supported primitives

Currently, the following Chia primitives are supported:

  • Standard Transactions, either as an inner puzzle or standalone
  • CATs (Chia Asset Tokens), with creation, parsing, and spending capabilities
  • DIDs (Decentralized Identities), with creation, parsing, and (limited) spending capabilities
  • NFTs (Non-Fungible Tokens), with minting and (limited) spending capabilities

Additionally, the wallet sdk is designed to be modular, so you can extend it with your own primitives and driver code if needed! Contributions are welcome for adding things to the wallet sdk itself as well.

Credits

Special thanks to SumSet Tech, LLC for sponsoring the initial development of various parts of the wallet sdk.

Banner image produced by Midjourney.

Dependencies

~12MB
~284K SLoC