Run Factom Federation
Time to remember Mr. Miyagi’s lesson.
This step will be used every time you need to run Factom Federation software, so get familiar with it. Practice makes perfect. Wax on, wax off.
Every time you come across “Run FF” you need to perform the following steps. These are the necessary steps to run the wallet. For Mac and Windows, use the cd command with Terminal to browse to the location of your FF installation. On Linux, you will be able to run commands without having to browse the to install location.
This step is required before you run factomd, factom-walletd, and factom-cli. The three applications are required to run the Factom Federation software.
In a new Terminal window, run
Mac
cd /Applications/Factom/
Windows
cd C:\Program Files (x86)\Factom\
On Mac, Windows and Linux, run “factomd” first
factomd
Then browse to http://localhost:8090 to see the Control Panel for your local FF node.
Could not load image
Control panel
Syncing the Factom blockchain may take a little while. The Factom Control panel will display the progress and notify you when it has finished syncing. This will also occur when it has been a while since the last time you have run factomd. However, after the first full sync is complete, successive syncs are faster and you will only have to sync blocks since the last full sync.
Once you are synced, in a new Terminal window browse (cd) to the location of your FF installation as you did above (Mac and Windows only). There are two options now, one for people who have run Factom Genesis (FG), our previous software release, and one for people who haven’t. The former has to import their old FG wallet file; the latter doesn’t. Choose the next step accordingly.

If you have used FG

If you have run our previous software release “Factom Genesis (FG)” you need to import your FG wallet file (named factoid_wallet_bolt.db) the first time your run factom-walletd to make sure all its previous addresses and balances are transferred over. You have learned how to backup your wallet file in our Backup Your Wallet File! guide and you should know if still in the default location within the .factom folder at ~/.factom/factoid_wallet_bolt.db.
Simply run the next command with a special flag and the path to your wallet file:
factom-walletd -i=PATH_TO_YOUR_FGWALLETFILE.
For example, if your FG wallet file is still in the .factom folder, run:
factom-walletd -i=~/.factom/factoid_wallet_bolt.db
This command will tell factom-walletd to look for the file at the specified path and import all its addresses into the new wallet. The file can be located in a different location on your hard drive, just make sure to specify the path properly.
If by any chance the operation fails, quit factom-walletd, delete the new wallet file located at ~/.factom/wallet/factoid_wallet.db and try again until you get all your addresses back. Remember, you only need to do this once the first time you run factom-walletd, after that you can run it normally.

If you have never used FG

