diff --git a/packages/app-extrinsics/src/Selection.tsx b/packages/app-extrinsics/src/Selection.tsx index 84d289b0ed..c178496b82 100644 --- a/packages/app-extrinsics/src/Selection.tsx +++ b/packages/app-extrinsics/src/Selection.tsx @@ -9,12 +9,11 @@ import { ApiProps } from '@polkadot/ui-api/types'; import React from 'react'; import { Method } from '@polkadot/types'; -import { Button, InputAddress, Labelled } from '@polkadot/ui-app'; +import { Button, Extrinsic, InputAddress, Labelled } from '@polkadot/ui-app'; import { withApi, withMulti } from '@polkadot/ui-api'; import { Nonce } from '@polkadot/ui-reactive'; import Balance from './Balance'; -import Extrinsic from './Extrinsic'; import translate from './translate'; type Props = ApiProps & I18nProps & { diff --git a/packages/app-sudo/LICENSE b/packages/app-sudo/LICENSE new file mode 100644 index 0000000000..0d381b2e97 --- /dev/null +++ b/packages/app-sudo/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/packages/app-sudo/README.md b/packages/app-sudo/README.md new file mode 100644 index 0000000000..7ace253d72 --- /dev/null +++ b/packages/app-sudo/README.md @@ -0,0 +1 @@ +# @polkadot/app-sudo diff --git a/packages/app-sudo/package.json b/packages/app-sudo/package.json new file mode 100644 index 0000000000..452adf7271 --- /dev/null +++ b/packages/app-sudo/package.json @@ -0,0 +1,17 @@ +{ + "name": "@polkadot/app-sudo", + "version": "0.32.0-beta.6", + "description": "A basic app that shows the ropes on customisation", + "main": "index.js", + "scripts": {}, + "author": "Keith Ingram ", + "maintainers": [ + "Keith Ingram ", + "Jaco Greeff " + ], + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.4.4", + "@polkadot/ui-app": "^0.33.0-beta.4" + } +} diff --git a/packages/app-sudo/src/SetKey.tsx b/packages/app-sudo/src/SetKey.tsx new file mode 100644 index 0000000000..00b4f035aa --- /dev/null +++ b/packages/app-sudo/src/SetKey.tsx @@ -0,0 +1,117 @@ +// Copyright 2017-2019 @polkadot/app-123code authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. +import { I18nProps } from '@polkadot/ui-app/types'; + +import React from 'react'; +import { AddressMini, Icon, InputAddress, Labelled, TxButton } from '@polkadot/ui-app'; +import { ComponentProps } from './types'; + +import styled from 'styled-components'; + +import translate from './translate'; + +type Props = I18nProps & ComponentProps; + +type State = { + selected?: string +}; + +const Wrapper = styled.section` + align-items: flex-end; + justify-content: center; + + .summary { + text-align: center; + } +`; + +const SudoInputAddress = styled(InputAddress)` + margin: -0.25rem 0.5rem -0.25rem 0; +`; + +const SudoLabelled = styled(Labelled)` + align-items: center; +`; + +class SetKey extends React.PureComponent { + state: State = {}; + + constructor (props: Props) { + super(props); + + this.state = { + selected: props.sudoKey + } as State; + } + + componentWillReceiveProps ({ sudoKey = this.props.sudoKey }) { + if (sudoKey !== this.props.sudoKey) { + this.setState({ selected: sudoKey }); + } + } + + render () { + const { isMine, sudoKey, t } = this.props; + const { selected } = this.state; + + return ( +
+ + {isMine ? ( + <> + + + + ) : ( + + + + )} + + {this.willLose() && ( +
+
+ + {t('You will no longer have sudo access')} +
+
+ )} +
+ ); + } + + private onChange = (selected?: string): void => { + this.setState({ selected }); + } + + private willLose = (): boolean => { + const { allAccounts, isMine, sudoKey } = this.props; + const { selected } = this.state; + return ( + isMine && + !!Object.keys(allAccounts).length && + !!selected && + selected !== sudoKey && + !Object.keys(allAccounts).find(s => s === selected) + ); + } +} +export default translate(SetKey); diff --git a/packages/app-sudo/src/Sudo.tsx b/packages/app-sudo/src/Sudo.tsx new file mode 100644 index 0000000000..1aa58b341a --- /dev/null +++ b/packages/app-sudo/src/Sudo.tsx @@ -0,0 +1,98 @@ +// Copyright 2017-2019 @polkadot/app-123code authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { I18nProps } from '@polkadot/ui-app/types'; +import { ApiProps } from '@polkadot/ui-api/types'; +import { ComponentProps } from './types'; + +import React from 'react'; +import { Method, Proposal } from '@polkadot/types'; +import { Button, Icon, Extrinsic, TxButton } from '@polkadot/ui-app'; +import { withApi, withMulti } from '@polkadot/ui-api'; + +import translate from './translate'; + +type Props = I18nProps & ApiProps & ComponentProps & { + onChange: (accountId?: string) => void +}; + +type State = { + method: Method | null, + isValid: boolean +}; + +class Propose extends React.PureComponent { + state: State = { + method: null, + isValid: false + }; + + render () { + const { api, apiDefaultTx, isMine, sudoKey, t } = this.props; + const { method, isValid } = this.state; + + const defaultExtrinsic = (() => { + try { + return api.tx.consensus.setCode; + } catch (error) { + return apiDefaultTx; + } + })(); + + return isMine ? ( +
+ +
+ + + +
+ ) : ( +
+
+ + {t('You do not have access to the current sudo key')} +
+
+ ); + } + + private nextState (newState: State): void { + this.setState( + (prevState: State): State => { + const { method = prevState.method } = newState; + const isValid = !!method; + + return { + method, + isValid + }; + } + ); + } + + private onChangeExtrinsic = (method: Method): void => { + if (!method) { + return; + } + + this.nextState({ method } as State); + } +} + +export default withMulti( + Propose, + translate, + withApi +); diff --git a/packages/app-sudo/src/index.tsx b/packages/app-sudo/src/index.tsx new file mode 100644 index 0000000000..cdcad9ff09 --- /dev/null +++ b/packages/app-sudo/src/index.tsx @@ -0,0 +1,103 @@ +// Copyright 2017-2019 @polkadot/app-123code authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { AppProps, I18nProps } from '@polkadot/ui-app/types'; +import { ApiProps } from '@polkadot/ui-api/types'; +import { SubjectInfo } from '@polkadot/ui-keyring/observable/types'; +import { ComponentProps } from './types'; + +import React from 'react'; +import { Route, Switch } from 'react-router'; +import { Icon, Tabs } from '@polkadot/ui-app'; +import { withApi, withCalls, withMulti, withObservable } from '@polkadot/ui-api'; +import accountObservable from '@polkadot/ui-keyring/observable/accounts'; + +import SetKey from './SetKey'; +import Sudo from './Sudo'; + +import translate from './translate'; + +type Props = AppProps & ApiProps & I18nProps & { + allAccounts: SubjectInfo, + sudo_key?: string +}; + +type State = { + isMine: boolean +}; + +class App extends React.PureComponent { + state: State = { + isMine: false + }; + + static getDerivedStateFromProps ({ allAccounts = {}, sudo_key }: Props): State | null { + return { + isMine: !!sudo_key && !!Object.keys(allAccounts).find((key) => key === sudo_key.toString()) + }; + } + + render () { + const { basePath, t } = this.props; + const { isMine } = this.state; + + return ( +
+
+ +
+ {isMine ? ( + + + + + ) : ( +
+
+ + {t('You do not have access to the current sudo key')} +
+
+ )} +
+ ); + } + + private renderComponent (Component: React.ComponentType) { + return (): React.ReactNode => { + const { allAccounts = {}, sudo_key: sudoKey = '' } = this.props; + const { isMine } = this.state; + + return ( + + ); + }; + } +} + +export default withMulti( + App, + translate, + withApi, + withCalls( + ['query.sudo.key', { transform: key => key.toString() }] + ), + withObservable(accountObservable.subject, { propName: 'allAccounts' }) +); diff --git a/packages/app-sudo/src/translate.ts b/packages/app-sudo/src/translate.ts new file mode 100644 index 0000000000..8242af08de --- /dev/null +++ b/packages/app-sudo/src/translate.ts @@ -0,0 +1,7 @@ +// Copyright 2017-2019 @polkadot/app-123code authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { withTranslation } from 'react-i18next'; + +export default withTranslation(['sudo', 'ui']); diff --git a/packages/app-sudo/src/types.ts b/packages/app-sudo/src/types.ts new file mode 100644 index 0000000000..0424b22dc7 --- /dev/null +++ b/packages/app-sudo/src/types.ts @@ -0,0 +1,11 @@ +// Copyright 2017-2019 @polkadot/app-staking authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { SubjectInfo } from '@polkadot/ui-keyring/observable/types'; + +export type ComponentProps = { + allAccounts: SubjectInfo, + isMine: boolean, + sudoKey?: string +}; diff --git a/packages/apps/src/SideBar/Item.tsx b/packages/apps/src/SideBar/Item.tsx index 0c053cc5b9..a8945ff86e 100644 --- a/packages/apps/src/SideBar/Item.tsx +++ b/packages/apps/src/SideBar/Item.tsx @@ -12,7 +12,7 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; import { Icon, Menu } from '@polkadot/ui-app'; import accountObservable from '@polkadot/ui-keyring/observable/accounts'; -import { withApi, withMulti, withObservable } from '@polkadot/ui-api'; +import { withApi,withCalls, withMulti, withObservable } from '@polkadot/ui-api'; import { isFunction } from '@polkadot/util'; import ReactTooltip from 'react-tooltip'; @@ -21,7 +21,8 @@ type Props = I18nProps & ApiProps & { isCollapsed: boolean, onClick: () => void, allAccounts?: SubjectInfo, - route: Route + route: Route, + sudo_key: string }; interface Tooltip { @@ -87,8 +88,9 @@ class Item extends React.PureComponent { } private isVisible () { - const { allAccounts = {}, isApiConnected, isApiReady, route: { display: { isHidden, needsAccounts, needsApi }, name } } = this.props; + const { allAccounts = {}, isApiConnected, isApiReady, route: { display: { isHidden, needsAccounts, needsApi, needsSudo }, name }, sudo_key: sudoKey } = this.props; const hasAccounts = Object.keys(allAccounts).length !== 0; + const hasSudo = !!Object.keys(allAccounts).find(address => address === sudoKey); if (isHidden) { return false; @@ -98,6 +100,11 @@ class Item extends React.PureComponent { return true; } else if (!isApiReady || !isApiConnected) { return false; + } else if (needsSudo) { + if (!hasSudo) { + console.info('Disabling route sudo, no authority'); + return false; + } } const notFound = needsApi.filter((endpoint: string | Array) => { @@ -119,5 +126,8 @@ class Item extends React.PureComponent { export default withMulti( Item, withApi, + withCalls( + ['query.sudo.key', { transform: key => key.toString() }] + ), withObservable(accountObservable.subject, { propName: 'allAccounts' }) ); diff --git a/packages/apps/src/routing/index.ts b/packages/apps/src/routing/index.ts index e67e21aa66..bfdbf22dd7 100644 --- a/packages/apps/src/routing/index.ts +++ b/packages/apps/src/routing/index.ts @@ -17,6 +17,7 @@ import js from './js'; import settings from './settings'; import staking from './staking'; import storage from './storage'; +import sudo from './sudo'; import toolbox from './toolbox'; import transfer from './transfer'; @@ -44,6 +45,7 @@ const routes: Routes = appSettings.uiMode === 'light' contracts, storage, extrinsics, + sudo, null, settings, toolbox, diff --git a/packages/apps/src/routing/sudo.ts b/packages/apps/src/routing/sudo.ts new file mode 100644 index 0000000000..d9f5737e45 --- /dev/null +++ b/packages/apps/src/routing/sudo.ts @@ -0,0 +1,25 @@ +// Copyright 2017-2019 @polkadot/apps authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { Routes } from '../types'; + +import Sudo from '@polkadot/app-sudo'; + +export default ([ + { + Component: Sudo, + display: { + needsAccounts: true, + needsApi: [ + 'tx.sudo.setKey' + ], + needsSudo: true + }, + i18n: { + defaultValue: 'Sudo' + }, + icon: 'unlock', + name: 'sudo' + } +] as Routes); diff --git a/packages/apps/src/types.ts b/packages/apps/src/types.ts index 71738fb7b7..66c48b62e5 100644 --- a/packages/apps/src/types.ts +++ b/packages/apps/src/types.ts @@ -12,7 +12,8 @@ export type Route = { display: { isHidden?: boolean, needsAccounts?: boolean, - needsApi?: Array> + needsApi?: Array>, + needsSudo?: boolean }, i18n: { defaultValue: string }, icon: SemanticICONS, diff --git a/packages/app-extrinsics/src/Extrinsic.tsx b/packages/ui-app/src/Extrinsic.tsx similarity index 100% rename from packages/app-extrinsics/src/Extrinsic.tsx rename to packages/ui-app/src/Extrinsic.tsx diff --git a/packages/app-extrinsics/src/Params/Call.tsx b/packages/ui-app/src/Params/Call.tsx similarity index 100% rename from packages/app-extrinsics/src/Params/Call.tsx rename to packages/ui-app/src/Params/Call.tsx diff --git a/packages/app-extrinsics/src/Params/Extrinsic.tsx b/packages/ui-app/src/Params/Extrinsic.tsx similarity index 100% rename from packages/app-extrinsics/src/Params/Extrinsic.tsx rename to packages/ui-app/src/Params/Extrinsic.tsx diff --git a/packages/app-extrinsics/src/Params/Proposal.tsx b/packages/ui-app/src/Params/Proposal.tsx similarity index 100% rename from packages/app-extrinsics/src/Params/Proposal.tsx rename to packages/ui-app/src/Params/Proposal.tsx diff --git a/packages/app-extrinsics/src/Params/index.ts b/packages/ui-app/src/Params/index.ts similarity index 100% rename from packages/app-extrinsics/src/Params/index.ts rename to packages/ui-app/src/Params/index.ts diff --git a/packages/ui-app/src/index.tsx b/packages/ui-app/src/index.tsx index ec062bad3f..c4967c734b 100644 --- a/packages/ui-app/src/index.tsx +++ b/packages/ui-app/src/index.tsx @@ -15,6 +15,7 @@ export { default as CopyButton } from './CopyButton'; export { default as Dropdown } from './Dropdown'; export { default as Editor } from './Editor'; export { default as Event } from './Event'; +export { default as Extrinsic } from './Extrinsic'; export { default as HelpOverlay } from './HelpOverlay'; export { default as Icon } from './Icon'; export { default as IdentityIcon } from './IdentityIcon'; diff --git a/tsconfig.json b/tsconfig.json index 003ed205ed..166b222fc6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,8 @@ "@polkadot/app-staking/*": [ "packages/app-staking/src/*" ], "@polkadot/app-storage": [ "packages/app-storage/src" ], "@polkadot/app-storage/*": [ "packages/app-storage/src/*" ], + "@polkadot/app-sudo": [ "packages/app-sudo/src" ], + "@polkadot/app-sudo/*": [ "packages/app-sudo/src/*" ], "@polkadot/app-toolbox": [ "packages/app-toolbox/src" ], "@polkadot/app-toolbox/*": [ "packages/app-toolbox/src/*" ], "@polkadot/app-transfer": [ "packages/app-transfer/src" ], diff --git a/yarn.lock b/yarn.lock index 7cfd966819..2e6647117d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1703,29 +1703,29 @@ universal-user-agent "^2.0.0" url-template "^2.0.8" -"@polkadot/api-derive@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.78.0-beta.1.tgz#f2f520c520d372ecbc0fc1e00e2faa9c517ddd6a" - integrity sha512-+ltCujawrpAcQb27Se4R5Hv/NANT2N6ZGDp3p0Kmh6QudqnN5kD4GDPMHJdPYc60tQBDwIAD1RqibappmgPC+Q== +"@polkadot/api-derive@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.78.0-beta.2.tgz#e454ad0d7a919e42fe20e38258b29fe7600b0a44" + integrity sha512-bxgj7KgpXYAc3DWTGxa72LykaZivptd/p/dANME9hEBTgY9ZZrh2z7ZMQ8/f/sEAhTpfM664/0AzzK+H6eAtDg== dependencies: "@babel/runtime" "^7.4.4" - "@polkadot/api" "^0.78.0-beta.1" - "@polkadot/types" "^0.78.0-beta.1" + "@polkadot/api" "^0.78.0-beta.2" + "@polkadot/types" "^0.78.0-beta.2" "@types/memoizee" "^0.4.2" memoizee "^0.4.14" -"@polkadot/api@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.78.0-beta.1.tgz#ef42a3563f99d75568b3300be844c1d37c8c3e17" - integrity sha512-26xXCaeP8CCJl6g0j/4UwOE65kovWm1FqB11DmZQd8eyE+525qvkiCcnIjMo0AXGVKqsItfu7dWv9euaWrUFLw== +"@polkadot/api@^0.78.0-beta.1", "@polkadot/api@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.78.0-beta.2.tgz#ecd149893dab0ba11645d4f0649313f2e2dab4ad" + integrity sha512-C1dTCkAUQYLBz+XazLLcvbKvckp9S7MoVqX/NxqIjCu0V0rBQPRAgh2AvbAvBfFad12+VaE+XBofZ9m6AaQ0ww== dependencies: "@babel/runtime" "^7.4.4" - "@polkadot/api-derive" "^0.78.0-beta.1" - "@polkadot/extrinsics" "^0.78.0-beta.1" - "@polkadot/rpc-provider" "^0.78.0-beta.1" - "@polkadot/rpc-rx" "^0.78.0-beta.1" - "@polkadot/storage" "^0.78.0-beta.1" - "@polkadot/types" "^0.78.0-beta.1" + "@polkadot/api-derive" "^0.78.0-beta.2" + "@polkadot/extrinsics" "^0.78.0-beta.2" + "@polkadot/rpc-provider" "^0.78.0-beta.2" + "@polkadot/rpc-rx" "^0.78.0-beta.2" + "@polkadot/storage" "^0.78.0-beta.2" + "@polkadot/types" "^0.78.0-beta.2" "@polkadot/util-crypto" "^0.90.0-beta.1" "@polkadot/dev-react@^0.30.0-beta.3": @@ -1801,19 +1801,19 @@ typescript "^3.4.5" vuepress "^1.0.0-alpha.47" -"@polkadot/extrinsics@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.78.0-beta.1.tgz#042e65e49e5bb720c91b083e75620fa884561fe4" - integrity sha512-j/Cz0+3EOOgF41Nqszsdz7tOwCaNSilaRgjd6XinEqSybTCAGHPMfuw7yCbMNKYlio7HrzFzYKhoi4il3uj82A== +"@polkadot/extrinsics@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.78.0-beta.2.tgz#71c515c9a79367e94e85b84da172ec6f4980a145" + integrity sha512-CiJJB9GYlFds74td8hoBseIbhgu+iL6JHHC3x0O1aHQ7X7uM3REiBdOdBVbj6zAcU8OM0lPzRVexX8NjJx3KYg== dependencies: "@babel/runtime" "^7.4.4" - "@polkadot/types" "^0.78.0-beta.1" + "@polkadot/types" "^0.78.0-beta.2" "@polkadot/util" "^0.90.0-beta.1" -"@polkadot/jsonrpc@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.78.0-beta.1.tgz#1fe5ef547178b89ea29399691d9a7603f5158d15" - integrity sha512-K4ink6iubM/6Jr2F7JBqQfbG9B/zR/4bATAljwZMfg/jcmEqY2pX8o2DnYfVgWaCY0NaePoEdS7VxUfT2HTDdQ== +"@polkadot/jsonrpc@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.78.0-beta.2.tgz#a3cc42177ba926f85d6661559aa2b0a456ac59fe" + integrity sha512-pecRL4fNbRNklvBenl4riKX0MzSjLLgm56S8gD4rf5k2c4wCKVFvpBdOpWUF3vYDuFxkaM5MgJofJ4slIfvsZA== dependencies: "@babel/runtime" "^7.4.4" @@ -1828,25 +1828,25 @@ "@types/bs58" "^4.0.0" bs58 "^4.0.1" -"@polkadot/rpc-core@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.78.0-beta.1.tgz#bfea0cc70bd4a9e75ec8d5402d24a4558e9d2367" - integrity sha512-oaBtTeFup7Fo8noYYUoPY8IolPjiwfriDDq5XbiEw1yzNwnBjCwaezHsfzFa0vYDkDiqj6IHQwpidW4gt7+eCA== +"@polkadot/rpc-core@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.78.0-beta.2.tgz#6f2615b1df0705773f6506f2b9e05f9f087042da" + integrity sha512-DLE22hI9AJiX62KGBxFTQrmLdWBJoP7d5o8cJOpQ7BqN0fr2nzZqtvfe3iTDFYqekVVdnXvyofzYgO5Wed/zHw== dependencies: "@babel/runtime" "^7.4.4" - "@polkadot/jsonrpc" "^0.78.0-beta.1" - "@polkadot/rpc-provider" "^0.78.0-beta.1" - "@polkadot/types" "^0.78.0-beta.1" + "@polkadot/jsonrpc" "^0.78.0-beta.2" + "@polkadot/rpc-provider" "^0.78.0-beta.2" + "@polkadot/types" "^0.78.0-beta.2" "@polkadot/util" "^0.90.0-beta.1" -"@polkadot/rpc-provider@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.78.0-beta.1.tgz#bb0f4009f607701120d0cfaf752c0b7768a42225" - integrity sha512-eKBDvjVg0uN5vDwRU5c5QgqzrZdzR1FNJgUOD/EQQ/eSbjA4XLzydPL4tZvU8Zvin5LLJT8koKTW2ueClac6EA== +"@polkadot/rpc-provider@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.78.0-beta.2.tgz#64eff1bdcc1fbceb31efca8e9d16db871a12070d" + integrity sha512-KJQ97vZa+53ZA9GjyE6zvOtSwV324H+q3nvdC7rFLKWSLqriIPoKkAemSfioSObsnowksgMhskVa7mBH2MJpTA== dependencies: "@babel/runtime" "^7.4.4" "@polkadot/keyring" "^0.90.0-beta.1" - "@polkadot/storage" "^0.78.0-beta.1" + "@polkadot/storage" "^0.78.0-beta.2" "@polkadot/util" "^0.90.0-beta.1" "@polkadot/util-crypto" "^0.90.0-beta.1" "@types/nock" "^9.3.1" @@ -1854,27 +1854,27 @@ isomorphic-fetch "^2.2.1" websocket "^1.0.28" -"@polkadot/rpc-rx@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-rx/-/rpc-rx-0.78.0-beta.1.tgz#26bbadac75d9b62eb05a70b1e17089a66565157d" - integrity sha512-DyF9QKkWVnD/wPLUlTQyEpBjF1SI9v3OwtW6BsTCxQm1NoibVoC17sYTGMAXrxXbmyMoTj4VE3cVV3pxRY1qgQ== +"@polkadot/rpc-rx@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-rx/-/rpc-rx-0.78.0-beta.2.tgz#0f2b36b44e0e11cbed0a5d5b59e017fed27c483c" + integrity sha512-THA3T5FaGQWbjyet36H3yioc5NZhY71ZqyWAhNVPsJ031o/1KfjLH2M7zeUnMHuwZY3bLcEF7/UF5gLYWj7xWg== dependencies: "@babel/runtime" "^7.4.4" - "@polkadot/rpc-core" "^0.78.0-beta.1" - "@polkadot/rpc-provider" "^0.78.0-beta.1" + "@polkadot/rpc-core" "^0.78.0-beta.2" + "@polkadot/rpc-provider" "^0.78.0-beta.2" "@types/memoizee" "^0.4.2" "@types/rx" "^4.1.1" memoizee "^0.4.14" rxjs "6.4.0" -"@polkadot/storage@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.78.0-beta.1.tgz#f2c0ded99e0f85408a1a671acfa1ba2bf5131f8e" - integrity sha512-HQJXwhKkp8DReBmd/exFGgn9rphEwbKKtUlet6eO9rTUoM8F2KdwlBQRXAs1t6zd81xNK04e6N5mhC4822fRQA== +"@polkadot/storage@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.78.0-beta.2.tgz#a39e0f663c976249b90aab1b275ef982772c19d5" + integrity sha512-K2YVjt+yPU961Y3JmpP2kH4FqNG0qcZFF8uSWbReTa2APE60CZJYDMsy77In1MuMdepu4r3u6ML+K2qYa/ShFg== dependencies: "@babel/runtime" "^7.4.4" "@polkadot/keyring" "^0.90.0-beta.1" - "@polkadot/types" "^0.78.0-beta.1" + "@polkadot/types" "^0.78.0-beta.2" "@polkadot/util" "^0.90.0-beta.1" "@polkadot/util-crypto" "^0.90.0-beta.1" @@ -1883,10 +1883,10 @@ resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.56.tgz#ffd6e9c95704a7fb90b918193b9dc5c440114b27" integrity sha512-wnt4zXxZXyz6WaubTO/I+nUElwV2DogFzdl6CrKfVn2PTWp8uHN06W9s40FH57ORtmQfDr9rLRP8Nq+oIyElbg== -"@polkadot/types@^0.78.0-beta.1": - version "0.78.0-beta.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.78.0-beta.1.tgz#f1fc4324487cdf7d9448994c73062b6210529551" - integrity sha512-vXFeuNB+gAgrkmfEv3d+otDASnu+sKB36fVPSImtBxczTemiMN+3AkVPXb7lBC0x9E7bCnm9p7WlYgj0Z/n9zw== +"@polkadot/types@^0.78.0-beta.1", "@polkadot/types@^0.78.0-beta.2": + version "0.78.0-beta.2" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.78.0-beta.2.tgz#3f99a06cf442cfcdae0fe48e741b2e3204fce1f4" + integrity sha512-PD7z2lCBlG1erZhhh55ApK3Tect9jQsb7qfyQC5Q9rVFkY2UsoiK+q1q6L+umUcSyUW4m+msbVQicY4Xf++y7g== dependencies: "@babel/runtime" "^7.4.4" "@polkadot/keyring" "^0.90.0-beta.1" @@ -2240,9 +2240,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^16.8.14": - version "16.8.14" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.14.tgz#b561bfabeb8f60d12e6d4766367e7a9ae927aa18" - integrity sha512-26tFVJ1omGmzIdFTFmnC5zhz1GTaqCjxgUxV4KzWvsybF42P7/j4RBn6UeO3KbHPXqKWZszMXMoI65xIWm954A== + version "16.8.15" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.15.tgz#a76515fed5aa3e996603056f54427fec5f2a5122" + integrity sha512-dMhzw1rWK+wwJWvPp5Pk12ksSrm/z/C/+lOQbMZ7YfDQYnJ02bc0wtg4EJD9qrFhuxFrf/ywNgwTboucobJqQg== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -2803,12 +2803,12 @@ abbrev@1: integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== accepts@^1.3.5, accepts@~1.3.4, accepts@~1.3.5: - version "1.3.6" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.6.tgz#27de8682f0833e966dde5c5d7a63ec8523106e4b" - integrity sha512-QsaoUD2dpVpjENy8JFpQnXP9vyzoZPmAoKrE3S6HtSB7qzSebkJNnmdY4p004FQUSSiHXPueENpoeuUW/7a8Ig== + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== dependencies: mime-types "~2.1.24" - negotiator "0.6.1" + negotiator "0.6.2" acorn-dynamic-import@^4.0.0: version "4.0.0" @@ -5911,9 +5911,9 @@ event-emitter@^0.3.5: es5-ext "~0.10.14" eventemitter3@^3.0.0, eventemitter3@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" - integrity sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA== + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== events@^1.1.0: version "1.1.1" @@ -6468,9 +6468,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.0.0, fsevents@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.8.tgz#57ea5320f762cd4696e5e8e87120eccc8b11cacf" - integrity sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA== + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== dependencies: nan "^2.12.1" node-pre-gyp "^0.12.0" @@ -6730,9 +6730,9 @@ global@^4.3.0, global@^4.3.2: process "~0.5.1" globals@^11.1.0: - version "11.11.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.11.0.tgz#dcf93757fa2de5486fbeed7118538adf789e9c2e" - integrity sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw== + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globby@^6.1.0: version "6.1.0" @@ -9602,10 +9602,10 @@ needle@^2.2.1: iconv-lite "^0.4.4" sax "^1.2.4" -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== neo-async@^2.5.0, neo-async@^2.6.0: version "2.6.0" @@ -9918,9 +9918,9 @@ number-is-nan@^1.0.0: integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwsapi@^2.0.7: - version "2.1.3" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.3.tgz#25f3a5cec26c654f7376df6659cdf84b99df9558" - integrity sha512-RowAaJGEgYXEZfQ7tvvdtAQUKPyTR6T6wNu0fwlNsGQYr/h3yQc6oI8WnVZh3Y/Sylwc+dtAlvPqfFZjhTyk3A== + version "2.1.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.4.tgz#e006a878db23636f8e8a67d33ca0e4edf61a842f" + integrity sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw== oauth-sign@~0.9.0: version "0.9.0"