[wip] state management and keypair generation

This commit is contained in:
2023-01-14 14:56:01 -07:00
parent 279bd888e3
commit da0fa03869
2 changed files with 82 additions and 30 deletions
+14
View File
@@ -0,0 +1,14 @@
% Seed phrases
% See: https://en.bitcoin.it/wiki/BIP_0039#Reference_Implementation
-module(vsp).
-compile([export_all, nowarn_export_all]).
-spec encode(SecretKey) -> SeedPhrase
when SecretKey :: <<_:128>>,
SeedPhrase :: [string()].
encode(SecretKey) ->
<<CheckBytes:4/binary, _/binary>> = crypto:hash(sha256, Key).