Skip to content

Releases: polkadot-js/api

v4.0.3

08 Mar 21:24
Compare
Choose a tag to compare

Upgrade priority: Low. Recommended if you use the API to sync the full chain, most notably Polkadot.

Contributed:

v4.0.2

08 Mar 14:34
Compare
Choose a tag to compare

Upgrade priority: High. Required if you are using 4.0.1 in a Node.js environment.

Changes:

  • Fix import from @polkadot/x-rxjs in Node environments (From common)
  • Add correct types for Phase is new validator elections module

v4.0.1

07 Mar 15:47
Compare
Choose a tag to compare

Upgrade priority: Low. Recommended for users wanting to keep updated with chain changes.

Important In the 4.0 version the default package type has been changed to ESM modules by default. This should not affect usage, however since the output formats changed, a new major version is required.

Contributed:

Changes:

  • Build to ESM by default (with cjs versions via export map)
  • Enum .toSON() now encodes all keys as camelCase (aligning with the output from Substrate)
  • Add createdAtHash?: Hash to Codec interface (filled-in by storage retrievals)
  • Expose the source hash as wamHash on Abi parsed instances
  • Use parentHash when creating mortal era (handles frequent forks better)
  • Add AccountInfoWithTripleRefCount to cater for latest Substrate
  • Add upgrade block for Westend 49

v3.11.1

28 Feb 12:51
Compare
Choose a tag to compare

Upgrade priority: Low. Recommended for users wanting to keep updated with chain changes.

Contributed:

Changes:

  • Adjust council derives to cater for current-generation candidate mapping
  • Allow for override of codec hasher (& output type)
  • Adjust submittables to submit hex-encoded addresses to queries
  • Adjust initialization to always retrieve tx version from Metadata only
  • Update election types as per latest Substrate
  • Add types for the new gilt module
  • Upgrade to the latest Substrate metadata
  • Adjust package detection to check for local monorepo dependencies
  • Ensure that metadata .toJSON() does apply type aliasses

v3.10.2

23 Feb 08:25
Compare
Choose a tag to compare

Upgrade priority: Medium. Recommended for users of chains where MultiAddress is in-use and blocks are decoded.

Changes:

  • Fix decoding for MultiAddress enum where non-AccountId variable-lengths are provided as part of a stream
  • Added known Polkadot 28 upgrade block
  • Update for latest Substrate contracts Schedule types

v3.10.1

22 Feb 10:10
Compare
Choose a tag to compare

Upgrade priority: Low.

Changes:

  • Adjust ConsumedWeight types to align with Rust module code
  • Check for connection status in subscription unsubscribe
  • Adjust staking reward derives ordering for better performance
  • Adapt detection imports to remove .json dependencies (Better behavior using Node.js with ESM)

v3.9.3

16 Feb 06:54
Compare
Choose a tag to compare

Upgrade priority: Low. Recommended for parachain builders since it contains the updated parachain types.

Changes:

  • Adjusted parachain PersistedValidationData structure

v3.9.2

15 Feb 09:06
Compare
Choose a tag to compare

Upgrade priority: Low. Recommended for parachain builders since it contains the latest parachain types.

Contributed:

Changes:

  • Added missing Culmulus ParachainInherentData & MessageQueueChain types
  • Add alias for system_unstable_networkState RPC

v3.9.1

14 Feb 17:52
Compare
Choose a tag to compare

Upgrade priority: Low.

  • Important The Result<T, E> has been updated in the generation and the base types to follow the Rust version 100%. This means {as, is}Error is now available as {as, is}Err on the Result type. The older versions can still be used, but the *Error interfaces are now marked as deprecated.

Changes:

  • Adjust Result<T, E> interface to be 100% compatible with the Rust version
  • Add the 2028 upgrade to the known upgrades (optimizing certain .at queries)
  • Adjust council derives to cater for latest Substrate & Polkadot
  • Adjust Rococo know type definitions to cater for the latest update
  • Update types for latest Polkadot/Substrate
  • Add generic arguments for TypeScript users to .entries/.keys to deal with the key typings

v3.8.1

07 Feb 13:08
Compare
Choose a tag to compare

Upgrade priority: Low. Recommended for users of the latest Substrate master, especially using contracts.

  • Important The api-contract Code now supports deploying the code and a contract in on operation. This aligns with the latest Substrate where code cannot be uploaded with a contract. The createBlueprint is therefore deprecated, use code.tx.<constructor>(...) to deploy code. (Compatible with both old and new versions of Substrate)

Contributed:

Changes:

  • Expand api-contract to allow for Code to deploy contract alongside code. createBlueprint is now deprecated, replaced by createContract or the preferred code.tx.<constructor>, which uploads and deploys the code in one operation. This aligns with the current Substrate master contracts implementation.
  • Allow for signed extensions to be supplied inside type bundles
  • Ensure that the auto-connect state is checked on auto-connections (respecting disconnect)
  • Added CancelProxy to `ProxyTypes on Polkadot, Kusama & Westend
  • Updated to latest Substrate metadata