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 |
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.
Returns:
array of BC UR strings
- Type
- Array.<string>