Skip to content

Vault

Module @netwiv/api/plugins/stronghold · Kind Class

import { Vault } from '@netwiv/api/plugins/stronghold';

A key-value storage that allows create, update and delete operations. It does not allow reading the data, so one of the procedures must be used to manipulate the stored data, allowing secure storage of secrets.

new Vault(path: string, client: ClientPath, name: VaultPath)
client: ClientPath
deriveSLIP10(chain: number[], source: "Seed" | "Key", sourceLocation: Location, outputLocation: Location): Promise<Uint8Array<ArrayBufferLike>>

Derive a SLIP10 private key using a seed or key.

generateBIP39(outputLocation: Location, passphrase?: string | undefined): Promise<Uint8Array<ArrayBufferLike>>

Generate a BIP39 seed.

generateSLIP10Seed(outputLocation: Location, sizeBytes?: number | undefined): Promise<Uint8Array<ArrayBufferLike>>

Generate a SLIP10 seed for the given location.

getEd25519PublicKey(privateKeyLocation: Location): Promise<Uint8Array<ArrayBufferLike>>

Gets the Ed25519 public key of a SLIP10 private key.

insert(recordPath: RecordPath, secret: number[]): Promise<void>

Insert a record to this vault.

name: VaultPath

The vault name.

path: string

The vault path.

procedureArgs: Record<string, unknown>
recoverBIP39(mnemonic: string, outputLocation: Location, passphrase?: string | undefined): Promise<Uint8Array<ArrayBufferLike>>

Store a BIP39 mnemonic.

remove(location: Location): Promise<void>

Remove a record from the vault.

signEd25519(privateKeyLocation: Location, msg: string): Promise<Uint8Array<ArrayBufferLike>>

Creates a Ed25519 signature from a private key.


Descriptions come from the pinned @tauri-apps/plugin-stronghold@2.3.2 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.