Skip to content

Releases: polkadot-js/api

1.1.1

06 Feb 15:21
Compare
Choose a tag to compare
  • Important Chains without balances.account or system.account should supply "BalanceLock": "BalanceLockTo212" to their types to use the previous-generation BalanceLock (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.*.* - the polkadot-types-from-chain now also generates these
  • Remove additional V1-only derives (staking.recentlyOffline, balances.nominatorsFor)
  • Add .isMax() on int values, an opposite of isZero() (e.g. u128, as well as derived, e.g. Balances)
  • Add .keyPrefix() to all api.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

30 Jan 16:08
Compare
Choose a tag to compare
  • 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 both api.tx.* and api.sign (in addition to api.setSigner)
  • Add derives for the society module
  • Don't map empty tuples, e.. () to Null, 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

13 Jan 15:21
Compare
Choose a tag to compare
  • 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 named Raw
  • 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

13 Dec 14:58
Compare
Choose a tag to compare
  • Breaking change The Data and U8a type has been renamed and just replaced with the Raw type
  • Breaking change The api.derive.staking.info has been split into 2 - staking.query for non-balance related information (more effective) and staking.account that enhances query for all the information previously found .info
  • Cleanup DoubleMap hashing to always hash over the full value (in the case of Vec<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

04 Dec 11:40
Compare
Choose a tag to compare
  • 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

29 Nov 10:26
Compare
Choose a tag to compare
  • Breaking change Add the passing on an explicit Registry to all calls to createType 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 create Metadata classes, you now would need to do so with the import Metadata from '@polkadot/metadata'; This is a decorated class, where the previous metadata is now available on Metadata.metadata, alongside decorated consts.*', tx.* and query.*.
  • 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 previous validatorPayment, you can override with ValidatorPrefs: '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

09 Nov 13:35
Compare
Choose a tag to compare
  • Updated types for latest Kusama
  • Add filterRecords (in addition to findRecord) 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

25 Oct 15:07
Compare
Choose a tag to compare
  • 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 to Call.injectMetadata to align with Events (This should not be used externally, however mentioned as breaking here)

v0.94.1

07 Oct 15:34
Compare
Choose a tag to compare
  • 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

26 Sep 10:32
Compare
Choose a tag to compare
  • 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 a Balance type. Additionally the api.queryMulti and .multi on queries not allow generic type params.
  • Add api.rpc.accounts.nextIndex, api.rpc.contracts.call and api.rpc.rpc.methods calls. Optional calls (such as account/contracts) is decorated based on the results from rpc.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)