From c67033604ff597353bd815195753f25240a6a057 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 7 Apr 2026 13:28:35 +0200 Subject: [PATCH 1/2] fix: redirect /midnight to /midnight/ to prevent broken css --- vercel.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..b5f232b8 --- /dev/null +++ b/vercel.json @@ -0,0 +1,9 @@ +{ + "redirects": [ + { + "source": "/midnight", + "destination": "/midnight/", + "permanent": true + } + ] +} From 8fd61c7cce71a77e4f45fa07c4ce9fc65b8b95c6 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 7 Apr 2026 15:52:46 +0200 Subject: [PATCH 2/2] chore: midnight preview, preprod --- blockfrost-openapi.yaml | 8 +- docs/blockfrost-openapi.yaml | 9 +- docs/midnight/index.html | 267 ++++++++++++++++++----------------- openapi.json | 2 +- openapi.yaml | 9 +- spectaql.yaml | 16 ++- src/definitions.yaml | 8 +- 7 files changed, 166 insertions(+), 153 deletions(-) diff --git a/blockfrost-openapi.yaml b/blockfrost-openapi.yaml index 2ad94a07..30c1c51a 100644 --- a/blockfrost-openapi.yaml +++ b/blockfrost-openapi.yaml @@ -234,11 +234,13 @@ info: The Midnight Indexer API exposes a GraphQL API that enables clients to query and subscribe to blockchain data — blocks, transactions, contracts, and wallet-related events — indexed from the Midnight blockchain. + Available networks: `mainnet`, `preprod`, `preview` + | Service | URL | Protocol | |---------|-----|----------| - | **Indexer HTTP API** | `https://midnight-mainnet.blockfrost.io/api/v0` | HTTP POST (GraphQL) | - | **Indexer Subscriptions API** | `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket | - | **Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | JSON-RPC | + | **Indexer HTTP API** | `https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) | + | **Indexer Subscriptions API** | `wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket | + | **Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | JSON-RPC | For the full documentation — queries, mutations, subscriptions, authentication options, and examples — see the Midnight GraphQL API Reference: diff --git a/docs/blockfrost-openapi.yaml b/docs/blockfrost-openapi.yaml index f193e51b..89986bae 100644 --- a/docs/blockfrost-openapi.yaml +++ b/docs/blockfrost-openapi.yaml @@ -312,17 +312,20 @@ info: wallet-related events — indexed from the Midnight blockchain. + Available networks: `mainnet`, `preprod`, `preview` + + | Service | URL | Protocol | |---------|-----|----------| - | **Indexer HTTP API** | `https://midnight-mainnet.blockfrost.io/api/v0` | + | **Indexer HTTP API** | `https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) | | **Indexer Subscriptions API** | - `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket | + `wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket | - | **Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | JSON-RPC | + | **Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | JSON-RPC | diff --git a/docs/midnight/index.html b/docs/midnight/index.html index a99eab12..a246162a 100644 --- a/docs/midnight/index.html +++ b/docs/midnight/index.html @@ -223,7 +223,7 @@

Quick Start

Endpoints

-

Blockfrost exposes three Midnight services:

+

Blockfrost exposes three Midnight services. Available networks: mainnet, preprod, preview.

@@ -234,15 +234,15 @@

Endpoints

- + - + - +
Indexer APIhttps://midnight-mainnet.blockfrost.io/api/v0https://midnight-{network}.blockfrost.io/api/v0
Indexer WebSocketwss://midnight-mainnet.blockfrost.io/api/v0/wswss://midnight-{network}.blockfrost.io/api/v0/ws
Node RPChttps://rpc.midnight-mainnet.blockfrost.iohttps://rpc.midnight-{network}.blockfrost.io
@@ -268,10 +268,11 @@

Authentication

Query parameter

Append ?project_id=YOUR_PROJECT_ID to the endpoint URL. Use this when your client doesn't support setting custom headers (e.g. Midnight.js SDK).

-
https://midnight-mainnet.blockfrost.io/api/v0?project_id=YOUR_PROJECT_ID
-wss://midnight-mainnet.blockfrost.io/api/v0/ws?project_id=YOUR_PROJECT_ID
-https://rpc.midnight-mainnet.blockfrost.io?project_id=YOUR_PROJECT_ID
+                  
https://midnight-{network}.blockfrost.io/api/v0?project_id=YOUR_PROJECT_ID
+wss://midnight-{network}.blockfrost.io/api/v0/ws?project_id=YOUR_PROJECT_ID
+https://rpc.midnight-{network}.blockfrost.io?project_id=YOUR_PROJECT_ID
 
+

Replace {network} with mainnet, preprod, or preview.

