Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 2.37 KB

File metadata and controls

40 lines (22 loc) · 2.37 KB

Synapse Core

NPM

A JavaScript/TypeScript standard library for interacting with Filecoin Onchain Cloud smart contracts

Overview

@filoz/synapse-core is the low-level protocol package for building on Filecoin Onchain Cloud. It provides typed, composable JavaScript and TypeScript utilities for directly using FOC smart contracts, storage provider HTTP APIs, EIP-712 signing flows, and Filecoin-specific data formats.

The package is designed for developers who need finer control than the high-level @filoz/synapse-sdk API. Its modules are organized around protocol boundaries, including Filecoin Pay payment rails, PDP verification, warm storage, service provider discovery, session keys, typed-data signing, PieceCID utilities, devnet helpers, and test mocks.

Most contract helpers follow viem's action style: single-purpose functions that accept a viem client and return strongly typed results. You can import only the protocol area you need, compose actions with viem primitives such as multicall and simulateContract, or use the package as a foundation for higher-level storage workflows.

Installation

pnpm install @filoz/synapse-core viem@2.x

Note: viem is a peer dependency and must be installed separately.

Docs

Check the documentation website

Contributing

Read contributing guidelines.

Open in GitHub Codespaces

Acknowledgments

The PieceCID primitives in src/piece/internal/ (FR32 expansion, the streaming SHA254 binary-tree hasher, merkle construction, zero-piece roots, and the digest/size math) are derived from @web3-storage/data-segment, Apache-2.0 OR MIT. That codebase in turn drew on js-fil-utils, go-data-segment, and go-fil-commp-hashhash.

License

Dual-licensed: MIT, Apache Software License v2 by way of the Permissive License Stack.