Full list of geth terminal commands

  • Is there a comprehensive list of the commands available in the geth terminal anywhere?

    (eg. miner.start(), eth.accounts, admin.nodeInfo, etc.)

    `eth`, `admin`, `personal`, and `miner` are the only top level objects I'm aware of. I want to know if there are more. And I'd like to see the document of all of the properties of each.

    also debug, txpool management apis are present.

  • By running geth and entering the start of each of the global objects I'm aware of I can get the following lists, but I won't mark this as the correct answer as I'm sure there is documentation out there somewhere.

    > eth.

    eth._requestManager            eth.getBlockUncleCount         eth.getWork                    
    eth.accounts                   eth.getCode                    eth.hashrate                   
    eth.blockNumber                eth.getCoinbase                eth.iban                       
    eth.call                       eth.getCompilers               eth.icapNamereg                
    eth.coinbase                   eth.getGasPrice                eth.isSyncing                  
    eth.compile                    eth.getHashrate                eth.mining                     
    eth.constructor                eth.getMining                  eth.namereg                    
    eth.contract                   eth.getPendingTransactions     eth.pendingTransactions        
    eth.defaultAccount             eth.getProtocolVersion         eth.protocolVersion            
    eth.defaultBlock               eth.getRawTransaction          eth.resend                     
    eth.estimateGas                eth.getRawTransactionFromBlock eth.sendIBANTransaction        
    eth.filter                     eth.getStorageAt               eth.sendRawTransaction         
    eth.gasPrice                   eth.getSyncing                 eth.sendTransaction            
    eth.getAccounts                eth.getTransaction             eth.sign                       
    eth.getBalance                 eth.getTransactionCount        eth.signTransaction            
    eth.getBlock                   eth.getTransactionFromBlock    eth.submitTransaction          
    eth.getBlockNumber             eth.getTransactionReceipt      eth.submitWork                 
    eth.getBlockTransactionCount   eth.getUncle                   eth.syncing                    
    

    > personal.

    personal._requestManager personal.getListWallets  personal.newAccount      
    personal.constructor     personal.importRawKey    personal.sendTransaction 
    personal.deriveAccount   personal.listAccounts    personal.sign            
    personal.ecRecover       personal.listWallets     personal.unlockAccount   
    personal.getListAccounts personal.lockAccount     
    

    > admin.

    admin.addPeer              admin.importChain          admin.startRPC             
    admin.constructor          admin.isPrototypeOf        admin.startWS              
    admin.datadir              admin.nodeInfo             admin.stopRPC              
    admin.exportChain          admin.peers                admin.stopWS               
    admin.getDatadir           admin.propertyIsEnumerable admin.toLocaleString       
    admin.getNodeInfo          admin.removePeer           admin.toString             
    admin.getPeers             admin.sleep                admin.valueOf              
    admin.hasOwnProperty       admin.sleepBlocks          
    

    > miner.

    miner.constructor          miner.setEtherbase         miner.toLocaleString       
    miner.getHashrate          miner.setExtra             miner.toString             
    miner.hasOwnProperty       miner.setGasPrice          miner.valueOf              
    miner.isPrototypeOf        miner.start                
    miner.propertyIsEnumerable miner.stop                 
    
  • You can find the commands and details at Geth github wiki page. It explains commands with examples and details under three main categories.

    1. Managing accounts
    2. Mining
    3. List item

    for eg. under Examples of Interactive use in managing accounts you can see

    creating an account

    $ geth account new
    Your new account is locked with a password. Please give a password. Do not forget this password.
    Passphrase:
    Repeat Passphrase:
    Address: {168bc315a2ee09042d83d7c5811b533620531f67}
    

    For interactions with JavaScript console, Javascript API Reference will be useful.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM

Tags used