Command Line Wallet

First, we need a node running. See the installation section. Once you have your node running here's how to create a wallet, generate an address and extract the scriptPubKey value that will allow you to earn mining rewards.

From the project's root folder:

src/factorn-wallet  -wallet=<wallet name>  -descriptors create
src/factorn-cli    loadwallet <wallet name>
src/factorn-cli    getnewaddress
src/factorn-cli    getaddressinfo <address from previous command>

For example, from the get getaddresinfo command above you should get something similar to:

{
  "address": "fact1q4zjycg88kyk72szmhpjvm82mu0zm6p26g7zeh8",
  "scriptPubKey": "0014a8a44c20e7b12de5405bb864cd9d5be3c5bd055a",
  "ismine": true,
  "solvable": true,
  "desc": "wpkh([67f532c6/84'/0'/0'/0/0]02de55517a22dc5a66d4a193cb877a3658b1c456827c1404d18e79dec82d5d937a)#0hcn4tny",
  "parent_desc": "wpkh([67f532c6/84'/0'/0']xpub6D7gQbDdRjuiMN9EqbEzWY4owSUfNNcRdA4E5aaYCX4VoRPMzgeaF4C15D6hSCUpvUkZvjKJTLktDVvjZ3beL8sfW1ATsNQ6qCsAkV6STtr/0/*)#zylutadk",
  "iswatchonly": false,
  "isscript": false,
  "iswitness": true,
  "witness_version": 0,
  "witness_program": "a8a44c20e7b12de5405bb864cd9d5be3c5bd055a",
  "pubkey": "02de55517a22dc5a66d4a193cb877a3658b1c456827c1404d18e79dec82d5d937a",
  "ischange": false,
  "timestamp": 1650416082,
  "hdkeypath": "m/84'/0'/0'/0/0",
  "hdseedid": "0000000000000000000000000000000000000000",
  "hdmasterfingerprint": "67f532c6",
  "labels": [
    ""
  ]
}

You will need the value from "scriptPubKey" to mine. In this example, this person would use the value "0014a8a44c20e7b12de5405bb864cd9d5be3c5bd055a" to pass to the python mining script. This would credit the rewards of the block to their address.

To send a transaction, the FACT0RN node must be running. You can then submit a transaction using the following command:

./factorn-cli -named sendtoaddress address="receiving_address" amount="amount_to_be_sent" fee_rate=10 subtractfeefromamount=true avoid_reuse=true replaceable=true verbose=true

Last updated