Upgrade guide (to current) (#1194)
* Upgrade guide (to current) * ClassOf * JSON example * s/srml/interfaces/ * Typos * Update UPGRADING.md Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com> * Add copy-to-apps script * Properly extend exstended derive types * Round out UPGRADING * Version in CHANGELOG * Typos * Update UPGRADING.md * Update CHANGELOG * Bump common * 0.90.0-beta.0 * Cleanups * Split 0.82 & 0.90 * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update UPGRADING.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update CHANGELOG.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update CHANGELOG.md Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Typo * findFunction -> api.findCall
This commit is contained in:
co-authored by
Amaury Martiny
Thibaut Sardan
parent
fe35527a65
commit
a45e313c84
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.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.5.5",
|
||||
"@polkadot/types": "^0.82.0-beta.96"
|
||||
"@polkadot/types": "^0.90.0-beta.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.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.5.5",
|
||||
"@polkadot/api": "^0.82.0-beta.96",
|
||||
"@polkadot/types": "^0.82.0-beta.96"
|
||||
"@polkadot/api": "^0.90.0-beta.0",
|
||||
"@polkadot/types": "^0.90.0-beta.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.95.0-beta.1"
|
||||
"@polkadot/keyring": "^0.95.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AccountId, Header } from '@polkadot/types/interfaces';
|
||||
|
||||
import { AnyJsonObject } from '@polkadot/types/types';
|
||||
import { AnyJsonObject, Constructor } from '@polkadot/types/types';
|
||||
|
||||
import { u64, ClassOf } from '@polkadot/types';
|
||||
|
||||
// This is a bit hacky, but is exactly what it resolves to when compiled -
|
||||
// and as a bonus is gets the typing right
|
||||
const _Header: Constructor<Header> = ClassOf('Header');
|
||||
|
||||
/**
|
||||
* @name HeaderExtended
|
||||
* @description
|
||||
* A [[Block]] header with an additional `author` field that indicates the block author
|
||||
*/
|
||||
export default class HeaderExtended extends ClassOf('Header') {
|
||||
export default class HeaderExtended extends _Header {
|
||||
private _author?: AccountId;
|
||||
|
||||
public constructor (header: Header | null = null, sessionValidators: AccountId[] = []) {
|
||||
|
||||
@@ -3,17 +3,21 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ReferendumIndex, ReferendumInfo } from '@polkadot/types/interfaces/democracy';
|
||||
import { AnyJsonObject, Constructor } from '@polkadot/types/types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { ClassOf, createType } from '@polkadot/types';
|
||||
import { AnyJsonObject } from '@polkadot/types/types';
|
||||
|
||||
// This is a bit hacky, but is exactly what it resolves to when compiled -
|
||||
// and as a bonus is gets the typing right
|
||||
const _ReferendumInfo: Constructor<ReferendumInfo> = ClassOf('ReferendumInfo');
|
||||
|
||||
/**
|
||||
* @name ReferendumInfoExtended
|
||||
* @description
|
||||
* A [[ReferendumInfo]] with an additional `index` field
|
||||
*/
|
||||
export default class ReferendumInfoExtended extends ClassOf('ReferendumInfo') {
|
||||
export default class ReferendumInfoExtended extends _ReferendumInfo {
|
||||
private _index: ReferendumIndex;
|
||||
|
||||
public constructor (value: ReferendumInfo | ReferendumInfoExtended, index?: BN | number) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-metadata",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.0",
|
||||
"description": "Helpers to extract information from runtime metadata",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -27,11 +27,11 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/types": "^0.82.0-beta.96",
|
||||
"@polkadot/util": "^0.95.0-beta.1",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.1"
|
||||
"@polkadot/types": "^0.90.0-beta.0",
|
||||
"@polkadot/util": "^0.95.0-beta.2",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.95.0-beta.1"
|
||||
"@polkadot/keyring": "^0.95.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.0",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,14 +27,14 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/api-derive": "^0.82.0-beta.96",
|
||||
"@polkadot/api-metadata": "^0.82.0-beta.96",
|
||||
"@polkadot/rpc-core": "^0.82.0-beta.96",
|
||||
"@polkadot/rpc-provider": "^0.82.0-beta.96",
|
||||
"@polkadot/types": "^0.82.0-beta.96",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.1"
|
||||
"@polkadot/api-derive": "^0.90.0-beta.0",
|
||||
"@polkadot/api-metadata": "^0.90.0-beta.0",
|
||||
"@polkadot/rpc-core": "^0.90.0-beta.0",
|
||||
"@polkadot/rpc-provider": "^0.90.0-beta.0",
|
||||
"@polkadot/types": "^0.90.0-beta.0",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.95.0-beta.1"
|
||||
"@polkadot/keyring": "^0.95.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.0",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,10 +27,10 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/jsonrpc": "^0.82.0-beta.96",
|
||||
"@polkadot/rpc-provider": "^0.82.0-beta.96",
|
||||
"@polkadot/types": "^0.82.0-beta.96",
|
||||
"@polkadot/util": "^0.95.0-beta.1",
|
||||
"@polkadot/jsonrpc": "^0.90.0-beta.0",
|
||||
"@polkadot/rpc-provider": "^0.90.0-beta.0",
|
||||
"@polkadot/types": "^0.90.0-beta.0",
|
||||
"@polkadot/util": "^0.95.0-beta.2",
|
||||
"rxjs": "^6.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.0",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,16 +27,16 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/api-metadata": "^0.82.0-beta.96",
|
||||
"@polkadot/util": "^0.95.0-beta.1",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.1",
|
||||
"@polkadot/api-metadata": "^0.90.0-beta.0",
|
||||
"@polkadot/util": "^0.95.0-beta.2",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.2",
|
||||
"@types/nock": "^10.0.3",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
"websocket": "^1.0.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.95.0-beta.1",
|
||||
"@polkadot/keyring": "^0.95.0-beta.2",
|
||||
"mock-socket": "^8.0.5",
|
||||
"nock": "^10.0.4"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/jsonrpc",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.0",
|
||||
"description": "Method definitions for the Polkadot RPC layer",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "0.82.0-beta.96",
|
||||
"version": "0.90.0-beta.0",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
@@ -27,12 +27,12 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/util": "^0.95.0-beta.1",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.1",
|
||||
"@polkadot/util": "^0.95.0-beta.2",
|
||||
"@polkadot/util-crypto": "^0.95.0-beta.2",
|
||||
"@types/memoizee": "^0.4.2",
|
||||
"memoizee": "^0.4.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.95.0-beta.1"
|
||||
"@polkadot/keyring": "^0.95.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user