paritytech / txwrapper-core

Tools for FRAME chain builders to publish chain specific offline transaction generation libraries.
https://paritytech.github.io/txwrapper-core/
Apache License 2.0
77 stars 28 forks source link

feat: add `additionalTypes`, and `typesBundle` to `getRegistryBase` #294

Closed TarikGul closed 1 year ago

TarikGul commented 1 year ago

closes: https://github.com/paritytech/txwrapper-core/issues/286

Summary

This allows for two new keys in the getRegistryBase function for injecting types to the registry.

  1. typesBundle: for adding OverrideBundleTypes to the knownTypes of the registry.

  2. additionalTypes: for registering any custom types you wish to construct that are not included in the specTypes field.

Affected Function

@substrate/txwrapper-polkadot

@substrate/txwrapper-core

@substrate/txwrapper-registry