From 5f065b52550cfa5525945f224cccc9b75636fcb3 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 7 Mar 2019 11:08:18 +0100 Subject: [PATCH] Alias Header number -> blockNumber (#760) --- package.json | 2 +- packages/api/package.json | 2 +- packages/rpc-core/package.json | 2 +- packages/rpc-provider/package.json | 6 ++--- packages/type-extrinsics/package.json | 2 +- packages/type-storage/package.json | 6 ++--- packages/types/package.json | 4 +-- packages/types/src/type/Header.ts | 7 +++++ yarn.lock | 38 +++++++++++++-------------- 9 files changed, 38 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 9ba264e86e..190899d2cb 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@babel/core": "^7.3.3", "@babel/register": "^7.0.0", "@babel/runtime": "^7.3.4", - "@polkadot/dev": "^0.25.12", + "@polkadot/dev": "^0.25.13", "@polkadot/ts": "^0.1.56", "gh-pages": "^2.0.1" } diff --git a/packages/api/package.json b/packages/api/package.json index cab800298e..e1a33ed6e8 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -36,6 +36,6 @@ "@polkadot/rpc-rx": "^0.46.5", "@polkadot/storage": "^0.46.5", "@polkadot/types": "^0.46.5", - "@polkadot/util-crypto": "^0.35.4" + "@polkadot/util-crypto": "^0.35.6" } } diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index ec89123fbd..7a11f49b96 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -33,6 +33,6 @@ "@polkadot/jsonrpc": "^0.46.5", "@polkadot/rpc-provider": "^0.46.5", "@polkadot/types": "^0.46.5", - "@polkadot/util": "^0.35.4" + "@polkadot/util": "^0.35.6" } } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 018fa5dd52..266304fdb2 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -30,10 +30,10 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme", "dependencies": { "@babel/runtime": "^7.3.4", - "@polkadot/keyring": "^0.35.4", + "@polkadot/keyring": "^0.35.6", "@polkadot/storage": "^0.46.5", - "@polkadot/util": "^0.35.4", - "@polkadot/util-crypto": "^0.35.4", + "@polkadot/util": "^0.35.6", + "@polkadot/util-crypto": "^0.35.6", "@types/nock": "^9.3.1", "eventemitter3": "^3.1.0", "isomorphic-fetch": "^2.2.1", diff --git a/packages/type-extrinsics/package.json b/packages/type-extrinsics/package.json index 79fc4bbb7c..8a557a9b40 100644 --- a/packages/type-extrinsics/package.json +++ b/packages/type-extrinsics/package.json @@ -12,6 +12,6 @@ "dependencies": { "@babel/runtime": "^7.3.4", "@polkadot/types": "^0.46.5", - "@polkadot/util": "^0.35.4" + "@polkadot/util": "^0.35.6" } } diff --git a/packages/type-storage/package.json b/packages/type-storage/package.json index c7374f0448..894867fac4 100644 --- a/packages/type-storage/package.json +++ b/packages/type-storage/package.json @@ -30,9 +30,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-storage#readme", "dependencies": { "@babel/runtime": "^7.3.4", - "@polkadot/keyring": "^0.35.4", + "@polkadot/keyring": "^0.35.6", "@polkadot/types": "^0.46.5", - "@polkadot/util": "^0.35.4", - "@polkadot/util-crypto": "^0.35.4" + "@polkadot/util": "^0.35.6", + "@polkadot/util-crypto": "^0.35.6" } } diff --git a/packages/types/package.json b/packages/types/package.json index ea1727737f..c2fb81915a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -30,8 +30,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme", "dependencies": { "@babel/runtime": "^7.3.4", - "@polkadot/keyring": "^0.35.4", - "@polkadot/util": "^0.35.4", + "@polkadot/keyring": "^0.35.6", + "@polkadot/util": "^0.35.6", "core-js": "^2.6.5" } } diff --git a/packages/types/src/type/Header.ts b/packages/types/src/type/Header.ts index 75f3dfcfc4..9c261deece 100644 --- a/packages/types/src/type/Header.ts +++ b/packages/types/src/type/Header.ts @@ -68,6 +68,13 @@ export default class Header extends Struct { ); } + /** + * @description Alias for `blockNumber` (this is displayed in JSON) + */ + get number (): BlockNumber { + return this.blockNumber; + } + /** * @description The wrapped parent as a [[Hash]] */ diff --git a/yarn.lock b/yarn.lock index bf84d7e509..d5067d2adc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1393,10 +1393,10 @@ universal-user-agent "^2.0.0" url-template "^2.0.8" -"@polkadot/dev@^0.25.12": - version "0.25.12" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.25.12.tgz#de440a96dba3c9b4a92e6be0f0276b8c1f4daf24" - integrity sha512-pISn6l4+brHCE04jjqSc7j7V63QmuhFykJFV2WejZHvUtKzBJa35C1ps+U9iKfa5Ma2gFyjyvlQOOvAKRwuKrA== +"@polkadot/dev@^0.25.13": + version "0.25.13" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.25.13.tgz#2cb3888cba59409dc0e5f829b41c738e34e8fad7" + integrity sha512-uHizvsNzNodL+aL7B0z363l4/mAfguzdaP5xggUsI9z2iA3GPu80gmgmLgMq+0kbr/Ju0N3vWP5BgUI4OH5/Qw== dependencies: "@babel/cli" "^7.2.3" "@babel/core" "^7.3.4" @@ -1429,14 +1429,14 @@ typescript "^3.3.3333" vuepress "^1.0.0-alpha.40" -"@polkadot/keyring@^0.35.4": - version "0.35.4" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.35.4.tgz#c7a6eca79a53c0468fa2a32b4647e5866460f9de" - integrity sha512-muqVxGXigwW+ahQKBCDc0vdeOatP82vbcu4p7tz/LIzgfKmHX85JBWi63lcNTWljabJSRf9mqlf3jaU7L4OXlw== +"@polkadot/keyring@^0.35.6": + version "0.35.6" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.35.6.tgz#6b8f5d8f9fadfa99b0171659d024b4cb04fa5bb7" + integrity sha512-/M7aQZX0HN2R+mryGoAu+xW3NufdnXZiPqTJ4kXaUo2zkOBseEA9duztwHP3PJaXSVklob3qRYM5YTK2zvnHpw== dependencies: "@babel/runtime" "^7.3.4" - "@polkadot/util" "^0.35.4" - "@polkadot/util-crypto" "^0.35.4" + "@polkadot/util" "^0.35.6" + "@polkadot/util-crypto" "^0.35.6" "@types/bs58" "^4.0.0" bs58 "^4.0.1" @@ -1450,14 +1450,14 @@ resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.56.tgz#ffd6e9c95704a7fb90b918193b9dc5c440114b27" integrity sha512-wnt4zXxZXyz6WaubTO/I+nUElwV2DogFzdl6CrKfVn2PTWp8uHN06W9s40FH57ORtmQfDr9rLRP8Nq+oIyElbg== -"@polkadot/util-crypto@^0.35.4": - version "0.35.4" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.35.4.tgz#f63d9a0fb1527b506e391ec77e51edcbfb5597f5" - integrity sha512-CsdP2u+OEzk7zIuptHY6OEJpCvamgb2p+n80qO3g+VCF9144ArB/UzOE1Zw0ixNHOs6Dj6M2qYUMZf8hUrIvAg== +"@polkadot/util-crypto@^0.35.6": + version "0.35.6" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.35.6.tgz#23e15da6a09d8201bbb1c4bbce7a37cbf7ba476a" + integrity sha512-LaT1KZ/BXVVKoZ0Yd0pj3Aqxs3pqwWh+0/uuCQyGT+a0a3cZ5QHcksWeCV1wjPGqNKEEhNUhNc6CXO99Qpt2wA== dependencies: "@babel/runtime" "^7.3.4" "@polkadot/schnorrkel-js" "^0.1.2-3" - "@polkadot/util" "^0.35.4" + "@polkadot/util" "^0.35.6" "@types/bip39" "^2.4.2" "@types/pbkdf2" "^3.0.0" "@types/secp256k1" "^3.5.0" @@ -1470,10 +1470,10 @@ tweetnacl "^1.0.1" xxhashjs "^0.2.2" -"@polkadot/util@^0.35.4": - version "0.35.4" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.35.4.tgz#1e84ca76c08768b8ac7d73c84308c1d7d1077295" - integrity sha512-JhhfqDBcxHud3dlBt6xqDvnCS52mz7RN1QJOZMiOTrf12vyq3GN6NrEUcTOgiTGy3mUyB2t+5zx24VX8HrTeKA== +"@polkadot/util@^0.35.6": + version "0.35.6" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.35.6.tgz#6f82a80ee33d79f8006c3ca5f36def840dfa700b" + integrity sha512-UkXftcPjx99QnP3L2hXcjmyejUm4wiSrzD3k4OM+iVkBTlg7DztQm2Eb9uTbCwii4i1SScudIogbjbOjeX1e7g== dependencies: "@babel/runtime" "^7.3.4" "@types/bn.js" "^4.11.4"