Implement API for transaction retrieval

For now it only supports transactions in mined blocks
Fix NameService JSON-RPC API to return envelope hash instead of a tx hash