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¶
-
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.
-
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.
-
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.
Connect your wallet or app identity, select a Main Storage Provider (MSP), and create or reuse a bucket.
Use the File Manager to create your file fingerprint and issue a 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.
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¶
| Created: October 17, 2025