toWif :: Network -> SecKeyI -> Base58
toWif net (SecKeyI k c) =
    encodeBase58Check . BS.cons (getSecretPrefix net) $
    if c
        then getSecKey k `BS.snoc` 0x01
        else getSecKey k
toWif :: Network -> SecKeyI -> Base58
toWif net (SecKeyI k c) =
    encodeBase58Check . BS.cons (getSecretPrefix net) $
    if c
        then getSecKey k `BS.snoc` 0x01
        else getSecKey k
toWif net (SecKeyI k c) =
    encodeBase58Check . BS.cons (getSecretPrefix net) $
    if c
        then getSecKey k `BS.snoc` 0x01
        else getSecKey k