View on GitHub
File Changes
    , unsafeEpochNo
    , wholeRange
    )
+
import Cardano.Wallet.Unsafe
+
    ( unsafeMkSomeMnemonicFromEntropy )
import Control.Arrow
    ( second )
import Control.DeepSeq
    ()
import Data.List
    ( unfoldr )
+
import Data.Proxy
+
    ( Proxy (..) )
import Data.Quantity
    ( Quantity (..) )
import Data.Text.Class
  where
    genRootKeysSeq :: Gen (ShelleyKey 'RootK XPrv)
    genRootKeysSeq = do
-
        s <- (SomeMnemonic <$> genMnemonic @12)
+
        s <- SomeMnemonic <$> genMnemonic @12
        g <- frequency
                [ (1, return Nothing)
                , (3, Just . SomeMnemonic <$> genMnemonic @12)
arbitrarySeqAccount =
    publicKey $ unsafeGenerateKeyFromSeed (mw, Nothing) mempty
  where
-
    mw = SomeMnemonic $ unsafePerformIO $ generate $ genMnemonic @15
+
    mw = unsafeMkSomeMnemonicFromEntropy (Proxy @15) (BS.replicate 32 0)

                      
arbitraryRewardAccount
    :: ShelleyKey 'AddressK XPub
arbitraryRewardAccount =
    publicKey $ unsafeGenerateKeyFromSeed (mw, Nothing) mempty
  where
-
    mw = SomeMnemonic $ unsafePerformIO $ generate $ genMnemonic @15
+
    mw = unsafeMkSomeMnemonicFromEntropy (Proxy @15) (BS.replicate 32 0)

                      
{-------------------------------------------------------------------------------
                                 Random State
    , Passphrase (..)
    , SomeMnemonic (..)
    , XPrv
-
    , fromMnemonic
    )
import Cardano.Wallet.Primitive.AddressDerivation.Byron
    ( ByronKey (..)
    , generateKeyFromSeed
    , minSeedLengthBytes
    , unsafeGenerateKeyFromSeed
    )
-

                      
import Cardano.Wallet.Primitive.AddressDerivationSpec
    ()
+
import Cardano.Wallet.Unsafe
+
    ( unsafeMkMnemonic )
import Control.Monad
    ( (<=<) )
import Data.ByteArray.Encoding
    `shouldBe`
    getKey rootKey
  where
-
    mw = either (error . show) id $ fromMnemonic @'[12] mnem
+
    mw = SomeMnemonic $ unsafeMkMnemonic @12 mnem

                      
generateTest1 :: GenerateKeyFromSeed
generateTest1 = GenerateKeyFromSeed
    let crc = BS.pack [26,1,2,3,4]
    return $ Address (prefix <> addrPayload <> crc)

                      
-
instance {-# OVERLAPS #-} Arbitrary SomeMnemonic where
+
instance Arbitrary SomeMnemonic where
    arbitrary = SomeMnemonic <$> genMnemonic @12
    , mkSeqState
    , shrinkPool
    )
-
import Cardano.Wallet.Primitive.Mnemonic
-
    ( entropyToMnemonic )
import Cardano.Wallet.Primitive.Types
    ( Address (..), ShowFmt (..) )
import Cardano.Wallet.Unsafe
-
    ( unsafeMkEntropy, unsafeMkSomeMnemonicFromEntropy )
+
    ( unsafeMkSomeMnemonicFromEntropy )
import Control.Monad
    ( forM, forM_, unless )
import Control.Monad.IO.Class
prop_genChangeGap g =
    property prop
  where
-
    mw = SomeMnemonic
-
        $ entropyToMnemonic @12
-
        $ unsafeMkEntropy "0000000000000000"
+
    mw = unsafeMkSomeMnemonicFromEntropy (Proxy @12) "0000000000000000"
    key = Shelley.unsafeGenerateKeyFromSeed (mw, Nothing) mempty
    s0 = mkSeqState (key, mempty) g
    prop =