mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-27 15:48:54 +00:00
rename to adapt
This commit is contained in:
@@ -45,7 +45,7 @@ import Simplex.Messaging.Parsers (defaultJSON, dropPrefix, sumTypeJSON)
|
||||
type AccountIndex = Word32
|
||||
|
||||
-- | The key at an account index. It owns whatever that account owns.
|
||||
type AccountKey = S.PrivateKey
|
||||
type AccountKey = S.Secp256k1PrivateKey
|
||||
|
||||
-- | One derived address, with the index it came from, so a caller that left the
|
||||
-- index out knows what it got.
|
||||
|
||||
@@ -36,7 +36,7 @@ testPhrase24 = B.unwords $ replicate 23 "abandon" <> ["art"]
|
||||
seedEntropy :: ByteString -> BA.ScrubbedBytes
|
||||
seedEntropy phrase = BA.convert . B39.mnemonicToEntropy . either error id $ B39.parseMnemonic phrase
|
||||
|
||||
accountKey :: BA.ScrubbedBytes -> AccountIndex -> S.PrivateKey
|
||||
accountKey :: BA.ScrubbedBytes -> AccountIndex -> S.Secp256k1PrivateKey
|
||||
accountKey entropy n = either (error . show) id $ seedMaster entropy >>= \m -> deriveAccountKey m n
|
||||
|
||||
-- | The address a wallet reaches when the secret is imported as a private key.
|
||||
|
||||
Reference in New Issue
Block a user