A user-friendly desktop wallet with support for transaction history, encrypted contact book, gift codes, and payments.
There are two ways to use desktop wallet (DW) offline: view-only accounts and offline mode. Offline mode is more secure, but view-only mode is more convenient, while still being more secure than a fully-online wallet.
In offline mode, none of your keys is ever saved to an online computer, the offline computer will save your keys in an encrypted database, and you will have to copy the ledger from an online computer to the offline computer any time you want to update your balance or create a transaction.
A view only account allows you to maintain an account on a connected computer using only your view keys. The connected account will be able to sync with the ledger and show you all of the transactions that have been received for that account. However it will not know which transactions have been spent until you use a tool called the transactions-signer to sync the view-only account. You can also build + submit transactions using the view-only account and the transaction signer. The transaction-signer should only be used on an offline computer. By default it will save your mnemonic in an unencrypted JSON file on the computer where it is run.
View only accounts can be identified in the DW by a circular icon with an exclamation mark inside it. The icon will be next to the account balance indicator. If the account contains MOB/eUSD that might be spent, the icon will be yellow and icon-buttons for downloading and uploading sync files will be rendered. If the account contains only MOB/eUSD that is confirmed to be unspent, the view-only icon will be white and the sync buttons will not appear.
./transaction-signer create
../transaction-signer import “<your account’s mnemonic>” –-name <your account’s name>
.mobilecoin_secret_mnemonic_xxxx.json
and mobilecoin_view_account_import_package.xxxx.json
. The mnemonic file will be used by the transaction signer to sync the account & sign transactions. The import package contains your view keys and will be used to import a view-only account into the online DW.mobilecoin_view_account_import_package.xxxx.json
file over to the online computer. Install DW and when given the choice to create or import an account, select “Import View Only Account”. Upload the import package json file../transaction-signer sync <path to mnemonic file> <path to sync package>
. The transaction signer will generate and save a completed sync JSON file. ./transaction-signer sign <path to mnemonic file> <path to unsigned transaction JSON>
. The transaction-signer will sign and save the transaction.MobileCoin Desktop Wallet is available under open-source licenses. Look for the LICENSE file for more information.
Depending on your local platform, you'll need to add the correct version from the Downloads section of the full-service binaries to the ./full-service-bin
directory. Grab the binary full-service
file and the .css files, and place them in their relative subdirectory in ./full-service-bin
. Once you have the files in the ./full-service-bin/testnet
and ./full-service-bin/mainnet
directories, copy the contents from ./full-service-bin/testnet
into ./full-service-bin
. When you add the binaries, you will likely need to give permissions for the dev environment to run them. In the directory with the binaries, grant permission: chmod +x full-service
.
The application is dependent on using node version ^16.0.0
. Since different applications may rely on different versions of node, it is recommended you use a node manager like n. You can check the current node version with node --version
.
Once you're working with the correct version of node, you'll need to install the rest of the packages. At the root of the directory run yarn install
(or yarn
if you're cool like that). Because this wallet has native packages, you'll need to drop into the app/ directory cd app/
and run yarn install
here as well. Once done, hop back up to the root directory (I know you know this, but cd ..
).
Run the dev environment with yarn dev
from the base directory.
That's it!
(There's plenty of other commands, take a peak at the package.json scripts).
When you call yarn dev
, the app will run with a Chrome inspect window for debugging convenience. If you want to debug the built or packaged app, please look closely at the package.json
file for other commands.
If you need to debug the renderer (the interactive side of the app + the api request/responses from full-service
), you can simply add the keyword debugger
in the code. When inspecting in the Chrome window, javascript will stop at that line and allow you to quickly inspect the local state.
YOU CANNOT USE THE DEBUGGER
KEYWORD IN A REACT'S RENDER RETURN VALUE. (The return value that looks an awful lot like html).
You may want to debug the main process. You can find a debugging tutorial here.