@bitahon/transport
The library implements functions and data types for encoding data into a series of QR Code messages for the Bitahon Protocol.
Depends on:
Installation
General
To obtain the latest version, simply require the project using npm
:
npm install @bitahon/transport
Usage
import {
encodeQRCodeChunks,
decodeQRCodeChunk,
decodeChunks,
} from '@bitahon/transport';
const src = Buffer.from('01020304', 'hex');
const chunks: string[] = encodeQRCodeChunks(src);
const chunk = decodeQRCodeChunk(chunks[0]);
console.log(chunk);
const dst: Buffer = decodeChunks([chunk]);
console.log(dst);