npm @polkadot/types 1.31.1
v1.31.1

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

Upgrade priority: Medium, especially for staking users on Polkadot, Kusama & Westend (type updates applied for v23 onwards) or if transparent .at(hash) queries are required/used

  • Important Substrate changed the RewardDestination enum with an extra field for payout-to-any account for staking preferences. If on an older chain consider adding RewardDestination: 'RewardDestinationTo257'
  • Important Substrate changed the CompactAssignment type enhanced types for session solution submissions. If on an older chain consider adding CompactAssignments: 'CompactAssignmentsTo257'

Contributed:

Changes:

  • Add transparent support for types/metadata, i.e. hash queries such as rpc.chain.getBlock(<hash>) & query.system.events.at(<hash>) now works out-of-the-box injecting the correct metadata & types.
  • Optimize RPC-layer calls with detection of short-term cacheable calls (in the same way subscriptions are done)
  • Additional checks on AccountId for valid sizes
  • Add toBigInt() (JS built-in BigInt) on Int/Uint, & Compact<*> types
  • Support for .concat on Codec arrays
  • Support for serialization with isBare flag on enums
  • Add api.getBlockRegistry(blockHash?) to create registry/types for a specific block
  • derive.democracy.locks now returns delegated locks for an account as well
  • Adjust unlocking derives with appropriate in-place additions (less object allocations)
  • .sign on submittables is marked deprecated (not due for removal, but rather use .signAsync for consistency with .signAndSend)
  • Adjust types for CompactAssignments & RewardDestination for Polkadot, Kusama & Westend
  • @polkadot/util 3.4
  • @polkadot/wasm-crypto 1.4

Don't miss a new types release

NewReleases is sending notifications on new releases.