Skip to main content

Spore SDK

Spore SDK is a Web environment development kit written in TypeScript, designed to provide developers with the essential tools they need to interact with Spore Protocol and create digital artifacts on Nervos CKB.

Spore SDK - GitHub
A Web development kit to interact with Spore Protocol
https://github.com/sporeprotocol/spore-sdk

Features

  • ⚡ Composed APIs for efficient spores/clusters interactions with minimal time overhead
  • 🧩 Joint APIs for building advanced transactions as a fun block-building process
  • 🛠️ Versatile utilities for encoding/decoding data of spores/clusters
  • 🎹 Fully written in TypeScript

Getting started

Installation

npm i @spore-sdk/core

Building browser env dapps

The Spore SDK is built on top of Lumos, an open-source dapp framework for Nervos CKB. Lumos incorporates certain Node-polyfills into its implementation, such as crypto-browserify and buffer, to provide specific functionalities.

If you intend to use the Spore SDK in a browser environment, it's important to note that you may need to manually add Node-polyfills to your application. This ensures that the Spore SDK functions properly in the browser. For detailed instructions on how to add these polyfills, refer to the Lumos documentation: CRA, Vite, Webpack or Other.

Development

Running in Node.js

If you want to use the Spore SDK in a Node.js environment, there's no extra step needed after the installation.

Building web applications

If you want to use the Spore SDK in a browser environment, such as building web applications with Vite/CRA/Next, etc., you may need to follow the instructions of Setup Node-polyfills to ensure the Spore SDK can function properly in your project.

  • For beginners, you can start by following the Create Simple On-Chain Blog tutorial, a comprehensive guide on how to build a dapp, including wallet integration.
  • For more application demos with the Spore SDK, refer to Spore Demos.