Skip to content

MetaHash Wallet

ChMarina edited this page Feb 2, 2022 · 6 revisions

MetaHashGate is MetaHash wallet. MetaHashGate is not just another cryptocurrency wallet and browser for decentralized applications. It is a gateway to the decentralized internet which exists in parallel with the usual internet but follows its own rules. It cannot be modified or blocked.

The wallet supports "light mode" without downloading the entire Blockchain. Data comes from different sources of the decentralized network and is checked by the user. Private keys from all Blockchains used will be stored only by the user.

MetaHashGate is an open source program, so all developers can embed parts of its code into their applications and browsers.

Repository metahashorg/metagate contains Metahash wallet c++ source code.

The Metahash c ++ wallet has functions:

Q_INVOKABLE void updateAndReloadApplication();
# Restarts wallet installing updates

Q_INVOKABLE void qtOpenInBrowser(QString url);
# Opens link in default browser

Q_INVOKABLE void getWalletFolders();
# Function calls javascript
walletFoldersJs(walletDefaultPath, walletCurrentPath, userName, errorNum, errorMessage)

Q_INVOKABLE void setPaths(QString newPatch, QString newUserName);
# Set current walletPath.  newUserName to the path  has not to be written! It is needed for reference only.
# javascript is called after completion of this function
setPathsJs(result("Ok", "Not ok"), errorNum, errorMessage)

Q_INVOKABLE QString openFolderDialog(QString beginPath, QString caption);
# Shows to user the dialog box providing the ability to select a directory. 
beginPath # initial directory location
caption # name of the dialog box
#  Returns the path to the selected by user directory or an empty string, if user declines selecting directory.

Q_INVOKABLE bool migrateKeysToPath(QString newPath);
# Moves keys from the previous user's directory (home/user/.metahash_wallets) to the specified directory.

Q_INVOKABLE void exitApplication();
# Stops the app.

Q_INVOKABLE QString backupKeys(QString caption);
# Backs up keys to the file. Before backup, user is shown a dialog box providing ability to select a path.
caption # name of the dialog 
# Returns error description or empty string, if successful.

Q_INVOKABLE QString restoreKeys(QString caption);
# Recovers keys from a file. Before recovery, user is shown a dialog box providing ability to select backup file.
caption # name of the dialog
#  Returns error description or empty string, if successful.

Q_INVOKABLE void getMachineUid();
# Returns unique machine ID to the machineUidJs(uid) function.

Q_INVOKABLE void setUserName(const QString &userName);
# Sets username for the user button.

Q_INVOKABLE void setHasNativeToolbarVariable()
# Sets window.hasNativeToolbar javascript variable to true.

Q_INVOKABLE void setCommandLineText(const QString &text);
# Sets text to command line.

Q_INVOKABLE void openWalletPathInStandartExplorer();
# Open directory containing keys in standard explorer.

For more information about the required dependencies and build this project, please see the repository.