Elixir, Bitcoin, Testing, Software Development, Programming.
binary(min_length: 16, max_length: 32), bits_to_truncate = bytes |> bit_size |> rem(32), <<_::size(bits_to_truncate), data::bits>> = bytes do {:ok, mnemonic} = Bip39.Mnemonic.encode(data) assert Bip39.Mnemonic.decode(mnemonic) == {:ok, data} end We should also add property tests to ensure that