The command below will not read data from the blockchain, but only what has been added or imported into your local installation (By default the keyring-backendis set to os)
You can change the keyring as preferred. When using the MacOS default keyring it may require you to unlock access to your Keychain app.
Note that the pubkey value can be used for sharing with multisig counterparties, when they instantiate the multisig on their workstations
dydxprotocoldkeysshowtest
2. Generate new wallet
Let’s say you want to name your wallet myNewWallet - you can choose an arbitrary name, that is meaningful to you. Spaces are allowed, although they might not be convenient when you try to use the wallet
$dydxprotocoldkeysaddmyNewWallet-address:dydx1cza...069cname:myNewWalletpubkey:'{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A9QEyr+iQoCI...6IjzVG2vEMf"}'type:local**Important** write this mnemonic phrase in a safe place.Itistheonlywaytorecoveryouraccountifyoueverforgetyourpassword.somemnemonickeywordswillappearhere
This will output the newly created wallet information, as well as the mnemonic for it.
3. Import an existing wallet with a mnemonic
You will need to have the mnemonic of the wallet available. myImportedWallet is an example, use a name that is meaningful to you.
The command will halt with the message > Enter your bip39 mnemonic asking for your mnemonic - paste it (or enter it manually) and hit enter:
4. Add an offline wallet
dydxprotocold allows you to add the public key of someone else’s wallet, so that you can, for example, work with a multisig containing that wallet. The section can help obtain a wallet’s public key.
To add it to your setup, execute the following command, adjusting the name offllineWallet accordingly
5. Connect a Ledger HW wallet
💡 If you encounter the following error during the process, please perform the steps in Ledger Wallet and try again.
Error: failed to generate ledger key: failed to retrieve device: ledger nano S: hidapi: failed to open device
Connect your Ledger device to your workstation
Make sure the Cosmos App is installed - open it
Run the following command: (note that myLedgerWallet is an arbitrary name - you can choose your own name)
To output the wallet address in the Ledger device - this will allow you to review the address on the device.
Every time you use dydxprotocold with myLedgerWallet you will need to have your Ledger device connected, the Cosmos app open on it
6. Rename a wallet
💡 On MacOS, this may require you to input your password in Keychain several times.
7. Query token balances
You can list the tokens balances of an address with
8. Send a transaction
from:can be either wallet name, or wallet address, but it cannot be an offline wallet
to:is the recipient’s wallet address
amount denom:e.g. 1000000000000000000 adydx for sending 1 DYDX
fee amount denom:e.g. 5000000000000000 adydx - this value may need adjustment
Let's take a look at an example on testnet:
For mainnet, pass --chain-id dydx-mainnet-1 instead. Also make sur the node is a mainnet RPC endpoint.
9. Vote for a proposal
View a specific proposal details
10. Submit vote
option: should be either Yes , No , NoWithVeto , or Abstain
Fees: 5000000000000000adydx - this value may need some adjustment