Skip to content

Instantly share code, notes, and snippets.

Bitcoin SV RPC-Commands

Bitcoin implementations provide a simple command interface for interacting with the full node via JSON-RPC.

There’s one endpoint which receives the command and its arguments via HTTP. The default port for it is 8332. Further information on how to configure it can be found in the bitcoin.conf example.

To get a list of the available commands, you might use the bitcoin-cli and a running bitcoin full node. Eg. this is the output of my local regtest setup:

Raw Transactions with BSV and Sending over RPC

Code
const bitcoinRpc = require('node-bitcoin-rpc');
const bsv = require('bsv');

bitcoinRpc.init('localhost', 18445, 'user', 'pwd');
@schlingel
schlingel / AzuraCastBeispiel.asciidoc
Last active May 14, 2024 13:13
Kurze Erläuterung zur Azura API Verwendung.

Azura Beispiel Code

Alle Daten die man benötigt sind schon im Station-Response drinnen. In diesem Beispiel nehmen wir einfach die Daten daraus und wiederholen den Aufruf alle 1,5 Sekunden um aktuell zu bleiben.

Das Beispiel besteht aus zwei Dateien. Einem HTML-File namens index.html. Dieses definiert nur eine sehr grobe Grundstruktur in der die Daten dargestellt werden. Das zweite File heißt azura_beispiel.js und definiert die Logik, die die Daten abruft und darstellt.