Skip to content

Commit 043d161

Browse files
committed
chore: add midnight mainnet, drop testnets
1 parent 0e17e5e commit 043d161

7 files changed

Lines changed: 236 additions & 288 deletions

File tree

blockfrost-openapi.yaml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ info:
5959
<code>https://midnight-mainnet.blockfrost.io/api/v0</code>
6060
</td>
6161
</tr>
62-
<tr>
63-
<td>Midnight preview</td>
64-
<td>
65-
<code>https://midnight-preview.blockfrost.io/api/v0</code>
66-
</td>
67-
</tr>
6862
<tr>
6963
<td>InterPlanetary File System</td>
7064
<td>
@@ -251,7 +245,7 @@ info:
251245
Create a Midnight project on [blockfrost.io](https://blockfrost.io) and make your first API call:
252246
253247
```bash
254-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
248+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
255249
-H "project_id: YOUR_PROJECT_ID" \
256250
-H "Content-Type: application/json" \
257251
-d '{"query": "{ block { hash height timestamp } }"}'
@@ -276,13 +270,12 @@ info:
276270
277271
| Service | URL | Protocol |
278272
|---------|-----|----------|
279-
| **Midnight Indexer HTTP API** | `https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) |
280-
| **Midnight Indexer Subscriptions API** | `wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket |
281-
| **Midnight Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | JSON-RPC |
273+
| **Midnight Indexer HTTP API** | `https://midnight-mainnet.blockfrost.io/api/v0` | HTTP POST (GraphQL) |
274+
| **Midnight Indexer Subscriptions API** | `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket |
275+
| **Midnight Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | JSON-RPC |
282276
283277
284278
The **Node RPC** endpoint exposes direct connection to the Midnight Node RPC for low-level runtime access, wallet providers, and transaction submission — use it with libraries like [midnight.js](https://github.com/midnightntwrk/midnight-js) that need a node connection.
285-
Currently available networks are `preview` and `preprod`. The `mainnet` network is coming soon.
286279
287280
### Request Format
288281
@@ -342,19 +335,17 @@ info:
342335
343336
**Midnight Indexer API:**
344337
```
345-
https://nightpreview:YOUR_PROJECT_ID@midnight-preview.blockfrost.io/api/v0
346-
https://nightpreprod:YOUR_PROJECT_ID@midnight-preprod.blockfrost.io/api/v0
338+
https://nightmainnet:YOUR_PROJECT_ID@midnight-mainnet.blockfrost.io/api/v0
347339
```
348340
349341
**Midnight Node RPC:**
350342
```
351-
https://nightpreview:YOUR_PROJECT_ID@rpc.midnight-preview.blockfrost.io
352-
https://nightpreprod:YOUR_PROJECT_ID@rpc.midnight-preprod.blockfrost.io
343+
https://nightmainnet:YOUR_PROJECT_ID@rpc.midnight-mainnet.blockfrost.io
353344
```
354345
355346
When using WebSocket in the browser (which doesn't support custom headers), include your project ID as a subprotocol by prefixing it with `project_id_`:
356347
```javascript
357-
new WebSocket("wss://midnight-preview.blockfrost.io/api/v0/ws", [
348+
new WebSocket("wss://midnight-mainnet.blockfrost.io/api/v0/ws", [
358349
"graphql-transport-ws",
359350
"project_id_YOUR_PROJECT_ID"
360351
]);
@@ -364,23 +355,23 @@ info:
364355
365356
**Query the latest block:**
366357
```bash
367-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
358+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
368359
-H "project_id: YOUR_PROJECT_ID" \
369360
-H "Content-Type: application/json" \
370361
-d '{"query": "{ block { hash height timestamp author transactions { hash } } }"}'
371362
```
372363
373364
**Query a block by height:**
374365
```bash
375-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
366+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
376367
-H "project_id: YOUR_PROJECT_ID" \
377368
-H "Content-Type: application/json" \
378369
-d '{"query": "{ block(offset: { height: 3 }) { hash height protocolVersion timestamp transactions { hash } } }"}'
379370
```
380371
381372
**Query transactions by hash:**
382373
```bash
383-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
374+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
384375
-H "project_id: YOUR_PROJECT_ID" \
385376
-H "Content-Type: application/json" \
386377
-d '{"query": "{ transactions(offset: { hash: \"YOUR_TX_HASH\" }) { hash protocolVersion block { height hash } } }"}'
@@ -392,7 +383,7 @@ info:
392383
393384
**Connecting with `websocat`:**
394385
```bash
395-
websocat wss://midnight-preview.blockfrost.io/api/v0/ws \
386+
websocat wss://midnight-mainnet.blockfrost.io/api/v0/ws \
396387
--protocol "graphql-transport-ws" \
397388
-H "project_id: YOUR_PROJECT_ID"
398389
```
@@ -445,7 +436,7 @@ info:
445436
**Connecting from JavaScript:**
446437
```javascript
447438
const ws = new WebSocket(
448-
"wss://midnight-preview.blockfrost.io/api/v0/ws",
439+
"wss://midnight-mainnet.blockfrost.io/api/v0/ws",
449440
["graphql-transport-ws", "project_id_YOUR_PROJECT_ID"]
450441
);
451442

docs/blockfrost-openapi.yaml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,6 @@ info:
6969
<code>https://midnight-mainnet.blockfrost.io/api/v0</code>
7070
</td>
7171
</tr>
72-
<tr>
73-
<td>Midnight preview</td>
74-
<td>
75-
<code>https://midnight-preview.blockfrost.io/api/v0</code>
76-
</td>
77-
</tr>
7872
<tr>
7973
<td>InterPlanetary File System</td>
8074
<td>
@@ -336,7 +330,7 @@ info:
336330
337331
```bash
338332
339-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
333+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
340334
-H "project_id: YOUR_PROJECT_ID" \
341335
-H "Content-Type: application/json" \
342336
-d '{"query": "{ block { hash height timestamp } }"}'
@@ -371,12 +365,12 @@ info:
371365
|---------|-----|----------|
372366
373367
| **Midnight Indexer HTTP API** |
374-
`https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) |
368+
`https://midnight-mainnet.blockfrost.io/api/v0` | HTTP POST (GraphQL) |
375369
376370
| **Midnight Indexer Subscriptions API** |
377-
`wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket |
371+
`wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket |
378372
379-
| **Midnight Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` |
373+
| **Midnight Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` |
380374
JSON-RPC |
381375
382376
@@ -387,9 +381,6 @@ info:
387381
[midnight.js](https://github.com/midnightntwrk/midnight-js) that need a node
388382
connection.
389383
390-
Currently available networks are `preview` and `preprod`. The `mainnet`
391-
network is coming soon.
392-
393384
394385
### Request Format
395386
@@ -476,9 +467,7 @@ info:
476467
477468
```
478469
479-
https://nightpreview:YOUR_PROJECT_ID@midnight-preview.blockfrost.io/api/v0
480-
481-
https://nightpreprod:YOUR_PROJECT_ID@midnight-preprod.blockfrost.io/api/v0
470+
https://nightmainnet:YOUR_PROJECT_ID@midnight-mainnet.blockfrost.io/api/v0
482471
483472
```
484473
@@ -487,9 +476,7 @@ info:
487476
488477
```
489478
490-
https://nightpreview:YOUR_PROJECT_ID@rpc.midnight-preview.blockfrost.io
491-
492-
https://nightpreprod:YOUR_PROJECT_ID@rpc.midnight-preprod.blockfrost.io
479+
https://nightmainnet:YOUR_PROJECT_ID@rpc.midnight-mainnet.blockfrost.io
493480
494481
```
495482
@@ -499,7 +486,7 @@ info:
499486
500487
```javascript
501488
502-
new WebSocket("wss://midnight-preview.blockfrost.io/api/v0/ws", [
489+
new WebSocket("wss://midnight-mainnet.blockfrost.io/api/v0/ws", [
503490
"graphql-transport-ws",
504491
"project_id_YOUR_PROJECT_ID"
505492
]);
@@ -514,7 +501,7 @@ info:
514501
515502
```bash
516503
517-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
504+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
518505
-H "project_id: YOUR_PROJECT_ID" \
519506
-H "Content-Type: application/json" \
520507
-d '{"query": "{ block { hash height timestamp author transactions { hash } } }"}'
@@ -525,7 +512,7 @@ info:
525512
526513
```bash
527514
528-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
515+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
529516
-H "project_id: YOUR_PROJECT_ID" \
530517
-H "Content-Type: application/json" \
531518
-d '{"query": "{ block(offset: { height: 3 }) { hash height protocolVersion timestamp transactions { hash } } }"}'
@@ -536,7 +523,7 @@ info:
536523
537524
```bash
538525
539-
curl -X POST https://midnight-preview.blockfrost.io/api/v0 \
526+
curl -X POST https://midnight-mainnet.blockfrost.io/api/v0 \
540527
-H "project_id: YOUR_PROJECT_ID" \
541528
-H "Content-Type: application/json" \
542529
-d '{"query": "{ transactions(offset: { hash: \"YOUR_TX_HASH\" }) { hash protocolVersion block { height hash } } }"}'
@@ -554,7 +541,7 @@ info:
554541
555542
```bash
556543
557-
websocat wss://midnight-preview.blockfrost.io/api/v0/ws \
544+
websocat wss://midnight-mainnet.blockfrost.io/api/v0/ws \
558545
--protocol "graphql-transport-ws" \
559546
-H "project_id: YOUR_PROJECT_ID"
560547
```
@@ -630,7 +617,7 @@ info:
630617
```javascript
631618
632619
const ws = new WebSocket(
633-
"wss://midnight-preview.blockfrost.io/api/v0/ws",
620+
"wss://midnight-mainnet.blockfrost.io/api/v0/ws",
634621
["graphql-transport-ws", "project_id_YOUR_PROJECT_ID"]
635622
);
636623

0 commit comments

Comments
 (0)