API Documentation
The Beerscoin Explorer provides access to the Beerscoin blockchain through a set of RPC commands.
New REST API Available!
We now provide a modern REST API for accessing blockchain data. This API is designed for public use and follows REST principles.
Our new REST API provides standardized access to blockchain data including statistics, blocks, transactions, and address information.
REST API Endpoints
Modern REST API for accessing blockchain data
The main REST API endpoint is /api/blockchain/data which provides access to various blockchain data.
Query Parameters
type- Type of data to fetch (blocks, transactions, address, stats)limit- Number of items to return (max: 100)offset- Offset for paginationaddress- Address to fetch data for (required for type=address)height- Block height (for type=blocks with specific height)hash- Transaction or block hash (for type=transactions or type=blocks)
Examples
/api/blockchain/data?type=stats- Get blockchain statistics/api/blockchain/data?type=blocks&limit=10- Get the latest 10 blocks/api/blockchain/data?type=transactions&hash=txid- Get a specific transaction/api/blockchain/data?type=address&address=BNDJwbYrgxdi2ZQTbLzagsi8CBAq9QzZTP- Get address information
Blockchain Commands
Commands for interacting with the blockchain
getbestblockhash- Returns the hash of the best (tip) block in the longest blockchaingetblock "blockhash" ( verbosity )- Returns information about a blockgetblockchaininfo- Returns an object containing various state info regarding blockchain processinggetblockcount- Returns the number of blocks in the longest blockchaingetblockhash height- Returns hash of block in best-block-chain at height providedgetblockheader "hash" ( verbose )- Returns information about a block headergetblockstats hash ( stats )- Compute per block statistics for a given windowgetchaintips- Return information about all known tips in the block treegetcoincount- Returns the total number of coins in the blockchaingetdifficulty- Returns the proof-of-work difficulty as a multiple of the minimum difficultygetmempoolancestors txid (verbose)- Returns all in-mempool ancestors for a transactiongetmempooldescendants txid (verbose)- Returns all in-mempool descendants for a transactiongetmempoolentry txid- Returns mempool data for given transactiongetmempoolinfo- Returns details on the active state of the TX memory poolgetrawmempool ( verbose )- Returns all transaction ids in memory poolgettxout "txid" n ( include_mempool )- Returns details about an unspent transaction outputgettxoutproof ["txid",...] ( blockhash )- Returns a hex-encoded proof that "txid" was included in a blockgettxoutsetinfo- Returns statistics about the unspent transaction output setpreciousblock "blockhash"- Treats a block as if it were received before others with the same workpruneblockchain- Prunes the blockchain up to a specified height or timestampverifychain ( checklevel nblocks )- Verifies blockchain databaseverifytxoutproof "proof"- Verifies that a proof points to a transaction in a block
Mining Commands
Commands for mining operations
createauxblock <address>- Create a new auxiliary block for mininggetauxblock (hash auxpow)- Get auxiliary block informationgetblocktemplate ( TemplateRequest )- Returns data needed to construct a block to work ongetmininginfo- Returns a json object containing mining-related informationgetnetworkhashps ( nblocks height )- Returns the estimated network hashes per secondprioritisetransaction <txid> <priority delta> <fee delta>- Accepts the transaction into mined blocks at a higher (or lower) prioritysubmitauxblock <hash> <auxpow>- Submit auxiliary proof-of-work solution to the networksubmitblock "hexdata" ( "jsonparametersobject" )- Attempts to submit new block to network
Network Commands
Commands for network operations
addnode "node" "add|remove|onetry"- Attempts to add or remove a node from the addnode listclearbanned- Clear all banned IPsdisconnectnode "address"- Immediately disconnects from the specified nodegetaddednodeinfo ( "node" )- Returns information about the given added nodegetconnectioncount- Returns the number of connections to other nodesgetnettotals- Returns information about network trafficgetnetworkinfo- Returns an object containing various state info regarding P2P networkinggetpeerinfo- Returns data about each connected network nodelistbanned- List all banned IPs/Subnetsping- Requests that a ping be sent to all other nodessetban "subnet" "add|remove" (bantime) (absolute)- Attempts to add or remove an IP/Subnet from the banned listsetmaxconnections- Set the maximum number of connectionssetnetworkactive true|false- Disable/enable all p2p network activity