Cryptopunk.Derivation.Path (cryptopunk v0.7.8)

Utility functions to work with deriviation path

See https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki

Summary

Types

raw_path()

@type raw_path() :: {atom(), [non_neg_integer()]}

t()

@type t() :: %Cryptopunk.Derivation.Path{
  account: non_neg_integer(),
  address_index: non_neg_integer(),
  change: non_neg_integer(),
  coin_type: non_neg_integer(),
  purpose: non_neg_integer(),
  type: :private | :public
}

Functions

is_hardened(x)

(macro)

is_normal(x)

(macro)

new(opts)

@spec new(Keyword.t()) :: t()

parse(string_path)

@spec parse(String.t()) :: {:error, any()} | {:ok, t()}

to_raw_path(path)

@spec to_raw_path(t()) :: raw_path()

two_power_31()

@spec two_power_31() :: non_neg_integer()