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.
Constructor
Section titled “Constructor”new Vault(path: string, client: ClientPath, name: VaultPath)Instance members
Section titled “Instance members”client
Section titled “client”client: ClientPathderiveSLIP10
Section titled “deriveSLIP10”deriveSLIP10(chain: number[], source: "Seed" | "Key", sourceLocation: Location, outputLocation: Location): Promise<Uint8Array<ArrayBufferLike>>Derive a SLIP10 private key using a seed or key.
generateBIP39
Section titled “generateBIP39”generateBIP39(outputLocation: Location, passphrase?: string | undefined): Promise<Uint8Array<ArrayBufferLike>>Generate a BIP39 seed.
generateSLIP10Seed
Section titled “generateSLIP10Seed”generateSLIP10Seed(outputLocation: Location, sizeBytes?: number | undefined): Promise<Uint8Array<ArrayBufferLike>>Generate a SLIP10 seed for the given location.
getEd25519PublicKey
Section titled “getEd25519PublicKey”getEd25519PublicKey(privateKeyLocation: Location): Promise<Uint8Array<ArrayBufferLike>>Gets the Ed25519 public key of a SLIP10 private key.
insert
Section titled “insert”insert(recordPath: RecordPath, secret: number[]): Promise<void>Insert a record to this vault.
name: VaultPathThe vault name.
path: stringThe vault path.
procedureArgs
Section titled “procedureArgs”procedureArgs: Record<string, unknown>recoverBIP39
Section titled “recoverBIP39”recoverBIP39(mnemonic: string, outputLocation: Location, passphrase?: string | undefined): Promise<Uint8Array<ArrayBufferLike>>Store a BIP39 mnemonic.
remove
Section titled “remove”remove(location: Location): Promise<void>Remove a record from the vault.
signEd25519
Section titled “signEd25519”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.