#mnemonic: Bip39Mnemonic | null\r
#safe: Safe\r
#seed: string | null\r
+ get id () {\r
+ return this.#id.hex\r
+ }\r
get mnemonic () {\r
if (this.#mnemonic instanceof Bip39Mnemonic) {\r
return this.#mnemonic.phrase\r
async lock (passkey: string | CryptoKey): Promise<boolean> {\r
let success = true\r
try {\r
- success &&= await this.#safe.overwrite(this.#id.hex, passkey as string, this.#id.hex)\r
+ success &&= await this.#safe.overwrite(this.id, passkey as string, this.id)\r
if (!success) {\r
throw null\r
}\r
async unlock (key: CryptoKey): Promise<boolean>\r
async unlock (passkey: string | CryptoKey): Promise<boolean> {\r
try {\r
- const id = await this.#safe.get(this.#id.hex, passkey as string)\r
- if (id !== this.#id.hex) {\r
+ const id = await this.#safe.get(this.id, passkey as string)\r
+ if (id !== this.id) {\r
throw null\r
}\r
const mnemonic = await this.#safe.get('mnemonic', passkey as string)\r