I want to develop my own wallet, and the default currency is not Ethereum but other currencies.
When reading the official code, I found that when creating an account, the code generates mnemonics and then generates Ethereum’s public and private keys.
I want to change the public and private keys of Ethereum to those of other currencies. How can I modify the code?
Hey @oumingyu, welcome to the MetaMask community!
You may be interested in Snaps
Hello @oumingyu !
The default currency depends on the blockchain you are using.
Your private key is valid for signing transactions across all EVM network.
Thank you for your reply
I want to develop my own Google plugin with features similar to MetaMask, so I downloaded the source code.
But the default currency of the plugin I developed is not ETN, so I want to change the MetaMask source code to achieve the functionality I want
Now that I have found the mnemonic section, I would like to know how mnemonics generate public and private keys, so that I can modify the source code to achieve the functionality I want
What is the default currency in your project ?
Regarding the BIP39 standard that MetaMask uses, you can read here:
@snwlprd.eth
ICW
We want to develop a Google plugin similar to MetaMask, and now we want to modify the Ethereum public and private keys in MetaMask to ICW public and private keys
As per rule #6 of our Community and for the safety and security of community members, do NOT share the name of your individual project.
Just use BIP39 standard for this
To modify the default currency in Ethereum, you’re referring to changing the default unit of measurement for displaying values in the Ethereum network, such as wei, gwei, or ether. Here’s how you can do it:
- Wallet Settings: Most Ethereum wallets allow you to customize the unit of measurement for displaying balances and transactions. Look for settings or preferences within your wallet application to modify the default currency.
- Web3 Library: If you’re a developer interacting with Ethereum through a library like Web3.js, you can specify the unit of measurement when displaying values. For example, you can use the
web3.utils.fromWei()
andweb3.utils.toWei()
functions to convert between different units. You can specify the desired unit (e.g., ether, gwei, wei) as a parameter in these functions. - Custom Code: If you’re building a custom application, you can manually convert values to the desired currency using the appropriate conversion functions. There are libraries and code snippets available for various programming languages that can help you perform these conversions.
Keep in mind that modifying the default currency for display purposes does not alter the underlying units used in Ethereum’s smart contracts and transactions. The base unit in Ethereum is wei, which is the smallest denomination. Ether, gwei, and other units are merely different representations for convenience.
Remember to double-check any changes you make to ensure you’re displaying and working with the correct units, as it’s crucial to avoid confusion or errors when dealing with cryptocurrencies.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.