Launch the Ark server
We're going to ensure that all dependencies are running properly, configure your server settings, start aspd, then fund your server to complete the setup.
Start your signet node
Launch a signet bitcoin node using the following command.
bitcoind --signet --daemon
If your bitcoin.conf file is empty, this will launch a signet node.
By default the node will:
- Create a cookie in
~/.bitcoin/signet/.cookie
- The RPC interface will listen on port
38332
You can verify this using:
bitcoin-cli -signet \
-rpcconnect=localhost \
-rpcport=38332 \
-rpccookiefile=$HOME/.bitcoin/signet/.cookie \
getblockcount
Start your PostgreSQL database
Install and run PostgreSQL as described in the dependencies section before proceeding with the server configuration.
Create a config file
Create a config.toml file that specifies the configuration of your Ark server.
data_dir = "./aspd"
network = "regtest"
vtxo_expiry_delta = 144
vtxo_exit_delta = 12
htlc_delta = 6
htlc_expiry_delta = 6
round_interval = "10s"
round_submit_time = "2s"
round_sign_time = "2s"
nb_round_nonces = 64
round_tx_feerate = "2500sat/kwu"
sweep_tx_fallback_feerate = "2500sat/kwu"
round_sweep_interval = "1h"
round_board_confirmations = 12
sweep_threshold = 1000000
rpc_rich_errors = true
[rpc]
public_address = "127.0.0.1:3535"
admin_address = "127.0.0.1:3536"
[postgres]
host = "localhost"
port = 5432
name = "aspdb"
user = "postgres"
password = "postgres"
[bitcoind]
url = "http://127.0.0.1:38332"
cookie = "/home/<username>/.bitcoin/signet/.cookie"
Run the Ark server
Once you've got the dependencies running and set up your configuration, you can launch the server using:
aspd create --config <path-to-your-toml-file>
Fund the server
You can retrieve the address using:
export ASPD_ADDRESS=$(aspd rpc get-address)
Generate some blocks:
bitcoin-cli -signet -generate 106
And send 10 bitcoin to the Ark server address:
bitcoin-cli -signet sendtoaddress $ASPD_ADDRESS 10