Skip to content

Commit 9591b1d

Browse files
committed
removes aeson and conduit
1 parent 29cfb0b commit 9591b1d

File tree

16 files changed

+1428
-1781
lines changed

16 files changed

+1428
-1781
lines changed

bitcoin.cabal

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,13 @@ library
9393
src
9494
build-depends:
9595
QuickCheck >=2.13.2
96-
, aeson >=1.4.6.0
9796
, array >=0.5.4.0
9897
, base >=4.9 && <5
9998
, base16 >=0.3.0.1
10099
, binary >=0.8.8
101100
, bytes >=0.17
102101
, bytestring >=0.10.10.0
103102
, cereal >=0.5.8
104-
, conduit >=1.3.1.2
105103
, containers >=0.6.2.1
106104
, cryptonite >=0.26
107105
, deepseq >=1.4.4.0
@@ -148,7 +146,6 @@ test-suite spec
148146
build-depends:
149147
HUnit >=1.6.0.0
150148
, QuickCheck >=2.13.2
151-
, aeson >=1.4.6.0
152149
, array >=0.5.4.0
153150
, base >=4.9 && <5
154151
, base16 >=0.3.0.1
@@ -158,7 +155,6 @@ test-suite spec
158155
, bytes >=0.17
159156
, bytestring >=0.10.10.0
160157
, cereal >=0.5.8
161-
, conduit >=1.3.1.2
162158
, containers >=0.6.2.1
163159
, cryptonite >=0.26
164160
, deepseq >=1.4.4.0

package.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ extra-source-files:
1919
- README.md
2020
- CHANGELOG.md
2121
dependencies:
22-
- aeson >= 1.4.6.0
2322
- array >= 0.5.4.0
2423
- base >=4.9 && <5
2524
- base16 >= 0.3.0.1
2625
- binary >= 0.8.8
2726
- bytes >= 0.17
2827
- bytestring >= 0.10.10.0
2928
- cereal >= 0.5.8
30-
- conduit >= 1.3.1.2
3129
- containers >= 0.6.2.1
3230
- cryptonite >= 0.26
3331
- deepseq >= 1.4.4.0

src/Haskoin/Address.hs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ module Haskoin.Address (
2626
textToAddr,
2727
bech32ToAddr,
2828
base58ToAddr,
29-
addrToJSON,
30-
addrToEncoding,
31-
addrFromJSON,
3229
pubKeyAddr,
3330
pubKeyWitnessAddr,
3431
pubKeyCompatWitnessAddr,
@@ -54,9 +51,6 @@ import Control.Applicative
5451
import Control.Arrow (second)
5552
import Control.DeepSeq
5653
import Control.Monad
57-
import Data.Aeson as A
58-
import Data.Aeson.Encoding as A
59-
import Data.Aeson.Types
6054
import Data.Binary (Binary (..))
6155
import Data.ByteString (ByteString)
6256
import qualified Data.ByteString as B
@@ -184,24 +178,6 @@ isWitnessAddress WitnessAddress{} = True
184178
isWitnessAddress _ = False
185179

186180

187-
addrToJSON :: Network -> Address -> Value
188-
addrToJSON net a = toJSON (addrToText net a)
189-
190-
191-
addrToEncoding :: Network -> Address -> Encoding
192-
addrToEncoding net = maybe null_ text . addrToText net
193-
194-
195-
-- | JSON parsing for Bitcoin addresses. Works with 'Base58', 'CashAddr' and
196-
-- 'Bech32'.
197-
addrFromJSON :: Network -> Value -> Parser Address
198-
addrFromJSON net =
199-
withText "address" $ \t ->
200-
case textToAddr net t of
201-
Nothing -> fail "could not decode address"
202-
Just x -> return x
203-
204-
205181
-- | Convert address to human-readable string. Uses 'Base58', 'Bech32', or
206182
-- 'CashAddr' depending on network.
207183
addrToText :: Network -> Address -> Maybe Text

0 commit comments

Comments
 (0)