npm @polkadot/api 1.31.1

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'



  • Add transparent support for types/metadata, i.e. hash queries such as rpc.chain.getBlock(<hash>) &<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
latest releases: 4.13.2-9, 4.13.2-8, 4.13.2-7...
9 months ago