Welcome to Synapse SDK
The Synapse SDK is a TypeScript/JavaScript library that provides a simple, powerful interface for building applications on Filecoin Onchain Cloud (FOC). It abstracts away the complexity of smart contracts and storage provider APIs, giving you a high-level interface to store and retrieve data on Filecoin with built-in redundancy and payments.What is Filecoin Onchain Cloud?
Filecoin Onchain Cloud is a decentralized storage marketplace that combines:- Proof of Data Possession (PDP) - Cryptographic verification that your data is stored
- Multi-provider redundancy - Data automatically replicated across multiple storage providers
- Integrated payments - Usage-based payments via USDFC stablecoin
- CDN acceleration - Optional content delivery network for fast retrievals
Why Use Synapse SDK?
Simple API
Upload and download data with just a few lines of code. No need to understand smart contracts or storage protocols.
Built-in Redundancy
Automatic multi-copy uploads ensure your data is safe across multiple independent storage providers.
Flexible Payments
Pay-as-you-go pricing with USDFC. Deposit once, and the SDK handles ongoing storage payments automatically.
Works Everywhere
Run in Node.js or browsers. Uses web standards like ReadableStream and fetch for maximum compatibility.
Architecture Overview
Synapse SDK sits between your application and the Filecoin infrastructure:Key Components
Synapse Class - Main entry point that provides access to all services:synapse.storage- Upload, download, and manage datasynapse.payments- Deposits, withdrawals, and balance checkssynapse.providers- Query available storage providerssynapse.filbeam- CDN statistics and quotas
- Store - Upload data to primary provider
- Pull - Secondary providers fetch from primary (SP-to-SP)
- Commit - Register pieces on-chain with PDP verification
Quick Example
Here’s how simple it is to store data:Supported Networks
Synapse SDK works on Filecoin mainnet and calibration testnet:- Calibration (Testnet)
- Mainnet
Use calibration for development and testing:RPC Endpoint:
https://api.calibration.node.glif.io/rpc/v1Filecoin has a 30-second block time. Be patient when waiting for transaction confirmations.
Package Structure
The Synapse ecosystem includes two main packages: @filoz/synapse-sdk - High-level SDK for applications- Simple
Synapseclass with intuitive methods - Automatic provider selection and multi-copy uploads
- Built-in error handling and retries
- Direct smart contract interactions
- PieceCID utilities and EIP-712 signing
- Session key management
- Used internally by synapse-sdk, but also available for advanced use cases
What’s Next?
Quickstart
Get up and running in 5 minutes with your first upload
Installation
Install the SDK in your Node.js or browser project
Core Concepts
Understand the storage pipeline and provider selection
API Reference
Explore all available methods and options