Skip to content
Tauri
Releases

@tauri-apps/plugin-stronghold

Classes

Client

Constructors

new Client()
new Client(path, name): Client
Parameters
ParameterType
pathstring
nameClientPath
Returns

Client

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L275

Properties

PropertyType
nameBytesDto
pathstring

Methods

getStore()
getStore(): Store
Returns

Store

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L290

getVault()
getVault(name): Vault

Get a vault by name.

Parameters
ParameterTypeDescription
nameVaultPath
Returns

Vault

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L286


Location

Constructors

new Location()
new Location(type, payload): Location
Parameters
ParameterType
typestring
payloadRecord<string, unknown>
Returns

Location

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L96

Properties

PropertyType
payloadRecord<string, unknown>
typestring

Methods

counter()
static counter(vault, counter): Location
Parameters
ParameterType
vaultVaultPath
counternumber
Returns

Location

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L108

generic()
static generic(vault, record): Location
Parameters
ParameterType
vaultVaultPath
recordRecordPath
Returns

Location

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L101


Store

Constructors

new Store()
new Store(path, client): Store
Parameters
ParameterType
pathstring
clientBytesDto
Returns

Store

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L299

Properties

PropertyType
clientBytesDto
pathstring

Methods

get()
get(key): Promise<null | Uint8Array>
Parameters
ParameterType
keyStoreKey
Returns

Promise<null | Uint8Array>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L304

insert()
insert(
key,
value,
lifetime?): Promise<void>
Parameters
ParameterType
keyStoreKey
valuenumber[]
lifetime?Duration
Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L312

remove()
remove(key): Promise<null | Uint8Array>
Parameters
ParameterType
keyStoreKey
Returns

Promise<null | Uint8Array>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L326


Stronghold

A representation of an access to a stronghold.

Constructors

new Stronghold()
private new Stronghold(path): Stronghold

Initializes a stronghold. If the snapshot path located at path exists, the password must match.

Parameters
ParameterTypeDescription
pathstring
Returns

Stronghold

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L406

Properties

PropertyType
pathstring

Methods

createClient()
createClient(client): Promise<Client>
Parameters
ParameterType
clientClientPath
Returns

Promise<Client>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L438

loadClient()
loadClient(client): Promise<Client>
Parameters
ParameterType
clientClientPath
Returns

Promise<Client>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L431

save()
save(): Promise<void>

Persists the stronghold state to the snapshot.

Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L449

unload()
unload(): Promise<void>

Remove this instance from the cache.

Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L425

load()
static load(path, password): Promise<Stronghold>

Load the snapshot if it exists (password must match), or start a fresh stronghold instance otherwise.

Parameters
ParameterTypeDescription
pathstring-
passwordstring
Returns

Promise<Stronghold>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L415


Vault

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.

Extends

  • ProcedureExecutor

Constructors

new Vault()
new Vault(
path,
client,
name): Vault
Parameters
ParameterType
pathstring
clientClientPath
nameVaultPath
Returns

Vault

Overrides

ProcedureExecutor.constructor

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L350

Properties

PropertyTypeDescriptionInherited from
clientBytesDto--
nameBytesDtoThe vault name.-
pathstringThe vault path.-
procedureArgsRecord<string, unknown>-ProcedureExecutor.procedureArgs

Methods

deriveSLIP10()
deriveSLIP10(
chain,
source,
sourceLocation,
outputLocation): Promise<Uint8Array>

Derive a SLIP10 private key using a seed or key.

Parameters
ParameterTypeDescription
chainnumber[]The chain path.
source"Seed" | "Key"The source type, either ‘Seed’ or ‘Key’.
sourceLocationLocationThe source location, must be the outputLocation of a previous call to generateSLIP10Seed or deriveSLIP10.
outputLocationLocationLocation of the record where the private key will be stored.
Returns

Promise<Uint8Array>

Inherited from

ProcedureExecutor.deriveSLIP10

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L155

generateBIP39()
generateBIP39(outputLocation, passphrase?): Promise<Uint8Array>

Generate a BIP39 seed.

Parameters
ParameterTypeDescription
outputLocationLocationThe location of the record where the BIP39 seed will be stored.
passphrase?stringThe optional mnemonic passphrase.
Returns

Promise<Uint8Array>

Inherited from

