@plugnet/util-crypto
Version:
A collection of useful crypto utilities for @plugnet
11 lines (10 loc) • 473 B
TypeScript
import DeriveJunction from './DeriveJunction';
export interface ExtractResult {
password?: string;
path: DeriveJunction[];
phrase: string;
}
/**
* @description Extracts the phrase, path and password from a SURI format for specifying secret keys `<secret>/<soft-key>//<hard-key>///<password>` (the `///password` may be omitted, and `/<soft-key>` and `//<hard-key>` maybe repeated and mixed).
*/
export default function keyExtract(suri: string): ExtractResult;