diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df714841e..6496c16d33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 0.98.1 + +- Make the TypeScript generation script mor 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 + # 0.97.1 - **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](UPGRADING.md) to walk through the changes required. diff --git a/UPGRADING.md b/UPGRADING.md index 85299975b8..243e0ec90a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -5,7 +5,7 @@ This is an upgrade guide for users of the API. It does not attempt to detail eac While we try to keep the user-facing interfaces as stable as possible, sometimes you just need to make additions to move forward and improve things down the road, as painful as they may be. Like you, we are also users of the API, and eat our own dog food - and as such, feel any pains introduced first. -## 0.97.1 (and newer), from 0.90.1 (and older) +## 0.97.1 (and newer) The 0.97 series lays the groundwork to allow type registration to be ties to a specific chain and a specific Api instance. In the past, 2 Api instances in the same process would share types, which mean that you could not connect to 2 independent chains with different types. This is very problematic for Polkadot chains, where the idea is to connect to multiple chains. diff --git a/lerna.json b/lerna.json index c775b0a0e9..5b9b692461 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ "packages": [ "packages/*" ], - "version": "0.98.0-beta.10" + "version": "0.98.0" } diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index 1c6e22be21..2190b3851c 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-contract", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Interfaces for interacting with contracts and contract ABIs", "main": "index.js", "keywords": [ @@ -27,6 +27,6 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/types": "^0.98.0-beta.10" + "@polkadot/types": "^0.98.0" } } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index 506498a405..1c53af5748 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-derive", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Common functions used across Polkadot, derived from RPC calls and storage queries.", "main": "index.js", "keywords": [ @@ -28,8 +28,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/api": "^0.98.0-beta.10", - "@polkadot/types": "^0.98.0-beta.10" + "@polkadot/api": "^0.98.0", + "@polkadot/types": "^0.98.0" }, "devDependencies": { "@polkadot/keyring": "^1.7.1" diff --git a/packages/api/package.json b/packages/api/package.json index 4a27d3ce4e..80c6bc0b92 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Promise and RxJS wrappers around the Polkadot JS RPC", "main": "index.js", "keywords": [ @@ -27,12 +27,12 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/api-derive": "^0.98.0-beta.10", + "@polkadot/api-derive": "^0.98.0", "@polkadot/keyring": "^1.7.1", - "@polkadot/metadata": "^0.98.0-beta.10", - "@polkadot/rpc-core": "^0.98.0-beta.10", - "@polkadot/rpc-provider": "^0.98.0-beta.10", - "@polkadot/types": "^0.98.0-beta.10", + "@polkadot/metadata": "^0.98.0", + "@polkadot/rpc-core": "^0.98.0", + "@polkadot/rpc-provider": "^0.98.0", + "@polkadot/types": "^0.98.0", "@polkadot/util-crypto": "^1.7.1" }, "devDependencies": { diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 25122bc12e..f0f76bf39e 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/metadata", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Helpers to extract information from runtime metadata", "main": "index.js", "publishConfig": { @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/types": "^0.98.0-beta.10", + "@polkadot/types": "^0.98.0", "@polkadot/util": "^1.7.1", "@polkadot/util-crypto": "^1.7.1" }, diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index 35654f2c16..0f4c3e1046 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-core", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "A JavaScript wrapper for the Polkadot JsonRPC interface", "main": "index.js", "keywords": [ @@ -27,9 +27,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/jsonrpc": "^0.98.0-beta.10", - "@polkadot/rpc-provider": "^0.98.0-beta.10", - "@polkadot/types": "^0.98.0-beta.10", + "@polkadot/jsonrpc": "^0.98.0", + "@polkadot/rpc-provider": "^0.98.0", + "@polkadot/types": "^0.98.0", "@polkadot/util": "^1.7.1", "rxjs": "^6.5.3" } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 00ac3b1bb5..8ae9a747e2 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-provider", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Transport providers for the API", "main": "index.js", "keywords": [ @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/metadata": "^0.98.0-beta.10", + "@polkadot/metadata": "^0.98.0", "@polkadot/util": "^1.7.1", "@polkadot/util-crypto": "^1.7.1", "eventemitter3": "^4.0.0", diff --git a/packages/type-jsonrpc/package.json b/packages/type-jsonrpc/package.json index 9c9eccf464..32f8189066 100644 --- a/packages/type-jsonrpc/package.json +++ b/packages/type-jsonrpc/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/jsonrpc", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Method definitions for the Polkadot RPC layer", "main": "index.js", "publishConfig": { diff --git a/packages/types/package.json b/packages/types/package.json index 4578afe99d..678179c9a9 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/types", - "version": "0.98.0-beta.10", + "version": "0.98.0", "description": "Implementation of the Parity codec", "main": "index.js", "keywords": [ @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme", "dependencies": { "@babel/runtime": "^7.7.4", - "@polkadot/metadata": "^0.98.0-beta.10", + "@polkadot/metadata": "^0.98.0", "@polkadot/util": "^1.7.1", "@polkadot/util-crypto": "^1.7.1", "@types/memoizee": "^0.4.3", diff --git a/packages/types/src/codec/create/createType.ts b/packages/types/src/codec/create/createType.ts index 68b0633707..07e81639c1 100644 --- a/packages/types/src/codec/create/createType.ts +++ b/packages/types/src/codec/create/createType.ts @@ -57,9 +57,12 @@ function initType (registry: // An unsafe version of the `createType` below. It's unsafe because the `type` // argument here can be any string, which, if not parseable, will yield a // runtime error. +// eslint-disable-next-line @typescript-eslint/no-unused-vars export function createTypeUnsafe (registry: Registry, type: K, params: any[] = [], isPedantic?: boolean): T { try { - return initType(registry, createClass(registry, type), params, isPedantic); + // Circle back to isPedenatic when it handles all cases 100% - as of now, + // it provides false wraning which is more hinderance than help + return initType(registry, createClass(registry, type), params); // , isPedantic); } catch (error) { throw new Error(`createType(${type}):: ${error.message}`); }