github:onion-monero-blockchain-explorer
Onion Monero Blockchain Explorer特点:
• 没有cookie,没有网络分析跟踪器,没有image,
• 开源,
• 完全用C++编写,
• 显示加密的付款 ID,
• 显示环签名,
• 显示交易额外字段,
• 显示门罗币地址的公共部分,
• 解码哪些输出和混合属于给定的门罗币地址和视图密钥,
• 可以证明您将门罗币发送给某人,
• 有关戒指成员的详细信息,例如年龄、时间范围和戒指尺寸,
• 显示数量输出指数,
• 支持 Monero 测试网和 stagnet 网络,
• 用于在线推送交易的交易检查器和推送器,
• 根据地址和视图密钥估计可能的支出,
• 可以提供所有矿工费的总额,
• 解码加密的支付ID,
• 解码输出并证明发送到子地址的交易。
linux ubuntu22.04
首先要下载并编译最新的monerod
一旦门罗币编译完成,就可以下载并编译浏览器:
cpp
# go to home folder if still in ~/monero
cd ~
# download the source code
git clone https://github.com/moneroexamples/onion-monero-blockchain-explorer.git
# enter the downloaded sourced code folder
cd onion-monero-blockchain-explorer
# make a build folder and enter it
mkdir build && cd build
# create the makefile
cmake ..
# compile
make
cmake可能提示错误:Monero libraries not found in:/xxx/xx/xxx
这时候打开CMakeCache.txt修改路径
修改MONERO_BUILD_DIR:PATH和MONWEO_SOURCE_DIR:PATH
修改到你自己.../monero的位置和.../monero/build/release文件夹位置
cpp
cmake ..
cpp
make
run
cpp
./xmrblocks
就可以访问127.0.0.1:8081
浏览器有 JSON api。默认情况下,API 是禁用的。要启用它,请使用--enable-json-api标志,例如
cpp
./xmrblocks --enable-json-api
api/transaction/<tx_hash>
cpp
curl -w "\n" -X GET "http://127.0.0.1:8081/api/transaction/6093260dbe79fd6277694d14789dc8718f1bd54457df8bab338c2efa3bb0f03d"
Partial results shown:
cpp
{
"data": {
"block_height": 1268252,
"coinbase": false,
"confirmations": 1057855,
"current_height": 2326107,
"extra": "01be23e277aed6b5f41f66b05244bf994c13108347366ec678ae16657f0fc3a22b",
"inputs": [
{
"amount": 0,
"key_image": "67838fd0ffd79f13e735830d3ec60412aed59e53e1f997feb6f73d088b949611",
"mixins": [
{
"block_no": 1238623,
"public_key": "0a5b853c55303c10e1326acfb085b9e246e088b1ccac7e37f7a810d46a28a914",
"tx_hash": "686555fb053dd53f6f9eb79449e2bdcd377221f823f508158d70d4a1966fe955"
},
{
"block_no": 1246942,
"public_key": "527cf86f5abbfb006c970f7c6eb40493786d4751306f8985c6a43f98a88c0dff",
"tx_hash": "4fa1999f9e0d2ad031dbe5594f2e8336651b6cad19dd3cee7980a01c47600f91"
}
]
}
],
"mixin": 9,
"outputs": [
{
"amount": 0,
"public_key": "525779873776e4a42f517fd79b72e7c31c3ba03e730fc32287f6414fb702c1d7"
},
{
"amount": 0,
"public_key": "e25f00fceb77af841d780b68647618812695b4ca6ebe338faba6e077f758ac30"
}
],
"payment_id": "",
"payment_id8": "",
"rct_type": 1,
"timestamp": 1489753456,
"timestamp_utc": "2017-03-17 12:24:16",
"tx_fee": 12517785574,
"tx_hash": "6093260dbe79fd6277694d14789dc8718f1bd54457df8bab338c2efa3bb0f03d",
"tx_size": 13323,
"tx_version": 2,
"xmr_inputs": 0,
"xmr_outputs": 0
},
"status": "success"
}
api/transactions
Transactions in last 25 blocks:
cpp
curl -w "\n" -X GET "http://127.0.0.1:8081/api/transactions"
Partial results shown:
cpp
{
"data": {
"blocks": [
{
"age": "33:16:49:53",
"height": 1268252,
"size": 105390000000000000,
"timestamp": 1489753456,
"timestamp_utc": "2017-03-17 12:24:16",
"txs": [
{
"coinbase": true,
"mixin": 0,
"outputs": 8491554678365,
"rct_type": 0,
"tx_fee": 0,
"tx_hash": "7c4286f64544568265bb5418df84ae69afaa3567749210e46f8340c247f4803f",
"tx_size": 151000000000000,
"tx_version": 2
},
{
"coinbase": false,
"mixin": 5,
"outputs": 0,
"rct_type": 2,
"tx_fee": 17882516700,
"tx_hash": "2bfbccb918ee5f050808dd040ce03943b7315b81788e9cdee59cf86b557ba48c",
"tx_size": 19586000000000000,
"tx_version": 2
}
]
}
],
"limit": 25,
"page": 0
},
"status": "success"
}
其他示例参考github