npm @polkadot/types 1.3.1
v1.3.1

latest releases: 11.0.2, 11.0.1, 10.13.1...
4 years ago

This is a slightly-out-of-band release, with mostly internal refactoring. It was pushed earlier than normal to ensure there is a minor release available that fixing the TypeScript typing issues. Unless you are running @polkadot/util 2.4.1, or don't want to explicitly install @types/bn.js to the use the API (TS) an upgrade is not strictly required for on-chain functionality.

  • Add @types/bn.js as a normal dependency, exposed in *.d.ts ((Thanks to https://github.com/monitz87)
  • Type generation scripts (including polkadot-types-from-{chain,defs}) has been moved to the @polkadot/typegen package
  • The @polkadot/types/codec/create has been moved to @polkadot/types/create, imports from @polkadot/types are unaffected
  • Expose chain properties on registry (and use for API type formatting)
  • Add toHuman(isExtended?: boolean) to all codec types, formatting into a human-readable structure

Don't miss a new types release

NewReleases is sending notifications on new releases.