| CHIP Number | 0030 |
|---|---|
| Title | Wallet signer BLOB subdivision |
| Description | A standard technique for subdividing (chunking) BLOB data used in the wallet signer protocol |
| Author | Matt Hauff |
| Editor | Dan Perry |
| Comments-URI | CHIPs repo, PR #105 |
| Status | Final |
| Category | Process |
| Sub-Category | Tooling |
| Created | 2024-03-14 |
| Requires | 0027 |
| Replaces | None |
| Superseded-By | None |
CHIP-0029 provides a method for serializing JSON data from the APIs laid out in CHIP-0027 into binary large object (BLOB) data. This CHIP provides a method for subdividing BLOB data into multiple chunks.
BLOBs used in the Chia wallet signer protocol can be too large to send in one piece. Therefore, a method is needed to subdivide, or "chunk" the data into multiple pieces. For now, this method is only used with QR codes, but in the future it could be applied more broadly to other types of BLOBs.
This CHIP does not introduce any backwards incompatibilities.
The primary method is called create_chunks_for_blob:
ARGUMENTS
blob: bytes
bytes_per_chunk: intRETURNS
The blob, broken into chunks of size bytes_per_chunk.
Each chunk is appended with [x, y], where x is the current chunk number, and y is the total number of chunks.
This CHIP is implemented in the hsms GitHub repository, under byte_chunks.py.
CNI has conducted an internal security audit of the code from this CHIP's reference implementation.
None
Copyright and related rights waived via CC0.