Class: BCUREncoder

bcur.BCUREncoder(hexString, fragmentCapacity)

Encoder class for BC UR data.

Encodes a hex string as a sequence of UR parts. Each UR is a string.

Designed for use by a calling application which will typically take the resulting strings and display them as a sequence of animated QR codes.

Constructor

new BCUREncoder(hexString, fragmentCapacity)

Create a new encoder.

Parameters:
Name Type Default Description
hexString string

a hex string to encode

fragmentCapacity int 200

passed to internal bcur implementation

Source:
Example
import {BCUREncoder} from "unchained-wallets";
const hexString = "deadbeef";
const encoder = BCUREncoder(hexString);
console.log(encoder.parts())
// [ "ur:...", "ur:...", ... ]

Methods

parts() → {Array.<string>}

Return all UR parts.

Source:
Returns:

array of BC UR strings

Type
Array.<string>