21

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

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

2
  • 3
    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. Oct 18, 2017 at 3:42
  • 1
    also debug, txpool management apis are present. Apr 6, 2019 at 5:13

4 Answers 4

31

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                 
1
6

You can check the management APIs

Management API

2

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.

0

JSON RPC section in the official geth documentation looks like the most complete API overview at the end of 2022:

https://geth.ethereum.org/docs/rpc/server

Top level objects are:

Real-time Events
Batch requests
GraphQL Server
admin Namespace
clique Namespace
debug Namespace
eth Namespace
les Namespace
miner Namespace
net Namespace
personal Namespace
txpool Namespace
Objects

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.