+3
-2
@@ -1,4 +1,4 @@
|
||||
# 1.10.0-beta.x
|
||||
# 1.10.1 Apr 13, 2020
|
||||
|
||||
- **Important** Substrate master has updated staking, on older chains apply `StakingLedger: 'StakingLedgerTo240'`
|
||||
- Add `rpc.system.chainType` to retrieve the chain type (Development. Local, Live & Custom)
|
||||
@@ -8,7 +8,8 @@
|
||||
- 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 indicated with `_` (Aligning with the `private/protected` indicators in the TS definitions)
|
||||
- Internally all private/protected methods/variables are now `_` prefixed (Aligning with the `private/protected` indicators in the TS definitions)
|
||||
- Update metadata/docs-from-metadata to the latest Substrate
|
||||
|
||||
# 1.9.1 Apr 1, 2020
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ When working maps and double-maps, it is possible to retrieve a list of all the
|
||||
// Retrieve the active era
|
||||
const activeEra = await api.query.staking.activeEra();
|
||||
|
||||
// retrieve all exposures int the active era
|
||||
// retrieve all exposures for the active era
|
||||
const exposures = await api.query.staking.erasStakers.entries(activeEra.index);
|
||||
|
||||
exposures.forEach(([key, exposure]) => {
|
||||
@@ -73,7 +73,17 @@ exposures.forEach(([key, exposure]) => {
|
||||
|
||||
Here we are querying a double-map, so we supply 1 argument. No arguments on double-maps will be very costly, retrieving all the eras and associated entries. Additionally when `twox64_concat` & `blake2_concat` is used, the key `.args` will contain decoded values of the params, in this case it will contain the actual `AccountId` of the staker. (Since that was not supplied)
|
||||
|
||||
In the same way as above we can simply do `.keys(activeEra.index): StorageKey[]` to retrieve all the keys here, including the individual keys args decoding, as available on maps with decodable hashing functions.
|
||||
In the same way as above we can simply do `.keys(activeEra.index): StorageKey[]` to retrieve all the keys here, including the individual keys args (available on maps with decodable hashing functions) -
|
||||
|
||||
```js
|
||||
// retrieve all the nominator keys
|
||||
const keys = await api.query.staking.nominators.keys();
|
||||
|
||||
// extract the first key argument (AccountId) as string
|
||||
const nominatorIds = keys.map((key) => key.args[0].toString());
|
||||
|
||||
console.log('all nominators:', nminatorIds.join(', '));
|
||||
```
|
||||
|
||||
## State entries
|
||||
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "1.10.0-beta.29"
|
||||
"version": "1.10.0"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,9 +27,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/api": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-core": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/api": "1.10.0",
|
||||
"@polkadot/rpc-core": "1.10.0",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"bn.js": "^5.1.1",
|
||||
"rxjs": "^6.5.5"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -28,10 +28,10 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/api": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-core": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-provider": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/api": "1.10.0",
|
||||
"@polkadot/rpc-core": "1.10.0",
|
||||
"@polkadot/rpc-provider": "1.10.0",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"@polkadot/util-crypto": "^2.8.1",
|
||||
"bn.js": "^5.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,13 +27,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/api-derive": "1.10.0-beta.29",
|
||||
"@polkadot/api-derive": "1.10.0",
|
||||
"@polkadot/keyring": "^2.8.1",
|
||||
"@polkadot/metadata": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-core": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-provider": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/types-known": "1.10.0-beta.29",
|
||||
"@polkadot/metadata": "1.10.0",
|
||||
"@polkadot/rpc-core": "1.10.0",
|
||||
"@polkadot/rpc-provider": "1.10.0",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/types-known": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"@polkadot/util-crypto": "^2.8.1",
|
||||
"bn.js": "^5.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/metadata",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "Helpers to extract information from runtime metadata",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -27,8 +27,8 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/types-known": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/types-known": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"@polkadot/util-crypto": "^2.8.1",
|
||||
"bn.js": "^5.1.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.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.9.2",
|
||||
"@polkadot/metadata": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-provider": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/metadata": "1.10.0",
|
||||
"@polkadot/rpc-provider": "1.10.0",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"memoizee": "^0.4.14",
|
||||
"rxjs": "^6.5.5"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,8 +27,8 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/metadata": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/metadata": "1.10.0",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"@polkadot/util-crypto": "^2.8.1",
|
||||
"bn.js": "^5.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
@@ -36,10 +36,10 @@
|
||||
"@babel/core": "^7.9.0",
|
||||
"@babel/register": "^7.9.0",
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/api": "1.10.0-beta.29",
|
||||
"@polkadot/metadata": "1.10.0-beta.29",
|
||||
"@polkadot/rpc-provider": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/api": "1.10.0",
|
||||
"@polkadot/metadata": "1.10.0",
|
||||
"@polkadot/rpc-provider": "1.10.0",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"websocket": "^1.0.31",
|
||||
"yargs": "^15.3.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.0",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,7 +27,7 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@polkadot/types": "1.10.0-beta.29",
|
||||
"@polkadot/types": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"bn.js": "^5.1.1"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "1.10.0-beta.29",
|
||||
"version": "1.10.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.9.2",
|
||||
"@polkadot/metadata": "1.10.0-beta.29",
|
||||
"@polkadot/metadata": "1.10.0",
|
||||
"@polkadot/util": "^2.8.1",
|
||||
"@polkadot/util-crypto": "^2.8.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
|
||||
@@ -2607,25 +2607,25 @@ __metadata:
|
||||
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/api": 1.10.0-beta.29
|
||||
"@polkadot/rpc-core": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/api": 1.10.0
|
||||
"@polkadot/rpc-core": 1.10.0
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
bn.js: ^5.1.1
|
||||
rxjs: ^6.5.5
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/api-derive@1.10.0-beta.29, @polkadot/api-derive@workspace:packages/api-derive":
|
||||
"@polkadot/api-derive@1.10.0, @polkadot/api-derive@workspace:packages/api-derive":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/api-derive@workspace:packages/api-derive"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/api": 1.10.0-beta.29
|
||||
"@polkadot/api": 1.10.0
|
||||
"@polkadot/keyring": ^2.8.1
|
||||
"@polkadot/rpc-core": 1.10.0-beta.29
|
||||
"@polkadot/rpc-provider": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/rpc-core": 1.10.0
|
||||
"@polkadot/rpc-provider": 1.10.0
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@polkadot/util-crypto": ^2.8.1
|
||||
bn.js: ^5.1.1
|
||||
@@ -2634,18 +2634,18 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/api@1.10.0-beta.29, @polkadot/api@workspace:packages/api":
|
||||
"@polkadot/api@1.10.0, @polkadot/api@workspace:packages/api":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/api@workspace:packages/api"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/api-derive": 1.10.0-beta.29
|
||||
"@polkadot/api-derive": 1.10.0
|
||||
"@polkadot/keyring": ^2.8.1
|
||||
"@polkadot/metadata": 1.10.0-beta.29
|
||||
"@polkadot/rpc-core": 1.10.0-beta.29
|
||||
"@polkadot/rpc-provider": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/types-known": 1.10.0-beta.29
|
||||
"@polkadot/metadata": 1.10.0
|
||||
"@polkadot/rpc-core": 1.10.0
|
||||
"@polkadot/rpc-provider": 1.10.0
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/types-known": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@polkadot/util-crypto": ^2.8.1
|
||||
bn.js: ^5.1.1
|
||||
@@ -2752,43 +2752,43 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/metadata@1.10.0-beta.29, @polkadot/metadata@workspace:packages/metadata":
|
||||
"@polkadot/metadata@1.10.0, @polkadot/metadata@workspace:packages/metadata":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/metadata@workspace:packages/metadata"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/keyring": ^2.8.1
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/types-known": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/types-known": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@polkadot/util-crypto": ^2.8.1
|
||||
bn.js: ^5.1.1
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/rpc-core@1.10.0-beta.29, @polkadot/rpc-core@workspace:packages/rpc-core":
|
||||
"@polkadot/rpc-core@1.10.0, @polkadot/rpc-core@workspace:packages/rpc-core":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/keyring": ^2.8.1
|
||||
"@polkadot/metadata": 1.10.0-beta.29
|
||||
"@polkadot/rpc-provider": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/metadata": 1.10.0
|
||||
"@polkadot/rpc-provider": 1.10.0
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
memoizee: ^0.4.14
|
||||
rxjs: ^6.5.5
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/rpc-provider@1.10.0-beta.29, @polkadot/rpc-provider@workspace:packages/rpc-provider":
|
||||
"@polkadot/rpc-provider@1.10.0, @polkadot/rpc-provider@workspace:packages/rpc-provider":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/keyring": ^2.8.1
|
||||
"@polkadot/metadata": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/metadata": 1.10.0
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@polkadot/util-crypto": ^2.8.1
|
||||
bn.js: ^5.1.1
|
||||
@@ -2816,10 +2816,10 @@ __metadata:
|
||||
"@babel/core": ^7.9.0
|
||||
"@babel/register": ^7.9.0
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/api": 1.10.0-beta.29
|
||||
"@polkadot/metadata": 1.10.0-beta.29
|
||||
"@polkadot/rpc-provider": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/api": 1.10.0
|
||||
"@polkadot/metadata": 1.10.0
|
||||
"@polkadot/rpc-provider": 1.10.0
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@types/websocket": ^1.0.0
|
||||
"@types/yargs": ^15.0.4
|
||||
@@ -2834,25 +2834,25 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/types-known@1.10.0-beta.29, @polkadot/types-known@workspace:packages/types-known":
|
||||
"@polkadot/types-known@1.10.0, @polkadot/types-known@workspace:packages/types-known":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/types-known@workspace:packages/types-known"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/types": 1.10.0-beta.29
|
||||
"@polkadot/types": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@types/bn.js": ^4.11.6
|
||||
bn.js: ^5.1.1
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@polkadot/types@1.10.0-beta.29, @polkadot/types@workspace:packages/types":
|
||||
"@polkadot/types@1.10.0, @polkadot/types@workspace:packages/types":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/types@workspace:packages/types"
|
||||
dependencies:
|
||||
"@babel/runtime": ^7.9.2
|
||||
"@polkadot/keyring": ^2.8.1
|
||||
"@polkadot/metadata": 1.10.0-beta.29
|
||||
"@polkadot/metadata": 1.10.0
|
||||
"@polkadot/util": ^2.8.1
|
||||
"@polkadot/util-crypto": ^2.8.1
|
||||
"@types/bn.js": ^4.11.6
|
||||
|
||||
Reference in New Issue
Block a user