Key Path
The CryptoKeypath class represents a cryptographic key path (BIP-44 derivation path).
Inputs
| Field | Value Type | Meaning |
|---|---|---|
components | PathComponent[] | Array of path components (default: empty) |
sourceFingerprint | Buffer | The source fingerprint (optional) |
depth | number | The depth (optional) |
PathComponent
The PathComponent class represents an individual component in a key path.
Inputs
| Field | Value Type | Meaning |
|---|---|---|
index | number | The component index (optional) |
hardened | boolean | Whether it is hardened |
Demo
import { CryptoKeypath, PathComponent } from "@keystonehq/bc-ur-registry";
// path note: BIP44: m/44'/60'/0'/0/0
const keypath = new CryptoKeypath([
new PathComponent({ index: 44, hardened: true }),
new PathComponent({ index: 60, hardened: true }),
new PathComponent({ index: 0, hardened: true }),
new PathComponent({ index: 0, hardened: false }),
new PathComponent({ index: 0, hardened: false }),
]);
UR Demo
ur:crypto-keypath/xxxxx