Releases: polkadot-js/api
Releases · polkadot-js/api
1.1.1
- Important Chains without
balances.account
orsystem.account
should supply"BalanceLock": "BalanceLockTo212"
to their types to use the previous-generationBalanceLock
(when querying locks) - Add support for
balances.account
in all applicable derives (incl.vesting
module) - Inject and use SignedExtensions by name from V11 metadata (V4 extrinsics only)
- Add typings for
api.tx.*.*
- thepolkadot-types-from-chain
now also generates these - Remove additional V1-only derives
(staking.recentlyOffline
,balances.nominatorsFor
) - Add
.isMax()
on int values, an opposite ofisZero()
(e.g.u128
, as well as derived, e.g.Balances
) - Add
.keyPrefix()
to allapi.query.*
complementing the.key()
call, both returning a hex string - Council derives now takes bootstrapping (member, no elections) into account
- Account derives now allow for an optional indices module (not required)
- Adjust balances fees derivation with optional transfer and creation fees (removed in Substrate)
- Adjust enum
.toJSON()
to return type name as specified
v1.0.1
- Breaking change Drop support for Substrate v1 chain in all derives
- Return unsub functions from provider .on emitters (Thanks to https://github.com/jak-pan)
ApiPromise.isReady
now rejects on unrecoverable errors (Thanks to https://github.com/laec)- Add
polkadot-types-from-chain
&polkadot-types-from-defs
TypeScript generators to@polkadot/types
- Only decorate derives where relevant parent
api.query.*
is available - Support
.entries(arg?: any)
lookups on DoubleMaps (in addition to previously supported maps) - Allow v9 metadata to parse even in cases where it was wrongly deployed pre-v10
- Allow type-aliases on a per-module basis (e.g.
Judgement
in identity as well as society) - Allow passing
{ signer }
to bothapi.tx.*
andapi.sign
(in addition toapi.setSigner
) - Add derives for the society module
- Don't map empty tuples, e..
()
toNull
, rather keep them empty - Add lookups to the metadata errors via
findMetaError
- Update metadata and types for the latest Substrate & Polkadot versions
- Support metadata V11 as per latest Substrate
- Remove support for un-deployed metadata
- Remove old known types for Substrate V1
v0.100.1
- Important This will the the last API version with Substrate 1.x support. Although you will still be able to use subsequent versions with older chans, dependent libraries such as sr25519 may not be compatible.
- Add support for the Substrate identity module
- Remove the
codec/Data
type, to remove a conflict with Substrate. This type is now namedRaw
- Fix for linked maps using
Option
- Add support for
BTreeSet
(Thanks to https://github.com/satellitex) - Add support for Metadata v10
- Add support for latest Polkadot/Substrate types
- Add
paymentInfo
to submittables to calculate fees
v0.99.1
- Breaking change The
Data
andU8a
type has been renamed and just replaced with theRaw
type - Breaking change The
api.derive.staking.info
has been split into 2 -staking.query
for non-balance related information (more effective) andstaking.account
that enhances query for all the information previously found.info
- Cleanup
DoubleMap
hashing to always hash over the full value (in the case ofVec<T>
, this includes the length) - Update democracy derives to take care of nextTally and lowestUnbaked
- Add additional derives for both council & treasury
- Alignment with latest Polkadot/Substrate master branch types
v0.98.1
- Make the TypeScript generation script more re-usable (Thanks to @xlc)
- Add
.entries()
for all map-types, returning storage keys and values - Add
.signAsync
to submittable extrinsics (Thanks to @c410-f3r) - Cleanup circular references between internal dependencies
- Support for new Substrate democracy with preimages in derive
- Alignment of types with Substrate/Polkadot master branches
v0.97.1
- Breaking change Add the passing on an explicit
Registry
to all calls tocreateType
as well as all codec classes. If you are upgrading form an older version, use the migration guide to walk through the changes required. - Breaking change The metadata classes have been moved from
@polkadot/types
into@polkadot/metadata
. If you explicitly createMetadata
classes, you now would need to do so with theimport Metadata from '@polkadot/metadata';
This is a decorated class, where the previous metadata is now available onMetadata.metadata
, alongside decoratedconsts.*
',tx.*
andquery.*
. - Breaking change Session
Keys
defaults to 4 keys now (Substrate master), depending on your node config, you would want to override with e.g.Keys: 'SessionKeys3'
(1, 2, 3, 4, 5 & 6) - Breaking change
ValidatorPrefs
now default to the new percentage commission model, to use the previousvalidatorPayment
, you can override withValidatorPrefs: 'ValidatorPrefsTo196'
api.derive.*
now has built-in memomization- Various fixes and cleanups to
api.derive.*
including era length progress and vesting calculations - Aligned all types with the latest Polkadot & Substrate, including Kusama CC3
- Support for Metadata V9, which adjusts the hashing methods of storage entries
- Support for Metadata V10 (still un-released), which includes prefixed map support
v0.96.1
- Updated types for latest Kusama
- Add
filterRecords
(in addition tofindRecord
) on submittable results - Various ABI v2 contract fixes
- Update derive for elections (incl. RunnersUp) and heartbeat derives (with blocks & messages)
- Add vesting totals & locked breakdowns to derive balances
- Update council derives for the latest Substrate master support (with constants)
- Derive cleanups, including sharing of instances between the API and internal to derives
v0.95.2
- Support Extrinsic V4 with additional signature indicator (Latest Polkadot/Substrate/Kusama)
- Adjust subscription update checks to avoid duplicated data updates
- Support Metadata V8 (exposes per-module
decl_error
definitions) - Support next generation contracts ABI (with additional type definitions)
- Support for
BTreeMap<K, V>
types and definitions - All latest Polkadot & Substrate types (as per master branches)
- Breaking change
Call.injectMethods
is moved toCall.injectMetadata
to align withEvents
(This should not be used externally, however mentioned as breaking here)
v0.94.1
- Add handling of
Result<Ok, Error>
definitions - Adjust API cloning now takes RPC filters from source into account
- Simplification of isPedantic checks and less overhead on StorageData types
- Cleanups and fixes around RPC and derive type definitions
- Fix
derive.imOnline.receivedHeatbeats
to query via indexes - Adjustment of
api.derive.elections.{approvalsOf|approvalsOfAt}
to allow ss58 address input - Cleanup
Enum
.eq
handling to be more exhaustive - Add documentation for custom extrinsic formats (advanced chains)
- Update to latest substrate master metadata
v0.93.1
- Support for Kusama CC2
- In extrinsic submission, use
rpc.account.nextIndex
to retrieve the nonce when available - For TypeScript users
api.query.*.*
is now properly typed for default Substrate calls, i.e.api.query.balances.freeBalance(...)
will return aBalance
type. Additionally theapi.queryMulti
and.multi
on queries not allow generic type params. - Add
api.rpc.accounts.nextIndex
,api.rpc.contracts.call
andapi.rpc.rpc.methods
calls. Optional calls (such as account/contracts) is decorated based on the results fromrpc.methods
, so they don't show up on nodes where they are not active. - Updated types to support the latest Polkadot/Substrate master changes
- Support recursive type registration (self-referencing via
Box
) in addition to better sanitation of user-defined-types - Documentation and example updates (thanks mostly to contributions)