Skip to content

Commit ebb2525

Browse files
authored
Merge branch 'main' into 1778-api-reference
2 parents 36c9f26 + ca24212 commit ebb2525

File tree

89 files changed

+2162
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2162
-47
lines changed

docs/whats-new.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
1111

1212
## December 2024
1313

14+
- Documented [Swellchain](/services/reference/swellchain) support. ([#1776](https://github.com/MetaMask/metamask-docs/pull/1776))
1415
- Documented [Snap Notifications Expanded View](/snaps/features/notifications/#expanded-view).
1516
([#1774](https://github.com/MetaMask/metamask-docs/pull/1774))
1617
- Documented [`snap_getInterfaceContext`](/snaps/reference/snaps-api/#snap_getinterfacecontext).

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ const config = {
336336
appId: "AWX4QVM59R",
337337

338338
// Public API key: it is safe to commit it
339-
apiKey: "6095a25a6824bfa909fa0692e6847ec4",
339+
apiKey: "861f327c200a8eab62a28ee1396f90de",
340340

341341
indexName: "mm--v2-staging",
342342

services/get-started/endpoints.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ Include your authentication details when [making IPFS requests](/reference/ipfs/
155155
| Mainnet | JSON-RPC over HTTPS | `https://starknet-mainnet.infura.io/v3/<YOUR-API-KEY>` |
156156
| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://starknet-sepolia.infura.io/v3/<YOUR-API-KEY>` |
157157

158+
## Swellchain
159+
160+
| Network | Description | URL |
161+
|---------|---------------------|----------------------------------------------------------|
162+
| Mainnet | JSON-RPC over HTTPS | `https://swellchain-mainnet.infura.io/v3/<YOUR-API-KEY>` |
163+
| Testnet | JSON-RPC over HTTPS | `https://swellchain-testnet.infura.io/v3/<YOUR-API-KEY>` |
164+
158165
## Unichain
159166

160167
| Network | Description | URL |

services/how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Traffic is billed at the same price as access to IPFS via the Infura API:
110110
- 5GB data transfer up free.
111111
- 5GB data transfer down free.
112112

113-
Anything above those limits are charged at:
113+
Anything above those limits is charged at:
114114

115115
- Unlimited storage at **$0.08/GB/month.**
116116
- Unlimited data transfer at **$0.12/GB/month.**

services/reference/ethereum/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
6969
```javascript title="index.js"
7070
import fetch from "node-fetch"
7171

72-
fetch("https://mainnet.infura.io.infura.io/v3/<YOUR-API-KEY>", {
72+
fetch("https://mainnet.infura.io/v3/<YOUR-API-KEY>", {
7373
method: "POST",
7474
headers: {
7575
"Content-Type": "application/json",
@@ -112,7 +112,7 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
112112
const axios = require("axios")
113113

114114
axios
115-
.post("https://mainnet.infura.io.infura.io/v3/<YOUR-API-KEY>", {
115+
.post("https://mainnet.infura.io/v3/<YOUR-API-KEY>", {
116116
jsonrpc: "2.0",
117117
method: "eth_blockNumber",
118118
params: [],
@@ -148,7 +148,7 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
148148
const ethers = require("ethers")
149149

150150
const provider = new ethers.providers.JsonRpcProvider(
151-
"https://mainnet.infura.io.infura.io/v3/<YOUR-API-KEY>"
151+
"https://mainnet.infura.io/v3/<YOUR-API-KEY>"
152152
)
153153

154154
provider

services/reference/ipfs/http-api-methods/dag_import.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ curl "https://ipfs.infura.io:5001/api/v0/dag/import?pin-roots=true&silent=<value
4343
#### Request parameters
4444

4545
- `file` : _string_ - path to the `.car` file.
46-
- `pin-roots:` _boolean_ - pin the root listed in the .car headers after importing. The default is `true`. Only one DAG root can be pinned per request.
47-
- `silent` : _boolean -_ no output.
48-
- `stats`: _boolean -_ output statistics.
46+
- `pin-roots` : _boolean_ - pin the root listed in the .car headers after importing. The default is `true`. Only one DAG root can be pinned per request.
47+
- `silent` : _boolean_ - no output.
48+
- `stats`: _boolean_ - output statistics.
4949
- `allow-big-block`: _boolean_ - disable the block size check and allow the creation of blocks bigger than 1 MiB. The default is `false`. Bigger blocks won't be transferable over the standard bitswap.
5050

5151
### Response
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
description: Swellchain documentation.
3+
---
4+
5+
import CardList from '@site/src/components/CardList'
6+
7+
# Swellchain
8+
9+
:::note Decentralized Infrastructure Network (DIN)
10+
11+
Swellchain is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
12+
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).
13+
14+
:::
15+
16+
Swellchain is a Layer 2 (L2) network built on the [OP Stack](https://docs.optimism.io/stack/getting-started#the-op-stack-today).
17+
The network extends Ethereum's security using EigenLayer's restaking mechanism, and uses Optimism's reliable
18+
infrastructure for efficient transaction processing and scalability.
19+
20+
:::info See also
21+
22+
- The [official Swellchain documentation](https://build.swellnetwork.io/) for more information.
23+
- The official
24+
[Optimism Ethereum JSON-RPC API documentation](https://docs.optimism.io/builders/node-operators/json-rpc)
25+
(Bedrock release) for custom Swellchain methods.
26+
27+
:::
28+
29+
Select an option below to get started with the Swellchain network.
30+
31+
<CardList
32+
items={[
33+
{
34+
href: "quickstart",
35+
title: "Quickstart",
36+
description: "Learn how to quickly connect and make calls to Swellchain."
37+
},
38+
{
39+
href: "json-rpc-methods",
40+
title: "JSON-RPC APIs",
41+
description: "View the APIs available for communicating with Swellchain."
42+
},
43+
{
44+
href: "../../../developer-tools/dashboard/get-started/create-api/",
45+
title: "Create an API key",
46+
description: "Learn how to create an API key and secure and share it with your team."
47+
}
48+
]}
49+
/>
50+
51+
## Partners and privacy policies
52+
53+
The following partners provide access to Swellchain:
54+
- Infstones ([Privacy Policy](https://infstones.com/terms/privacy-notice))
55+
- NorthWest Nodes
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://swellchain-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
</Tabs>
16+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Tabs from "@theme/Tabs";
2+
import TabItem from "@theme/TabItem";
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://swellchain-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
</Tabs>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://swellchain-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
</Tabs>

0 commit comments

Comments
 (0)