Bump deps

This commit is contained in:
Jaco Greeff 2019-07-19 07:58:19 +02:00
parent 94dd2f737d
commit 02d998d542
7 changed files with 888 additions and 858 deletions

View File

@ -37,9 +37,9 @@ Once added, you can create an account (via a generated seed) or import via an ex
The repo is split into a number of packages -
- [extension](packages/extension/) - All the injection and background processing logic (the main entry)
- [extension-ui](packages/extension-ui/) - The UI components for the extension, do build up the popup
- [extension-ui](packages/extension-ui/) - The UI components for the extension, to build up the popup
- [extension-dapp](packages/extension-dapp/) - A convenience wrapper to work with the injected objects, simplifying data extraction for any dapp that wishes to integrate the extension (or any extension that supports the interface)
- [extension-inject](packages/extension-inject/) - A convience wrapper that allows extension developers to inject their extension for use by dapp developers
- [extension-inject](packages/extension-inject/) - A convience wrapper that allows extension developers to inject their extension for use by any dapp
## Dapp developers
@ -50,13 +50,13 @@ This approach is used to support multiple external signers in for instance [apps
## API interface
The extension injection interfaces are generic, i.e. it is designed to allow any extension developer to easily inject extensions (that conforms to a specific interface) and at the same time, it allows for any dapp developer to easily enable the interfaces from multiple extensions at the same time. It is not an all-or-nothing approach, but rather it is an ecosystem where the user can choose which extensions fit his style best.
The extension injection interfaces are generic, i.e. it is designed to allow any extension developer to easily inject extensions (that conforms to a specific interface) and at the same time, it allows for any dapp developer to easily enable the interfaces from multiple extensions at the same time. It is not an all-or-nothing approach, but rather it is an ecosystem where the user can choose which extensions fit their style best.
From a dapp developer perspective, the only work needed is to include the [@polkadot/extension-dapp](packages/extension-dapp/) package and call the appropriate enabling function to retrieve all the extensions and their associated interfaces.
From an extension developer perspective, the only work required is to enable the extension via the razor-thin [@polkadot/extension-inject](packages/extension-inject/) wrapper. Any dapp using the above interfaces will have access.
From an extension developer perspective, the only work required is to enable the extension via the razor-thin [@polkadot/extension-inject](packages/extension-inject/) wrapper. Any dapp using the above interfaces will have access to the extension via this interface.
When there is more than one extension, each will populate an entry above, so from an extension implementation perspective, the structure should not be overridden. The `Injected` interface, as returned via `enable`, contains the following and is what any compliant extension supplies -
When there is more than one extension, each will populate an entry via the injection interface and each will be made available to the dapp. The `Injected` interface, as returned via `enable`, contains the following information for any compliant extension -
```js
interface Injected {
@ -93,9 +93,9 @@ interface Signer extends SignerInterface {
## Injection information
This information may change and evolve. It is therefore recommended that all access is done via the `-dapp` and `-inject` packages, which removes the need to work with the lower-level targets.
The information contained in this section may change and evolve. It is therefore recommended that all access is done via the [@polkadot/extension-dapp](packages/extension-dapp/) (for dapps) and [extension-inject](packages/extension-inject/) (for extensions) packages, which removes the need to work with the lower-level targets.
The extension injects `injectedWeb3` into the global `window` object, exposing the following: (This is meant to be generic across extensions, allowing any dapp to utilize multiple signers, as they are available)
The extension injects `injectedWeb3` into the global `window` object, exposing the following: (This is meant to be generic across extensions, allowing any dapp to utilize multiple signers, and pull accounts from multiples, as they are available)
```js
window.injectedWeb3 = {
@ -113,18 +113,6 @@ window.injectedWeb3 = {
}
```
The app can use all or any of these, depending on needs. To instantiate the `@polkadot/api` signer (allowing the extension to sign messages) can be done via (assuming a known, single extension) -
```js
import { ApiPromise } from '@polkadot/api';
const pjsx = await window.injectedWeb3['polkadot-js'].enable('my dapp');
const accounts = await pjsx.accounts.get();
const api = await Api.create({ signer: pjsx.signer });
```
Generally, you would probably want to have access to all extensions available and have a slightly higher-level interface to work with. For these cases, [extension-dapp](packages/extension-dapp/) provides a cleaner interface around the injected object, making it simpler to work with from a dapp perspective.
## FAQ
### Why can't I import an account with a seed

View File

@ -12,11 +12,11 @@
"yarn": "^1.10.1"
},
"resolutions": {
"@polkadot/api": "^0.82.0-beta.70",
"@polkadot/keyring": "^0.94.0-beta.15",
"@polkadot/types": "^0.82.0-beta.70",
"@polkadot/util": "^0.94.0-beta.15",
"@polkadot/util-crypto": "^0.94.0-beta.15",
"@polkadot/api": "^0.82.0-beta.73",
"@polkadot/keyring": "^0.94.0-beta.17",
"@polkadot/types": "^0.82.0-beta.73",
"@polkadot/util": "^0.94.0-beta.17",
"@polkadot/util-crypto": "^0.94.0-beta.17",
"babel-core": "^7.0.0-bridge.0",
"typescript": "^3.5.3"
},
@ -31,8 +31,8 @@
"watch": "cd packages/extension && webpack --config webpack.config.js --watch"
},
"devDependencies": {
"@babel/core": "^7.5.4",
"@polkadot/dev-react": "^0.30.0-beta.22",
"@babel/core": "^7.5.5",
"@polkadot/dev-react": "^0.30.0-beta.23",
"@polkadot/ts": "^0.1.62"
}
}

View File

@ -8,7 +8,7 @@
"@polkadot/extension-inject": "^0.5.0-beta.0"
},
"peerDependencies": {
"@babel/runtime": "^7.5.4",
"@babel/runtime": "^7.5.5",
"@polkadot/api": "*"
}
}

View File

@ -5,7 +5,7 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"peerDependencies": {
"@babel/runtime": "^7.5.4",
"@babel/runtime": "^7.5.5",
"@polkadot/api": "*"
}
}

View File

@ -5,8 +5,8 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {
"@babel/runtime": "^7.5.4",
"@polkadot/ui-identicon": "^0.42.0-beta.13",
"@babel/runtime": "^7.5.5",
"@polkadot/ui-identicon": "^0.42.0-beta.14",
"@types/react-router": "^5.0.3",
"@types/react-router-dom": "^4.3.4",
"react-router": "^5.0.1",

View File

@ -5,18 +5,18 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {
"@polkadot/api": "^0.82.0-beta.70",
"@polkadot/api": "^0.82.0-beta.73",
"@polkadot/extension-ui": "^0.5.0-beta.0",
"@polkadot/ui-keyring": "^0.42.0-beta.13"
"@polkadot/ui-keyring": "^0.42.0-beta.14"
},
"devDependencies": {
"@babel/runtime": "^7.5.4",
"@polkadot/keyring": "^0.94.0-beta.15",
"@babel/runtime": "^7.5.5",
"@polkadot/keyring": "^0.94.0-beta.17",
"@types/chrome": "^0.0.86",
"@types/firefox-webext-browser": "^67.0.1",
"extensionizer": "^1.0.1",
"extract-loader": "^3.1.0",
"file-loader": "^4.0.0",
"file-loader": "^4.1.0",
"html-loader": "^0.5.5",
"webpack-extension-manifest-plugin": "^0.4.3"
}

1688
yarn.lock

File diff suppressed because it is too large Load Diff