Skip to content

Commit

Permalink
1.3 (#1883)
Browse files Browse the repository at this point in the history
* 1.3

* Pair create update

* CHANGELOG update
  • Loading branch information
jacogr authored Feb 18, 2020
1 parent ebf3f44 commit 4a1e504
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 80 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 1.3.0-beta.x
# 1.3.1 Feb 18, 2020

- Add `@types/bn.js` as a normal dependency, exposed in `*.d.ts` ((Thanks to https://github.com/monitz87)
- Type generation scripts (including `polkadot-types-from-{chain,defs}`) has been moved to the `@polkadot/typegen` package
- The `@polkadot/types/codec/create` has been moved to `@polkadot/types/create`, imports from `@polkadot/types` are unaffected
- Expose chain properies on registry (and use for API type formatting)
- Add `toHuman(isExtended?: boolean)` to all codec types, formatting into a human-readable structure
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"packages": [
"packages/*"
],
"version": "1.3.0-beta.11"
"version": "1.3.0"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/core": "^7.8.4",
"@babel/register": "^7.8.3",
"@babel/runtime": "^7.8.4",
"@polkadot/dev": "^0.40.17",
"@polkadot/dev": "^0.40.18",
"@polkadot/ts": "^0.2.3",
"copyfiles": "^2.2.0"
}
Expand Down
10 changes: 5 additions & 5 deletions packages/api-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
"keywords": [
Expand All @@ -27,10 +27,10 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/api": "^1.3.0-beta.11",
"@polkadot/rpc-core": "^1.3.0-beta.11",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/api": "^1.3.0",
"@polkadot/rpc-core": "^1.3.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"bn.js": "^5.1.1",
"rxjs": "^6.5.4"
}
Expand Down
16 changes: 8 additions & 8 deletions packages/api-derive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
"keywords": [
Expand Down Expand Up @@ -28,17 +28,17 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/api": "^1.3.0-beta.11",
"@polkadot/rpc-core": "^1.3.0-beta.11",
"@polkadot/rpc-provider": "^1.3.0-beta.11",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/util-crypto": "^2.4.0-beta.0",
"@polkadot/api": "^1.3.0",
"@polkadot/rpc-core": "^1.3.0",
"@polkadot/rpc-provider": "^1.3.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"@polkadot/util-crypto": "^2.4.1",
"bn.js": "^5.1.1",
"memoizee": "^0.4.14",
"rxjs": "^6.5.4"
},
"devDependencies": {
"@polkadot/keyring": "^2.4.0-beta.0"
"@polkadot/keyring": "^2.4.1"
}
}
20 changes: 10 additions & 10 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
"keywords": [
Expand All @@ -27,19 +27,19 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/api-derive": "^1.3.0-beta.11",
"@polkadot/keyring": "^2.4.0-beta.0",
"@polkadot/metadata": "^1.3.0-beta.11",
"@polkadot/rpc-core": "^1.3.0-beta.11",
"@polkadot/rpc-provider": "^1.3.0-beta.11",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/util-crypto": "^2.4.0-beta.0",
"@polkadot/api-derive": "^1.3.0",
"@polkadot/keyring": "^2.4.1",
"@polkadot/metadata": "^1.3.0",
"@polkadot/rpc-core": "^1.3.0",
"@polkadot/rpc-provider": "^1.3.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"@polkadot/util-crypto": "^2.4.1",
"bn.js": "^5.1.1",
"eventemitter3": "^4.0.0",
"rxjs": "^6.5.4"
},
"devDependencies": {
"@polkadot/keyring": "^2.4.0-beta.0"
"@polkadot/keyring": "^2.4.1"
}
}
3 changes: 2 additions & 1 deletion packages/api/src/promise/Api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ describe('ApiPromise', (): void => {
const registry = new TypeRegistry();
const keyring = testKeyring({ type: 'ed25519' });
const aliceEd = keyring.addPair(
createPair('ed25519', {
// eslint-disable-next-line @typescript-eslint/unbound-method
createPair({ toSS58: keyring.encodeAddress, type: 'ed25519' }, {
secretKey: hexToU8a('0xabf8e5bdbe30c65656c0a3cbd181ff8a56294a69dfedd27982aace4a7690911588dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee'),
publicKey: hexToU8a('0x88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee')
})
Expand Down
6 changes: 3 additions & 3 deletions packages/jsonrpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/jsonrpc",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Method definitions for the Polkadot RPC layer",
"main": "index.js",
"publishConfig": {
Expand All @@ -27,7 +27,7 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/jsonrpc#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0"
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1"
}
}
10 changes: 5 additions & 5 deletions packages/metadata/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
"publishConfig": {
Expand All @@ -27,12 +27,12 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/util-crypto": "^2.4.0-beta.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"@polkadot/util-crypto": "^2.4.1",
"bn.js": "^5.1.1"
},
"devDependencies": {
"@polkadot/keyring": "^2.4.0-beta.0"
"@polkadot/keyring": "^2.4.1"
}
}
14 changes: 7 additions & 7 deletions packages/rpc-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"keywords": [
Expand All @@ -27,15 +27,15 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/jsonrpc": "^1.3.0-beta.11",
"@polkadot/metadata": "^1.3.0-beta.11",
"@polkadot/rpc-provider": "^1.3.0-beta.11",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/jsonrpc": "^1.3.0",
"@polkadot/metadata": "^1.3.0",
"@polkadot/rpc-provider": "^1.3.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"memoizee": "^0.4.14",
"rxjs": "^6.5.4"
},
"devDependencies": {
"@polkadot/keyring": "^2.4.0-beta.0"
"@polkadot/keyring": "^2.4.1"
}
}
14 changes: 7 additions & 7 deletions packages/rpc-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Transport providers for the API",
"main": "index.js",
"keywords": [
Expand All @@ -27,18 +27,18 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/jsonrpc": "^1.3.0-beta.11",
"@polkadot/metadata": "^1.3.0-beta.11",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/util-crypto": "^2.4.0-beta.0",
"@polkadot/jsonrpc": "^1.3.0",
"@polkadot/metadata": "^1.3.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"@polkadot/util-crypto": "^2.4.1",
"bn.js": "^5.1.1",
"eventemitter3": "^4.0.0",
"isomorphic-fetch": "^2.2.1",
"websocket": "^1.0.31"
},
"devDependencies": {
"@polkadot/keyring": "^2.4.0-beta.0",
"@polkadot/keyring": "^2.4.1",
"mock-socket": "^9.0.3",
"nock": "^11.8.2"
}
Expand Down
12 changes: 6 additions & 6 deletions packages/typegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Type generation scripts",
"main": "index.js",
"bin": {
Expand Down Expand Up @@ -36,11 +36,11 @@
"@babel/core": "^7.8.3",
"@babel/register": "^7.8.3",
"@babel/runtime": "^7.8.4",
"@polkadot/api": "^1.3.0-beta.11",
"@polkadot/jsonrpc": "^1.3.0-beta.11",
"@polkadot/metadata": "^1.3.0-beta.11",
"@polkadot/types": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/api": "^1.3.0",
"@polkadot/jsonrpc": "^1.3.0",
"@polkadot/metadata": "^1.3.0",
"@polkadot/types": "^1.3.0",
"@polkadot/util": "^2.4.1",
"websocket": "^1.0.31",
"yargs": "^15.1.0"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "1.3.0-beta.11",
"version": "1.3.0",
"description": "Implementation of the Parity codec",
"main": "index.js",
"keywords": [
Expand All @@ -27,16 +27,16 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@polkadot/metadata": "^1.3.0-beta.11",
"@polkadot/util": "^2.4.0-beta.0",
"@polkadot/util-crypto": "^2.4.0-beta.0",
"@polkadot/metadata": "^1.3.0",
"@polkadot/util": "^2.4.1",
"@polkadot/util-crypto": "^2.4.1",
"@types/bn.js": "^4.11.6",
"bn.js": "^5.1.1",
"memoizee": "^0.4.14",
"rxjs": "^6.5.4"
},
"devDependencies": {
"@polkadot/keyring": "^2.4.0-beta.0",
"@polkadot/keyring": "^2.4.1",
"@types/memoizee": "^0.4.3"
}
}
2 changes: 1 addition & 1 deletion packages/types/src/codec/UInt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class UInt extends AbstractInt {
public toHuman (isExpanded?: boolean): any {
// FIXME we need proper expansion here
return this instanceof ClassOf(this.registry, 'Balance')
? formatBalance(this, { withSi: true, withUnit: this.registry.chainToken }, this.registry.chainDecimals)
? formatBalance(this, { decimals: this.registry.chainDecimals, withSi: true, withUnit: this.registry.chainToken })
: super.toHuman(isExpanded);
}

Expand Down
39 changes: 20 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2016,10 +2016,10 @@
dependencies:
"@types/node" ">= 8"

"@polkadot/dev@^0.40.17":
version "0.40.17"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.40.17.tgz#493f4a7263797e416b12e6b735b39d428f6c0ef1"
integrity sha512-tAfUlcdOzixa6c4/5fxaXjO4cEmXpGZzx3EAIyqsQw+74FBFVR1BKEeGoGuWetTQfIWKqAMOKsFjF5O6VS+VfA==
"@polkadot/dev@^0.40.18":
version "0.40.18"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.40.18.tgz#6ca40304bcc7c75b26c0190d60cb5b892a512dc5"
integrity sha512-SEkmrdZPYcnFzXnfpIjnvNfrwdBS3uAenEt8ZYBMkay59+XgFnPKi7xKV92x5iGYEiAXfcKFYjCAN0Nk2rXV5Q==
dependencies:
"@babel/cli" "^7.8.4"
"@babel/core" "^7.8.4"
Expand Down Expand Up @@ -2077,14 +2077,14 @@
webpack-cli "^3.3.11"
yargs "^15.1.0"

"@polkadot/keyring@^2.4.0-beta.0":
version "2.4.0-beta.0"
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.4.0-beta.0.tgz#d43996daf38c53b35eccd3016246726a26c7b483"
integrity sha512-dv4wonHpWnXDNHyidWdKzXZQnDesxQWWbATbDeZUv4P1Hwbn4zpa8+nQoRuKi7v5OmFJvm0Ailb84/sWQweoYA==
"@polkadot/keyring@^2.4.1":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.4.1.tgz#1f6e59dd55031481d3642f18e407141d596fd388"
integrity sha512-NBsw6ypCvTUNBUTB/LIZGcJE6R8qrsZ6CEa+Hu6uKrwhR/xjtPBCH2sPaXj+OeNAZ2sMQuEoUJlJUhYnMal2pg==
dependencies:
"@babel/runtime" "^7.8.4"
"@polkadot/util" "^2.4.0-beta.0"
"@polkadot/util-crypto" "^2.4.0-beta.0"
"@polkadot/util" "^2.4.1"
"@polkadot/util-crypto" "^2.4.1"

"@polkadot/ts@^0.2.3":
version "0.2.3"
Expand All @@ -2093,13 +2093,13 @@
dependencies:
"@types/chrome" "^0.0.95"

"@polkadot/util-crypto@^2.4.0-beta.0":
version "2.4.0-beta.0"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.4.0-beta.0.tgz#a821c29835ca6e23b0db6faecf3edc263fac75fb"
integrity sha512-fc6g5GNGDv1QbIeaa5BaBvdXQHmkBmsydVoZEzE49YLPHA142WzM1dof0SuP5/C/K6O11oq3yP9Ns7H+lWJf2g==
"@polkadot/util-crypto@^2.4.1":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.4.1.tgz#f02e4dca225882c7f1a7762bc416530567c4803c"
integrity sha512-5mPuRhpvYXeLqqGEqOtJqp+lZCr1Z2NIxIKgabaFfrp1malbgWhKDnafkAg7kwL3BrRQbOge0vgK6VmDiuXljQ==
dependencies:
"@babel/runtime" "^7.8.4"
"@polkadot/util" "^2.4.0-beta.0"
"@polkadot/util" "^2.4.1"
"@polkadot/wasm-crypto" "^1.0.1"
base-x "^3.0.7"
bip39 "^3.0.2"
Expand All @@ -2112,12 +2112,13 @@
tweetnacl "^1.0.3"
xxhashjs "^0.2.2"

"@polkadot/util@^2.4.0-beta.0":
version "2.4.0-beta.0"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.4.0-beta.0.tgz#2a289a1a9da1f59b1e07399252fdf8fbe2bf5d76"
integrity sha512-mSC/NSpqImx45f9FWf6qjzjqDpRnF1v7dfeRfRxkPGX94zrRRS/jTjPbPmOhnbfA3+vokShq3/t3DvESwYH9ZQ==
"@polkadot/util@^2.4.1":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.4.1.tgz#7c0d0619af6ced647e99d6bc8ccc24bc3202a2a7"
integrity sha512-60yBpgYgowx/TVuJyrjYYIJJpw4aCNzay8imy5L2Fug2y3lvgrHyTxPAgrykOmuFeZ3jq9ayjXk5bpAJ179vFg==
dependencies:
"@babel/runtime" "^7.8.4"
"@types/bn.js" "^4.11.6"
bn.js "^5.1.1"
camelcase "^5.3.1"
chalk "^3.0.0"
Expand Down

0 comments on commit 4a1e504

Please sign in to comment.