gitlab.com/aquachain/aquachain@v1.17.16-rc3.0.20221018032414-e3ddf1e1c055/Documentation/user-guide/Wallet.md (about)

     1  # Wallet
     2  
     3  You need to have a wallet to acquire AQUA. A Wallet provides access to your crypto which live on the AQUA blockchain aka Aquachain. This crypto is only available through your private key. If you lose this secret/private key, there is no way to recover your assets. Please safely store the wallet keys in a secure manner. Anyone with access to your private keys gains access to your crypto and can perform outward transactions. This gave birth to the famous expression “not your (private) keys, not your crypto”.
     4  
     5  Note: To safeguard your private keys, its best to use a hardware wallet instead of storing it on your device or paper. Using a hardware wallet is the most secure way of accessing your tokens because your signing key never leave the device.
     6  
     7  When you're setting up a wallet, be sure to:
     8  ✅ Download and install only the latest version from an official source.
     9  ✅ Follow the setup guide carefully.
    10  ✅ Safely back up your recovery phrases.
    11  ❌ NEVER share your recovery phrases with anyone, under any circumstances.
    12  ❌ NEVER input your recovery phrase to a website or app, other than your wallet app.
    13  
    14  ## Metamask
    15  
    16  Metamask is a cryptocurrency wallet available for IOS, Android and as a Chrome extension. Once installed, create a new wallet. Make sure to securely backup your private key. Anyone with access to your private keys gains access to your crypto.
    17  By default, MetaMask creates a wallet on Ethereum Mainnet network. To use AQUA with MetaMask, you need to add AquaChain network. Go to Settings->Networks->Add a network and fill following fields
    18  
    19  ```
    20  Network Name: Aquachain Mainnet
    21  RPC URL: https://c.onical.org (or yours)
    22  Chain ID: 61717561
    23  Symbol: AQUAC (use this to get correct cryptocompare api response)
    24  Block Explorer URL: https://aquachain.github.io/explorer/#/
    25  ```
    26  
    27  After saving above network information, switch to Aquachain network and you are ready to use MetaMask with AQUA.
    28  
    29  MetaMask also supports hardware wallets such as Ledger and Trezor. See this [guide](https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet) on how to set up MetaMask to use your hardware wallet.
    30  
    31  ## Frame Wallet
    32  
    33  "A privacy focused Ethereum wallet that runs natively on macOS, Windows and Linux"
    34  
    35  Get here [frame.sh](https://frame.sh) and [frame releases](https://github.com/floating/frame/releases)
    36  
    37  Configure same as metamask above
    38  
    39  ## Full node wallet
    40  
    41  ### Advanced mode
    42  
    43  Such usecases for a full node wallet include:
    44    * if you wish to programmatically sending transactions using `personal_sendTransaction` 
    45    * if you only want to use wallet through the secure console wallet
    46  
    47  Both situations require a secure network, and are for advanced users only. Consider using a common wallet.
    48  
    49  <em>If you use a JSON Keyfile wallet attached to your node, you MUST take safety precautions.</em>
    50  
    51  It is BETTER to use `eth_sendRawTransaction` to submit a signed transaction, and keep your key away from your RPC node.
    52  
    53  Anyone can set up complex private aquachain networks with multiple nodes, some with keys, some without, and transactions will be broadcast to the main network if at least one of the nodes are connected to the "world". Consider keeping your signing node "offline" if possible, and use `personal_signTransaction` which returns a signed tx without broadcasting it.
    54  
    55  **You do NOT need a private key to run an aquachain node**
    56  
    57  But, a password-protected JSON keyfile is perfectly safe if kept secured, and securely backed up.
    58  The most common issue with this type of wallet is that it can't be easily written down in its current form.
    59  Most users will probably want to NOT use this, and instead use a mnemonic phrase.
    60  
    61  ### Generating new console wallet
    62  
    63  A wallet can be generated in three ways from the aquachain command:
    64  
    65  - `aquachain.exe account new`
    66  - `aquachain.exe paper 10`
    67  - in the AQUA Console: `personal.newAccount()`
    68  
    69  ### Send a transaction
    70  
    71  Start a transaction by typing `send` and press enter (type `n` or `ctrl+c` to cancel)
    72  
    73  ### Most important commands
    74  
    75  Check balance with `aqua.balance(aqua.coinbase)`
    76  
    77  Check all accounts balances: `balance()`
    78  
    79  Send a transaction (easy way): `send`
    80  
    81  Also see the [Console Cheatsheet](../../node-operator-guide/ConsoleCheatcheat/) and other node-operator-guide resources, since you operate a node.
    82  
    83  ### Example: Sending a transaction the hard way
    84  
    85  Before sending coins, you must unlock the account:
    86  
    87  `personal.unlockAccount(aqua.accounts[0])`
    88  
    89  This next command will send 2 AQUA from "account 0" (first account created) to the typed account below:
    90  
    91  ```
    92  aqua.sendTransaction({from: aqua.accounts[0], to: '0x3317e8405e75551ec7eeeb3508650e7b349665ff', value:web3.toWei(2,"aqua")});
    93  ```
    94  
    95  Since its a javascript console, you can do something like this:
    96  
    97  ```
    98  var destination = '0x3317e8405e75551ec7eeeb3508650e7b349665ff';
    99  aqua.sendTransaction({from: aqua.accounts[0], to: destination, value:web3.toWei(2,"aqua")});
   100  ```
   101  
   102  Default gas price is 0.1 gwei, if you want to specify a higher gas price you can add it to the tx:
   103  
   104  ```
   105  var tx = {from: aqua.accounts[0], to: destination, gasPrice: web3.toWei(20, "gwei"), value:web3.toWei(2,"aqua")};
   106  aqua.sendTransaction(tx);
   107  ```
   108  
   109  ### Useful Console Commands
   110  
   111  (Save time! Press tab twice to auto-complete everything.)
   112  
   113  ```
   114  balance()
   115  aqua.balance(aqua.coinbase)
   116  send
   117  admin.nodeInfo.enode
   118  net.listening
   119  net.peerCount
   120  admin.peers
   121  aqua.coinbase
   122  aqua.getBalance(aqua.coinbase)
   123  personal
   124  aqua.accounts
   125  miner.setAquabase(web3.aqua.accounts[0])
   126  miner.setAquabase(“0x0000000000000000000000000000000000000000”)
   127  miner.start()
   128  miner.stop()
   129  miner.hashrate
   130  aqua.getBlock(0)
   131  aqua.getBlock(“latest”)
   132  aqua.blockNumber
   133  web3.aqua.getBlock(BLOCK_NUMBER).hash
   134  aqua.syncing
   135  debug.verbosity(6) // highest logging level, 3 is default
   136  ```
   137  
   138  ### Import Private Key
   139  
   140  If you created a wallet with `aquachain.exe paper` or `aquachain wallet` you will have an unprotected private key. To send coins from the account derived from this key, you must import it into the console.
   141  
   142  to import a private key into the aquachain console:
   143  
   144  prepare your private key as a **simple text file with no spaces**. name it anything.txt for example
   145  
   146  run `aquachain.exe account import anything.txt`
   147  
   148  <b>make sure to delete/shred the private key txt file!!!</b>
   149  
   150  
   151  ### Backup Private Key
   152  
   153  Running `aquachain account list` will list all key locations. Simply copy these files and check that directory.