API
JSON-RPC und REST-Schnittstellen
Orin Core bietet JSON-RPC- und REST-APIs für Blockchain-, Wallet- und Mempool-Operationen.
JSON-RPC
orindaktiviert JSON-RPC standardmäßig;orin-qtbenötigt-server.- Endpoints:
/und/wallet/<walletname>/. - Ports wie REST: mainnet 9998, testnet 19998 (überschreibbar via
rpcport).
curl --user alice --data-binary '{"jsonrpc":"1.0","id":"0","method":"getblockcount","params":[]}' \
-H 'content-type: text/plain;' http://127.0.0.1:9998/
Positionale, benannte und args-basierte Parameter werden unterstützt.
Vollständige RPC-Listen via
orin-cli help oder orin-cli help <command>.
REST API
REST wird mit -rest aktiviert. Ausgaben sind in bin,
hex und json verfügbar.
| Methode | Endpoint | Beschreibung |
|---|---|---|
| GET | /rest/tx/<TX-HASH>.<bin|hex|json> |
Transaktion aus dem Mempool (txindex=1 für bestätigte). |
| GET | /rest/block/<BLOCK-HASH>.<bin|hex|json> |
Vollständiger Block. |
| GET | /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json> |
Block ohne Transaktionsdetails. |
| GET | /rest/headers/<BLOCK-HASH>.<bin|hex|json>?count=<N> |
Block-Header ab Hash. |
| GET | /rest/blockfilterheaders/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>?count=<N> |
Header der Blockfilter. |
| GET | /rest/blockfilter/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json> |
Blockfilter für den Typ. |
| GET | /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json> |
Blockhash nach Höhe. |
| GET | /rest/chaininfo.json |
Chain-Status (getblockchaininfo). |
| GET | /rest/getutxos/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json> |
UTXO-Abfrage per Outpoint. |
| GET | /rest/getutxos/checkmempool/...<bin|hex|json> |
UTXO-Abfrage inkl. Mempool-Prüfung. |
| GET | /rest/mempool/info.json |
Mempool-Statistiken. |
| GET | /rest/mempool/contents.json |
Kompletter Mempool-Inhalt. |
Sicherheitsnotizen
- RPC/REST nicht ohne Tunnel im öffentlichen Internet exponieren.
- OS-Dateideskriptoren für hohe Request-Last erhöhen.
- REST kann Datenschutzdaten offenlegen, wenn du auf demselben Host untrusted Seiten öffnest.