Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Jul 13, 2024
1 parent 4a79ae4 commit b04389d
Show file tree
Hide file tree
Showing 13 changed files with 195 additions and 1,626 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Define a live code block by adding a `codesandbox` key to the code block.
For example:
````jsx
;```javascript codesandbox=vanilla
```javascript codesandbox=vanilla
// JavaScript live code block
```
````
Expand Down
2 changes: 1 addition & 1 deletion developer-tools/dashboard/get-started/create-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To create an API key:
<div class="left-align-container">
<div class="img-large">
<img
src={require('../../images/create_key.png').default}
src={require("../../images/create_key.png").default}
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions developer-tools/dashboard/how-to/network-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ sidebar_position: 8
# View the network status

View the [Infura status page](https://status.infura.io/) to check for service outages and other incidents, as well as
scheduled maintenance notices. You can also subscribe to status updates via email, SMS, webhook, Slack and Atom/RSS.
scheduled maintenance notices. You can also subscribe to status updates via email, SMS, webhook, Slack, and Atom/RSS.

You can also select the **Status** link at the top of the Infura dashboard to view the status page.

<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../images/status-page.png').default}
src={require("../../images/status-page.png").default}
/>
</div>
</div>
4 changes: 2 additions & 2 deletions developer-tools/dashboard/how-to/project-sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To share an API key:
<div class="left-align-container">
<div class="img-large">
<img
src={require('../../images/invite-member-button.png').default}
src={require("../../images/invite-member-button.png").default}
/>
</div>
</div>
Expand Down Expand Up @@ -82,7 +82,7 @@ You can view all keys that you own, and all keys shared with you, by selecting *
<div class="left-align-container">
<div class="img-large">
<img
src={require('../../images/update-role.png').default}
src={require("../../images/update-role.png").default}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In the API key's **Settings** tab, select **Require API Key secret for all reque
<div class="left-align-container">
<div class="img-large">
<img
src={require('../../../images/security-page.png').default}
src={require("../../../images/security-page.png").default}
/>
</div>
</div>
Expand All @@ -47,15 +47,15 @@ In the API key's **Settings** tab, select **Require API Key secret for all reque
```bash
curl --user :<YOUR-API-KEY-SECRET> \
https://mainnet.infura.io/v3/<YOUR-API-KEY> \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```

</TabItem>
<TabItem value="WebSocket" label="WebSocket" >

```bash
wscat -c wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY> --auth ":<YOUR-API-KEY-SECRET>"
> {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}
> {"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}
```

</TabItem>
Expand Down
2 changes: 1 addition & 1 deletion developer-tools/dashboard/how-to/secure-an-api/api-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ security features such as [JSON Web Tokens (JWTs)](use-jwts.md) and [allowlists]
<div class="left-align-container">
<div class="img-large">
<img
src={require('../../../images/project_page.png').default}
src={require("../../../images/project_page.png").default}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Set rate limits to control access to the API key and to limit costs in case of a
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/rate-limiting-settings.png').default}
src={require("../../../images/rate-limiting-settings.png").default}
/>
</div>
</div
</div>

- **PER SECOND REQUESTS RATE-LIMITING** restricts requests per second for the API key. Set the maximum number of requests per second in decimals, e.g. 1.2. Whenever the rate of requests exceeds this value, requests are rejected. When the rate of requests drops below the limit again, requests are accepted again.
Expand Down
36 changes: 23 additions & 13 deletions developer-tools/dashboard/how-to/secure-an-api/use-an-allowlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Add the restriction details in the **ALLOWLISTS** section of your API key's **Se
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/allowlist.png').default}
src={require("../../../images/allowlist.png").default}
/>
</div>
</div>
Expand Down Expand Up @@ -57,7 +57,7 @@ To allow a specific Ethereum address, click **ADD** and input it into the **CONT
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/address-allowlist.png').default}
src={require("../../../images/address-allowlist.png").default}
/>
</div>
</div>
Expand All @@ -66,15 +66,19 @@ Test with a method from the list.

```bash
curl https://mainnet.infura.io/v3/<PROJECT_ID> \
-H 'Content-Type: application/json' \
-X POST \
-d '{"id":1, "jsonrpc": "2.0", "method": "eth_getBalance","params":["0xfe05a3e72235c9f92fd9f2282f41a8154d6d342b", "latest"]}'
-H 'Content-Type: application/json' \
-X POST \
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xfe05a3e72235c9f92fd9f2282f41a8154d6d342b", "latest"], "id": 1}'
```

Result:

```bash
{"jsonrpc":"2.0","id":1,"result":"0x0"}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```

## User agents
Expand Down Expand Up @@ -104,7 +108,7 @@ the **USER AGENTS** allowlist.
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/user-agents.png').default}
src={require("../../../images/user-agents.png").default}
/>
</div>
</div>
Expand All @@ -113,15 +117,21 @@ Test with a simple call from a desktop terminal.

```bash
curl https://mainnet.infura.io/v3/<PROJECT_ID> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
```

Result:

```bash
{"jsonrpc":"2.0","error":{"code":-32002,"message":"rejected due to project ID settings"}}ash
{
"jsonrpc": "2.0",
"error": {
"code": -32002,
"message": "rejected due to project ID settings"
}
}
```

## Origins
Expand Down Expand Up @@ -166,7 +176,7 @@ Use the dropdown list to select a method.
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/api-request-method.png').default}
src={require("../../../images/api-request-method.png").default}
/>
</div>
</div>
Expand All @@ -185,7 +195,7 @@ URL isn't on your allowlist, provided they include both the API key and the API
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/allowlist-toggle.png').default}
src={require("../../../images/allowlist-toggle.png").default}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion developer-tools/dashboard/how-to/secure-an-api/use-jwts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Input the **JWT PUBLIC KEY NAME** and the key and select **ADD**.
<div class="left-align-container">
<div class="img-medium">
<img
src={require('../../../images/jwt-token-settings.png').default}
src={require("../../../images/jwt-token-settings.png").default}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To log in without a 2FA device, log in to Infura with your username and password
<div class="left-align-container">
<div class="img-small">
<img
src={require('../../images/login2FA.png').default}
src={require("../../images/login2FA.png").default}
/>
</div>
</div>
Expand Down
34 changes: 17 additions & 17 deletions developer-tools/dashboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ Don't have an API key? Sign up for our free plan and start using the Infura serv
Select one of the cards below to learn more about using the Infura dashboard.

<CardList
items={[
{
href: "get-started/create-api",
title: "Create an API key",
description: "Learn how to create an API key that allows you to make API calls."
},
{
href: "how-to/secure-an-api/api-key",
title: "Secure your API key",
description: "Learn how to secure your API key to avoid unwanted costs and unauthorized access."
},
{
href: "how-to/dashboard-stats",
title: "Monitor API call stats",
description: "Learn how to use the dashboard to view API call stats."
}
]}
items={[
{
href: "get-started/create-api",
title: "Create an API key",
description: "Learn how to create an API key that allows you to make API calls."
},
{
href: "how-to/secure-an-api/api-key",
title: "Secure your API key",
description: "Learn how to secure your API key to avoid unwanted costs and unauthorized access."
},
{
href: "how-to/dashboard-stats",
title: "Monitor API call stats",
description: "Learn how to use the dashboard to view API call stats."
}
]}
/>
Loading

0 comments on commit b04389d

Please sign in to comment.