api-rpc-pegnet-0.1.1.1: simple json-rpc client for PegNet

Safe HaskellNone
LanguageHaskell2010

PegNet.RPC.Api

Synopsis

Documentation

endpoint :: [Char] Source #

Simple endpoint wrappers to use as different local or remotte API endoint, keep default values

reqGetSyncStatus :: RPC SyncStatus Source #

"get-sync-status" Return the current heights synced by pegnetd and the factomd it is communicating with

reqGetTransaction Source #

Arguments

:: Text

Transaction id

-> RPC Transaction

Requested Transaction

"get-transaction" Returns the given pegnet transaction if it exists.

reqPegNetIssuance :: RPC NetIssuance Source #

Get the total supply for each pegnet asset.

reqPegNetBalances Source #

Arguments

:: Text

Address to get balances from

-> RPC NetBalances

Resulting balances over all assets

Get the pegnet asset balances for a given address

reqPegNetRates Source #

Arguments

:: Int

Specified height to get rates at

-> RPC Rates

Resulted Rates

"get-pegnet-rates" Returns the pegnet conversion rates for a given block height.

reqGetTransactionStatus Source #

Arguments

:: Text

Transaction chain entry hash

-> RPC TransactionStatus

Current status of transaction

"get-transaction-status" Returns the status of a transaction. The parameter entryhash can be either a winning OPR entry hash, a transaction chain entry hash, or an FCT Burn transaction id.

reqGetTransactions Source #

Arguments

:: Maybe Text 
-> Maybe Text 
-> Maybe Int 
-> Maybe Int

offset

-> Maybe Bool 
-> Maybe Bool 
-> Maybe Bool 
-> Maybe Bool 
-> Maybe Bool 
-> RPC [Transaction]

List of Transactions by specified parameters

get-transactions Returns a set of up to 50 transactions for the given parameters. TODO: this many arguments including boolean combination is a case for a bad API design. Better hide it with convinience functions provided to library user

reqGetRichList Source #

Arguments

:: Maybe Text

Asset name, exclude to list by all assets

-> Int

Number to limit from top

-> RPC [RichEntry] 

"get-rich-list" Returns the rich list of addresses for all assets or a specific asset.

main :: IO () Source #