Run:
factom-walletd
Terminal output for: factom-walletd
1
> factom-walletd
2
3
Reading from '/Home/.factom/m2/factomd.conf'
4
Cannot open custom config file,
5
Starting with default settings.
6
open /Home/.factom/m2/factomd.conf: no such file or directory
7
8
Reading from '/Home/.factom/m2/factomd.conf'
9
Cannot open custom config file,
10
Starting with default settings.
11
open /Home/.factom/m2/factomd.conf: no such file or directory
12
13
Warning, factom-walletd API is not password protected. Factoids can be stolen remotely.
14
Warning, factom-walletd API connection is unencrypted. The password is unprotected over the network.
15
Database started from: /Home/.factom/wallet/factom_wallet.db
16
Database started from: /Home/.factom/wallet/factoid_blocks.cache
17
2016/11/24 06:28:37 web.go serving :8089
Copied!
You are now ready to use factom-cli to run commands in your third Terminal window. Run the command -h (help) to see all the available commands and their descriptions. cd to the location of your FF installation first, then run:
factom-cli -h
Terminal output for: factom-cli -h
1
> factom-cli -h
2
3
Usage of ./factom-cli:
4
5
-factomdcert string
6
This file is the TLS certificate provided by the factomd API. (default ~/.factom/m2/factomdAPIpub.cert)
7
-factomdpassword string
8
Password for API connections to factomd
9
-factomdtls
10
Set to true when the factomd API is encrypted
11
-factomduser string
12
Username for API connections to factomd
13
-h help
14
-s string
15
IPAddr:port# of factomd API to use to access blockchain (default localhost:8088)
16
-test.bench string
17
regular expression per path component to select benchmarks to run
18
-test.benchmem
19
print memory allocations for benchmarks
20
-test.benchtime duration
21
approximate run time for each benchmark (default 1s)
22
-test.blockprofile string
23
write a goroutine blocking profile to the named file after execution
24
-test.blockprofilerate int
25
if >= 0, calls runtime.SetBlockProfileRate() (default 1)
26
-test.count n
27
run tests and benchmarks n times (default 1)
28
-test.coverprofile string
29
write a coverage profile to the named file after execution
30
-test.cpu string
31
comma-separated list of the number of CPUs to use for each test
32
-test.cpuprofile string
33
write a CPU profile to the named file during execution
34
-test.memprofile string
35
write a memory profile to the named file after execution
36
-test.memprofilerate int
37
if >=0, sets runtime.MemProfileRate
38
-test.outputdir string
39
directory in which to write profiles
40
-test.parallel int
41
maximum test parallelism (default 8)
42
-test.run string
43
regular expression to select tests and examples to run
44
-test.short
45
run smaller test suite to save time
46
-test.timeout duration
47
if positive, sets an aggregate time limit for all tests
48
-test.trace string
49
write an execution trace to the named file after execution
50
-test.v
51
verbose: print additional output
52
-w string
53
IPAddr:port# of factom-walletd API to use to create transactions (default localhost:8089)
54
-walletcert string
55
This file is the TLS certificate provided by the factom-walletd API. (default ~/.factom/walletAPIpub.cert)
56
-walletpassword string
57
Password for API connections to factom-walletd
58
-wallettls
59
Set to true when the wallet API is encrypted
60
-walletuser string
61
Username for API connections to factom-walletd
62
63
factom-cli ack TxID|FullTx
64
Returns information about a factoid transaction, or an entry / entry credit transaction
65
66
factom-cli addchain [-e EXTID1 -e EXTID2 -E BINEXTID3 ...] ECADDRESS <STDIN>
67
Create a new Factom Chain. Read data for the First Entry from stdin. Use the Entry Credits from the specified address.
68
69
factom-cli addentry -c CHAINID [-e EXTID1 -e EXTID2 -E BEEF1D ...] ECADDRESS <STDIN>
70
Create a new Factom Entry. Read data for the Entry from stdin. Use the Entry Credits from the specified address.
71
72
factom-cli addtxecoutput [-r] TXNAME ADDRESS AMOUNT
73
Add an Entry Credit output to a transaction in the wallet
74
75
factom-cli addtxfee TXNAME ADDRESS
76
Add the transaction fee to an input of a transaction in the wallet
77
78
factom-cli addtxinput TXNAME ADDRESS AMOUNT
79
Add a Factoid input to a transaction in the wallet
80
81
factom-cli addtxoutput [-r] TXNAME ADDRESS AMOUNT
82
Add a Factoid output to a transaction in the wallet
83
84
factom-cli backupwallet
85
Backup the running wallet
86
87
factom-cli balance [-r] ADDRESS
88
If this is an EC Address, returns the number of Entry Credits. If this is a Factoid Address, returns the Factoid balance.
89
90
factom-cli buyec FCTADDRESS ECADDRESS ECAMOUNT
91
Buy entry credits
92
93
factom-cli composechain [-e EXTID1 -e EXTID2 -E BINEXTID3 ...] ECADDRESS <STDIN>
94
Create API calls to create a new Factom Chain. Read data for the First Entry from stdin. Use the Entry Credits from the specified address.
95
96
factom-cli composeentry -c CHAINID [-e EXTID1 -e EXTID2 -E BEEF1D ...] ECADDRESS <STDIN>
97
Create API calls to create a new Factom Entry. Read data for the Entry from stdin. Use the Entry Credits from the specified address.
98
99
factom-cli composetx TXNAME
100
Compose a wallet transaction into a JSON RPC object
101
102
factom-cli ecrate
103
It takes this many Factoids to buy an Entry Credit. Displays the larger between current and future rates. Also used to set Factoid fees.
104
105
factom-cli exportaddresses
106
List the private addresses stored in the wallet
107
108
factom-cli get allentries|chainhead|dblock|eblock|entry|firstentry|head|heights
109
Get data about Factom Chains, Entries, and Blocks
110
111
factom-cli get allentries [-n NAME1 -N HEXNAME2 ...] CHAINID
112
Get all of the Entries in a Chain
113
114
factom-cli get chainhead [-n NAME1 -N HEXNAME2 ...] CHAINID
115
Get ebhead by chainid
116
117
factom-cli get dblock KEYMR
118
Get dblock contents by merkle root
119
120
factom-cli get eblock KEYMR
121
Get eblock by merkle root
122
123
factom-cli get entry HASH
124
Get entry by hash
125
126
factom-cli get firstentry [-n NAME1 -N HEXNAME2 ...] CHAINID
127
Get the first entry from a chain
128
129
factom-cli get head
130
Get the latest completed directory block
131
132
factom-cli get heights
133
Get the current heights of various blocks in factomd
134
135
factom-cli importaddress ADDRESS [ADDRESS...]
136
Import one or more secret keys into the wallet
137
138
factom-cli importwords '12WORDS'
139
Import 12 words from Koinify sale into the Wallet
140
141
factom-cli listaddresses
142
List the addresses stored in the wallet
143
144
factom-cli listtxs [tmp|all|address|id|range]
145
List transactions from the wallet or the Factoid Chain
146
147
factom-cli listtxs address ECADDRESS|FCTADDRESS
148
List transactions from the Factoid Chain with a particular address
149
150
factom-cli listtxs [all]
151
List all transactions from the Factoid Chain
152
153
factom-cli listtxs id TXID
154
List transaction from the Factoid Chain
155
156
factom-cli listtxs range START END
157
List the transactions from the Factoid Chain within the specified range
158
159
factom-cli listtxs tmp
160
List current working transactions in the wallet
161
162
factom-cli newecaddress
163
Generate a new Entry Credit Address in the wallet
164
165
factom-cli newfctaddress
166
Generate a new Factoid Address in the wallet
167
168
factom-cli newtx TXNAME
169
Create a new transaction in the wallet
170
171
factom-cli properties
172
Get version information about facotmd and the factom wallet
173
174
factom-cli receipt ENTRYHASH
175
Returns a Receipt for a given Entry
176
177
factom-cli rmtx TXNAME
178
Remove a transaction in the wallet
179
180
factom-cli sendfct FROMADDRESS TOADDRESS AMOUNT
181
Send Factoids between 2 addresses
182
183
factom-cli sendtx TXNAME
184
Send a Transaction to Factom
185
186
factom-cli signtx TXNAME
187
Sign a transaction in the wallet
188
189
factom-cli subtxfee TXNAME ADDRESS
190
Subtract the transaction fee from an output of a transaction in the wallet
Copied!