This repository is a community controlled index of relay/parachain assets, allowing developers to easily leverage the latest chain information when building within the polkadot ecosystem.
Think of it as an supplementary datastore to extend the information available on-chain.
The hope is for developers to use this repository as an chain-id-indexed endpoint for chain specific data, while allowing parachain teams to update their own assets as required.
The goals of this repo are:
- Provide a common URL schema for accessing chain assets
- Allow parachains to manage their assets across community projects
- Provide brand consistency across the ecosystem
- Move towards a decentralised model
Developers: If you're looking to utilise these assets in your application, use the @talismn/chaindata-js lib for a much smoother experience
Each supported chain will have a directory based on the chain id. This directory will contain a manifest.json
file, a chainspec.json
file [TODO] and an assets directory containing all available assets.
Required assets are
logo.svg
,banner.png
and acard.png
.
To use an asset in your application, simply reference it by ID using the chain-id-indexed directory structure.
Note: In the following examples we'll be using the Kusama chain assets (id: 2)
To use the chain logo, access the asset file using:
https://github.com/talismansociety/chaindata/blob/master/2/assets/logo.svg
This can be used directly in a UI layer. For example in HTML:
<img src='https://github.com/talismansociety/chaindata/blob/master/2/assets/logo.svg'/>
To discover which assets are available, reference the manifest.json file at the root of the chain directory:
https://github.com/talismansociety/chaindata/blob/master/2/manifest.json
This will return a json file containing all available asset types, filenames & branding information.
{
"logo": "logo.svg",
"poster": "poster.png",
// ...more
"colors": {
"primary": "#FF0056",
"secondary": "...",
"dark": "...",
// ...more
}
}
Note: see here [TODO] for info on which items are marked as required
Each chain directory should have at least 1 public rpc included in the manifest.
This array will contain a list publically available RPC endpoints. These endpoints can be used when connecting to a chain using polkadot.js.
[
"wss://kusama-rpc.polkadot.io",
"wss://kusama.api.onfinality.io"
]
To discover which chains are supported, reference the manifest.json file at the root of the repo.
https://github.com/talismansociety/chaindata/blob/master/manifest.json
The JSON file returned will be an object containing key:value pairs of the chain id and name.
{
"0": "Polkadot",
"2": "Kusama",
// ... more
}
TODO: provide the WASM chaindata for spinning up local lightclients
1. is this possible?
2. do the specs need constant updating?
3. ... questions
Nominate a github account (todo) be the authorised signaller of pull requests.
With your nominated account you can create pull requests, or signal the validity of other pull requests. Once signalled, we'll validate and merge the pull request into the master branch.
Note: For new parachains, along with a new directory for your parachain assets (see required fields), you'll also need to add an entry into the manifest.json file at the root of the repo.
For recommended assets specs, see this file this file
Although developers can use the raw URLs as above, it's recommended to use one of the following when building applications:
- Chaindata JS lib (js library)
- Chaindata react hooks (react wrapper around the js lib)
The following files are required per chain directory:
- manifest.json
- chainspec.json
- /assets
- logo.svg
- banner.png
- background.png
- /colors
- primary
- secondary
- โ๏ธ Add all current relay/parachains
- โ๏ธ Integrate on IPFS
- โ๏ธ Implement governance model
- โ๏ธ configure directory structure
- โ๏ธ set up repo
all public rpcs here: https://github.com/polkadot-js/apps/tree/master/packages/apps-config/src/endpoints