diff options
author | joe <joe@jerkface.net> | 2014-04-15 14:02:24 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-15 14:02:24 -0400 |
commit | 4d96c66f6ece8383c04543c875556d1fae9422f6 (patch) | |
tree | ab237de0edfccaa7bf6978f4105e0c7877668e85 /kiki.hs | |
parent | c43883d074b09c9d86de9873d261bd34aa7ac1fb (diff) |
work in progress: writeWalletKeys
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -89,19 +89,6 @@ import KeyRing | |||
89 | nistp256_id = 0x2a8648ce3d030107 | 89 | nistp256_id = 0x2a8648ce3d030107 |
90 | secp256k1_id = 0x2b8104000a | 90 | secp256k1_id = 0x2b8104000a |
91 | 91 | ||
92 | isCryptoCoinKey p = | ||
93 | and [ isKey p | ||
94 | , key_algorithm p == ECDSA | ||
95 | , lookup 'c' (key p) == Just (MPI secp256k1_id) | ||
96 | ] | ||
97 | |||
98 | getCryptoCoinTag p | isSignaturePacket p = do | ||
99 | -- CryptoCoins.secret | ||
100 | let sps = hashed_subpackets p ++ unhashed_subpackets p | ||
101 | u <- listToMaybe $ mapMaybe usage sps | ||
102 | CryptoCoins.lookupNetwork CryptoCoins.network_name u | ||
103 | getCryptoCoinTag _ = Nothing | ||
104 | |||
105 | warn str = hPutStrLn stderr str | 92 | warn str = hPutStrLn stderr str |
106 | 93 | ||
107 | unprefix c spec = if null (snd p) then swap p else (fst p, tail (snd p)) | 94 | unprefix c spec = if null (snd p) then swap p else (fst p, tail (snd p)) |