Skip to main content
Version: Current

Substrate types bundles

Where do I get a types bundle for my chain?‚Äč

Types bundle is only needed for pre-Metadata v14 blocks and only if Subsquid does not offer a built-in support for the chain in question.

Most chains publish their type bundles as an npm package (for example: Edgeware). One of the best places to check for the latest version is the polkadot-js/app and polkadot-js/api repositories.

info

Note: the type bundle format for typegen is slightly different from OverrideBundleDefinition of polkadot.js. The structure is as follows, all the fields are optional.

{
types: {}, // top-level type definitions, as `.types` option of `ApiPromise`
typesAlias: {}, // top-level type aliases, as `.typesAlias` option of `ApiPromise`
versions: [ // spec version specific overrides, same as `OverrideBundleDefinition.types` of `polkadot.js`
{
minmax: [0, 1010] // spec range
types: {}, // type overrides for the spec range
typesAlias: {}, // type alias overrides for the spec range
}
]
}