@tauri-apps/plugin-stronghold
Store secrets and keys using the IOTA Stronghold encrypted database and secure runtime.
Classes
Section titled “Classes”Client
Section titled “Client”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L386
A client of a stronghold snapshot, owning a set of vaults and a key-value store. Clients are obtained with Stronghold.loadClient and Stronghold.createClient.
2.0.0
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Client(path, name): Client;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L406
Creates a client handle for a client that was already loaded or created. Prefer Stronghold.loadClient and Stronghold.createClient, which also register the client on the Rust side.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
path |
string |
The path of the snapshot file the client belongs to. |
name |
ClientPath |
The name identifying the client inside the snapshot. |
Returns
Section titled “Returns”Example
Section titled “Example”import { Client } from '@tauri-apps/plugin-stronghold';const client = new Client('/path/to/snapshot.hold', 'my-client');Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
name |
ClientPath |
The name identifying this client inside the snapshot. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L390 |
path |
string |
The path of the snapshot file this client belongs to. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L388 |
Methods
Section titled “Methods”getStore()
Section titled “getStore()”getStore(): Store;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L443
Gets a handle to the key-value store of this client.
Returns
Section titled “Returns”The store handle.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');const store = client.getStore();getVault()
Section titled “getVault()”getVault(name): Vault;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L426
Gets a handle to the vault with the given name. The vault is created on the Rust side when the first secret is written to it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
VaultPath |
The path of the vault. |
Returns
Section titled “Returns”The vault handle.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');const vault = client.getVault('my-vault');Location
Section titled “Location”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L163
A pointer to a record inside a vault, either addressed by its record path (Location.generic) or by a counter (Location.counter).
2.0.0
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Location(type, payload): Location;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L182
Creates a location of the given kind. Prefer the Location.generic and Location.counter helpers, which fill the payload for you.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
type |
string |
The location kind, either Generic or Counter. |
payload |
Record<string, unknown> |
The data identifying the record inside the vault. |
Returns
Section titled “Returns”Example
Section titled “Example”import { Location } from '@tauri-apps/plugin-stronghold';const location = new Location('Generic', { vault: 'my-vault', record: 'my-record' });Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
payload |
Record<string, unknown> |
The location data, holding the vault path and the record path or counter. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L167 |
type |
string |
The location kind, either Generic or Counter. |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L165 |
Methods
Section titled “Methods”counter()
Section titled “counter()”static counter(vault, counter): Location;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L220
Creates a location addressing a record of a vault by a counter.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
vault |
VaultPath |
The path of the vault holding the record. |
counter |
number |
The counter identifying the record inside the vault. |
Returns
Section titled “Returns”The location of the record.
Example
Section titled “Example”import { Location } from '@tauri-apps/plugin-stronghold';const location = Location.counter('my-vault', 0);generic()
Section titled “generic()”static generic(vault, record): Location;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L200
Creates a location addressing a record of a vault by its record path.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
vault |
VaultPath |
The path of the vault holding the record. |
record |
RecordPath |
The path of the record inside the vault. |
Returns
Section titled “Returns”The location of the record.
Example
Section titled “Example”import { Location } from '@tauri-apps/plugin-stronghold';const location = Location.generic('my-vault', 'my-record');Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L454
The key-value store of a Client. Unlike a Vault, the values stored here can be read back directly.
2.0.0
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Store(path, client): Store;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L473
Creates a store handle for a client that was already loaded or created. Prefer Client.getStore.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
path |
string |
The path of the snapshot file the store belongs to. |
client |
ClientPath |
The name of the client owning the store. |
Returns
Section titled “Returns”Example
Section titled “Example”import { Store } from '@tauri-apps/plugin-stronghold';const store = new Store('/path/to/snapshot.hold', 'my-client');Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
client |
ClientPath |
The name of the client owning this store. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L458 |
path |
string |
The path of the snapshot file this store belongs to. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L456 |
Methods
Section titled “Methods”get(key): Promise< | Uint8Array<ArrayBufferLike>| null>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L492
Reads the value of a record of this store.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key |
StoreKey |
The key of the record. |
Returns
Section titled “Returns”Promise<
| Uint8Array<ArrayBufferLike>
| null>
A promise resolving to the stored value, or null if the key does not exist.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');const value = await client.getStore().get('my-key');insert()
Section titled “insert()”insert( key, value, lifetime?): Promise<void>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L518
Inserts a record in this store, replacing the previous value of the key. Note that the snapshot is only persisted when Stronghold.save is called.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key |
StoreKey |
The key of the record. |
value |
number[] |
The value of the record, as an array of bytes. |
lifetime? |
Duration |
The optional duration after which the record expires. |
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');const data = Array.from(new TextEncoder().encode('Hello, World!'));await client.getStore().insert('my-key', data);await stronghold.save();remove()
Section titled “remove()”remove(key): Promise< | Uint8Array<ArrayBufferLike>| null>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L546
Deletes a record from this store.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key |
StoreKey |
The key of the record. |
Returns
Section titled “Returns”Promise<
| Uint8Array<ArrayBufferLike>
| null>
A promise resolving to the deleted value, or null if the key did not exist.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');await client.getStore().remove('my-key');Stronghold
Section titled “Stronghold”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L656
A representation of an access to a stronghold.
2.0.0
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
path |
string |
The path of the snapshot file backing this stronghold. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L658 |
Methods
Section titled “Methods”createClient()
Section titled “createClient()”createClient(client): Promise<Client>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L744
Creates a new empty client on this stronghold.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client |
ClientPath |
The name of the client. |
Returns
Section titled “Returns”A promise resolving to the created client.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');let client;try { client = await stronghold.loadClient('my-client');} catch { client = await stronghold.createClient('my-client');}loadClient()
Section titled “loadClient()”loadClient(client): Promise<Client>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L719
Loads an existing client from the snapshot. The promise rejects if the client does not exist in the snapshot or was already loaded.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client |
ClientPath |
The name of the client. |
Returns
Section titled “Returns”A promise resolving to the loaded client.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.loadClient('my-client');save()
Section titled “save()”save(): Promise<void>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L763
Persists the stronghold state to the snapshot.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');await client.getStore().insert('my-key', [1, 2, 3]);await stronghold.save();unload()
Section titled “unload()”unload(): Promise<void>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L699
Saves the snapshot and removes this instance from the cache.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');await stronghold.unload();load()
Section titled “load()”static load(path, password): Promise<Stronghold>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L682
Load the snapshot if it exists (password must match), or start a fresh stronghold instance otherwise.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
path |
string |
The path of the snapshot file. |
password |
string |
The password used to encrypt and decrypt the snapshot. |
Returns
Section titled “Returns”A promise resolving to the stronghold instance.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';import { appDataDir } from '@tauri-apps/api/path';const stronghold = await Stronghold.load(`${await appDataDir()}/vault.hold`, 'password');Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L565
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.
2.0.0
Extends
Section titled “Extends”ProcedureExecutor
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Vault( path, client, name): Vault;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L587
Creates a vault handle for a client that was already loaded or created. Prefer Client.getVault.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
path |
string |
The path of the snapshot file the vault belongs to. |
client |
ClientPath |
The name of the client owning the vault. |
name |
VaultPath |
The path identifying the vault inside the client. |
Returns
Section titled “Returns”Example
Section titled “Example”import { Vault } from '@tauri-apps/plugin-stronghold';const vault = new Vault('/path/to/snapshot.hold', 'my-client', 'my-vault');Overrides
Section titled “Overrides”ProcedureExecutor.constructorProperties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
client |
ClientPath |
The name of the client owning this vault. | - | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L569 |
name |
VaultPath |
The path identifying this vault inside the client. | - | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L571 |
path |
string |
The path of the snapshot file this vault belongs to. | - | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L567 |
procedureArgs |
Record<string, unknown> |
- | ProcedureExecutor.procedureArgs |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L229 |
Methods
Section titled “Methods”deriveSLIP10()
Section titled “deriveSLIP10()”deriveSLIP10( chain, source, sourceLocation, outputLocation): Promise<Uint8Array<ArrayBufferLike>>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L266
Derive a SLIP10 private key using a seed or key. The derivation is always performed on the Ed25519 curve.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
chain |
number[] |
The chain path. |
source |
"Seed" | "Key" |
The source type, either ‘Seed’ or ‘Key’. |
sourceLocation |
Location |
The source location, must be the outputLocation of a previous call to generateSLIP10Seed or deriveSLIP10. |
outputLocation |
Location |
Location of the record where the private key will be stored. |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.deriveSLIP10generateBIP39()
Section titled “generateBIP39()”generateBIP39(outputLocation, passphrase?): Promise<Uint8Array<ArrayBufferLike>>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L319
Generate a BIP39 seed. The mnemonic is generated in English.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
outputLocation |
Location |
The location of the record where the BIP39 seed will be stored. |
passphrase? |
string |
The optional mnemonic passphrase. |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.generateBIP39generateSLIP10Seed()
Section titled “generateSLIP10Seed()”generateSLIP10Seed(outputLocation, sizeBytes?): Promise<Uint8Array<ArrayBufferLike>>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L241
Generate a SLIP10 seed for the given location.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
outputLocation |
Location |
Location of the record where the seed will be stored. |
sizeBytes? |
number |
The size in bytes of the SLIP10 seed. |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.generateSLIP10SeedgetEd25519PublicKey()
Section titled “getEd25519PublicKey()”getEd25519PublicKey(privateKeyLocation): Promise<Uint8Array<ArrayBufferLike>>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L342
Gets the Ed25519 public key of a SLIP10 private key.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
privateKeyLocation |
Location |
The location of the private key. Must be the outputLocation of a previous call to deriveSLIP10. |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise resolving to the public key hex string.
2.0.0
Inherited from
Section titled “Inherited from”ProcedureExecutor.getEd25519PublicKeyinsert()
Section titled “insert()”insert(recordPath, secret): Promise<void>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L615
Writes a secret to this vault. Note that the snapshot is only persisted when Stronghold.save is called.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
recordPath |
RecordPath |
The path of the record inside this vault. |
secret |
number[] |
The secret to store, as an array of bytes. |
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');const secret = Array.from(new TextEncoder().encode('secret value'));await client.getVault('my-vault').insert('my-record', secret);await stronghold.save();recoverBIP39()
Section titled “recoverBIP39()”recoverBIP39( mnemonic, outputLocation, passphrase?): Promise<Uint8Array<ArrayBufferLike>>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L295
Store a BIP39 mnemonic.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
mnemonic |
string |
The mnemonic string. |
outputLocation |
Location |
The location of the record where the BIP39 mnemonic will be stored. |
passphrase? |
string |
The optional mnemonic passphrase. |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.recoverBIP39remove()
Section titled “remove()”remove(location): Promise<void>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L641
Deletes a secret from this vault. Only the record path of the given location is used, the vault is always this one.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
location |
Location |
The location of the record to delete. |
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { Stronghold, Location } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');const client = await stronghold.createClient('my-client');await client .getVault('my-vault') .remove(Location.generic('my-vault', 'my-record'));signEd25519()
Section titled “signEd25519()”signEd25519(privateKeyLocation, msg): Promise<Uint8Array<ArrayBufferLike>>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L363
Creates a Ed25519 signature from a private key.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
privateKeyLocation |
Location |
The location of the record where the private key is stored. Must be the outputLocation of a previous call to deriveSLIP10. |
msg |
string |
The message to sign. |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
A promise resolving to the signature hex string.
2.0.0
Inherited from
Section titled “Inherited from”ProcedureExecutor.signEd25519Interfaces
Section titled “Interfaces”AddressInfo
Section titled “AddressInfo”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L82
The address book of the peer-to-peer network. See NetworkConfig for a note on how these definitions are used.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
peers |
Map<string, PeerAddress> |
The known addresses of each peer, keyed by the peer identifier. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L84 |
relays |
string[] |
The identifiers of the peers that can be used as relays. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L86 |
ClientAccess
Section titled “ClientAccess”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L93
The operations a remote peer is allowed to perform on a client. See NetworkConfig for a note on how these definitions are used.
Properties
Section titled “Properties”ConnectionLimits
Section titled “ConnectionLimits”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L52
The limits applied to the connections of a Stronghold peer-to-peer network. See NetworkConfig for a note on how these definitions are used.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
maxEstablishedIncoming? |
number |
The maximum number of established incoming connections. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L58 |
maxEstablishedOutgoing? |
number |
The maximum number of established outgoing connections. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L60 |
maxEstablishedPerPeer? |
number |
The maximum number of established connections per peer. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L62 |
maxEstablishedTotal? |
number |
The maximum number of established connections, incoming and outgoing combined. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L64 |
maxPendingIncoming? |
number |
The maximum number of incoming connections that can be pending at the same time. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L54 |
maxPendingOutgoing? |
number |
The maximum number of outgoing connections that can be pending at the same time. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L56 |
Duration
Section titled “Duration”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L150
A duration definition.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
nanos |
number |
The 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) | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L154 |
secs |
number |
The number of whole seconds contained by this Duration. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L152 |
NetworkConfig
Section titled “NetworkConfig”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L130
The configuration of the Stronghold peer-to-peer network.
These definitions mirror the networking options of IOTA Stronghold. The plugin does not currently expose a command that consumes them, so they are only useful as type definitions.
Properties
Section titled “Properties”PeerAddress
Section titled “PeerAddress”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L71
The addresses on which a remote peer can be reached. See NetworkConfig for a note on how these definitions are used.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
known |
string[] |
The addresses that are known for the peer, in the multiaddr format. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L73 |
use_relay_fallback |
boolean |
Whether the peer may be reached through a relay when its known addresses cannot be used. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L75 |
Permissions
Section titled “Permissions”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L116
The access a remote peer is granted on the clients of a snapshot. See NetworkConfig for a note on how these definitions are used.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
default? |
ClientAccess |
The access granted when no exception matches. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L118 |
exceptions? |
Map<VaultPath, ClientAccess> |
The access granted for specific paths, overriding Permissions.default. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L120 |
Type Aliases
Section titled “Type Aliases”ClientPath
Section titled “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#L17
The name of a Stronghold client, either as a UTF-8 string or as its raw byte representation.
RecordPath
Section titled “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#L33
The path of a record inside a vault, either as a UTF-8 string or as its raw byte representation.
StoreKey
Section titled “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#L42
The key of a record in a client store. Note that the store commands read the key as a string on the Rust side, so string keys are the safe choice.
VaultPath
Section titled “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#L25
The path of a vault inside a client, either as a UTF-8 string or as its raw byte representation.
© 2026 Tauri Contributors. CC-BY / MIT