Skip to content

Releases: polkadot-js/common

v2.5.1

22 Feb 15:38
Compare
Choose a tag to compare
  • Breaking change (TypeScript only) The *.d.ts files now contain TypeScript 3.8 features, #private, which is not usable in older versions
  • Add isBigInt(value) to allow BigInt checks. Also add support in bnToBn as well as number conversion utils
  • Add isChildClass(Parent, Child?) to check if a class extends the parent, asserting Child is Parent
  • (internal) Use #<varname> instead of private _<varname> for private class variables

v2.4.1

18 Feb 08:22
Compare
Choose a tag to compare
  • Ensure that formatBalance does not apply unit overrides apply when no SI is applicable
  • Adjust formatBalance(<balance>, <options>) to take expanded withUnit: string | boolean option where string is an actual unit, e.g. KSM
  • The decimals option to formatBalance should now be passed as part of the options (previous last-param deprecated)
  • The .setSS58Format on keyring will now just operate on pairs created on the keyring, not globally. The global setSS58Format in @polkadot/util-crypto will be deprecated.
  • The deprecated addressPrefix option to keyring has been belatedly removed (Use ss58Format rather)

v2.3.1

15 Feb 11:02
Compare
Choose a tag to compare

v2.2.1

06 Feb 14:50
Compare
Choose a tag to compare
  • Add resolver for jest/test requires (tests execute in src/)

v2.1.1

04 Feb 13:08
Compare
Choose a tag to compare
  • Update detectPackage(<package.json>, __dirname?) with calling folder

v2.0.1

30 Jan 15:13
Compare
Choose a tag to compare
  • Update w3f/schnorrkel to 0.8.5 (Full Substrate 2.x support, no 1.x support)
  • Remove Alice session (ed2551) account from testing keyring (not applicable to Substrate 2.x)
  • Remove chainspec, db, trie-codec, trie-db and trie-hash packages (moved to client)
  • Renamed assertSingletonPackage to detectPackage with inclusion of version listing
  • Swap to elliptic library for secp256k1 recovery (No node bindings)

v1.8.1

13 Jan 15:41
Compare
Choose a tag to compare

v1.7.1

27 Nov 19:12
Compare
Choose a tag to compare
  • formatBalance signature now allows to force unit displays
  • Keypair now allows for derive on a pair, with pair.derive(...)
  • assert now acts like a real asserts, with no return - signature adapted for new TS 3.7

v1.6.1

24 Oct 11:55
Compare
Choose a tag to compare
  • pair.sign(message) now takes an optional second options?: SignOptions parameter, where SignOptions is currently defined as { withType: boolean }. Here withType instructs the signing to prepend the type of signature (ed2551, sr25519 or ecdsa). This is used for the new Polkadot/Substrate MultiSignature format.

v1.5.1

04 Oct 10:09
Compare
Choose a tag to compare
  • Fix typings on the Keyring-exposed encode & decodeAddress
  • Allow ss58Format = 0 as a valid value
  • Loosen type definitions for allowed ss58format values (still checked against allowed array)