docs: fix hyperliquid docs formatting

This commit is contained in:
Matthias
2024-11-08 06:45:45 +01:00
parent 2de4f425ff
commit 96354ee1d8
+4
View File
@@ -311,16 +311,19 @@ This needs to be configured like this:
// ... // ...
} }
``` ```
walletAddress must be in hex format: `0x<40 hex characters>`, and can be easily copied from your wallet. walletAddress must be in hex format: `0x<40 hex characters>`, and can be easily copied from your wallet.
privateKey also must be in hex format: `0x<64 hex characters>`. privateKey also must be in hex format: `0x<64 hex characters>`.
If needed you can use your mnemonic phrase (the 12 or 24 words you had to write down when creating your wallet) to generate your private key in python. First install eth_account: If needed you can use your mnemonic phrase (the 12 or 24 words you had to write down when creating your wallet) to generate your private key in python. First install eth_account:
```shell ```shell
$ pip3 install eth_account $ pip3 install eth_account
``` ```
Then run this in python (replace <mnemonic phrase> with your actual mnemonic phrase) : Then run this in python (replace <mnemonic phrase> with your actual mnemonic phrase) :
```python ```python
from eth_account import Account from eth_account import Account
Account.enable_unaudited_hdwallet_features() Account.enable_unaudited_hdwallet_features()
@@ -329,6 +332,7 @@ print(f"0x{Account.from_mnemonic(words)._private_key.hex()}")
``` ```
Some general best practices (non exhaustive): Some general best practices (non exhaustive):
* Don't ever run this conversion online. Online tools 'facilitating' this conversion are likely scams and will steal your funds. * Don't ever run this conversion online. Online tools 'facilitating' this conversion are likely scams and will steal your funds.
* Always keep your mnemonic phrase and private key (basically the same thing) private. * Always keep your mnemonic phrase and private key (basically the same thing) private.
* Don't use the same mnemonic as the one you had to backup when initializing a hardware wallet, using the same mnemonic basically deletes the security of your hardware wallet. * Don't use the same mnemonic as the one you had to backup when initializing a hardware wallet, using the same mnemonic basically deletes the security of your hardware wallet.