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
cd C:\Program Files (x86)\Factom\
On Mac, Windows and Linux, run “factomd” first
Then browse to http://localhost:8090 to see the Control Panel for your local FF node.
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 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:
For example, if your FG wallet file is still in the .factom folder, run:
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.
Terminal output for:
> factom-walletdReading from '/Home/.factom/m2/factomd.conf'Cannot open custom config file,Starting with default settings.open /Home/.factom/m2/factomd.conf: no such file or directoryReading from '/Home/.factom/m2/factomd.conf'Cannot open custom config file,Starting with default settings.open /Home/.factom/m2/factomd.conf: no such file or directoryWarning, factom-walletd API is not password protected. Factoids can be stolen remotely.Warning, factom-walletd API connection is unencrypted. The password is unprotected over the network.Database started from: /Home/.factom/wallet/factom_wallet.dbDatabase started from: /Home/.factom/wallet/factoid_blocks.cache2016/11/24 06:28:37 web.go serving :8089
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:
Terminal output for:
> factom-cli -hUsage of ./factom-cli:-factomdcert stringThis file is the TLS certificate provided by the factomd API. (default ~/.factom/m2/factomdAPIpub.cert)-factomdpassword stringPassword for API connections to factomd-factomdtlsSet to true when the factomd API is encrypted-factomduser stringUsername for API connections to factomd-h help-s stringIPAddr:port# of factomd API to use to access blockchain (default localhost:8088)-test.bench stringregular expression per path component to select benchmarks to run-test.benchmemprint memory allocations for benchmarks-test.benchtime durationapproximate run time for each benchmark (default 1s)-test.blockprofile stringwrite a goroutine blocking profile to the named file after execution-test.blockprofilerate intif >= 0, calls runtime.SetBlockProfileRate() (default 1)-test.count nrun tests and benchmarks n times (default 1)-test.coverprofile stringwrite a coverage profile to the named file after execution-test.cpu stringcomma-separated list of the number of CPUs to use for each test-test.cpuprofile stringwrite a CPU profile to the named file during execution-test.memprofile stringwrite a memory profile to the named file after execution-test.memprofilerate intif >=0, sets runtime.MemProfileRate-test.outputdir stringdirectory in which to write profiles-test.parallel intmaximum test parallelism (default 8)-test.run stringregular expression to select tests and examples to run-test.shortrun smaller test suite to save time-test.timeout durationif positive, sets an aggregate time limit for all tests-test.trace stringwrite an execution trace to the named file after execution-test.vverbose: print additional output-w stringIPAddr:port# of factom-walletd API to use to create transactions (default localhost:8089)-walletcert stringThis file is the TLS certificate provided by the factom-walletd API. (default ~/.factom/walletAPIpub.cert)-walletpassword stringPassword for API connections to factom-walletd-wallettlsSet to true when the wallet API is encrypted-walletuser stringUsername for API connections to factom-walletdfactom-cli ack TxID|FullTxReturns information about a factoid transaction, or an entry / entry credit transactionfactom-cli addchain [-e EXTID1 -e EXTID2 -E BINEXTID3 ...] ECADDRESS <STDIN>Create a new Factom Chain. Read data for the First Entry from stdin. Use the Entry Credits from the specified address.factom-cli addentry -c CHAINID [-e EXTID1 -e EXTID2 -E BEEF1D ...] ECADDRESS <STDIN>Create a new Factom Entry. Read data for the Entry from stdin. Use the Entry Credits from the specified address.factom-cli addtxecoutput [-r] TXNAME ADDRESS AMOUNTAdd an Entry Credit output to a transaction in the walletfactom-cli addtxfee TXNAME ADDRESSAdd the transaction fee to an input of a transaction in the walletfactom-cli addtxinput TXNAME ADDRESS AMOUNTAdd a Factoid input to a transaction in the walletfactom-cli addtxoutput [-r] TXNAME ADDRESS AMOUNTAdd a Factoid output to a transaction in the walletfactom-cli backupwalletBackup the running walletfactom-cli balance [-r] ADDRESSIf this is an EC Address, returns the number of Entry Credits. If this is a Factoid Address, returns the Factoid balance.factom-cli buyec FCTADDRESS ECADDRESS ECAMOUNTBuy entry creditsfactom-cli composechain [-e EXTID1 -e EXTID2 -E BINEXTID3 ...] ECADDRESS <STDIN>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.factom-cli composeentry -c CHAINID [-e EXTID1 -e EXTID2 -E BEEF1D ...] ECADDRESS <STDIN>Create API calls to create a new Factom Entry. Read data for the Entry from stdin. Use the Entry Credits from the specified address.factom-cli composetx TXNAMECompose a wallet transaction into a JSON RPC objectfactom-cli ecrateIt takes this many Factoids to buy an Entry Credit. Displays the larger between current and future rates. Also used to set Factoid fees.factom-cli exportaddressesList the private addresses stored in the walletfactom-cli get allentries|chainhead|dblock|eblock|entry|firstentry|head|heightsGet data about Factom Chains, Entries, and Blocksfactom-cli get allentries [-n NAME1 -N HEXNAME2 ...] CHAINIDGet all of the Entries in a Chainfactom-cli get chainhead [-n NAME1 -N HEXNAME2 ...] CHAINIDGet ebhead by chainidfactom-cli get dblock KEYMRGet dblock contents by merkle rootfactom-cli get eblock KEYMRGet eblock by merkle rootfactom-cli get entry HASHGet entry by hashfactom-cli get firstentry [-n NAME1 -N HEXNAME2 ...] CHAINIDGet the first entry from a chainfactom-cli get headGet the latest completed directory blockfactom-cli get heightsGet the current heights of various blocks in factomdfactom-cli importaddress ADDRESS [ADDRESS...]Import one or more secret keys into the walletfactom-cli importwords '12WORDS'Import 12 words from Koinify sale into the Walletfactom-cli listaddressesList the addresses stored in the walletfactom-cli listtxs [tmp|all|address|id|range]List transactions from the wallet or the Factoid Chainfactom-cli listtxs address ECADDRESS|FCTADDRESSList transactions from the Factoid Chain with a particular addressfactom-cli listtxs [all]List all transactions from the Factoid Chainfactom-cli listtxs id TXIDList transaction from the Factoid Chainfactom-cli listtxs range START ENDList the transactions from the Factoid Chain within the specified rangefactom-cli listtxs tmpList current working transactions in the walletfactom-cli newecaddressGenerate a new Entry Credit Address in the walletfactom-cli newfctaddressGenerate a new Factoid Address in the walletfactom-cli newtx TXNAMECreate a new transaction in the walletfactom-cli propertiesGet version information about facotmd and the factom walletfactom-cli receipt ENTRYHASHReturns a Receipt for a given Entryfactom-cli rmtx TXNAMERemove a transaction in the walletfactom-cli sendfct FROMADDRESS TOADDRESS AMOUNTSend Factoids between 2 addressesfactom-cli sendtx TXNAMESend a Transaction to Factomfactom-cli signtx TXNAMESign a transaction in the walletfactom-cli subtxfee TXNAME ADDRESSSubtract the transaction fee from an output of a transaction in the wallet