Skip to main content

Module origin_path

Module origin_path 

Source
Expand description

Origin-path-decl block per spec §3.4.

Block format:

  • shared mode (bit 4 = 0): [n: 5 bits, encoded n-1][origin-path-encoding]
  • divergent mode (bit 4 = 1): [n: 5 bits, encoded n-1][origin-path-encoding × n]

origin-path-encoding (explicit-only per D19′): [depth: 4 bits][component × depth]

component: [hardened: 1 bit][value: LP4-ext varint]

Structs§

OriginPath
An explicit BIP-32 origin path (a sequence of PathComponents).
PathComponent
A single BIP-32 path component (e.g. 84' or 0).
PathDecl
A path declaration: key count n plus either a shared origin path or n divergent origin paths (mode selected by header bit 4).

Enums§

PathDeclPaths
Path payload for a PathDecl.

Constants§

MAX_PATH_COMPONENTS
Maximum number of components in a single origin path (4-bit depth field).