@ -17,46 +17,46 @@ func (env *Environment) GetRoutes() RoutesMap {
"unsubscribe_all" : rpc . NewWSRPCFunc ( env . UnsubscribeAll , "" ) ,
"unsubscribe_all" : rpc . NewWSRPCFunc ( env . UnsubscribeAll , "" ) ,
// info API
// info API
"health" : rpc . NewRPCFunc ( env . Health , "" , false ) ,
"status" : rpc . NewRPCFunc ( env . Status , "" , false ) ,
"net_info" : rpc . NewRPCFunc ( env . NetInfo , "" , false ) ,
"blockchain" : rpc . NewRPCFunc ( env . BlockchainInfo , "minHeight,maxHeight" , true ) ,
"genesis" : rpc . NewRPCFunc ( env . Genesis , "" , true ) ,
"genesis_chunked" : rpc . NewRPCFunc ( env . GenesisChunked , "chunk" , true ) ,
"header" : rpc . NewRPCFunc ( env . Header , "height" , true ) ,
"header_by_hash" : rpc . NewRPCFunc ( env . HeaderByHash , "hash" , true ) ,
"block" : rpc . NewRPCFunc ( env . Block , "height" , true ) ,
"block_by_hash" : rpc . NewRPCFunc ( env . BlockByHash , "hash" , true ) ,
"block_results" : rpc . NewRPCFunc ( env . BlockResults , "height" , true ) ,
"commit" : rpc . NewRPCFunc ( env . Commit , "height" , true ) ,
"check_tx" : rpc . NewRPCFunc ( env . CheckTx , "tx" , true ) ,
"remove_tx" : rpc . NewRPCFunc ( env . RemoveTx , "txkey" , false ) ,
"tx" : rpc . NewRPCFunc ( env . Tx , "hash,prove" , true ) ,
"tx_search" : rpc . NewRPCFunc ( env . TxSearch , "query,prove,page,per_page,order_by" , false ) ,
"block_search" : rpc . NewRPCFunc ( env . BlockSearch , "query,page,per_page,order_by" , false ) ,
"validators" : rpc . NewRPCFunc ( env . Validators , "height,page,per_page" , true ) ,
"dump_consensus_state" : rpc . NewRPCFunc ( env . DumpConsensusState , "" , false ) ,
"consensus_state" : rpc . NewRPCFunc ( env . GetConsensusState , "" , false ) ,
"consensus_params" : rpc . NewRPCFunc ( env . ConsensusParams , "height" , true ) ,
"unconfirmed_txs" : rpc . NewRPCFunc ( env . UnconfirmedTxs , "limit" , false ) ,
"num_unconfirmed_txs" : rpc . NewRPCFunc ( env . NumUnconfirmedTxs , "" , false ) ,
"health" : rpc . NewRPCFunc ( env . Health , "" ) ,
"status" : rpc . NewRPCFunc ( env . Status , "" ) ,
"net_info" : rpc . NewRPCFunc ( env . NetInfo , "" ) ,
"blockchain" : rpc . NewRPCFunc ( env . BlockchainInfo , "minHeight,maxHeight" ) ,
"genesis" : rpc . NewRPCFunc ( env . Genesis , "" ) ,
"genesis_chunked" : rpc . NewRPCFunc ( env . GenesisChunked , "chunk" ) ,
"header" : rpc . NewRPCFunc ( env . Header , "height" ) ,
"header_by_hash" : rpc . NewRPCFunc ( env . HeaderByHash , "hash" ) ,
"block" : rpc . NewRPCFunc ( env . Block , "height" ) ,
"block_by_hash" : rpc . NewRPCFunc ( env . BlockByHash , "hash" ) ,
"block_results" : rpc . NewRPCFunc ( env . BlockResults , "height" ) ,
"commit" : rpc . NewRPCFunc ( env . Commit , "height" ) ,
"check_tx" : rpc . NewRPCFunc ( env . CheckTx , "tx" ) ,
"remove_tx" : rpc . NewRPCFunc ( env . RemoveTx , "txkey" ) ,
"tx" : rpc . NewRPCFunc ( env . Tx , "hash,prove" ) ,
"tx_search" : rpc . NewRPCFunc ( env . TxSearch , "query,prove,page,per_page,order_by" ) ,
"block_search" : rpc . NewRPCFunc ( env . BlockSearch , "query,page,per_page,order_by" ) ,
"validators" : rpc . NewRPCFunc ( env . Validators , "height,page,per_page" ) ,
"dump_consensus_state" : rpc . NewRPCFunc ( env . DumpConsensusState , "" ) ,
"consensus_state" : rpc . NewRPCFunc ( env . GetConsensusState , "" ) ,
"consensus_params" : rpc . NewRPCFunc ( env . ConsensusParams , "height" ) ,
"unconfirmed_txs" : rpc . NewRPCFunc ( env . UnconfirmedTxs , "limit" ) ,
"num_unconfirmed_txs" : rpc . NewRPCFunc ( env . NumUnconfirmedTxs , "" ) ,
// tx broadcast API
// tx broadcast API
"broadcast_tx_commit" : rpc . NewRPCFunc ( env . BroadcastTxCommit , "tx" , false ) ,
"broadcast_tx_sync" : rpc . NewRPCFunc ( env . BroadcastTxSync , "tx" , false ) ,
"broadcast_tx_async" : rpc . NewRPCFunc ( env . BroadcastTxAsync , "tx" , false ) ,
"broadcast_tx_commit" : rpc . NewRPCFunc ( env . BroadcastTxCommit , "tx" ) ,
"broadcast_tx_sync" : rpc . NewRPCFunc ( env . BroadcastTxSync , "tx" ) ,
"broadcast_tx_async" : rpc . NewRPCFunc ( env . BroadcastTxAsync , "tx" ) ,
// abci API
// abci API
"abci_query" : rpc . NewRPCFunc ( env . ABCIQuery , "path,data,height,prove" , false ) ,
"abci_info" : rpc . NewRPCFunc ( env . ABCIInfo , "" , true ) ,
"abci_query" : rpc . NewRPCFunc ( env . ABCIQuery , "path,data,height,prove" ) ,
"abci_info" : rpc . NewRPCFunc ( env . ABCIInfo , "" ) ,
// evidence API
// evidence API
"broadcast_evidence" : rpc . NewRPCFunc ( env . BroadcastEvidence , "evidence" , false ) ,
"broadcast_evidence" : rpc . NewRPCFunc ( env . BroadcastEvidence , "evidence" ) ,
}
}
}
}
// AddUnsafeRoutes adds unsafe routes.
// AddUnsafeRoutes adds unsafe routes.
func ( env * Environment ) AddUnsafe ( routes RoutesMap ) {
func ( env * Environment ) AddUnsafe ( routes RoutesMap ) {
// control API
// control API
routes [ "unsafe_flush_mempool" ] = rpc . NewRPCFunc ( env . UnsafeFlushMempool , "" , false )
routes [ "unsafe_flush_mempool" ] = rpc . NewRPCFunc ( env . UnsafeFlushMempool , "" )
}
}