Initial commit
This commit is contained in:
commit
c101616e62
309 changed files with 53937 additions and 0 deletions
25
bundled/Network/Stellar/Network.hs
Normal file
25
bundled/Network/Stellar/Network.hs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
module Network.Stellar.Network
|
||||
( Network
|
||||
, publicNetwork
|
||||
, testNetwork
|
||||
)
|
||||
where
|
||||
|
||||
import qualified Data.ByteString.Char8 as B
|
||||
import qualified Data.ByteString.Lazy as LB
|
||||
import Data.Digest.Pure.SHA (sha256, bytestringDigest)
|
||||
|
||||
type Network = B.ByteString
|
||||
|
||||
hashPassphrase :: String -> Network
|
||||
hashPassphrase = LB.toStrict . bytestringDigest . sha256 . LB.fromStrict . B.pack
|
||||
|
||||
publicPassphrase :: String
|
||||
publicPassphrase = "Public Global Stellar Network ; September 2015"
|
||||
publicNetwork :: Network
|
||||
publicNetwork = hashPassphrase publicPassphrase
|
||||
|
||||
testPassphrase :: String
|
||||
testPassphrase = "Test SDF Network ; September 2015"
|
||||
testNetwork :: Network
|
||||
testNetwork = hashPassphrase testPassphrase
|
||||
Loading…
Add table
Add a link
Reference in a new issue