Skip to main content

Gateway Overview

The Net Gateway is an HTTP API that provides standardized access to Net Storage data stored onchain. It serves data from the blockchain - handling all blockchain interactions for you so you can access onchain data with simple HTTP requests.

What is the Net Gateway?

The Net Gateway is a read-only HTTP interface to Net Storage. All data is stored permanently on the blockchain - the gateway handles all blockchain interactions (querying contracts, detecting storage types, retrieving chunks, etc.) so your application doesn't need to. You simply make an HTTP request and receive the stored data.

Think of it like IPFS gateways or traditional cloud storage: Just as IPFS gateways serve content from IPFS nodes and cloud storage services serve content from centralized storage, the Net Gateway serves content from blockchain storage - handling all the underlying complexity for you.

Net CDN

By running the Net Gateway with edge caching, it becomes the Net CDN — a performant globally replicated delivery network for onchain data.

storedon.net is a production deployment of the Net Gateway with edge caching and global distribution. Every piece of content stored on Net gets a unique CDN link that can be shared or embedded anywhere on the internet.

Key Features

  • Onchain Data: All data is stored permanently on the blockchain
  • No Blockchain Code Required: The gateway handles all blockchain interactions - you just make HTTP requests
  • No Authentication: Public read access to all stored data
  • Standardized URLs: Consistent addressing format across all chains
  • Version History: Access any historical version of stored data
  • Multi-Chain: Same URL structure works across all supported chains
  • Automatic Detection: Handles all storage types (Regular, ChunkedStorage, XML Storage) automatically

How It Works

The gateway handles all blockchain complexity for you. When you make an HTTP request, the gateway queries the blockchain, detects storage type, retrieves and processes the data, then returns it with the appropriate Content-Type.

Key benefit: Your application doesn't need to interact with blockchain contracts, handle storage type detection, manage chunking/decompression, or deal with XML expansion. The gateway handles all of this complexity - you just make HTTP requests and receive the data.

Quick Start

Access stored data using a simple URL - no blockchain code needed:

https://storedon.net/net/{chainId}/storage/{mode}/{operator}/{key}

Load Mode Example (Processed Data):

https://storedon.net/net/8453/storage/load/0x17EeF8C6F9edCBceb3dEE33eF277A1F33C504629/gm

Returns the latest processed version of the gm key - XML embeds are resolved and data is returned with detected Content-Type.

Raw Mode Example (Raw Data):

https://storedon.net/net/8453/storage/raw/0x17EeF8C6F9edCBceb3dEE33eF277A1F33C504629/gm

Returns the latest raw version as JSON with key, text, and data fields - no XML resolution.

The Net Gateway is read-only - it only retrieves data. To store content, see the Storage Developer Guide for smart contract integration.

Getting Your CDN Link:

  1. Store your content using the Net Storage contracts
  2. Click the Export button on your stored content page
  3. Copy your unique CDN link

Your content is now accessible to anyone on the internet via a simple HTTP link, while being permanently stored on the blockchain. Share your CDN link anywhere - social media, websites, applications, or anywhere else on the internet.

Storage Types Supported

The gateway automatically handles all Net Storage types:

  • Small files (under 20KB): Regular Storage
  • Medium files (20KB-80KB): ChunkedStorage
  • Large files (over 80KB): XML Storage

The gateway automatically detects which storage type contains your data, retrieves it, handles decompression and chunking, and returns the complete file. You don't need to know which storage type was used - just make the HTTP request and get the data.

Gateway Access

The Net Gateway is available at:

  • Domain: https://storedon.net
  • Route format: /net/{chainId}/storage/{mode}/...
  • Access modes: load (processed data) or raw (raw JSON)

This standardized addressing format allows any application to read Net Storage data using simple HTTP requests. Just like IPFS gateways make IPFS content accessible via HTTP, or cloud storage services make centralized storage accessible via HTTP, the Net Gateway makes blockchain storage accessible via HTTP - handling all the underlying complexity for you.

Build Your Own Gateway: Since all data is stored onchain, anyone can build their own gateway implementation using the Storage contracts and following the same URL structure. This ensures no single point of failure and allows for multiple gateway providers, similar to how IPFS has multiple gateway providers.

Onchain Verification

Important: All data returned by the gateway is stored permanently on the blockchain. You can verify any response by querying the blockchain directly using the same parameters. The gateway is a convenience layer - the source of truth is always the blockchain.


Next Steps