> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autheo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ETH

## `eth_syncing`

Returns an object with data about the sync status or false.

**Parameters**

None

**Returns**

The precise return data varies between client implementations. All clients return False when the node is not syncing, and all clients return the following fields:

* `Object`: \[Boolean], An object with sync status data or FALSE, when not syncing.
* `startingBlock`: QUANTITY - The block at which the import started (will only be reset, after the sync reached his head)
* `currentBlock`: QUANTITY - The current block, same as eth\_blockNumber
* `highestBlock`: QUANTITY - The estimated highest block

**Example**

```
// Request
 curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
// Result
{"jsonrpc":"2.0","id":1,"result":false}
```

## `eth_chainId`

Returns the chain ID used for signing replay-protected transactions.

**Parameters**

None

**Returns**

`chainId`: hexadecimal value as a string representing the integer of the current chain ID.

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67}'
// Result
{"jsonrpc":"2.0","id":67,"result":"0x311"}
```

## `eth_accounts`

Returns a list of addresses owned by client.

**Parameters**

None

**Returns**

`DATA`, 20 Bytes - \[Array] of addresses owned by the client.

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
// Result
{"jsonrpc":"2.0","id":1,"result":[]}
```

## `eth_getBalance`

Returns the balance of the account of given address.

**Parameters**

* `DATA`, 20 Bytes - address to check for balance.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe", or "finalized", see the default block parameter
* `params`: `["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"]`

**Returns**

`QUANTITY` - integer of the current balance in wei.

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xeeCC2FA50180e7c929C814a8bD65e45f81994327", "latest"],"id":1}'
// Response
{"jsonrpc":"2.0","id":1,"result":"0xc75d5bd30345f400"}
```

## `eth_getStorageAt`

Returns the value from a storage position at a given address.

**Parameters**

* `DATA`, 20 Bytes - address of the storage.
* `QUANTITY` - integer of the position in the storage.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe", "finalized", see the default block parameter

**Returns**

`DATA` - the value at this storage position.

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method": "eth_getStorageAt", "params": ["0x295a70b2de5e39532 354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
// Response
{"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"}
```

## `eth_getCode`

Returns code at a given address.

**Parameters**

* `DATA`, 20 Bytes - address
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe" or "finalized", see the default block parameter
* `params`: `["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x5daf3b", // 6139707]`

**Returns**

`DATA` - the code from the given address.

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getCode","params":["0x412d0675cae6C384629Ad47EA74eA4747375B09b", "0xa8bdd"],"id":1}'
// Response
Either the returns the representation of the smart contract or if no smart contract found:
{"jsonrpc": "2.0", "id": 1, "result": "0x"}
```

## `eth_sign`

The sign method calculates an Ethereum specific signature with: `sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.

By adding a prefix to the message it makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious dApp can sign arbitrary data (e.g. transactions) and use the signature to impersonate the victim.

Note: the address to sign with must be unlocked.

**Parameters**

* `DATA`, 20 Bytes - address
* `DATA`, N Bytes - message to sign

**Returns**

`DATA`: Signature

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_sign","params":["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83", "0xdeadbeaf"],"id":1}'
// Result
{"id":1, "jsonrpc": "2.0", "result": "0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"}
```

## `eth_call`

Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the balanceOf for an ERC-20 contract.

**Parameters**

* `Object` - The transaction call object
* `from`: `DATA`, 20 Bytes - (optional) The address the transaction is sent from.
* `to`: `DATA`, 20 Bytes - The address the transaction is directed to.
* `gas`: `QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth\_call consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice`: `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas
* `value`: `QUANTITY` - (optional) Integer of the value sent with this transaction
* `input`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe" or "finalized", see the default block parameter

**Returns**

`DATA` - the return value of executed contract.

**Example**

```
// Request
curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}'
// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x"
}
```
