namecoin-update-0.2.2.0: Tool to keep namecoin names updated and well

Safe HaskellNone
LanguageHaskell2010

Namecoin

Contents

Description

Namecoin utility library

Synopsis

Documentation

type Error = Either String Source #

Alias for types with an error message

Namecoin config parser

comment :: Parser () Source #

Parse a comment (line beggining with a "#")

setting :: Parser (Text, Text) Source #

Parse an option of form

key=value

line :: Parser (Text, Text) Source #

Parse a line (either a comment or an option)

config :: Parser [(Text, Text)] Source #

Parse the namecoin config format

uri :: Text -> Error String Source #

Takes the content of a namecoin config file and gives the URI to connect to the JSON-RPC server

JSON-RPC client

data RPCRequest Source #

JSON-RPC 1.0 request record

Constructors

RPCRequest 

Fields

data RPCResponse Source #

JSON-RPC 1.0 response record

Constructors

RPCResponse 

Fields

data RPCError Source #

Namecoin API error record

Constructors

RPCError 

Fields

  • code :: Int

    a number indicating the kind of error

  • message :: String

    a detailed explanation of the error

data Name Source #

Namecoin API Value record

Constructors

Name 

Fields

decodeValue :: FromJSON a => Value -> Error a Source #

Turn an Aeson AST object into a fromJSON type

rpcRequest Source #

Arguments

:: String

the URI of the JSON-RPC endpoint

-> String

the method name

-> [String]

the method parameters

-> IO (Error Value)

and error or the wanted result

Execute an RPC method

Name operations

nameList :: String -> IO (Error [Name]) Source #

Return the list of currently registered names

nameUpdate :: String -> Name -> IO Int Source #

Issue an udpate for a name (confirming its current value)