Expose createFromJSON

This commit is contained in:
Jaco Greeff committed 2020-09-24 15:34:43 +02:00
1 parent 4155547c0b
commit 723641ac57
9 files changed
+74 -33

No files matched your search

+4
View File
@@ -79,6 +79,10 @@ export class Keyring extends Base implements KeyringStruct {
return pair.toJson(password);
}
public createFromJSON (json: KeyringPair$Json, meta: KeyringPair$Meta = {}): KeyringPair {
return this.keyring.createFromJSON({ ...json, meta: { ...(json.meta || {}), meta } });
}
public createFromUri (suri: string, meta: KeyringPair$Meta = {}, type?: KeypairType): KeyringPair {
return this.keyring.createFromUri(suri, meta, type);
}