nim-json-rpc/eth-rpc/server/ethprocs.nim

185 lines
2.9 KiB
Nim
Raw Normal View History

import servertypes, cryptoutils, json, macros
2018-03-02 11:46:59 +00:00
var server = sharedRpcServer()
2018-03-02 11:46:59 +00:00
server.on("web3_clientVersion"):
result = %"Nimbus-RPC-Test"
server.on("web3_sha3") do(data: string):
let kres = k256(data)
result = %kres
2018-03-02 11:46:59 +00:00
proc net_version* {.rpc.} =
2018-03-27 15:08:31 +01:00
#[ See:
https://github.com/ethereum/interfaces/issues/6
https://github.com/ethereum/EIPs/issues/611
]#
2018-03-02 11:46:59 +00:00
discard
proc net_listening* {.rpc.} =
2018-03-27 15:08:31 +01:00
return %"true"
proc net_peerCount* {.rpc.} =
# TODO: Discovery integration
2018-03-02 11:46:59 +00:00
discard
proc eth_protocolVersion* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_syncing* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_coinbase* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_mining* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_hashrate* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_gasPrice* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_accounts* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_blockNumber* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
server.on("eth_getBalance") do(data: array[20, byte], quantity: int):
2018-03-02 11:46:59 +00:00
discard
proc eth_getStorageAt* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getTransactionCount* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getBlockTransactionCountByHash* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getBlockTransactionCountByNumber* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getUncleCountByBlockHash* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getUncleCountByBlockNumber* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getCode* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_sign* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_sendTransaction* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_sendRawTransaction* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_call* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_estimateGas* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getBlockByHash* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getBlockByNumber* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getTransactionByHash* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getTransactionByBlockHashAndIndex* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getTransactionByBlockNumberAndIndex* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getTransactionReceipt* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getUncleByBlockHashAndIndex* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getUncleByBlockNumberAndIndex* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getCompilers* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_compileLLL* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_compileSolidity* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_compileSerpent* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_newFilter* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_newBlockFilter* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_newPendingTransactionFilter* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_uninstallFilter* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getFilterChanges* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getFilterLogs* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getLogs* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_getWork* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_submitWork* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc eth_submitHashrate* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_post* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_version* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_newIdentity* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_hasIdentity* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_newGroup* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_addToGroup* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_newFilter* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_uninstallFilter* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_getFilterChanges* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard
proc shh_getMessages* {.rpc.} =
2018-03-02 11:46:59 +00:00
discard