namecoin-update-0.2.3.0: Tool to keep namecoin names updated and well
Safe HaskellSafe-Inferred
LanguageHaskell2010

Namecoin

Description

Namecoin utility library

Synopsis

JSON-RPC client

data RPCRequest Source #

JSON-RPC 1.0 request record

Constructors

RPCRequest 

Fields

Instances

Instances details
FromJSON RPCRequest Source # 
Instance details

Defined in Namecoin

ToJSON RPCRequest Source # 
Instance details

Defined in Namecoin

Generic RPCRequest Source # 
Instance details

Defined in Namecoin

Associated Types

type Rep RPCRequest :: Type -> Type #

type Rep RPCRequest Source # 
Instance details

Defined in Namecoin

type Rep RPCRequest = D1 ('MetaData "RPCRequest" "Namecoin" "namecoin-update-0.2.3.0-inplace" 'False) (C1 ('MetaCons "RPCRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "method") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "params") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]))))

data RPCResponse Source #

JSON-RPC 1.0 response record

Constructors

RPCResponse 

Fields

Instances

Instances details
FromJSON RPCResponse Source # 
Instance details

Defined in Namecoin

ToJSON RPCResponse Source # 
Instance details

Defined in Namecoin

Generic RPCResponse Source # 
Instance details

Defined in Namecoin

Associated Types

type Rep RPCResponse :: Type -> Type #

type Rep RPCResponse Source # 
Instance details

Defined in Namecoin

type Rep RPCResponse = D1 ('MetaData "RPCResponse" "Namecoin" "namecoin-update-0.2.3.0-inplace" 'False) (C1 ('MetaCons "RPCResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "result") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "rpcError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RPCError)))))

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

Instances

Instances details
FromJSON RPCError Source # 
Instance details

Defined in Namecoin

ToJSON RPCError Source # 
Instance details

Defined in Namecoin

Generic RPCError Source # 
Instance details

Defined in Namecoin

Associated Types

type Rep RPCError :: Type -> Type #

Methods

from :: RPCError -> Rep RPCError x #

to :: Rep RPCError x -> RPCError #

type Rep RPCError Source # 
Instance details

Defined in Namecoin

type Rep RPCError = D1 ('MetaData "RPCError" "Namecoin" "namecoin-update-0.2.3.0-inplace" 'False) (C1 ('MetaCons "RPCError" 'PrefixI 'True) (S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

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

data Name Source #

Namecoin API Value record

Constructors

Name 

Fields

Instances

Instances details
FromJSON Name Source # 
Instance details

Defined in Namecoin

Generic Name Source # 
Instance details

Defined in Namecoin

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Show Name Source # 
Instance details

Defined in Namecoin

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

type Rep Name Source # 
Instance details

Defined in Namecoin

type Rep Name = D1 ('MetaData "Name" "Namecoin" "namecoin-update-0.2.3.0-inplace" 'False) (C1 ('MetaCons "Name" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "expires_in") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

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

Returns the list of currently registered names

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

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

Miscellanea

uri :: Text -> Error String Source #

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