サブストリーム
Publishing a Substreams Package
Learn how to publish a Substreams package to the Substreams Registry.
概要
What is a package?
A Substreams package is a precompiled binary file that defines the specific data you want to extract from the blockchain, similar to the mapping.ts file in traditional Subgraphs.
Publish a Package
Prerequisites
- You must have the Substreams CLI installed.
 - You must have a Substreams package (
.spkg) that you want to publish. 
Step 1: Run the substreams publish Command
- 
In a command-line terminal, run
substreams publish <YOUR-PACKAGE>.spkg. - 
If you do not have a token set in your computer, navigate to
https://substreams.dev/me. 

Step 2: Get a Token in the Substreams Registry
- 
In the Substreams Registry, log in with your GitHub account.
 - 
Create a new token and copy it in a safe location.
 

Step 3: Authenticate in the Substreams CLI
- Back in the Substreams CLI, paste the previously generated token.
 

- Lastly, confirm that you want to publish the package.
 

That’s it! You have successfully published a package in the Substreams registry.

その他のリソース
Visit Substreams to explore a growing collection of ready-to-use Substreams packages across various blockchain networks.