Add 'tx' as API command

Also change block parameter name to 'blockhash'