Skip to main content

Key Path

The CryptoKeypath class represents a cryptographic key path (BIP-44 derivation path).

Inputs

FieldValue TypeMeaning
componentsPathComponent[]Array of path components (default: empty)
sourceFingerprintBufferThe source fingerprint (optional)
depthnumberThe depth (optional)

PathComponent

The PathComponent class represents an individual component in a key path.

Inputs

FieldValue TypeMeaning
indexnumberThe component index (optional)
hardenedbooleanWhether 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