{"id":18375714,"url":"https://github.com/factomproject/walletmgr","last_synced_at":"2025-06-14T13:03:00.192Z","repository":{"id":57654366,"uuid":"49159693","full_name":"FactomProject/walletmgr","owner":"FactomProject","description":"General utility tool for factom wallet functions","archived":false,"fork":false,"pushed_at":"2016-01-22T23:53:47.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-14T13:02:41.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FactomProject.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-06T20:29:42.000Z","updated_at":"2019-07-08T10:21:25.000Z","dependencies_parsed_at":"2022-09-01T01:13:18.303Z","dependency_job_id":null,"html_url":"https://github.com/FactomProject/walletmgr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FactomProject/walletmgr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fwalletmgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fwalletmgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fwalletmgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fwalletmgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FactomProject","download_url":"https://codeload.github.com/FactomProject/walletmgr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fwalletmgr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259820788,"owners_count":22916544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T00:19:59.219Z","updated_at":"2025-06-14T13:03:00.120Z","avatar_url":"https://github.com/FactomProject.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Factom Wallet Manager\n==========\n\nThis program exports the root seed of the current factom wallet in a portable format.  It can printed to paper and backed up securely.\n\nNote, the seed was not intended to be a deterministic wallet, but can be used as such.\n\nThe seed serves as a pool of randomness. The randomness is pulled from to create both Factoid and Entry Credit keys. If only Factoid keys were created, then when restoring the addresses should not be problematic.  If EC and Factoid keys are interleaved, then it would make sense to restore many Factoid keys to find all of those with balances.  Rename the wallet, restore it again and create many EC keys to find the ones with balances.\n\n\n## Creating the backup\n\nDownload and compile walletmgr.\n\nGolang 1.5 or above must be installed, as walletmgr is not distributed as binaries.  It can also then be cross compiled or run in a VM.\n\nTo install run `go get -v -u github.com/FactomProject/walletmgr`\n\nthen run `walletmgr exportseed`\n\nNeither fctwallet nor walletapp can be running at the same time as walletmgr.\n\nEither fctwallet or walletapp must have been run and at least 1 address must have been created to backup the seed.\n\n\n```\n$ walletmgr exportseed\n2016/01/19 17:46:56 read factom config file:  /home/brian/.factom/factomd.conf\n\nSeed: sdrU9wonUEx47Ee1EjeXgeGtr8vrkEbd4GuQ1tfgRxp3woy2nBJQS9eqoa2WdAeiB3ga2DBEzr558GnSe4qpNBSZF6BNX5C\n```\n\nThe sdxxx... value is a base58 encoded seed with a checksum.  Record this value, as it can be injected back into Factom to restore the private keys.\n\n\n\n\n## Restore the backup\n\nCurrently there is no easy way to restore the key, but it can be done with enough effort.  It is a lot easier to make a digital backup, but paper backups have their benefits.\n\n\n### Decode the seed\n\nThe seed is recorded in bitcoin base58check format, so it is effectively impossible for a typo to go undetected.\n\nCurrently, only a simple python script is needed to decode the address.  the base58 library is a prerequisite.\n\n- Make sure pip is installed for your OS.  [Here](http://www.liquidweb.com/kb/how-to-install-pip-on-ubuntu-14-04-lts/) are some directions for Ubuntu.\n\n- Install the base58 library with pip.  On ubuntu run `sudo pip install base58`.\n\n- Next run the decoding script.  replace the example `seedToCheck` with your own.\n\n```\nimport base58\n\nseedToCheck = \"sdrU9wonUEx47Ee1EjeXgeGtr8vrkEbd4GuQ1tfgRxp3woy2nBJQS9eqoa2WdAeiB3ga2DBEzr558GnSe4qpNBSZF6BNX5C\"\n\ntry:\n\tdecodedSeed = base58.b58decode_check(seedToCheck).encode(\"hex\")\nexcept:\n\tprint \"failed checksum\"\nelse:\n\tif len(decodedSeed) != 132:\n\t\tprint \"too long or short\"\n\telif decodedSeed[:4] != \"13dd\":\n\t\tprint \"not a seed prefix\"\n\telse:\n\t\tprint \"OK\"\n\t\tprint \"secret seed is \" + decodedSeed[4:]\n```\n\nit gives: `secret seed is e6d0083684c4decae94b9890b4c4ad3ca5f962f508d0641a4d5225117ebfc8ec29a0c58930d30424e0154ae6a88a3a63e32025f0e216f4d174bf81b17fff9e47`\n\n\n\n\n### Make a new wallet with the seed\n\nInstall factomd and walletapp as normal\n\n```\ngo get -v -u github.com/FactomProject/FactomCode/factomd\ngo get -v -u github.com/FactomProject/fctwallet\ngo get -v -u github.com/FactomProject/factom-cli\ngo get -v -u github.com/FactomProject/walletapp\n```\n\n\nOpen the file ~/go/src/github.com/FactomProject/factoid/wallet/scwallet.go\n\nAdd a line forcing the seedhash to the one decoded above.\n\nhttps://github.com/FactomProject/factoid/blob/666a00af6f151830cb8be97abf566239d4a11425/wallet/scwallet.go#L305\n\n```\n...\n\nfunc (w *SCWallet) NewSeed(data []byte) {\n\tif len(data) == 0 {\n\t\treturn\n\t} // No data, no change\n\thasher := sha512.New()\n\thasher.Write(data)\n\tseedhash := hasher.Sum(nil)\n\tseedhash, _ = hex.DecodeString (\"e6d0083684c4decae94b9890b4c4ad3ca5f962f508d0641a4d5225117ebfc8ec29a0c58930d30424e0154ae6a88a3a63e32025f0e216f4d174bf81b17fff9e47\") //added this line\n\tw.NextSeed = seedhash\n\tw.RootSeed = seedhash\n\tb := new(database.ByteStore)\n\tb.SetBytes(w.RootSeed)\n...\n```\n\nalso add this line `\"encoding/hex\"` to the import list at the top of the scwallet.go file.\n\n\nNow compile the updated wallet which always creates new addresses with the seed.\n\n`go install github.com/FactomProject/fctwallet`\n\n\nRename the existing wallet if `~/.factom/factoid_wallet_bolt.db` exists.  This will cause the wallet to make a new one when new addresses are made.\n\n```\n$ factom-cli newaddress fct recovered001\nfct  =  FA3LRaa3oqC8F3wvecqo1D7WPPhG7opttoM67yCsQQLy1LkzYXUa\n```\n\nKeep making new addresses with new names, and it should create addresses you had backed up.\n\n\n\nnote: editing the same scwallet.go and creating new addresses will restore the same way when using walletapp as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactomproject%2Fwalletmgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffactomproject%2Fwalletmgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactomproject%2Fwalletmgr/lists"}