mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-05-31 18:01:04 +00:00
Add external account creation (#61)
This commit is contained in:
@@ -44,6 +44,14 @@ class Keyring extends Base implements KeyringStruct {
|
||||
return pair;
|
||||
}
|
||||
|
||||
createAccountExternal (publicKey: Uint8Array, meta: KeyringPair$Meta = {}): KeyringPair {
|
||||
const pair = this.keyring.addFromAddress(publicKey, { ...meta, isExternal: true });
|
||||
|
||||
this.saveAccount(pair);
|
||||
|
||||
return pair;
|
||||
}
|
||||
|
||||
createAccountMnemonic (seed: string, password?: string, meta: KeyringPair$Meta = {}): KeyringPair {
|
||||
const pair = this.keyring.addFromMnemonic(seed, meta);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user