1.0.0 • Published 1 year ago

@bitahon/transport v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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);

API

Interfaces

Functions

License

MIT

1.0.0

1 year ago