View on GitHub
File Changes
    `shouldBe`
    getKey rootKey
  where
-
    Right mw = fromMnemonic @'[12] mnem
+
    mw = either (error . show) id $ fromMnemonic @'[12] mnem

                      
generateTest1 :: GenerateKeyFromSeed
generateTest1 = GenerateKeyFromSeed
spec :: Spec
spec = do
    describe "Golden Tests - Icarus' style addresses" $ do
-
--        let seed0 = Passphrase "4\175\242L\184\243\191 \169]\171 \207\r\v\233\NUL~&\ETB"
-
--
-
--        goldenAddressGeneration $ GoldenAddressGeneration
-
--            seed0 (toEnum 0x80000000) UTxOExternal (toEnum 0x00000000)
-
--            "Ae2tdPwUPEZGQVrA6qKreDzdtYxcWMMrpTFYCpFcuJfhJBEfoeiuW4MtaXZ"
-
--
-
--        goldenAddressGeneration $ GoldenAddressGeneration
-
--            seed0 (toEnum 0x80000000) UTxOExternal (toEnum 0x0000000E)
-
--            "Ae2tdPwUPEZDLWQQEBR1UW7HeXJVaqUnuw8DUFu52TDWCJbxbkCyQYyxckP"
-
--
-
--        goldenAddressGeneration $ GoldenAddressGeneration
-
--            seed0 (toEnum 0x8000000E) UTxOInternal (toEnum 0x0000002A)
-
--            "Ae2tdPwUPEZFRbyhz3cpfC2CumGzNkFBN2L42rcUc2yjQpEkxDbkPodpMAi"
-
--
        let (Right seed1) = fromMnemonic @'[12]
              [ "ghost", "buddy", "neutral", "broccoli", "face", "rack"
              , "relief", "odor", "swallow", "real", "once", "ecology"

                      
    describe "Buildable" $ do
        it "WalletId" $ do
-
            let mw = either (error . show) id $ SomeMnemonic . entropyToMnemonic @12 <$> mkEntropy "0000000000000000"
-
            let xprv = generateKeyFromSeed (mw, Nothing) mempty :: ShelleyKey 'RootK XPrv
+
            let mw = either (error . show) id
+
                    $ SomeMnemonic
+
                    . entropyToMnemonic @12
+
                    <$> mkEntropy "0000000000000000"
+
            let xprv = generateKeyFromSeed
+
                    (mw, Nothing) mempty :: ShelleyKey 'RootK XPrv
            let wid = WalletId $ digest $ publicKey xprv
            "336c96f1...b8cac9ce" === pretty @_ @Text wid
        it "TxMeta (1)" $ do
    ( DBLayer (..), ErrNoSuchWallet (..), PrimaryKey (..), putTxHistory )
import Cardano.Wallet.DummyTarget.Primitive.Types
    ( DummyTarget, block0, genesisParameters, mkTxId )
+
import Cardano.Wallet.Gen
+
    ( genMnemonic )
import Cardano.Wallet.Primitive.AddressDerivation
    ( AccountingStyle (..)
    , Depth (..)
    )
import Cardano.Wallet.Primitive.CoinSelection
    ( CoinSelection (..) )
-
import Cardano.Wallet.Primitive.Mnemonic
-
    ( entropyToMnemonic, mkEntropy )
import Cardano.Wallet.Primitive.Types
    ( Address (..)
    , BlockchainParameters (..)
        Passphrase . BA.convert . BS.pack <$> replicateM 16 arbitrary

                      

                      
-
instance {-# OVERLAPS #-} Arbitrary SomeMnemonic where
-
    arbitrary = do
-
        bytes <- BS.pack <$> vectorOf 16 arbitrary
-
        let ent = either (error . show) id $ mkEntropy @128 bytes
-
        return . SomeMnemonic . entropyToMnemonic @12 $ ent
+
instance Arbitrary SomeMnemonic where
+
    arbitrary = SomeMnemonic <$> genMnemonic @12

                      
instance {-# OVERLAPS #-} Arbitrary (ShelleyKey 'RootK XPrv, Passphrase "encryption")
  where