summaryrefslogtreecommitdiffhomepage
path: root/HTTP/ProofOfWork.hs
diff options
context:
space:
mode:
Diffstat (limited to 'HTTP/ProofOfWork.hs')
-rw-r--r--HTTP/ProofOfWork.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/HTTP/ProofOfWork.hs b/HTTP/ProofOfWork.hs
new file mode 100644
index 0000000..45cc96d
--- /dev/null
+++ b/HTTP/ProofOfWork.hs
@@ -0,0 +1,22 @@
+{- Copyright 2016 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU AGPL version 3 or higher.
+ -}
+
+{-# LANGUAGE DeriveGeneric #-}
+
+module HTTP.ProofOfWork where
+
+import Types
+import qualified Data.Text as T
+import GHC.Generics
+
+data ProofOfWorkRequirement t
+ = Result t
+ | ProofOfWorkRequirement
+ { leadingZeros :: Int
+ , argon2Iterations :: Int
+ }
+ deriving (Generic)
+
+newtype ProofOfWork = ProofOfWork T.Text