View on GitHub
File Changes
    , unsafeXPrv
    , unsafeMkMnemonic
    , unsafeMkEntropy
-
    , unsafeSomeMnemonicFromEntropy
+
    , unsafeMkSomeMnemonicFromEntropy
    , unsafeDeserialiseCbor
    , unsafeBech32DecodeFile
    , unsafeBech32Decode
    -> Entropy ent
unsafeMkEntropy = either (error . show) id . mkEntropy

                      
-
unsafeSomeMnemonicFromEntropy
+
unsafeMkSomeMnemonicFromEntropy
    :: forall mw ent csz.
        ( HasCallStack
        , ValidEntropySize ent
    => Proxy mw
    -> ByteString
    -> SomeMnemonic
-
unsafeSomeMnemonicFromEntropy _ = SomeMnemonic
+
unsafeMkSomeMnemonicFromEntropy _ = SomeMnemonic
    . entropyToMnemonic
    . unsafeMkEntropy @ent

                      
    , fromFlatSlot
    )
import Cardano.Wallet.Unsafe
-
    ( unsafeRunExceptT, unsafeSomeMnemonicFromEntropy )
+
    ( unsafeMkSomeMnemonicFromEntropy, unsafeRunExceptT )
import Control.DeepSeq
    ( NFData (..), force )
import Control.Exception
ourAccount :: ShelleyKey 'AccountK XPub
ourAccount = publicKey $ unsafeGenerateKeyFromSeed (seed, Nothing) mempty
  where
-
    seed = unsafeSomeMnemonicFromEntropy (Proxy @15) (BS.replicate 32 0)
+
    seed = unsafeMkSomeMnemonicFromEntropy (Proxy @15) (BS.replicate 32 0)

                      
rewardAccount :: ShelleyKey 'AddressK XPub
rewardAccount = publicKey $ unsafeGenerateKeyFromSeed (seed, Nothing) mempty
  where
-
    seed = unsafeSomeMnemonicFromEntropy (Proxy @15) (BS.replicate 32 0)
+
    seed = unsafeMkSomeMnemonicFromEntropy (Proxy @15) (BS.replicate 32 0)

                      
-- | Make a prefixed bytestring for use as a Hash or Address.
label :: Show n => String -> n -> B8.ByteString
import Cardano.Wallet.Primitive.Types
    ( Address )
import Cardano.Wallet.Unsafe
-
    ( unsafeSomeMnemonicFromEntropy )
+
    ( unsafeMkSomeMnemonicFromEntropy )
import Control.Monad
    ( forM_ )
import Data.Proxy
spec :: Spec
spec = do
    describe "Golden Tests - Icarus' style addresses" $ do
-
        let seed0 = unsafeSomeMnemonicFromEntropy (Proxy @15)
+
        let seed0 = unsafeMkSomeMnemonicFromEntropy (Proxy @15)
                "4\175\242L\184\243\191 \169]\171 \207\r\v\233\NUL~&\ETB"

                      
        goldenAddressGeneration $ GoldenAddressGeneration
import Cardano.Wallet.Primitive.Types
    ( Address (..), ShowFmt (..) )
import Cardano.Wallet.Unsafe
-
    ( unsafeMkEntropy, unsafeSomeMnemonicFromEntropy )
+
    ( unsafeMkEntropy, unsafeMkSomeMnemonicFromEntropy )
import Control.Monad
    ( forM, forM_, unless )
import Control.Monad.IO.Class
prop_lookupDiscovered (s0, addr) =
    let (ours, s) = isOurs addr s0 in ours ==> prop s
  where
-
    mw = unsafeSomeMnemonicFromEntropy (Proxy @12) "0000000000000000"
+
    mw = unsafeMkSomeMnemonicFromEntropy (Proxy @12) "0000000000000000"
    key = Shelley.unsafeGenerateKeyFromSeed (mw, Nothing) mempty
    prop s = monadicIO $ liftIO $ do
        unless (isJust $ isOwned s (key, mempty) addr) $ do

                      
dummyMnemonic :: SomeMnemonic
dummyMnemonic =
-
    unsafeSomeMnemonicFromEntropy (Proxy @12) (BS.pack $ replicate 16 0)
+
    unsafeMkSomeMnemonicFromEntropy (Proxy @12) (BS.pack $ replicate 16 0)
    , wholeRange
    )
import Cardano.Wallet.Unsafe
-
    ( unsafeFromHex, unsafeSomeMnemonicFromEntropy )
+
    ( unsafeFromHex, unsafeMkSomeMnemonicFromEntropy )
import Control.DeepSeq
    ( deepseq )
import Control.Exception

                      
    describe "Buildable" $ do
        it "WalletId" $ do
-
            let mw = unsafeSomeMnemonicFromEntropy (Proxy @12)
+
            let mw = unsafeMkSomeMnemonicFromEntropy (Proxy @12)
                    "0000000000000000"
            let xprv = generateKeyFromSeed
                    (mw, Nothing) mempty :: ShelleyKey 'RootK XPrv
import Cardano.Wallet.Transaction
    ( ErrMkTx (..), TransactionLayer (..) )
import Cardano.Wallet.Unsafe
-
    ( unsafeFromHex, unsafeSomeMnemonicFromEntropy )
+
    ( unsafeFromHex, unsafeMkSomeMnemonicFromEntropy )
import Data.ByteArray.Encoding
    ( Base (Base16), convertToBase )
import Data.ByteString
    )
  where
    pwd = mempty
-
    seed = unsafeSomeMnemonicFromEntropy (Proxy @12) bytes
+
    seed = unsafeMkSomeMnemonicFromEntropy (Proxy @12) bytes

                      
xprvRndFromSeed
    :: ByteString
  where
    pwd = mempty
    derPath = (minBound, minBound)
-
    seed = unsafeSomeMnemonicFromEntropy (Proxy @12) bytes
+
    seed = unsafeMkSomeMnemonicFromEntropy (Proxy @12) bytes

                      
mkKeystore :: Ord k => [(k,v)] -> (k -> Maybe v)
mkKeystore pairs k =