mirror of
https://github.com/status-im/nim-json-rpc.git
synced 2025-02-23 01:38:16 +00:00
* Upgrade rpc router internals * use new chronos asyncraises * Fix style mismatch * Fix nim v2 compilation error * Addresing review * Remove unnecessary custom serializer and let the library do the work * fix error message * Update readme.md
55 lines
2.7 KiB
Nim
55 lines
2.7 KiB
Nim
## This module contains signatures for the Ethereum client RPCs.
|
|
## The signatures are not imported directly, but read and processed with parseStmt,
|
|
## then a procedure body is generated to marshal native Nim parameters to json and visa versa.
|
|
import json, stint, ethtypes
|
|
|
|
proc web3_clientVersion(): string
|
|
proc web3_sha3(data: string): string
|
|
proc net_version(): string
|
|
proc net_peerCount(): int
|
|
proc net_listening(): bool
|
|
proc eth_protocolVersion(): string
|
|
proc eth_syncing(): JsonNode
|
|
proc eth_coinbase(): string
|
|
proc eth_mining(): bool
|
|
proc eth_hashrate(): int
|
|
proc eth_gasPrice(): int64
|
|
proc eth_accounts(): seq[array[20, byte]]
|
|
proc eth_blockNumber(): int
|
|
proc eth_getBalance(data: array[20, byte], quantityTag: string): int
|
|
proc eth_getStorageAt(data: array[20, byte], quantity: int, quantityTag: string): seq[byte]
|
|
proc eth_getTransactionCount(data: array[20, byte], quantityTag: string)
|
|
proc eth_getBlockTransactionCountByHash(data: array[32, byte])
|
|
proc eth_getBlockTransactionCountByNumber(quantityTag: string)
|
|
proc eth_getUncleCountByBlockHash(data: array[32, byte])
|
|
proc eth_getUncleCountByBlockNumber(quantityTag: string)
|
|
proc eth_getCode(data: array[20, byte], quantityTag: string): seq[byte]
|
|
proc eth_sign(data: array[20, byte], message: seq[byte]): seq[byte]
|
|
proc eth_sendTransaction(obj: EthSend): UInt256
|
|
proc eth_sendRawTransaction(data: string, quantityTag: int): UInt256
|
|
proc eth_call(call: EthCall, quantityTag: string): UInt256
|
|
proc eth_estimateGas(call: EthCall, quantityTag: string): UInt256
|
|
proc eth_getBlockByHash(data: array[32, byte], fullTransactions: bool): BlockObject
|
|
proc eth_getBlockByNumber(quantityTag: string, fullTransactions: bool): BlockObject
|
|
proc eth_getTransactionByHash(data: Uint256): TransactionObject
|
|
proc eth_getTransactionByBlockHashAndIndex(data: UInt256, quantity: int): TransactionObject
|
|
proc eth_getTransactionByBlockNumberAndIndex(quantityTag: string, quantity: int): TransactionObject
|
|
proc eth_getTransactionReceipt(data: UInt256): ReceiptObject
|
|
proc eth_getUncleByBlockHashAndIndex(data: UInt256, quantity: int64): BlockObject
|
|
proc eth_getUncleByBlockNumberAndIndex(quantityTag: string, quantity: int64): BlockObject
|
|
proc eth_getCompilers(): seq[string]
|
|
proc eth_compileLLL(): seq[byte]
|
|
proc eth_compileSolidity(): seq[byte]
|
|
proc eth_compileSerpent(): seq[byte]
|
|
proc eth_newBlockFilter(): int
|
|
proc eth_newPendingTransactionFilter(): int
|
|
proc eth_uninstallFilter(filterId: int): bool
|
|
proc eth_getWork(): seq[UInt256]
|
|
proc eth_submitWork(nonce: int64, powHash: Uint256, mixDigest: Uint256): bool
|
|
proc eth_submitHashrate(hashRate: UInt256, id: Uint256): bool
|
|
proc shh_post(): string
|
|
proc shh_newIdentity(): array[60, byte]
|
|
proc shh_hasIdentity(identity: array[60, byte]): bool
|
|
proc shh_newGroup(): array[60, byte]
|
|
proc shh_uninstallFilter(id: int): bool
|