Skip to content

Store and Retrieve Data Overview

DataHaven is a verifiable storage network that separates storage from verification. Storage providers hold your file bytes off-chain, while the chain records compact on-chain commitments. These commitments serve as receipts so data can be checked at read time.

This section provides a high-level overview of how to create a bucket, upload files, and retrieve them.

How File Storage Works at a Glance

  1. Pick an MSP and bucket: Connect your wallet, select a Main Storage Provider (MSP), and create a bucket. Set your desired replication factor for backup copies.

  2. Upload data: Send a storage request to the MSP, which stores your file and coordinates replication to Backup Storage Providers (BSPs). Once enough BSPs confirm storage, the MSP records a cryptographic commitment on-chain, securing your file on the network.

  3. Retrieve data: The MSP returns your file with a proof that you can verify against the on-chain commitment, confirming your data matches what was stored.

sequenceDiagram
    participant User
    participant MSP
    participant BSPs
    participant Blockchain

    User->>MSP: Connect wallet and select bucket
    User->>MSP: Upload data
    MSP->>BSPs: Coordinate replication
    BSPs-->>MSP: Confirm replication
    MSP->>Blockchain: Anchor cryptographic commitment
    User->>MSP: Request data
    MSP-->>User: Return data + proof
    User->>Blockchain: Verify proof

DataHaven provides the benefits of provable data without the high cost of storing entire data files on-chain.

Store Data with StorageHub SDK

Use the following how-to guides to move through the DataHaven storage and retrieval lifecycle:

Get Started with StorageHub SDK

Set up your development environment, install the StorageHub SDK, and prepare your project to start interacting with the DataHaven network.

Create a Bucket

Connect your wallet or app identity, select a Main Storage Provider (MSP), and create or reuse a bucket.

Issue a Storage Request

Use the File Manager to create your file fingerprint and issue a storage request.

Verify Storage Request

Compute a file key to retrieve and read storage request data for verification of on-chain registration.

Authenticate with SIWE and JWT

Use Sign-In with Ethereum (SIWE) and JSON Web Tokens (JWT) for secure authentication.

Upload a File

Upload a file to the connected MSP. Includes steps to verify upload success.

Retrieve Your Data

Use your file key to download your file from the MSP client and save it programmatically.

You can also visit the End-to-End Storage Workflow tutorial for a streamlined walk-through using DataHaven's StorageHub SDK to store and retrieve data.

Next Steps

Last update: November 11, 2025
| Created: October 17, 2025