@@ -787,7 +788,7 @@
Response
"data": { "block": { "hash": HexEncoded, - "height": 123, + "height": 987, "protocolVersion": 123, "timestamp": 123, "author": HexEncoded, @@ -874,12 +875,12 @@
Response
"data": { "committee": [ { - "epochNo": 123, + "epochNo": 987, "position": 123, - "sidechainPubkeyHex": "xyz789", + "sidechainPubkeyHex": "abc123", "expectedSlots": 123, "auraPubkeyHex": "xyz789", - "poolIdHex": "xyz789", + "poolIdHex": "abc123", "spoSkHex": "abc123" } ] @@ -1163,11 +1164,11 @@
Response
"data": { "dParameterHistory": [ { - "blockHeight": 123, + "blockHeight": 987, "blockHash": HexEncoded, "timestamp": 123, - "numPermissionedCandidates": 123, - "numRegisteredCandidates": 123 + "numPermissionedCandidates": 987, + "numRegisteredCandidates": 987 } ] } @@ -1254,8 +1255,8 @@
Response
"dustAddress": DustAddress, "registered": true, "nightBalance": "xyz789", - "generationRate": "xyz789", - "maxCapacity": "xyz789", + "generationRate": "abc123", + "maxCapacity": "abc123", "currentCapacity": "xyz789", "utxoTxHash": HexEncoded, "utxoOutputIndex": 123 @@ -1353,7 +1354,7 @@
Query
Variables
-
{"epoch": 987, "limit": 123, "offset": 123}
+                  
{"epoch": 987, "limit": 987, "offset": 987}
 
@@ -1362,12 +1363,12 @@
Response
"data": { "epochPerformance": [ { - "epochNo": 987, - "spoSkHex": "abc123", - "produced": 987, + "epochNo": 123, + "spoSkHex": "xyz789", + "produced": 123, "expected": 987, "identityLabel": "abc123", - "stakeSnapshot": "abc123", + "stakeSnapshot": "xyz789", "poolIdHex": "xyz789", "validatorClass": "abc123" } @@ -1433,12 +1434,12 @@
Query
Variables
-
{"epoch": 987}
+                  
{"epoch": 123}
 
Response
-
{"data": {"epochUtilization": 123.45}}
+                  
{"data": {"epochUtilization": 987.65}}
 
@@ -1513,12 +1514,12 @@
Response
{
   "data": {
     "poolMetadata": {
-      "poolIdHex": "xyz789",
-      "hexId": "xyz789",
+      "poolIdHex": "abc123",
+      "hexId": "abc123",
       "name": "xyz789",
       "ticker": "abc123",
-      "homepageUrl": "xyz789",
-      "logoUrl": "abc123"
+      "homepageUrl": "abc123",
+      "logoUrl": "xyz789"
     }
   }
 }
@@ -1610,7 +1611,7 @@ 
Query
Variables
-
{"limit": 123, "offset": 123, "withNameOnly": true}
+                  
{"limit": 987, "offset": 123, "withNameOnly": true}
 
@@ -1619,12 +1620,12 @@
Response
"data": { "poolMetadataList": [ { - "poolIdHex": "abc123", - "hexId": "abc123", + "poolIdHex": "xyz789", + "hexId": "xyz789", "name": "xyz789", "ticker": "abc123", "homepageUrl": "xyz789", - "logoUrl": "abc123" + "logoUrl": "xyz789" } ] } @@ -1691,7 +1692,7 @@
Query
Variables
-
{"uptoEpoch": 123}
+                  
{"uptoEpoch": 987}
 
@@ -1783,7 +1784,7 @@
Query
Variables
-
{"fromEpoch": 987, "toEpoch": 123}
+                  
{"fromEpoch": 123, "toEpoch": 123}
 
@@ -1879,7 +1880,7 @@
Query
Variables
-
{"fromEpoch": 123, "toEpoch": 123}
+                  
{"fromEpoch": 987, "toEpoch": 123}
 
@@ -1974,7 +1975,7 @@
Query
Variables
-
{"fromEpoch": 123, "toEpoch": 123}
+                  
{"fromEpoch": 123, "toEpoch": 987}
 
@@ -1982,7 +1983,7 @@
Response
{
   "data": {
     "registeredTotalsSeries": [
-      {"epochNo": 987, "totalRegistered": 123, "newlyRegistered": 123}
+      {"epochNo": 123, "totalRegistered": 987, "newlyRegistered": 987}
     ]
   }
 }
@@ -2062,14 +2063,14 @@ 
Response
{
   "data": {
     "spoByPoolId": {
-      "poolIdHex": "xyz789",
+      "poolIdHex": "abc123",
       "validatorClass": "xyz789",
       "sidechainPubkeyHex": "abc123",
       "auraPubkeyHex": "abc123",
-      "name": "xyz789",
-      "ticker": "abc123",
+      "name": "abc123",
+      "ticker": "xyz789",
       "homepageUrl": "abc123",
-      "logoUrl": "xyz789"
+      "logoUrl": "abc123"
     }
   }
 }
@@ -2211,7 +2212,7 @@ 
Query
Response
-
{"data": {"spoCount": 123}}
+                  
{"data": {"spoCount": 987}}
 
@@ -2302,7 +2303,7 @@
Response
"poolIdHex": "abc123", "mainchainPubkeyHex": "abc123", "sidechainPubkeyHex": "xyz789", - "auraPubkeyHex": "abc123", + "auraPubkeyHex": "xyz789", "validatorClass": "abc123" } ] @@ -2373,7 +2374,7 @@
Query
Variables
-
{"poolIdHex": "abc123"}
+                  
{"poolIdHex": "xyz789"}
 
@@ -2381,9 +2382,9 @@
Response
{
   "data": {
     "spoIdentityByPoolId": {
-      "poolIdHex": "abc123",
+      "poolIdHex": "xyz789",
       "mainchainPubkeyHex": "xyz789",
-      "sidechainPubkeyHex": "xyz789",
+      "sidechainPubkeyHex": "abc123",
       "auraPubkeyHex": "xyz789",
       "validatorClass": "abc123"
     }
@@ -2480,7 +2481,7 @@ 
Query
Variables
{
-  "limit": 123,
+  "limit": 987,
   "offset": 123,
   "search": "abc123"
 }
@@ -2494,10 +2495,10 @@ 
Response
{ "poolIdHex": "abc123", "validatorClass": "abc123", - "sidechainPubkeyHex": "abc123", + "sidechainPubkeyHex": "xyz789", "auraPubkeyHex": "abc123", - "name": "xyz789", - "ticker": "abc123", + "name": "abc123", + "ticker": "xyz789", "homepageUrl": "xyz789", "logoUrl": "xyz789" } @@ -2595,9 +2596,9 @@
Query
Variables
{
-  "spoSkHex": "xyz789",
+  "spoSkHex": "abc123",
   "limit": 123,
-  "offset": 987
+  "offset": 123
 }
 
@@ -2608,11 +2609,11 @@
Response
"spoPerformanceBySpoSk": [ { "epochNo": 123, - "spoSkHex": "abc123", + "spoSkHex": "xyz789", "produced": 123, - "expected": 987, + "expected": 123, "identityLabel": "abc123", - "stakeSnapshot": "xyz789", + "stakeSnapshot": "abc123", "poolIdHex": "xyz789", "validatorClass": "xyz789" } @@ -2700,7 +2701,7 @@
Query
Variables
-
{"limit": 987, "offset": 987}
+                  
{"limit": 123, "offset": 123}
 
@@ -2714,9 +2715,9 @@
Response
"produced": 123, "expected": 123, "identityLabel": "abc123", - "stakeSnapshot": "xyz789", + "stakeSnapshot": "abc123", "poolIdHex": "abc123", - "validatorClass": "abc123" + "validatorClass": "xyz789" } ] } @@ -2826,7 +2827,7 @@
Query
Variables
{
   "limit": 987,
-  "offset": 123,
+  "offset": 987,
   "search": "xyz789",
   "orderByStakeDesc": true
 }
@@ -2839,17 +2840,17 @@ 
Response
"stakeDistribution": [ { "poolIdHex": "xyz789", - "name": "xyz789", + "name": "abc123", "ticker": "xyz789", - "homepageUrl": "xyz789", - "logoUrl": "xyz789", - "liveStake": "xyz789", - "activeStake": "abc123", + "homepageUrl": "abc123", + "logoUrl": "abc123", + "liveStake": "abc123", + "activeStake": "xyz789", "liveDelegators": 987, "liveSaturation": 123.45, - "declaredPledge": "abc123", + "declaredPledge": "xyz789", "livePledge": "xyz789", - "stakeShare": 987.65 + "stakeShare": 123.45 } ] } @@ -2970,9 +2971,9 @@
Response
{ "blockHeight": 123, "blockHash": HexEncoded, - "timestamp": 987, + "timestamp": 123, "hash": HexEncoded, - "url": "abc123" + "url": "xyz789" } ] } @@ -3268,9 +3269,9 @@
Response
"data": { "transactions": [ { - "id": 987, + "id": 123, "hash": HexEncoded, - "protocolVersion": 987, + "protocolVersion": 123, "raw": HexEncoded, "block": Block, "contractActions": [ContractAction], @@ -3628,7 +3629,7 @@
Response
"data": { "blocks": { "hash": HexEncoded, - "height": 123, + "height": 987, "protocolVersion": 987, "timestamp": 123, "author": HexEncoded, @@ -3888,7 +3889,7 @@
Response
{
   "data": {
     "dustLedgerEvents": {
-      "id": 123,
+      "id": 987,
       "raw": HexEncoded,
       "maxId": 123,
       "protocolVersion": 123
@@ -4015,7 +4016,7 @@ 
Query
Variables
-
{"sessionId": HexEncoded, "index": 987}
+                  
{"sessionId": HexEncoded, "index": 123}
 
@@ -4155,7 +4156,7 @@
Query
Variables
-
{"address": UnshieldedAddress, "transactionId": 987}
+                  
{"address": UnshieldedAddress, "transactionId": 123}
 
@@ -4240,7 +4241,7 @@
Response
"id": 123, "raw": HexEncoded, "maxId": 987, - "protocolVersion": 987 + "protocolVersion": 123 } } } @@ -4322,8 +4323,8 @@
Fields
Example
{
   "hash": HexEncoded,
-  "height": 987,
-  "protocolVersion": 123,
+  "height": 123,
+  "protocolVersion": 987,
   "timestamp": 123,
   "author": HexEncoded,
   "ledgerParameters": HexEncoded,
@@ -4376,7 +4377,7 @@ 
Fields
Example
-
{"hash": HexEncoded, "height": 987}
+                  
{"hash": HexEncoded, "height": 123}
 
@@ -4463,7 +4464,7 @@
Example
"startIndex": 987, "endIndex": 987, "update": HexEncoded, - "protocolVersion": 123 + "protocolVersion": 987 }
@@ -4545,8 +4546,8 @@
Example
"position": 987, "sidechainPubkeyHex": "xyz789", "expectedSlots": 987, - "auraPubkeyHex": "xyz789", - "poolIdHex": "xyz789", + "auraPubkeyHex": "abc123", + "poolIdHex": "abc123", "spoSkHex": "xyz789" }
@@ -4740,7 +4741,7 @@
Fields
Example
{
   "tokenType": HexEncoded,
-  "amount": "xyz789"
+  "amount": "abc123"
 }
 
@@ -4814,7 +4815,7 @@
Example
"address": HexEncoded, "state": HexEncoded, "zswapState": HexEncoded, - "entryPoint": "xyz789", + "entryPoint": "abc123", "transaction": Transaction, "deploy": ContractDeploy, "unshieldedBalances": [ContractBalance] @@ -5054,7 +5055,7 @@
Example
{
   "blockHeight": 123,
   "blockHash": HexEncoded,
-  "timestamp": 123,
+  "timestamp": 987,
   "numPermissionedCandidates": 987,
   "numRegisteredCandidates": 123
 }
@@ -5125,10 +5126,10 @@ 
Fields
Example
{
-  "id": 123,
+  "id": 987,
   "raw": HexEncoded,
   "maxId": 987,
-  "protocolVersion": 987
+  "protocolVersion": 123
 }
 
@@ -5211,11 +5212,11 @@
Example
{
   "cardanoRewardAddress": CardanoRewardAddress,
   "dustAddress": DustAddress,
-  "registered": true,
+  "registered": false,
   "nightBalance": "abc123",
-  "generationRate": "abc123",
+  "generationRate": "xyz789",
   "maxCapacity": "abc123",
-  "currentCapacity": "xyz789",
+  "currentCapacity": "abc123",
   "utxoTxHash": HexEncoded,
   "utxoOutputIndex": 123
 }
@@ -5277,7 +5278,7 @@ 
Example
"id": 123, "raw": HexEncoded, "maxId": 123, - "protocolVersion": 123, + "protocolVersion": 987, "output": DustOutput }
@@ -5372,8 +5373,8 @@
Example
{
   "id": 123,
   "raw": HexEncoded,
-  "maxId": 987,
-  "protocolVersion": 987
+  "maxId": 123,
+  "protocolVersion": 123
 }
 
@@ -5467,7 +5468,7 @@
Example
"id": 987, "raw": HexEncoded, "maxId": 123, - "protocolVersion": 987 + "protocolVersion": 123 }
@@ -5520,7 +5521,7 @@
Fields
Example
-
{"epochNo": 987, "durationSeconds": 987, "elapsedSeconds": 123}
+                  
{"epochNo": 123, "durationSeconds": 987, "elapsedSeconds": 123}
 
@@ -5605,8 +5606,8 @@
Example
{
   "epochNo": 987,
   "spoSkHex": "xyz789",
-  "produced": 123,
-  "expected": 987,
+  "produced": 987,
+  "expected": 123,
   "identityLabel": "abc123",
   "stakeSnapshot": "abc123",
   "poolIdHex": "xyz789",
@@ -5657,7 +5658,7 @@ 
Fields
Example
-
{"idKey": "xyz789", "firstValidEpoch": 987}
+                  
{"idKey": "abc123", "firstValidEpoch": 987}
 
@@ -5678,7 +5679,7 @@
Description
Example
-
123.45
+                  
987.65
 
@@ -5716,7 +5717,7 @@
Description
Example
-
987
+                  
123
 
@@ -5767,9 +5768,9 @@
Fields
Example
{
-  "id": 987,
+  "id": 123,
   "raw": HexEncoded,
-  "maxId": 987,
+  "maxId": 123,
   "protocolVersion": 987
 }
 
@@ -5842,12 +5843,12 @@
Fields
Example
{
-  "poolIdHex": "xyz789",
+  "poolIdHex": "abc123",
   "hexId": "abc123",
   "name": "abc123",
-  "ticker": "xyz789",
+  "ticker": "abc123",
   "homepageUrl": "abc123",
-  "logoUrl": "xyz789"
+  "logoUrl": "abc123"
 }
 
@@ -5908,9 +5909,9 @@
Fields
Example
{
   "epochNo": 987,
-  "idKey": "xyz789",
-  "source": "xyz789",
-  "status": "xyz789"
+  "idKey": "abc123",
+  "source": "abc123",
+  "status": "abc123"
 }
 
@@ -5984,7 +5985,7 @@
Example
{
   "epochNo": 123,
   "federatedValidCount": 123,
-  "federatedInvalidCount": 123,
+  "federatedInvalidCount": 987,
   "registeredValidCount": 123,
   "registeredInvalidCount": 987,
   "dparam": 123.45
@@ -6040,7 +6041,7 @@ 
Fields
Example
-
{"epochNo": 123, "totalRegistered": 987, "newlyRegistered": 123}
+                  
{"epochNo": 123, "totalRegistered": 123, "newlyRegistered": 987}
 
@@ -6155,7 +6156,7 @@
Fields
Example
{
-  "id": 987,
+  "id": 123,
   "hash": HexEncoded,
   "protocolVersion": 123,
   "raw": HexEncoded,
@@ -6355,8 +6356,8 @@ 
Fields
Example
{
-  "highestEndIndex": 123,
-  "highestCheckedEndIndex": 987,
+  "highestEndIndex": 987,
+  "highestCheckedEndIndex": 123,
   "highestRelevantEndIndex": 987
 }
 
@@ -6441,13 +6442,13 @@
Fields
Example
{
-  "poolIdHex": "xyz789",
-  "validatorClass": "xyz789",
-  "sidechainPubkeyHex": "abc123",
-  "auraPubkeyHex": "abc123",
+  "poolIdHex": "abc123",
+  "validatorClass": "abc123",
+  "sidechainPubkeyHex": "xyz789",
+  "auraPubkeyHex": "xyz789",
   "name": "abc123",
-  "ticker": "xyz789",
-  "homepageUrl": "xyz789",
+  "ticker": "abc123",
+  "homepageUrl": "abc123",
   "logoUrl": "abc123"
 }
 
@@ -6571,10 +6572,10 @@
Fields
Example
{
   "poolIdHex": "xyz789",
-  "mainchainPubkeyHex": "abc123",
-  "sidechainPubkeyHex": "abc123",
-  "auraPubkeyHex": "abc123",
-  "validatorClass": "xyz789"
+  "mainchainPubkeyHex": "xyz789",
+  "sidechainPubkeyHex": "xyz789",
+  "auraPubkeyHex": "xyz789",
+  "validatorClass": "abc123"
 }
 
@@ -6671,18 +6672,18 @@
Fields
Example
{
-  "poolIdHex": "xyz789",
+  "poolIdHex": "abc123",
   "name": "abc123",
   "ticker": "abc123",
   "homepageUrl": "abc123",
   "logoUrl": "xyz789",
   "liveStake": "abc123",
-  "activeStake": "abc123",
-  "liveDelegators": 987,
-  "liveSaturation": 123.45,
+  "activeStake": "xyz789",
+  "liveDelegators": 123,
+  "liveSaturation": 987.65,
   "declaredPledge": "abc123",
   "livePledge": "xyz789",
-  "stakeShare": 987.65
+  "stakeShare": 123.45
 }
 
@@ -6704,7 +6705,7 @@
Description
Example
-
"abc123"
+                  
"xyz789"
 
@@ -6836,7 +6837,7 @@
Fields
Example
{
-  "id": 987,
+  "id": 123,
   "hash": HexEncoded,
   "protocolVersion": 123,
   "raw": HexEncoded,
@@ -6953,7 +6954,7 @@ 
Fields
Example
{
-  "blockHeight": 123,
+  "blockHeight": 987,
   "blockHash": HexEncoded,
   "timestamp": 987,
   "hash": HexEncoded,
@@ -7077,7 +7078,7 @@ 
Example
{
   "id": 123,
   "hash": HexEncoded,
-  "protocolVersion": 123,
+  "protocolVersion": 987,
   "raw": HexEncoded,
   "block": Block,
   "contractActions": [ContractAction],
@@ -7131,7 +7132,7 @@ 
Fields
Example
{
   "paidFees": "xyz789",
-  "estimatedFees": "abc123"
+  "estimatedFees": "xyz789"
 }
 
@@ -7451,7 +7452,7 @@
Fields
Example
-
{"highestTransactionId": 123}
+                  
{"highestTransactionId": 987}
 
@@ -7618,7 +7619,7 @@
Fields
Example
{
-  "id": 987,
+  "id": 123,
   "raw": HexEncoded,
   "maxId": 987,
   "protocolVersion": 987
diff --git a/openapi.json b/openapi.json
index f9e955f1..cbd13646 100644
--- a/openapi.json
+++ b/openapi.json
@@ -17,7 +17,7 @@
       "url": "https://opensource.org/licenses/MIT"
     },
     "termsOfService": "https://blockfrost.io/terms",
-    "description": "Blockfrost is an API as a service that allows users to interact with the Cardano blockchain, Midnight blockchain, and parts of their ecosystems.\n\n## Tokens\n\nAfter signing up on https://blockfrost.io, a `project_id` token is automatically generated for each project.\nHTTP header of your request MUST include this `project_id` in order to authenticate against Blockfrost servers.\n\n## Available networks\n\nAt the moment, you can use the following networks. Please, note that each network has its own `project_id`.\n\n\n  \n    \n      \n      \n    \n    \n        \n        \n    \n    \n        \n        \n    \n    \n        \n        \n    \n    \n        \n        \n    \n    \n        \n        \n    \n  \n
\n Network\n \n Endpoint\n
Cardano mainnet\n https://cardano-mainnet.blockfrost.io/api/v0\n
Cardano preprod\n https://cardano-preprod.blockfrost.io/api/v0\n
Cardano preview\n https://cardano-preview.blockfrost.io/api/v0\n
Midnight mainnet\n https://midnight-mainnet.blockfrost.io/api/v0\n
InterPlanetary File System\n https://ipfs.blockfrost.io/api/v0\n
\n\n## Concepts\n\n* All endpoints return either a JSON object or an array.\n* Data is returned in *ascending* (oldest first, newest last) order, if not stated otherwise.\n * You might use the `?order=desc` query parameter to reverse this order.\n* By default, we return 100 results at a time. You have to use `?page=2` to list through the results.\n* All time and timestamp related fields (except `server_time`) are in seconds of UNIX time.\n* All amounts are returned in Lovelaces, where 1 ADA = 1 000 000 Lovelaces.\n* Addresses, accounts and pool IDs are in Bech32 format.\n* All values are case sensitive.\n* All hex encoded values are lower case.\n* Examples are not based on real data. Any resemblance to actual events is purely coincidental.\n* We allow to upload files up to 100MB of size to IPFS. This might increase in the future.\n* Only pinned IPFS files are counted towards the IPFS quota.\n* Non-pinned IPFS files are subject to regular garbage collection and will be removed unless pinned.\n* We allow maximum of 100 queued pins per IPFS user.\n\n## Errors\n\n### HTTP Status codes\n\nThe following are HTTP status code your application might receive when reaching Blockfrost endpoints and\nit should handle all of these cases.\n\n* HTTP `400` return code is used when the request is not valid.\n* HTTP `402` return code is used when the projects exceed their daily request limit.\n* HTTP `403` return code is used when the request is not authenticated.\n* HTTP `404` return code is used when the resource doesn't exist.\n* HTTP `418` return code is used when the user has been auto-banned for flooding too much after previously receiving error code `402` or `429`.\n* HTTP `425` return code is used in Cardano networks, when the user has submitted a transaction when the mempool is already full, not accepting new txs straight away.\n* HTTP `425` return code is used in IPFS network, when the user has submitted a pin when the pin queue is already full, not accepting new pins straight away.\n* HTTP `429` return code is used when the user has sent too many requests in a given amount of time and therefore has been rate-limited.\n* HTTP `500` return code is used when our endpoints are having a problem.\n\n### Error codes\n\nAn internal error code number is used for better indication of the error in question. It is passed using the following payload.\n\n```json\n{\n \"status_code\": 403,\n \"error\": \"Forbidden\",\n \"message\": \"Invalid project token.\"\n}\n```\n## Limits\n\nThere are two types of limits we are enforcing:\n\nThe first depends on your plan and is the number of request we allow per day. We defined the day from midnight to midnight of UTC time.\n\nThe second is rate limiting. We limit an end user, distinguished by IP address, to 10 requests per second. On top of that, we allow\neach user to send burst of 500 requests, which cools off at rate of 10 requests per second. In essence, a user is allowed to make another\nwhole burst after (currently) 500/10 = 50 seconds. E.g. if a user attempts to make a call 3 seconds after whole burst, 30 requests will be processed.\nWe believe this should be sufficient for most of the use cases. If it is not and you have a specific use case, please get in touch with us, and\nwe will make sure to take it into account as much as we can.\n\n## SDKs\n\nWe support a number of SDKs that will help you in developing your application on top of Blockfrost.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Programming languageSDK
JavaScript\n blockfrost-js\n
Haskell\n blockfrost-haskell\n
Python\n blockfrost-python\n
Rust\n blockfrost-rust\n
Golang\n blockfrost-go\n
Ruby\n blockfrost-ruby\n
Java\n blockfrost-java\n
Scala\n blockfrost-scala\n
Swift\n blockfrost-swift\n
Kotlin\n blockfrost-kotlin\n
Elixir\n blockfrost-elixir\n
.NET\n blockfrost-dotnet\n
Arduino\n blockfrost-arduino\n
PHP\n blockfrost-php\n
Crystal\n blockfrost-crystal\n
\n\n\n## Midnight API\n\n\nThe Midnight Indexer API exposes a GraphQL API that enables clients to query and subscribe to blockchain data — blocks, transactions, contracts, and wallet-related events — indexed from the Midnight blockchain.\n\n| Service | URL | Protocol |\n|---------|-----|----------|\n| **Indexer HTTP API** | `https://midnight-mainnet.blockfrost.io/api/v0` | HTTP POST (GraphQL) |\n| **Indexer Subscriptions API** | `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket |\n| **Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | JSON-RPC |\n\n\nFor the full documentation — queries, mutations, subscriptions, authentication options, and examples — see the Midnight GraphQL API Reference:\n\n[![Explore the Midnight API →](https://img.shields.io/badge/Explore_the_Midnight_API_→-0033AD?style=for-the-badge)](./midnight/)\n" + "description": "Blockfrost is an API as a service that allows users to interact with the Cardano blockchain, Midnight blockchain, and parts of their ecosystems.\n\n## Tokens\n\nAfter signing up on https://blockfrost.io, a `project_id` token is automatically generated for each project.\nHTTP header of your request MUST include this `project_id` in order to authenticate against Blockfrost servers.\n\n## Available networks\n\nAt the moment, you can use the following networks. Please, note that each network has its own `project_id`.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Network\n \n Endpoint\n
Cardano mainnet\n https://cardano-mainnet.blockfrost.io/api/v0\n
Cardano preprod\n https://cardano-preprod.blockfrost.io/api/v0\n
Cardano preview\n https://cardano-preview.blockfrost.io/api/v0\n
Midnight mainnet\n https://midnight-mainnet.blockfrost.io/api/v0\n
InterPlanetary File System\n https://ipfs.blockfrost.io/api/v0\n
\n\n## Concepts\n\n* All endpoints return either a JSON object or an array.\n* Data is returned in *ascending* (oldest first, newest last) order, if not stated otherwise.\n * You might use the `?order=desc` query parameter to reverse this order.\n* By default, we return 100 results at a time. You have to use `?page=2` to list through the results.\n* All time and timestamp related fields (except `server_time`) are in seconds of UNIX time.\n* All amounts are returned in Lovelaces, where 1 ADA = 1 000 000 Lovelaces.\n* Addresses, accounts and pool IDs are in Bech32 format.\n* All values are case sensitive.\n* All hex encoded values are lower case.\n* Examples are not based on real data. Any resemblance to actual events is purely coincidental.\n* We allow to upload files up to 100MB of size to IPFS. This might increase in the future.\n* Only pinned IPFS files are counted towards the IPFS quota.\n* Non-pinned IPFS files are subject to regular garbage collection and will be removed unless pinned.\n* We allow maximum of 100 queued pins per IPFS user.\n\n## Errors\n\n### HTTP Status codes\n\nThe following are HTTP status code your application might receive when reaching Blockfrost endpoints and\nit should handle all of these cases.\n\n* HTTP `400` return code is used when the request is not valid.\n* HTTP `402` return code is used when the projects exceed their daily request limit.\n* HTTP `403` return code is used when the request is not authenticated.\n* HTTP `404` return code is used when the resource doesn't exist.\n* HTTP `418` return code is used when the user has been auto-banned for flooding too much after previously receiving error code `402` or `429`.\n* HTTP `425` return code is used in Cardano networks, when the user has submitted a transaction when the mempool is already full, not accepting new txs straight away.\n* HTTP `425` return code is used in IPFS network, when the user has submitted a pin when the pin queue is already full, not accepting new pins straight away.\n* HTTP `429` return code is used when the user has sent too many requests in a given amount of time and therefore has been rate-limited.\n* HTTP `500` return code is used when our endpoints are having a problem.\n\n### Error codes\n\nAn internal error code number is used for better indication of the error in question. It is passed using the following payload.\n\n```json\n{\n \"status_code\": 403,\n \"error\": \"Forbidden\",\n \"message\": \"Invalid project token.\"\n}\n```\n## Limits\n\nThere are two types of limits we are enforcing:\n\nThe first depends on your plan and is the number of request we allow per day. We defined the day from midnight to midnight of UTC time.\n\nThe second is rate limiting. We limit an end user, distinguished by IP address, to 10 requests per second. On top of that, we allow\neach user to send burst of 500 requests, which cools off at rate of 10 requests per second. In essence, a user is allowed to make another\nwhole burst after (currently) 500/10 = 50 seconds. E.g. if a user attempts to make a call 3 seconds after whole burst, 30 requests will be processed.\nWe believe this should be sufficient for most of the use cases. If it is not and you have a specific use case, please get in touch with us, and\nwe will make sure to take it into account as much as we can.\n\n## SDKs\n\nWe support a number of SDKs that will help you in developing your application on top of Blockfrost.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Programming languageSDK
JavaScript\n blockfrost-js\n
Haskell\n blockfrost-haskell\n
Python\n blockfrost-python\n
Rust\n blockfrost-rust\n
Golang\n blockfrost-go\n
Ruby\n blockfrost-ruby\n
Java\n blockfrost-java\n
Scala\n blockfrost-scala\n
Swift\n blockfrost-swift\n
Kotlin\n blockfrost-kotlin\n
Elixir\n blockfrost-elixir\n
.NET\n blockfrost-dotnet\n
Arduino\n blockfrost-arduino\n
PHP\n blockfrost-php\n
Crystal\n blockfrost-crystal\n
\n\n\n## Midnight API\n\n\nThe Midnight Indexer API exposes a GraphQL API that enables clients to query and subscribe to blockchain data — blocks, transactions, contracts, and wallet-related events — indexed from the Midnight blockchain.\n\nAvailable networks: `mainnet`, `preprod`, `preview`\n\n| Service | URL | Protocol |\n|---------|-----|----------|\n| **Indexer HTTP API** | `https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) |\n| **Indexer Subscriptions API** | `wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket |\n| **Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | JSON-RPC |\n\n\nFor the full documentation — queries, mutations, subscriptions, authentication options, and examples — see the Midnight GraphQL API Reference:\n\n[![Explore the Midnight API →](https://img.shields.io/badge/Explore_the_Midnight_API_→-0033AD?style=for-the-badge)](./midnight/)\n" }, "servers": [ { diff --git a/openapi.yaml b/openapi.yaml index f193e51b..89986bae 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -312,17 +312,20 @@ info: wallet-related events — indexed from the Midnight blockchain. + Available networks: `mainnet`, `preprod`, `preview` + + | Service | URL | Protocol | |---------|-----|----------| - | **Indexer HTTP API** | `https://midnight-mainnet.blockfrost.io/api/v0` | + | **Indexer HTTP API** | `https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) | | **Indexer Subscriptions API** | - `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket | + `wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket | - | **Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | JSON-RPC | + | **Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | JSON-RPC | diff --git a/spectaql.yaml b/spectaql.yaml index b97aad35..c87b6a70 100644 --- a/spectaql.yaml +++ b/spectaql.yaml @@ -45,13 +45,13 @@ info: - title: Endpoints description: | - Blockfrost exposes three Midnight services: + Blockfrost exposes three Midnight services. Available networks: `mainnet`, `preprod`, `preview`. | Service | URL | |---------|-----| - | **Indexer API** | `https://midnight-mainnet.blockfrost.io/api/v0` | - | **Indexer WebSocket** | `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | - | **Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | + | **Indexer API** | `https://midnight-{network}.blockfrost.io/api/v0` | + | **Indexer WebSocket** | `wss://midnight-{network}.blockfrost.io/api/v0/ws` | + | **Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | **Indexer API** — Send GraphQL queries and mutations over HTTP POST. This is the main entry point for fetching blockchain data (blocks, transactions, contracts, DUST status). @@ -77,11 +77,13 @@ info: Append `?project_id=YOUR_PROJECT_ID` to the endpoint URL. Use this when your client doesn't support setting custom headers (e.g. Midnight.js SDK). ```text - https://midnight-mainnet.blockfrost.io/api/v0?project_id=YOUR_PROJECT_ID - wss://midnight-mainnet.blockfrost.io/api/v0/ws?project_id=YOUR_PROJECT_ID - https://rpc.midnight-mainnet.blockfrost.io?project_id=YOUR_PROJECT_ID + https://midnight-{network}.blockfrost.io/api/v0?project_id=YOUR_PROJECT_ID + wss://midnight-{network}.blockfrost.io/api/v0/ws?project_id=YOUR_PROJECT_ID + https://rpc.midnight-{network}.blockfrost.io?project_id=YOUR_PROJECT_ID ``` + Replace `{network}` with `mainnet`, `preprod`, or `preview`. + - title: Request Format description: | Send a POST request with a JSON body containing: diff --git a/src/definitions.yaml b/src/definitions.yaml index 715d5d0f..a9fa80ad 100644 --- a/src/definitions.yaml +++ b/src/definitions.yaml @@ -234,11 +234,13 @@ info: The Midnight Indexer API exposes a GraphQL API that enables clients to query and subscribe to blockchain data — blocks, transactions, contracts, and wallet-related events — indexed from the Midnight blockchain. + Available networks: `mainnet`, `preprod`, `preview` + | Service | URL | Protocol | |---------|-----|----------| - | **Indexer HTTP API** | `https://midnight-mainnet.blockfrost.io/api/v0` | HTTP POST (GraphQL) | - | **Indexer Subscriptions API** | `wss://midnight-mainnet.blockfrost.io/api/v0/ws` | WebSocket | - | **Node RPC** | `https://rpc.midnight-mainnet.blockfrost.io` | JSON-RPC | + | **Indexer HTTP API** | `https://midnight-{network}.blockfrost.io/api/v0` | HTTP POST (GraphQL) | + | **Indexer Subscriptions API** | `wss://midnight-{network}.blockfrost.io/api/v0/ws` | WebSocket | + | **Node RPC** | `https://rpc.midnight-{network}.blockfrost.io` | JSON-RPC | For the full documentation — queries, mutations, subscriptions, authentication options, and examples — see the Midnight GraphQL API Reference: