View Source Slip39.Share (slip39 v0.1.1)
Represents a single mnemonic share
Summary
Functions
This function will decode a mnemonic string into a Slip39.Share
struct.
This function will encode a Slip39.Share
struct into a mnemonic string.
Functions
@spec decode!(String.t()) :: %Slip39.Share{ data: term(), group_count: term(), group_index: term(), group_threshold: term(), identifier: term(), iteration_exponent: term(), member_index: term(), member_threshold: term() }
This function will decode a mnemonic string into a Slip39.Share
struct.
Example
iex(1)> Slip39.Share.decode!("kernel leader acrobat romp camera unusual fawn engage revenue total blimp quiet muscle clinic slush mouse watch estimate custody glimpse")
%Slip39.Share{
identifier: 15856,
iteration_exponent: 0,
group_index: 0,
group_threshold: 2,
group_count: 4,
member_index: 0,
member_threshold: 1,
data: <<116, 239, 149, 20, 122, 245, 231, 69, 107, 62, 90, 37, 51, 169, 87,
227>>
}
@spec encode!(%Slip39.Share{ data: term(), group_count: term(), group_index: term(), group_threshold: term(), identifier: term(), iteration_exponent: term(), member_index: term(), member_threshold: term() }) :: [String.t()]
This function will encode a Slip39.Share
struct into a mnemonic string.