Publish streams
π§ Prerequisites
- Install Keplr wallet extension from https://www.keplr.app/ to interact with the Data Layer.
- Get the web extension of Keplr wallet for seamless integration.
- Reach out to our Discord community to get access to the faucet tokens, which are exclusively available for Builders Program Members & Synternet Partners. This will provide you with test network tokens to start your journey.
Let's Get Started:β
Head over to https://datalayer.synternet.com/ to access the Developer Portal.
Navigate to Publish Data section
Go through the three-step process:
- First, register your Wallet and assign it an Alias. It will be the main name based on which you will be discoverable in our Publisher Portal, so be mindful about that!
- Second, register a Publisher. It will act as a specific category of the data that will be provided, for example - particular Chain data you intend to publish. SImilarly to Alias, you have to define a name - label for it, upload a logo and add a description that will help users to discover you.
- Finally, register the first Stream for the Publisher you have just created. Stream, so-called topic is the most granular item that can be opted for and subscribed. The setup contains a label, custom slug, description and the price setting. A stream can also be set free.
π§ NATS Abstractions
- In order not to set every single stream individually, which can be a lot of work (albeit recommended!), you can utilize the wildcard characters. They are part of the NATS subject-based publish/subscribe model and help in creating flexible and powerful routing schemes. Here's what they represent:
*
(asterisk): This is used as a wildcard for a single token. In NATS subjects, tokens are strings separated by dots. The*
character matches any string in the place of a single token. For example, if you have a subject likeweather.europe.*
, it would matchweather.europe.france
,weather.europe.spain
, etc., but it wouldn't matchweather.europe.france.paris
because that has an extra token.>
(greater-than sign): This symbol is used as a wildcard for multiple tokens. When placed at the end of a subject, it will match all subjects that share the same prefix. For instance,weather.europe.>
would matchweather.europe.france
,weather.europe.spain.barcelona
,weather.europe.germany.berlin
, etc. It essentially captures everything under a particular subject hierarchy.
Great! As you have the Alias, Publisher and Streams registered on the chain, itβs time to activate the Stream. Itβs an important step to make sure all is properly accounted for. Find the three dots in the Stream menu and click Activate stream.
Furthermore, itβs highly advisable to add a comprehensive documentation on the Publisher level. It will help users to understand the data, its structure and potential benefits for their applications. Use our markdown editor to easily do that.
Finally, get the access token that will be used in the Publisher software to get the data flowing.
Head to our Github and select the suitable Publishing software for your project. We have an ever growing number of dedicated chain-specific Publishers, basic pub-sub SDKs written in different languages that you can apply to your needs, or a comprehensive Data Layer SDK in Go.
Guide with Screenshotsβ
Head to Developer-Portal
1. Connect your wallet and navigate to Publish Data sectionβ
2. Register a Wallet - get your Aliasβ
3. Register a Publisherβ
4. Register a Streamβ
5. See that exclamation mark by the topic name? Activate the streamβ
6. Add a Publisher documentationβ
7. Get the access tokenβ
8. Success! Start publishing!β
Head to our Github and select the suitable Publishing software for your project. We have an ever growing number of dedicated chain-specific Publishers, basic pub-sub SDKs written in different languages that you can apply to your needs, or a comprehensive Data Layer SDK in Go.