ProcedureExecutor.generateBIP39

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L210

generateSLIP10Seed()
generateSLIP10Seed(outputLocation, sizeBytes?): Promise<Uint8Array>

Generate a SLIP10 seed for the given location.

Parameters
ParameterTypeDescription
outputLocationLocationLocation of the record where the seed will be stored.
sizeBytes?numberThe size in bytes of the SLIP10 seed.
Returns

Promise<Uint8Array>

Inherited from

ProcedureExecutor.generateSLIP10Seed

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L130

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

Gets the Ed25519 public key of a SLIP10 private key.

Parameters
ParameterTypeDescription
privateKeyLocationLocationThe location of the private key. Must be the outputLocation of a previous call to deriveSLIP10.
Returns

Promise<Uint8Array>

A promise resolving to the public key hex string.

Inherited from

ProcedureExecutor.getEd25519PublicKey

Since

2.0.0

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L233

insert()
insert(recordPath, secret): Promise<void>

Insert a record to this vault.

Parameters
ParameterType
recordPathRecordPath
secretnumber[]
Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L368

recoverBIP39()
recoverBIP39(
mnemonic,
outputLocation,
passphrase?): Promise<Uint8Array>

Store a BIP39 mnemonic.

Parameters
ParameterTypeDescription
mnemonicstringThe mnemonic string.
outputLocationLocationThe location of the record where the BIP39 mnemonic will be stored.
passphrase?stringThe optional mnemonic passphrase.
Returns

Promise<Uint8Array>

Inherited from

ProcedureExecutor.recoverBIP39

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L185

remove()
remove(location): Promise<void>

Remove a record from the vault.

Parameters
ParameterTypeDescription
locationLocationThe record location.
Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L384

signEd25519()
signEd25519(privateKeyLocation, msg): Promise<Uint8Array>

Creates a Ed25519 signature from a private key.

Parameters
ParameterTypeDescription
privateKeyLocationLocationThe location of the record where the private key is stored. Must be the outputLocation of a previous call to deriveSLIP10.
msgstringThe message to sign.
Returns

Promise<Uint8Array>

A promise resolving to the signature hex string.

Inherited from

ProcedureExecutor.signEd25519

Since

2.0.0

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L254

Interfaces

AddressInfo

Properties

PropertyType
peersMap<string, PeerAddress>
relaysstring[]

ClientAccess

Properties

PropertyType
cloneVaultDefault?boolean
cloneVaultExceptions?Map<VaultPath, boolean>
readStore?boolean
useVaultDefault?boolean
useVaultExceptions?Map<VaultPath, boolean>
writeStore?boolean
writeVaultDefault?boolean
writeVaultExceptions?Map<VaultPath, boolean>

ConnectionLimits

Properties

PropertyType
maxEstablishedIncoming?number
maxEstablishedOutgoing?number
maxEstablishedPerPeer?number
maxEstablishedTotal?number
maxPendingIncoming?number
maxPendingOutgoing?number

Duration

A duration definition.

Properties

PropertyTypeDescription
nanosnumberThe fractional part of this Duration, in nanoseconds. Must be greater or equal to 0 and smaller than 1e+9 (the max number of nanoseoncds in a second)
secsnumberThe number of whole seconds contained by this Duration.

NetworkConfig

Properties

PropertyType
addresses?AddressInfo
connectionTimeout?Duration
connectionsLimit?ConnectionLimits
enableMdns?boolean
enableRelay?boolean
peerPermissions?Map<string, Permissions>
permissionsDefault?Permissions
requestTimeout?Duration

PeerAddress

Properties

PropertyType
knownstring[]
use_relay_fallbackboolean

Permissions

Properties

PropertyType
default?ClientAccess
exceptions?Map<VaultPath, ClientAccess>

Type Aliases

ClientPath

type ClientPath: string | Iterable<number> | ArrayLike<number> | ArrayBuffer;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L8


RecordPath

type RecordPath: string | Iterable<number> | ArrayLike<number> | ArrayBuffer;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L18


StoreKey

type StoreKey: string | Iterable<number> | ArrayLike<number> | ArrayBuffer;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L23


VaultPath

type VaultPath: string | Iterable<number> | ArrayLike<number> | ArrayBuffer;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L13


© 2024 Tauri Contributors. CC-BY / MIT