|
|
|
|
- Overview
- Server configuration
- Prerequisites
- Setting up a Bitcoin server
- RPC server configuration
- Using WLanguage functions on client computers
- Server access configuration
Setting up and using a Bitcoin Core server
WLanguage offers several functions for manipulating a Bitcoin Core server. This help page explains how to: Prerequisites To use a Bitcoin Core server, you must have: - a server with 1 TB of free disk space,
- access to this server, either through a local network or via an SSH tunnel. For security reasons, it is not recommended to use public networks.
Setting up a Bitcoin server To set up a Bitcoin server: - Download the program from: https://bitcoin.org/en/download.
- Install the software and follow the steps.
- Once setup is complete, click "Settings" and then select "Options". In the "Main" tab, check "Start Bitcoin Core on system login".
- Run "bitcoin-qt.exe". Let the program synchronize with the Bitcoin network (this may take several days).
RPC server configuration To enable RPC calls: - Click "Settings" and then select "Options".
- In the "Main" tab, check "Enable RPC server".
- Also, modify the Bitcoin Core configuration file via one of the following methods:
- in the "Options" window, "Main" tab, click "Open Configuration File".
- edit the "bitcoin.conf" file directly (in the "%APPDATA%\Bitcoin" folder). For example: "C:\Users\bob\AppData\Roaming\Bitcoin\bitcoin.conf"
- Add the following lines in the file:
# Enable JSON/RPC API server=1 # Server IP address, found with IPConfig, for example rpcbind=172.17.1.255 # IP addresses of clients allowed to make calls: # All computers with address 172.17.2.xxx rpcallowip=172.17.2.1/255.255.255.1 # Port number rpcport=8332 # Username and password rpcuser=username rpcpassword=password
Using WLanguage functions on client computers Server access configuration To configure access to the server, use BitcoinCoreConfigure:
BitcoinCoreConfigure(btcRpcServerAddress, "172.17.1.255")
BitcoinCoreConfigure(btcRpcPortNumber, 8332)
BitcoinCoreConfigure(btcRpcUser, "username")
BitcoinCoreConfigure(btcRpcPassword, "password")
BitcoinCoreConfigure(btcTimeout, 3)
You can then use WLanguage functions:
dateBlock is DateTime = BitcoinCoreDateTimeLatestBlock()
IF ErrorOccurred THEN
Error()
RETURN
END
Info("Latest block " + dateBlock)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|