Skip to content

Commit

Permalink
add besu public.
Browse files Browse the repository at this point in the history
Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
  • Loading branch information
bgravenorst committed Jan 30, 2025
1 parent b677837 commit e03a591
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/public-networks/get-started/start-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ If you started Besu with the [`--rpc-http-enabled`](../reference/cli/options.md#
- `eth_chainId` returns the chain ID of the network.

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545/ -H "Content-Type: application/json"
```

- `eth_syncing` returns the starting, current, and highest block.

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545/ -H "Content-Type: application/json"
```

For example, after connecting to Mainnet, `eth_syncing` will return something similar to:
Expand Down
4 changes: 2 additions & 2 deletions docs/public-networks/how-to/use-besu-api/authenticate.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ Specify the `Bearer` in the header.
<TabItem value="cURL Request with authentication placeholders" label="cURL Request with authentication placeholders" default>

```bash
curl -X POST -H 'Authorization: Bearer <JWT_TOKEN>' -d '{"jsonrpc":"2.0","method":"<API_METHOD>","params":[],"id":1}' <JSON-RPC-http-hostname:port>
curl -X POST -H 'Authorization: Bearer <JWT_TOKEN>' -d '{"jsonrpc":"2.0","method":"<API_METHOD>","params":[],"id":1}' <JSON-RPC-http-hostname:port> -H "Content-Type: application/json"
```

</TabItem>

<TabItem value="cURL Request with authentication" label="cURL Request with authentication">

```bash
curl -X POST -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwidXNlcm5hbWUiOiJ1c2VyMiIsImlhdCI6MTU1MDQ2MTQxNiwiZXhwIjoxNTUwNDYxNzE2fQ.WQ1mqpqzRLHaoL8gOSEZPvnRs_qf6j__7A3Sg8vf9RKvWdNTww_vRJF1gjcVy-FFh96AchVnQyXVx0aNUz9O0txt8VN3jqABVWbGMfSk2T_CFdSw5aDjuriCsves9BQpP70Vhj-tseaudg-XU5hCokX0tChbAqd9fB2138zYm5M' -d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' http://localhost:8545
curl -X POST -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwidXNlcm5hbWUiOiJ1c2VyMiIsImlhdCI6MTU1MDQ2MTQxNiwiZXhwIjoxNTUwNDYxNzE2fQ.WQ1mqpqzRLHaoL8gOSEZPvnRs_qf6j__7A3Sg8vf9RKvWdNTww_vRJF1gjcVy-FFh96AchVnQyXVx0aNUz9O0txt8VN3jqABVWbGMfSk2T_CFdSw5aDjuriCsves9BQpP70Vhj-tseaudg-XU5hCokX0tChbAqd9fB2138zYm5M' -d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' http://localhost:8545/ -H "Content-Type: application/json"
```

</TabItem>
Expand Down
6 changes: 3 additions & 3 deletions docs/public-networks/how-to/use-besu-api/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ To make RPC requests over HTTP, you can use [`curl`](https://curl.haxx.se/downlo
<TabItem value="Syntax" label="Syntax" default>

```bash
curl -X POST --data '{"jsonrpc":"2.0","id":<request-ID>,"method":"<method-name>","params":[<method-parameters>]}' <JSON-RPC-http-endpoint:port>
curl -X POST --data '{"jsonrpc":"2.0","id":<request-ID>,"method":"<method-name>","params":[<method-parameters>]}' <JSON-RPC-http-endpoint:port> -H "Content-Type: application/json"
```

</TabItem>

<TabItem value="curl HTTP request" label="curl HTTP request">

```bash
curl -X POST --data '{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}' http://127.0.0.1:8555
curl -X POST --data '{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}' http://127.0.0.1:8555/ -H "Content-Type: application/json"
```

</TabItem>
Expand All @@ -120,7 +120,7 @@ You can use `curl` to make multiple RPC requests (batch requests) over HTTP at t
<TabItem value="curl HTTP request" label="curl HTTP request" default>

```bash
curl -X POST --data '[{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}, {"jsonrpc":"2.0","id":"2","method":"admin_peers","params":[]}]' http://127.0.0.1:8555
curl -X POST --data '[{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}, {"jsonrpc":"2.0","id":"2","method":"admin_peers","params":[]}]' http://127.0.0.1:8555/ -H "Content-Type: application/json"
```

</TabItem>
Expand Down

0 comments on commit e03a591

Please sign in to comment.