Releases: polkadot-js/api
v3.7.1
Upgrade priority: Low. However recommended for current Substrate master, Polkadot and Rococo users and those wishing to support the upcoming Polkadot 28 runtime with the new MultiAddress.
- Breaking change As indicated in the 3.5.1 release notes, the
Address/LookupSourcedefaults have now been adjusted forMultiAddress. If your chain does not use these types, explicitly add the correctAddress/LookupSourcetypes. This new extensible format is mean to cater for all address types into the future, removing a lot of discrepancies between chains.
Contributed:
- Extraction of the block author on Moonbeam (Thanks to https://github.com/joelamouche)
- Cleanup logs with HTTP providers, no subs (Thanks to https://github.com/Tbaut)
Changes:
- Allow
.sliceoperator on theVectype - Apply
MultiAddressas a default - Adds support for the upcoming Polkadot 28 and Kusama 2028 runtimes
- Add checkpoint for Kusama 2027 upgrade
- Update all parachain types (as per latest Rococo)
- Correctly use relay blockNumber in parachain validation data
- remove information log for capabilities detection (creates confusion)
- Remove explicit references to
global, use thex-globaldetection - Remove explicit
moduleinpackage.json(exports map available)
v3.6.1
Upgrade priority: Medium if not already on at least 3.3.1. The next upgrade of Kusama/Polkadot requires it.
- Breaking change To support chains with multiple tokens, such as bridges, the
ChainPropertiestype now returns an array of tokens and decimals (instead of singular values) in thetoken{Decimals, Symbol}getters. Additionally, this means that theregistryinterfaces has been changes, toregistry.chainDecimals: number[]andregistry.chainTokens: string[]. Where used the[0]index will return the first value if only interested in a single, for a straight conversion.
Changes:
- Allow for the detection of on-chain capabilities as available (e.g.
AccountData,ValidatorPrefs) - Cater for multiple tokens and decimals in the chain the chain
system.properties(as per the chain specification) - Add a
instances: { [key]: [module1, module2] }definition in teh bundle types, allowing for multiple instances (e.g. Balances) - Adjust the
api-derivefor balances to retrieve values viainstancesas well as across multiple modules - Ensure all types are registered for all metadata typegen steps
- Add
rpc.payment.queryFeeDetailsRPC endpoint - Update types & metadata to latest Substrate
- Move the
@polkadot/x-rxjspackage into the common repo - Allow doc generation for errors/events (markdown outputs)
v3.5.1
Upgrade priority: Low. Recommended for parachain developers.
- Important The default for Substrate on the Address types are
MultiAddress. It is recommended that chains add explicit definitions forAddressandLookupSourcein their types, instead of relying on the API-defaults. A future update will swap the API defaults to align with Substrate. - Important Like the above changes in Substrate, the
AccountInfostructure has also changed. It is recommended that chain developers explicitly addAccountInfo: 'AccountInfoWithRefCount'for the version withrefCounton andAccountInfoWithProvidersfor the latest Substrate version. As per the above, the API defaults will be changed to align with Substrate.
Contributed:
- Apply correct TypeScript type for
toBigInt()(Thanks to https://github.com/ianhe8x) - Expand type definitions for storage key tuples (Thanks to https://github.com/monitz87)
- Adjust bounty derive to cater for non-council chains (Thanks to https://github.com/ekowalsk)
Changes:
- Remove recursion in vector/struct U8a stream decoding
- Availability of staking made optional in session length calcs (era does require it)
- Updates to parachain types, ensuring it has coverage for all the latest
- Update all Rococo types to the latest (session keys, session reports, parachain indexes)
- Update known upgrade checkpoints fo WestEnd
- Add types of the lottery module in Substrate
- Add and extend types for the crowdloan module in Polkadot
- Adjust node-template to default to
MultiAddresson specVersion >= 100
v3.4.1
Upgrade priority: Low. Fixes for parachain types, .entries() (with no values) and event.is(...) checks, users of these interfaces will have benefit.
- Breaking change The
derive.chain.{getBlock, subscribeNewBlocks}now returnSignedBlockExtended, all with the actual extrinsics and events mapped. Users of the latter interface should take note.
Contributed:
- Fix
SessionKeys{6-9}definitions (Thanks to https://github.com/icodezjb) - Support
Vec<(a, b)>in enums (Thanks to https://github.com/monitz87) - Add motions to bounty derive (Thanks to https://github.com/ekowalsk)
Changes:
derive.chain.getBlock()now maps events to extrinsics via.extrinsicsgetter- Ensure dispatchInfo is extracted on failed extrinsics (
getBlockderive) - Allow specification of additional signed extrinsic via API options
- Add missing parachain types,
ParaGenesisArgs - Correct
EthTransactiontype (as per the correct cargo crate) - Update with latest contract types for Substrate master
- Update alias mapping for asset palette (including Substrate starting defaults)
- Allow
.entries()call where 0 keys are present - Fix
.ison events not checking the correct index - Construction of
i*types ow correctly checks for max positive/negative
v3.3.1
Upgrade priority: Low. Recommended for users of frontier evm module with additional types.
Contributed:
- Expand bounty derives (Thanks to https://github.com/ekowalsk)
- Adjust known-types (Thanks to https://github.com/mikiquantum)
Changes:
- Parallelize the API-init RPC calls for faster overall startup
- Add
ExitReasontypes for the frontier evm module - Adjust checks for indexed/non-indexed module checks (metadata decoration)
- Apply module aliases on constants (aligning with events, extrinsics)
- Allow for use of
system.ss58Prefixas exposed (current Substrate master) - Correct use of api-contract
blockWeights.maxBlockin estimation - Build metadata docs & interfaces with section aliases
- Update to latest Substrate master metadata in tests
v3.2.1
Upgrade priority: Low. Recommended for users of parachains.
Contributed:
- Adjust metadata
.asV12type signature (Thanks to https://github.com/yjhmelody)
Changes:
- Add
api.{errors, events, query, tx}.<section>.<name>.is(...) - Remove support for staking pre Substrate 2.0
- Add all frontier types & RPCs
- Support
AccountInfowith new provider/consumer refCount structure - Additional Cumulus parachain types
- Consistently format number JSON based on bitLength
- Cleanup metadata -> api dependencies
- Update
@polkadot/utilto 5.2.1
v3.1.1
Upgrade priority: Low. Recommended for users of parachains.
Contributed:
- Additional parachain types (Thanks to https://github.com/joelamouche)
- Support for multi queries with
HttpProvider(Thanks to https://github.com/ianhe8x) - Configurable error logging with
createTypeUnsafe(Thanks to https://github.com/dvdplm)
Changes:
- Adjust core type creation, removing storage duplication
- Update parachain types to support Rococo v1
- Adjust bounties derive to cater for new Substrate namespaces (& move to bounties)
- Mark
detectPackageas known side-effect - Add
detectPackageto@polkadot/metadata(a number of requests on this) - Adjust x-rxjs wrapper to expose all methods, incl. Node.js esm fixes
- Update to latest Substrate static metadata
- Update
@polkadot/utilto 5.1.1
v3.0.1
Upgrade priority: Low. Recommended for the next Kusama/Polkadot upgrades due to additional types and those following chains following Substrate master closely.
Important While this package contains no external interface changes, it now compiles and ships both cjs and esm modules. This means that modern bundlers will have more information for tree-shaking available. Additionally when using Node with .mjs extensions, the esm version imports will be used on recent Node versions. Adding an export map, as here, may have some impacts so a major semver bump is advised. There may be (small) dragons hiding in the dark corners...
Contributed:
- Injection of derives via typesBundle (Thanks to https://github.com/pr0fedt)
- Added derives for bounties (Thanks to https://github.com/krzysztof-jelski)
Changes:
- Build and expose both cjs and esm via exports map
- Inject RPC definitions for typesBundle, allowing per-spec configuration
- Added
query.<section>.<method>.sizeAt(hash, [...params])for all storage - Add new Substrate consumed Weight types
- Expand
SessionKeys<n>definitions (up to 9) - Cleanup circular
Type<->Textdefinitions - Cleanup circular
Metadata<->TypeRegistryimports - Update
@polkadot/utilto 5.0.1
v2.10.1
Upgrade priority: Low. Recommended when following Substrate master and/or parachains development, contains the latest types for both.
- Breaking change If using the
staking.queryderive, you now need to pass flags as to which values to retrieve
Changes:
- Ensure that maximum era is limited to
consts.system.blockHashCount(don't overflow on very low blocktimes) - Apply current Polkadot master parachain types
- Apply current Substrate master asset types
- Add
system_{addLogFilter, resetLogFilter}RPCs - Adjust tests for latest Substrate metadata
- Adjust staking derives to be more performant (flags indicate which query values to retrieve)
- Add account derive to cater for the availability of identities
- Use
import typein all cases
v2.9.1
Upgrade priority: Low. No major changes when on at least 2.8.2. Users encouraged to upgrade to at least that patch.
- Breaking change The API will now not attempt to queue calls made while not connected and send on connection. Rather when making a call and the RPC node is not connected, an error will be thrown.
Contributed:
- Add typegen capability for custom RPCs (Thanks to https://github.com/holygits)
Changes:
- Remove rpc-core send queue, only allow sends while connected
- Adjust staking derive for
electedInfoto contain details of current validators - Extract identity-only derive from
accounts.infofor simpler reusability - Add types for Substrate master node (to allow for consistent swapping to
MultiAddress) - Adjust
Byteswith.sliceto be consistent forUint8arrayextensions (already released in 2.8.2 as a bugfix)