Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeTransactionToHashes(fullTransaction string) (eTxID string, ecTxID string)
- func ECBlockToResp(block interfaces.IEntryCreditBlock) (interface{}, *primitives.JSONError)
- func HandleABlockByHeight(ctx *web.Context, height string)
- func HandleAuditServers(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleAuthorities(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleChainHead(ctx *web.Context, chainid string)
- func HandleCommitChain(ctx *web.Context)
- func HandleCommitEntry(ctx *web.Context)
- func HandleConfig(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleCurrentMinute(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleDBlockByHeight(ctx *web.Context, height string)
- func HandleDebug(ctx *web.Context)
- func HandleDebugRequest(state interfaces.IState, j *primitives.JSON2Request) (*primitives.JSON2Response, *primitives.JSONError)
- func HandleDelay(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleDirectoryBlock(ctx *web.Context, hashkey string)
- func HandleDirectoryBlockHead(ctx *web.Context)
- func HandleDirectoryBlockHeight(ctx *web.Context)
- func HandleDropRate(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleECBlockByHeight(ctx *web.Context, height string)
- func HandleEntry(ctx *web.Context, hashkey string)
- func HandleEntryBlock(ctx *web.Context, hashkey string)
- func HandleEntryCreditBalance(ctx *web.Context, address string)
- func HandleFBlockByHeight(ctx *web.Context, height string)
- func HandleFactoidBalance(ctx *web.Context, address string)
- func HandleFactoidSubmit(ctx *web.Context)
- func HandleFedServers(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleGetFee(ctx *web.Context)
- func HandleGetRaw(ctx *web.Context, hashkey string)
- func HandleGetReceipt(ctx *web.Context, hashkey string)
- func HandleHeights(ctx *web.Context)
- func HandleHoldingQueue(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleMessageFilter(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleMessages(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleNetworkInfo(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandlePredictiveFER(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleProcessList(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleProperties(ctx *web.Context)
- func HandleReloadConfig(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleRevealChain(ctx *web.Context)
- func HandleRevealEntry(ctx *web.Context)
- func HandleSetDelay(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleSetDropRate(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleSimControl(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleSummary(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2(ctx *web.Context)
- func HandleV2ABlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2ACKWithChain(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2AdminBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Anchors(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2ChainHead(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2CommitChain(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2CommitEntry(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2CurrentMinute(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2DBlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Diagnostics(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2DirectoryBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2DirectoryBlockHead(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2ECBlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Entry(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2EntryACK(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2EntryBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2EntryCreditBalance(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2EntryCreditBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2EntryCreditRate(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Error(ctx *web.Context, j *primitives.JSON2Request, err *primitives.JSONError)
- func HandleV2FBlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2FactoidACK(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2FactoidBalance(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2FactoidBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2FactoidSubmit(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2GetPendingEntries(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2GetPendingTransactions(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2GetTranasction(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Heights(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2MultipleECBalances(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2MultipleFCTBalances(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Properties(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2RawData(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Receipt(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2Request(state interfaces.IState, j *primitives.JSON2Request) (*primitives.JSON2Response, *primitives.JSONError)
- func HandleV2RevealChain(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2RevealEntry(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2SendRawMessage(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func HandleV2TransactionRate(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
- func InitLogs(logPath, logLevel string)
- func MapToObject(source interface{}, dst interface{}) error
- func NewBlockNotFoundError() *primitives.JSONError
- func NewCustomInternalError(data interface{}) *primitives.JSONError
- func NewCustomInvalidParamsError(data interface{}) *primitives.JSONError
- func NewEntryNotFoundError() *primitives.JSONError
- func NewInternalDatabaseError() *primitives.JSONError
- func NewInternalError() *primitives.JSONError
- func NewInvalidAddressError() *primitives.JSONError
- func NewInvalidCommitChainError() *primitives.JSONError
- func NewInvalidCommitEntryError() *primitives.JSONError
- func NewInvalidDataPassedError() *primitives.JSONError
- func NewInvalidEntryError() *primitives.JSONError
- func NewInvalidHashError() *primitives.JSONError
- func NewInvalidParamsError() *primitives.JSONError
- func NewInvalidRequestError() *primitives.JSONError
- func NewInvalidTransactionError() *primitives.JSONError
- func NewMethodNotFoundError() *primitives.JSONError
- func NewMissingChainHeadError() *primitives.JSONError
- func NewObjectNotFoundError() *primitives.JSONError
- func NewParseError() *primitives.JSONError
- func NewReceiptError() *primitives.JSONError
- func NewRepeatCommitError(data interface{}) *primitives.JSONError
- func NewUnableToDecodeTransactionError() *primitives.JSONError
- func RegisterPrometheus()
- func SetState(state interfaces.IState)
- func Start(state interfaces.IState)
- func Stop(state interfaces.IState)
- type AckRequest
- type AddressRequest
- type AnchorsResponse
- type AuditStatus
- type AuthSet
- type BitcoinAnchorResponse
- type BlockHeightResponse
- type CHead
- type ChainHeadResponse
- type ChainIDRequest
- type CommitChainResponse
- type CommitEntryResponse
- type CurrentMinuteResponse
- type DBHead
- type DBlock
- type DiagnosticsResponse
- type DirectoryBlockHeadResponse
- type DirectoryBlockResponse
- type EBlock
- type EBlockAddr
- type ElectionInfo
- type EntryAckWithChainRequest
- type EntryAddr
- type EntryBlockResponse
- type EntryCreditBalanceResponse
- type EntryCreditBlockResponse
- type EntryCreditRateResponse
- type EntryRequest
- type EntryResponse
- type EntryStatus
- type EntryStruct
- type EthereumAnchorResponse
- type FactiodAccounts
- type FactoidBalance
- type FactoidBalanceResponse
- type FactoidSubmitResponse
- type FactoidTxStatus
- type GeneralTransactionData
- type GetCommands
- type HashRequest
- type HeightOrHashRequest
- type HeightRequest
- type HeightsResponse
- type JStruct
- type KeyMRRequest
- type KeyRequest
- type LeaderStatus
- type Malleated
- type MessageFilter
- type MessageRequest
- type MultipleECBalances
- type MultipleFTBalances
- type PendingEntry
- type PendingTransaction
- type PropertiesResponse
- type RawDataResponse
- type ReceiptRequest
- type ReceiptResponse
- type RepeatedEntryMessage
- type ReserveInfo
- type RevealChainResponse
- type RevealEntryResponse
- type SendRawMessageRequest
- type SendRawMessageResponse
- type SetDelayRequest
- type SetDropRateRequest
- type SyncInfo
- type TransactionRateResponse
- type TransactionRequest
- type TransactionResponse
Constants ¶
View Source
const ( AckStatusInvalid = "Invalid" AckStatusUnknown = "Unknown" AckStatusNotConfirmed = "NotConfirmed" AckStatusACK = "TransactionACK" AckStatus1Minute = "1Minute" AckStatusDBlockConfirmed = "DBlockConfirmed" )
View Source
const API_VERSION string = "2.0"
Variables ¶
View Source
var ( GensisFblockCall = prometheus.NewCounter(prometheus.CounterOpts{ Name: "dcnt_wsapi_v2_gensis_fblock_count", Help: "Number of times the gensis Fblock is asked for", }) HandleV2APICallGeneral = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_general_call_ns", Help: "Time it takes to compelete a call", }) HandleV2APICallChainHead = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_chainhead_ns", Help: "Time it takes to compelete a chainhead", }) HandleV2APICallCommitChain = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_commitchain_ns", Help: "Time it takes to compelete a commithcain", }) HandleV2APICallCommitEntry = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_commitentry_ns", Help: "Time it takes to compelete a commitentry", }) HandleV2APICallDBlock = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_dblock_ns", Help: "Time it takes to compelete a dblock", }) HandleV2APICallDBlockHead = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_dblockhead_ns", Help: "Time it takes to compelete a dblockhead", }) HandleV2APICallEblock = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_eblock_ns", Help: "Time it takes to compelete a eblock", }) HandleV2APICallAblock = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_ablock_ns", Help: "Time it takes to compelete a eblock", }) HandleV2APICallEntry = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_entry_ns", Help: "Time it takes to compelete an entry", }) HandleV2APICallECBal = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_ecbal_ns", Help: "Time it takes to compelete a ecbal", }) HandleV2APICallECRate = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_ecrate_ns", Help: "Time it takes to compelete a ecrate", }) HandleV2APICallFABal = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_fabal_ns", Help: "Time it takes to compelete a fabal", }) HandleV2APICallFctTx = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_fcttx_ns", Help: "Time it takes to compelete a fcttx", }) HandleV2APICallHeights = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_heights_ns", Help: "Time it takes to compelete a heights", }) HandleV2APICallCurrentMinute = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_minute_ns", Help: "Time it takes to compelete a minute", }) HandleV2APICallProp = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_prop_ns", Help: "Time it takes to compelete a prop", }) HandleV2APICallRawData = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_rawdata_ns", Help: "Time it takes to compelete a rawdata", }) HandleV2APICallAnchors = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_anchors_ns", Help: "Time it takes to compelete a ", }) HandleV2APICallReceipt = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_receipt_ns", Help: "Time it takes to compelete a ", }) HandleV2APICallRevealEntry = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_reventry_ns", Help: "Time it takes to compelete a revealentry", }) HandleV2APICallFctAck = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_fctack_ns", Help: "Time it takes to compelete a fctack", }) HandleV2APICallEntryAck = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_entryack_ns", Help: "Time it takes to compelete a entryack", }) HandleV2APICall = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call__ns", Help: "Time it takes to compelete a ", }) HandleV2APICallPendingEntries = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_pendingentries_ns", Help: "Time it takes to compelete a pendingentries", }) HandleV2APICallPendingTxs = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_pendingtxs_ns", Help: "Time it takes to compelete a pendingtxs", }) HandleV2APICallSendRaw = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_sendraw_ns", Help: "Time it takes to compelete a sendraw", }) HandleV2APICallTransaction = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_tx_ns", Help: "Time it takes to compelete a tx", }) HandleV2APICallDBlockByHeight = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_dblockbyheight_ns", Help: "Time it takes to compelete a dblockbyheight", }) HandleV2APICallECBlockByHeight = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_ecblockbyheight_ns", Help: "Time it takes to compelete a ecblockbyheight", }) HandleV2APICallECBlock = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_ecblock_ns", Help: "Time it takes to compelete a ecblock", }) HandleV2APICallFblockByHeight = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_fblockbyheight_ns", Help: "Time it takes to compelete a fblockbyheight", }) HandleV2APICallFblock = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_fblock_ns", Help: "Time it takes to compelete a fblock", }) HandleV2APICallABlockByHeight = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_ablockbyheight_ns", Help: "Time it takes to compelete a ablockbyheight", }) HandleV2APICallAuthorities = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_auths_ns", Help: "Time it takes to compelete an auths ", }) HandleV2APICallTpsRate = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "dcnt_wsapi_v2_api_call_tpsrate_ns", Help: "Time it takes to compelete a tpsrate", }) )
View Source
var Servers map[int]*web.Server
View Source
var ServersMutex sync.Mutex
Functions ¶
func ECBlockToResp ¶
func ECBlockToResp(block interfaces.IEntryCreditBlock) (interface{}, *primitives.JSONError)
func HandleABlockByHeight ¶
func HandleAuditServers ¶
func HandleAuditServers( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleAuthorities ¶
func HandleAuthorities( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleChainHead ¶
func HandleCommitChain ¶
func HandleCommitEntry ¶
func HandleConfig ¶
func HandleConfig( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleCurrentMinute ¶
func HandleCurrentMinute( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleDBlockByHeight ¶
func HandleDebug ¶
func HandleDebugRequest ¶
func HandleDebugRequest( state interfaces.IState, j *primitives.JSON2Request, ) ( *primitives.JSON2Response, *primitives.JSONError, )
func HandleDelay ¶
func HandleDelay( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleDirectoryBlock ¶
func HandleDropRate ¶
func HandleDropRate( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleECBlockByHeight ¶
func HandleEntry ¶
func HandleEntryBlock ¶
func HandleFBlockByHeight ¶
func HandleFactoidBalance ¶
func HandleFactoidSubmit ¶
func HandleFedServers ¶
func HandleFedServers( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleGetFee ¶
func HandleGetRaw ¶
func HandleGetReceipt ¶
func HandleHeights ¶
func HandleHoldingQueue ¶
func HandleHoldingQueue( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleMessageFilter ¶
func HandleMessageFilter(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleMessages ¶
func HandleMessages( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleNetworkInfo ¶
func HandleNetworkInfo( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandlePredictiveFER ¶
func HandlePredictiveFER( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleProcessList ¶
func HandleProcessList( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleProperties ¶
func HandleReloadConfig ¶
func HandleReloadConfig( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleRevealChain ¶
func HandleRevealEntry ¶
func HandleSetDelay ¶
func HandleSetDelay( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleSetDropRate ¶
func HandleSetDropRate( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleSimControl ¶
func HandleSimControl(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleSummary ¶
func HandleSummary( state interfaces.IState, params interface{}, ) ( interface{}, *primitives.JSONError, )
func HandleV2ABlockByHeight ¶
func HandleV2ABlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2ACKWithChain ¶
func HandleV2ACKWithChain(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
HandleV2ACKWithChain is the ack call with a given chainID. The chainID serves as a directive on what type of hash we are given, and we can act appropriately.
func HandleV2AdminBlock ¶
func HandleV2AdminBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Anchors ¶
func HandleV2Anchors(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2ChainHead ¶
func HandleV2ChainHead(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2CommitChain ¶
func HandleV2CommitChain(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2CommitEntry ¶
func HandleV2CommitEntry(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2CurrentMinute ¶
func HandleV2CurrentMinute(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2DBlockByHeight ¶
func HandleV2DBlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Diagnostics ¶
func HandleV2Diagnostics(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2DirectoryBlock ¶
func HandleV2DirectoryBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2DirectoryBlockHead ¶
func HandleV2DirectoryBlockHead(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2ECBlockByHeight ¶
func HandleV2ECBlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Entry ¶
func HandleV2Entry(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2EntryACK ¶
func HandleV2EntryACK(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2EntryBlock ¶
func HandleV2EntryBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2EntryCreditBalance ¶
func HandleV2EntryCreditBalance(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2EntryCreditBlock ¶
func HandleV2EntryCreditBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2EntryCreditRate ¶
func HandleV2EntryCreditRate(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Error ¶
func HandleV2Error(ctx *web.Context, j *primitives.JSON2Request, err *primitives.JSONError)
func HandleV2FBlockByHeight ¶
func HandleV2FBlockByHeight(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2FactoidACK ¶
func HandleV2FactoidACK(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2FactoidBalance ¶
func HandleV2FactoidBalance(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2FactoidBlock ¶
func HandleV2FactoidBlock(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2FactoidSubmit ¶
func HandleV2FactoidSubmit(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2GetPendingEntries ¶
func HandleV2GetPendingEntries(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2GetPendingTransactions ¶
func HandleV2GetPendingTransactions(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2GetTranasction ¶
func HandleV2GetTranasction(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Heights ¶
func HandleV2Heights(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2MultipleECBalances ¶
func HandleV2MultipleECBalances(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2MultipleFCTBalances ¶
func HandleV2MultipleFCTBalances(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Properties ¶
func HandleV2Properties(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2RawData ¶
func HandleV2RawData(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Receipt ¶
func HandleV2Receipt(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2Request ¶
func HandleV2Request(state interfaces.IState, j *primitives.JSON2Request) (*primitives.JSON2Response, *primitives.JSONError)
func HandleV2RevealChain ¶
func HandleV2RevealChain(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2RevealEntry ¶
func HandleV2RevealEntry(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2SendRawMessage ¶
func HandleV2SendRawMessage(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func HandleV2TransactionRate ¶
func HandleV2TransactionRate(state interfaces.IState, params interface{}) (interface{}, *primitives.JSONError)
func MapToObject ¶
func MapToObject(source interface{}, dst interface{}) error
func NewBlockNotFoundError ¶
func NewBlockNotFoundError() *primitives.JSONError
http://www.jsonrpc.org/specification : -32000 to -32099 error codes are reserved for implementation-defined server-errors.
func NewCustomInternalError ¶
func NewCustomInternalError(data interface{}) *primitives.JSONError
*****************************************************************
func NewCustomInvalidParamsError ¶
func NewCustomInvalidParamsError(data interface{}) *primitives.JSONError
func NewEntryNotFoundError ¶
func NewEntryNotFoundError() *primitives.JSONError
func NewInternalDatabaseError ¶
func NewInternalDatabaseError() *primitives.JSONError
func NewInternalError ¶
func NewInternalError() *primitives.JSONError
func NewInvalidAddressError ¶
func NewInvalidAddressError() *primitives.JSONError
func NewInvalidCommitChainError ¶
func NewInvalidCommitChainError() *primitives.JSONError
func NewInvalidCommitEntryError ¶
func NewInvalidCommitEntryError() *primitives.JSONError
func NewInvalidDataPassedError ¶
func NewInvalidDataPassedError() *primitives.JSONError
func NewInvalidEntryError ¶
func NewInvalidEntryError() *primitives.JSONError
func NewInvalidHashError ¶
func NewInvalidHashError() *primitives.JSONError
func NewInvalidParamsError ¶
func NewInvalidParamsError() *primitives.JSONError
func NewInvalidRequestError ¶
func NewInvalidRequestError() *primitives.JSONError
func NewInvalidTransactionError ¶
func NewInvalidTransactionError() *primitives.JSONError
func NewMethodNotFoundError ¶
func NewMethodNotFoundError() *primitives.JSONError
func NewMissingChainHeadError ¶
func NewMissingChainHeadError() *primitives.JSONError
func NewObjectNotFoundError ¶
func NewObjectNotFoundError() *primitives.JSONError
func NewParseError ¶
func NewParseError() *primitives.JSONError
func NewReceiptError ¶
func NewReceiptError() *primitives.JSONError
func NewRepeatCommitError ¶
func NewRepeatCommitError(data interface{}) *primitives.JSONError
func NewUnableToDecodeTransactionError ¶
func NewUnableToDecodeTransactionError() *primitives.JSONError
func RegisterPrometheus ¶
func RegisterPrometheus()
RegisterPrometheus registers the variables to be exposed. This can only be run once, hence the boolean flag to prevent panics if launched more than once. This is called in NetStart
func SetState ¶
func SetState(state interfaces.IState)
func Start ¶
func Start(state interfaces.IState)
func Stop ¶
func Stop(state interfaces.IState)
Types ¶
type AckRequest ¶
type AddressRequest ¶
type AddressRequest struct {
Address string `json:"address"`
}
type AnchorsResponse ¶
type AnchorsResponse struct { Height uint32 `json:"directoryblockheight"` KeyMR string `json:"directoryblockkeymr"` Bitcoin interface{} `json:"bitcoin"` Ethereum interface{} `json:"ethereum"` }
For each chain: false or chain specific anchor response
type AuditStatus ¶
type AuthSet ¶
type AuthSet struct { Leaders []LeaderStatus `json:"leaders"` Audits []AuditStatus `json:"audits"` }
type BitcoinAnchorResponse ¶
type BlockHeightResponse ¶
type ChainHeadResponse ¶
type ChainIDRequest ¶
type ChainIDRequest struct {
ChainID string `json:"chainid"`
}
type CommitChainResponse ¶
type CommitEntryResponse ¶
type CurrentMinuteResponse ¶
type CurrentMinuteResponse struct { LeaderHeight int64 `json:"leaderheight"` DirectoryBlockHeight int64 `json:"directoryblockheight"` Minute int64 `json:"minute"` CurrentBlockStartTime int64 `json:"currentblockstarttime"` CurrentMinuteStartTime int64 `json:"currentminutestarttime"` CurrentTime int64 `json:"currenttime"` DirectoryBlockInSeconds int64 `json:"directoryblockinseconds"` StallDetected bool `json:"stalldetected"` FaultTimeOut int64 `json:"faulttimeout"` RoundTimeOut int64 `json:"roundtimeout"` }
type DBlock ¶
type DBlock struct { Header struct { PrevBlockKeyMR string `json:"prevblockkeymr"` SequenceNumber int64 `json:"sequencenumber"` Timestamp int64 `json:"timestamp"` } `json:"header"` EntryBlockList []EBlockAddr `json:"entryblocklist"` }
func (*DBlock) JSONString ¶
type DiagnosticsResponse ¶
type DiagnosticsResponse struct { Name string `json:"name"` ID string `json:"id,omitempty"` PublicKey string `json:"publickey,omitempty"` Role string `json:"role"` LeaderHeight uint32 `json:"leaderheight"` CurrentMinute int `json:"currentminute"` CurrentMinuteDuration int64 `json:"currentminuteduration"` PrevMinuteDuration int64 `json:"previousminuteduration"` BalanceHash string `json:"balancehash"` TempBalanceHash string `json:"tempbalancehash"` LastBlockFromDBState bool `json:"lastblockfromdbstate"` SyncInfo *SyncInfo `json:"syncing"` AuthSet *AuthSet `json:"authset"` ElectionInfo *ElectionInfo `json:"elections"` }
type DirectoryBlockHeadResponse ¶
type DirectoryBlockHeadResponse struct {
KeyMR string `json:"keymr"`
}
type DirectoryBlockResponse ¶
type DirectoryBlockResponse struct { Header struct { PrevBlockKeyMR string `json:"prevblockkeymr"` SequenceNumber int64 `json:"sequencenumber"` Timestamp int64 `json:"timestamp"` } `json:"header"` EntryBlockList []EBlockAddr `json:"entryblocklist"` }
type EBlock ¶
type EBlock struct { Header struct { BlockSequenceNumber int64 `json:"blocksequencenumber"` ChainID string `json:"chainid"` PrevKeyMR string `json:"prevkeymr"` Timestamp int64 `json:"timestamp"` DBHeight int64 `json:"dbheight"` } `json:"header"` EntryList []EntryAddr `json:"entrylist"` }
func (*EBlock) JSONString ¶
type EBlockAddr ¶
type ElectionInfo ¶
type EntryBlockResponse ¶
type EntryBlockResponse struct { Header struct { BlockSequenceNumber int64 `json:"blocksequencenumber"` ChainID string `json:"chainid"` PrevKeyMR string `json:"prevkeymr"` Timestamp int64 `json:"timestamp"` DBHeight int64 `json:"dbheight"` } `json:"header"` EntryList []EntryAddr `json:"entrylist"` }
type EntryCreditBalanceResponse ¶
type EntryCreditBalanceResponse struct {
Balance int64 `json:"balance"`
}
type EntryCreditBlockResponse ¶
type EntryCreditBlockResponse struct { ECBlock struct { Header interfaces.IECBlockHeader `json:"header"` Body interfaces.IECBlockBody `json:"body"` HeaderHash interfaces.IHash `json:"headerhash"` FullHash interfaces.IHash `json:"fullhash"` } `json:"ecblock"` RawData string `json:"rawdata"` }
type EntryCreditRateResponse ¶
type EntryCreditRateResponse struct {
Rate int64 `json:"rate"`
}
type EntryRequest ¶
type EntryRequest struct {
Entry string `json:"entry"`
}
type EntryResponse ¶
type EntryStatus ¶
type EntryStatus struct { CommitTxID string `json:"committxid"` EntryHash string `json:"entryhash"` CommitData GeneralTransactionData `json:"commitdata"` EntryData GeneralTransactionData `json:"entrydata"` ReserveTransactions []ReserveInfo `json:"reserveinfo,omitempty"` ConflictingRevealEntryHashes []string `json:"conflictingrevealentryhashes,omitempty"` }
type EntryStruct ¶
type EntryStruct struct { ChainID string `json:"chainid"` Content string `json:"content"` ExtIDs []string `json:"extids"` }
func (*EntryStruct) JSONString ¶
func (e *EntryStruct) JSONString() (string, error)
type EthereumAnchorResponse ¶
type EthereumAnchorResponse struct { RecordHeight int64 `json:"recordheight"` DBHeightMax int64 `json:"dbheightmax"` DBHeightMin int64 `json:"dbheightmin"` WindowMR string `json:"windowmr"` MerkleBranch []*primitives.MerkleNode `json:"merklebranch"` ContractAddress string `json:"contractaddress"` TxID string `json:"txid"` BlockHash string `json:"blockhash"` TxIndex int64 `json:"txindex"` }
type FactiodAccounts ¶
type FactoidBalance ¶
type FactoidBalanceResponse ¶
type FactoidBalanceResponse struct {
Balance int64 `json:"balance"`
}
type FactoidSubmitResponse ¶
type FactoidTxStatus ¶
type FactoidTxStatus struct { TxID string `json:"txid"` GeneralTransactionData }
type GeneralTransactionData ¶
type GeneralTransactionData struct { TransactionDate int64 `json:"transactiondate,omitempty"` //Unix time TransactionDateString string `json:"transactiondatestring,omitempty"` //ISO8601 time BlockDate int64 `json:"blockdate,omitempty"` //Unix time BlockDateString string `json:"blockdatestring,omitempty"` //ISO8601 time Malleated *Malleated `json:"malleated,omitempty"` Status string `json:"status"` }
type GetCommands ¶
type GetCommands struct {
Commands []string `json:"commands"`
}
type HashRequest ¶
type HashRequest struct {
Hash string `json:"hash"`
}
type HeightOrHashRequest ¶
type HeightRequest ¶
type HeightRequest struct {
Height int64 `json:"height"`
}
type HeightsResponse ¶
type HeightsResponse struct { DirectoryBlockHeight int64 `json:"directoryblockheight"` LeaderHeight int64 `json:"leaderheight"` EntryBlockHeight int64 `json:"entryblockheight"` EntryHeight int64 `json:"entryheight"` MissingEntryCount int64 `json:"-"` EntryBlockDBHeightProcessing int64 `json:"-"` EntryBlockDBHeightComplete int64 `json:"-"` }
type JStruct ¶
type JStruct struct {
// contains filtered or unexported fields
}
func ObjectToJStruct ¶
func (*JStruct) MarshalJSON ¶
func (*JStruct) UnmarshalJSON ¶
type KeyMRRequest ¶
type KeyMRRequest struct {
KeyMR string `json:"keymr"`
}
type KeyRequest ¶
type KeyRequest struct {
Key string `json:"key"`
}
type LeaderStatus ¶
type MessageFilter ¶
type MessageFilter struct {
Params string `json:"params"`
}
type MessageRequest ¶
type MessageRequest struct {
Message string `json:"message"`
}
type MultipleECBalances ¶
type MultipleFTBalances ¶
type PendingEntry ¶
type PendingEntry struct { EntryHash interfaces.IHash `json:"entryhash"` ChainID interfaces.IHash `json:"chainid"` Status string `json:"status"` }
type PendingTransaction ¶
type PendingTransaction struct { TransactionID interfaces.IHash `json:"transactionid"` Status string `json:"status"` }
type PropertiesResponse ¶
type PropertiesResponse struct { ApiVersion string `json:"dcntapiversion"` // contains filtered or unexported fields }
type RawDataResponse ¶
type RawDataResponse struct {
Data string `json:"data"`
}
type ReceiptRequest ¶
type ReceiptRequest struct { EntryHash string `json:"hash"` IncludeRawEntry bool `json:"includerawentry"` }
TODO: kept as "hash" for backwards compatibility (receipt call used to use the HashRequest),
but in API v3 this should specify that its an entry hash
type ReceiptResponse ¶
type RepeatedEntryMessage ¶
type ReserveInfo ¶
type RevealChainResponse ¶
type RevealChainResponse struct { }
type RevealEntryResponse ¶
type SendRawMessageRequest ¶
type SendRawMessageRequest struct {
Message string `json:"message"`
}
type SendRawMessageResponse ¶
type SendRawMessageResponse struct {
Message string `json:"message"`
}
type SetDelayRequest ¶
type SetDelayRequest struct {
Delay int64 `json:"delay"`
}
type SetDropRateRequest ¶
type SetDropRateRequest struct {
DropRate int `json:"droprate"`
}
type TransactionRateResponse ¶
type TransactionRequest ¶
type TransactionRequest struct {
Transaction string `json:"transaction"`
}
type TransactionResponse ¶
type TransactionResponse struct { ECTranasction interfaces.IECBlockEntry `json:"ectransaction,omitempty"` FactoidTransaction interfaces.ITransaction `json:"factoidtransaction,omitempty"` Entry interfaces.IEBEntry `json:"entry,omitempty"` //F/EC/E block the transaction is included in IncludedInTransactionBlock string `json:"includedintransactionblock"` //DirectoryBlock the tranasction is included in IncludedInDirectoryBlock string `json:"includedindirectoryblock"` //The DBlock height IncludedInDirectoryBlockHeight int64 `json:"includedindirectoryblockheight"` }
Click to show internal directories.
Click to hide internal directories.