Package Exports
- @polkadot/ui-keyring
- @polkadot/ui-keyring/defaults
- @polkadot/ui-keyring/index
- @polkadot/ui-keyring/observable/accounts
- @polkadot/ui-keyring/observable/addresses
- @polkadot/ui-keyring/options
- @polkadot/ui-keyring/options/item
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polkadot/ui-keyring) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@polkadot/ui-keyring
A wrapper extending the base @polkadot/keyring interface for usage in the browser: Key management of user accounts including generation and retrieval of keyring pairs from a variety of input combinations.
Usage Example
All module methods are exposed through a single default export.
import keyring from @polkadot/ui-keyring
render () {
// encode publicKey to ss58 address
const address = keyring.encodeAddress(publicKey);
// get keyring pair from ss58 address
const pair = keyring.getPair(address);
// ask questions about that particular keyring pair
const isLocked = pair.isLocked();
const meta = pair.getMeta();
// save account from pair
keyring.saveAccount(pair, password);
}
Users
Keyring is core to many polkadot/substrate apps.