Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 2.17 KB

README.md

File metadata and controls

37 lines (26 loc) · 2.17 KB

Chaindata

Talisman

api-link discord-link

A community controlled repository of relay and parachain information in the Polkadot ecosystem.

The goals of this repo are:

  1. Provide a community-managed index of Polkadot parachains and their connection information (rpcs, chainspecs)
  2. Provide a source of chain and token assets across the ecosystem
  3. Enable developers to retrieve this information via an API suitable to their project (graphql, rest soon™, npm soon™)
  4. Move towards a decentralised model

Usage

At this time, this repo is used to configure an API which scrapes information from each chain and exposes it via graphql.
The API can be interacted with via this URL: https://squid.subsquid.io/chaindata/v/v4/graphql

As an example, you could use this query to get the name, genesisHash and address type prefix for each chain:

query {
  chains {
    genesisHash
    prefix
    name
  }
}

For an example of a more advanced use-case, you can check out the Talisman wallet source code.
The wallet uses chaindata to populate a database of chains and tokens which is used for features like account balance subscriptions and sending funds.