Releases: polkadot-js/api
Releases · polkadot-js/api
v1.14.1
- Important
DispatchInfochangedpaysFeeto an enum, if using an older version use,DispatchInfo: 'DispatchInfoTo244' - Align imOnline
Heartbeatwith Substrate (Thanks to https://github.com/arjanz) - Adust EVM types to include
Vicinity(Thanks to https://github.com/drewstone) - Add
derive.democracy.locksto return extended lock info based on votes - Ensure metadata is only requested once upon startup (bypass on upgrade subscriptions)
- Expand testing around
ExtrinsicEraconstruction - Expand
Registryto direct access to available signed extensions (in addition to exposed types) - Cater for new
CheckSpecVersionandCheckTxVersionsigned extensions (withSignerPayloadadjustments) - Cater for new
PrevalidateAttestssigned extensions (Polkadot claims) - Don't re-calculate submittable extrinsic hash on status checks (optimization)
- Support for both old/new Tuples in
democracy.depositOfin derives - Fix democracy
ProxyStatetypes - Extends types for Polkadot claims
- Update
@polkadot/utilto 2.10
v1.13.1
- Add support for ECDSA keypairs in extrinsic signers (Thanks to https://github.com/akru)
- Rework type generation to use templating for better maintenance (Thanks to https://github.com/xlc)
- Adjust extrinsic
sign/signAsyncsignature to optional options (Thanks to https://github.com/KiChjang) - Support round-robin endpoints in the
WsProviderwith array of urls (Thanks to https://github.com/hoani) - Remove static test-only metadata for Polkadot dev chains (not updated regularly, Substrate dev to remain)
- Revert error swallow for wrong preimage data (temp. override for Kusama upgrade with no migration)
- Fix
.encodedLengthcalculation on[Type; N]types - Add new
rpc.grandpa.roundStateRPC - Update types & metadata as per latest Substrate master
- Adjust Centrifuge starting version
v1.12.1
- Fix
CompactAssignmentstypes (Thanks to https://github.com/arjanz) - Provider ayo-connect now allows for interval config (Thanks to https://github.com/jnaviask)
- Cleanup generation for c-like enums (Thanks to https://github.com/monitz87)
- Allow subscription to all storage keys, alignment with Substrate (Thanks to https://github.com/xlc)
- Cater for vote delegations in democracy derives
- Cleanup account derive flags where to allow for optional council modules
- Allow generic types in ApiPromise.combineLatest
- Update to latest substrate metadata
v1.11.1
- Important Substrate master has an updated
Weight(tou64), on older chains applyWeight: 'u32'(This does affect event decoding if wrongly set) - Allow user type augmentation to work with different versions of rxjs (Thanks to https://github.com/monitz87)
- Align augmented generation with camelCase (Thanks to https://github.com/monitz87)
- Fix bitfield endian encoding (Thanks to investigation by https://github.com/xlc)
- Add account flag derives via
accounts.flags(accountId)(Thanks to https://github.com/kwingram25) - Fix entries decoding for
Option<Number>(& simplify, decoding correctly on rpc layer) - Add
system.{localPeerId, localListenAddresses}&state.getReadProofRPCs - Ensure proper propagation of
api.runtimeVersion(used for signing) after upgrade - Field ordering fix for deprecated
Linkage(used in linked maps) derive.account.infonow returns all field enum types decoded (not only raw)- Add banner with FAQ entries for node-template to aid with common issues
Digesthas been moved to definitions, removal ofGenericDigesttype- Support
Fixed128type - Add
transactionVersiontoRuntimeVersionstruct - Enhance API support for non-subscription providers (skip subscription to runtimeVersion)
- Adjust types for Kusama 1057 (notably the new
StakingLedger)
v1.10.1
- Important Substrate master has updated staking, on older chains apply
StakingLedger: 'StakingLedgerTo240' - Add
rpc.system.chainTypeto retrieve the chain type (Development. Local, Live & Custom) - Adjust types for Westend after the reset
- Adjust democracy derives, including the support of the frame-scheduler for scheduled deployments
- Allow staking derives to work with new staking payouts, specifically
tx.staking.payoutStakers - Cleanups to derives for democracy & staking to be more performant
- Add Centrifuge base types to
@polkadot/types-known - Adjust with all the latest substrate master types
- Internally all private/protected methods/variables are now
_prefixed (Aligning with theprivate/protectedindicators in the TS definitions) - Update metadata/docs-from-metadata to the latest Substrate
v1.9.1
- Breaking change (TypeScript with derives only) The return type names for
api.derive.*have been adjusted for consistency, all starting withDerive*(previously a mixture ofDerived*andDerive*) - Breaking change (derives only) Additional cleanups of democracy proposal & referenda derives, including support for new Polkadot/Substrate vote retrievals
- Tx signing via
signAndSend&signAsyncnow tries to use the last finalized block (depending on finalized drift) - Add support for
api.rpc.childstate.*Substrate RPCs, older nodes with still populateapi.rpc.state.*with the child methods - Adjust
Error.messageon RPC failures to not include the (already known) method signature - Split
@polkadot/types/knowninto@polkadot/types-known, allowing for base API overrides - Extended
api.derive.democracyto cater for dispatchQueue and externals - Extended
api.derive.councilto cater for new phragmen elections - Use new
queryStorageAtfor query.entries, removing unneeded subscriptions (use as available) - Fix
BTreeSetinitialization when it forms part of query interfaces - Fix encoding for
Vec<u8>-related types as part of constants - Internal adjustment of interface type locations (no impact on imports via
@polkadot/types/interfaces)
v1.8.1
- Breaking change The format for any custom RPCs have been changed alongside API-internal changes to allow for better RPC management. If you are currently using custom RPCs (or planning to do so), look at the updated documentation
- Breaking change Alongside API RPC changes, the
@polkadot/jsonrpcpackage has been removed. Since it was never documented and only used internally, this should not have adverse impacts. All RPC definitions itself has now been moved to the relevant modules inside@polkadot/types/interfaces - Important Substrate has an updated democracy module. If using an older chain add the
ReferendumInfo: 'ReferendumInfoTo239'type when using referendums - The
isRetractedExtrinsic status is now a warning, not a fatal error, correctly aligning with Polkadot/Substrate - The Substrate extrinsic phase definitions has been expanded with
Initializationto align with the latest versions - Add support for all known substrate RPC methods
- Extend account derives to include status flags, e.g.
isCouncil,isSudo, ... - Adjusted referendum derives to cater for bot new/old democracy. Derived
referendumInfonow includesstatusfield, notinfo - Add
initWasmflag to API options, that when set tofalsedoes not init the WASM portion (leaving it to the user elsewhere)
v1.7.1
- Important Current versions of Polkadot/Substrate have dropped support for linked maps on storage entries. If you are using these queries to retrieve all entries, for instance
staking.{nominators,validators}()and using an upgraded chain, you need to swap to retrieving entries via.entries()or.keys()for the keys. - Pull in support and types for latest Polkadot/Substrate
- Add support for the new Substrate
state_getKeysPagedRPC, including use in storage keys - Move
derive.staking.controllerstoderive.staking.stashes, reflecting actual content - Cater for adjusted storage (non-linked mapped) for
derive.staking.stashesqueries (with old-compat) - Expanded
derive.staking.*derives, including addition ofderive.staking.own* - Re-add fixed (with tests) checks for query args, previously disabled in 1.6.2
v1.6.2
v1.6.1
- Breaking change
api.rpc.state.queryStorage(...)now fully decodes theVec<StorageChangeSet>and returns a decoded[Hash, Codec[]][]when using this RPC. StorageKeynow has an.argsproperty, decoded from meta wheretwox64_concatorblake128_concatare used on maps- Fix
api.query.*.*.entriestype conversions to return exact types (notOptionin some cases) - Add
api.query.*.*.keysto retrieve only the storage keys, similar to.entries - Full linked map retrievals will now use direct getStorage queries for faster operation
- Underlying rpc-core interfaces now unwraps
Error("...")when found in responses - Added
derive.eras*interfaces for queries to new Substrate staking interfaces - Update
derive.accountto cater for new indices module storage (detected with fallbacks) - Adjust derive queries for session without module prefix (DoubleMap -> Map), detected on use
- Add runtime validation for map arguments to
api.query.* - TypeScript interfaces for linked maps now correctly generates as
[Type, Linkage<Next>]