@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”Defined in: plugins/stronghold/guest-js/index.ts:386
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”new Client()
Section titled “new Client()”new Client(path: string, name: ClientPath): Client;Defined in: plugins/stronghold/guest-js/index.ts:406
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.
Example
Section titled “Example”import { Client } from '@tauri-apps/plugin-stronghold';const client = new Client('/path/to/snapshot.hold', 'my-client');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”Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
name |
ClientPath |
The name identifying this client inside the snapshot. | plugins/stronghold/guest-js/index.ts:390 |
path |
string |
The path of the snapshot file this client belongs to. | plugins/stronghold/guest-js/index.ts:388 |
Methods
Section titled “Methods”getStore()
Section titled “getStore()”getStore(): Store;Defined in: plugins/stronghold/guest-js/index.ts:443
Gets a handle to the key-value store of this 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.createClient('my-client');const store = client.getStore();Returns
Section titled “Returns”The store handle.
getVault()
Section titled “getVault()”getVault(name: VaultPath): Vault;Defined in: plugins/stronghold/guest-js/index.ts:426
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.
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');Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
VaultPath |
The path of the vault. |
Returns
Section titled “Returns”The vault handle.
Location
Section titled “Location”Defined in: plugins/stronghold/guest-js/index.ts:163
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”new Location()
Section titled “new Location()”new Location(type: string, payload: Record<string, unknown>): Location;Defined in: plugins/stronghold/guest-js/index.ts:182
Creates a location of the given kind. Prefer the Location.generic and Location.counter helpers, which fill the payload for you.
Example
Section titled “Example”import { Location } from '@tauri-apps/plugin-stronghold';const location = new Location('Generic', { vault: 'my-vault', record: 'my-record' });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”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. | plugins/stronghold/guest-js/index.ts:167 |
type |
string |
The location kind, either Generic or Counter. |
plugins/stronghold/guest-js/index.ts:165 |
Methods
Section titled “Methods”counter()
Section titled “counter()”static counter(vault: VaultPath, counter: number): Location;Defined in: plugins/stronghold/guest-js/index.ts:220
Creates a location addressing a record of a vault by a counter.
Example
Section titled “Example”import { Location } from '@tauri-apps/plugin-stronghold';const location = Location.counter('my-vault', 0);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.
generic()
Section titled “generic()”static generic(vault: VaultPath, record: RecordPath): Location;Defined in: plugins/stronghold/guest-js/index.ts:200
Creates a location addressing a record of a vault by its record path.
Example
Section titled “Example”import { Location } from '@tauri-apps/plugin-stronghold';const location = Location.generic('my-vault', 'my-record');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.
Defined in: plugins/stronghold/guest-js/index.ts:454
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”new Store()
Section titled “new Store()”new Store(path: string, client: ClientPath): Store;Defined in: plugins/stronghold/guest-js/index.ts:473
Creates a store handle for a client that was already loaded or created. Prefer Client.getStore.
Example
Section titled “Example”import { Store } from '@tauri-apps/plugin-stronghold';const store = new Store('/path/to/snapshot.hold', 'my-client');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”Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
client |
ClientPath |
The name of the client owning this store. | plugins/stronghold/guest-js/index.ts:458 |
path |
string |
The path of the snapshot file this store belongs to. | plugins/stronghold/guest-js/index.ts:456 |
Methods
Section titled “Methods”get(key: StoreKey): Promise< | Uint8Array| null>;Defined in: plugins/stronghold/guest-js/index.ts:492
Reads the value of a record of this store.
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');Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key |
StoreKey |
The key of the record. |
Returns
Section titled “Returns”Promise<
| Uint8Array
| null>
A promise resolving to the stored value, or null if the key does not exist.
insert()
Section titled “insert()”insert( key: StoreKey, value: number[], lifetime?: Duration): Promise<void>;Defined in: plugins/stronghold/guest-js/index.ts:518
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.
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();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”remove()
Section titled “remove()”remove(key: StoreKey): Promise< | Uint8Array| null>;Defined in: plugins/stronghold/guest-js/index.ts:546
Deletes a record from this store.
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');Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key |
StoreKey |
The key of the record. |
Returns
Section titled “Returns”Promise<
| Uint8Array
| null>
A promise resolving to the deleted value, or null if the key did not exist.
Stronghold
Section titled “Stronghold”Defined in: plugins/stronghold/guest-js/index.ts:656
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. | plugins/stronghold/guest-js/index.ts:658 |
Methods
Section titled “Methods”createClient()
Section titled “createClient()”createClient(client: ClientPath): Promise<Client>;Defined in: plugins/stronghold/guest-js/index.ts:744
Creates a new empty client on this stronghold.
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');}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.
loadClient()
Section titled “loadClient()”loadClient(client: ClientPath): Promise<Client>;Defined in: plugins/stronghold/guest-js/index.ts:719
Loads an existing client from the snapshot. The promise rejects if the client does not exist in the snapshot or was already loaded.
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');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.
save()
Section titled “save()”save(): Promise<void>;Defined in: plugins/stronghold/guest-js/index.ts:763
Persists the stronghold state to the snapshot.
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();Returns
Section titled “Returns”unload()
Section titled “unload()”unload(): Promise<void>;Defined in: plugins/stronghold/guest-js/index.ts:699
Saves the snapshot and removes this instance from the cache.
Example
Section titled “Example”import { Stronghold } from '@tauri-apps/plugin-stronghold';const stronghold = await Stronghold.load('/path/to/snapshot.hold', 'password');await stronghold.unload();Returns
Section titled “Returns”load()
Section titled “load()”static load(path: string, password: string): Promise<Stronghold>;Defined in: plugins/stronghold/guest-js/index.ts:682
Load the snapshot if it exists (password must match), or start a fresh stronghold instance otherwise.
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');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.
Defined in: plugins/stronghold/guest-js/index.ts:565
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”new Vault()
Section titled “new Vault()”new Vault( path: string, client: ClientPath, name: VaultPath): Vault;Defined in: plugins/stronghold/guest-js/index.ts:587
Creates a vault handle for a client that was already loaded or created. Prefer Client.getVault.
Example
Section titled “Example”import { Vault } from '@tauri-apps/plugin-stronghold';const vault = new Vault('/path/to/snapshot.hold', 'my-client', 'my-vault');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”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. | - | plugins/stronghold/guest-js/index.ts:569 |
name |
VaultPath |
The path identifying this vault inside the client. | - | plugins/stronghold/guest-js/index.ts:571 |
path |
string |
The path of the snapshot file this vault belongs to. | - | plugins/stronghold/guest-js/index.ts:567 |
procedureArgs |
Record<string, unknown> |
- | ProcedureExecutor.procedureArgs |
plugins/stronghold/guest-js/index.ts:229 |
Methods
Section titled “Methods”deriveSLIP10()
Section titled “deriveSLIP10()”deriveSLIP10( chain: number[], source: "Seed" | "Key", sourceLocation: Location, outputLocation: Location): Promise<Uint8Array>;Defined in: plugins/stronghold/guest-js/index.ts:266
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”A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.deriveSLIP10generateBIP39()
Section titled “generateBIP39()”generateBIP39(outputLocation: Location, passphrase?: string): Promise<Uint8Array>;Defined in: plugins/stronghold/guest-js/index.ts:319
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”A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.generateBIP39generateSLIP10Seed()
Section titled “generateSLIP10Seed()”generateSLIP10Seed(outputLocation: Location, sizeBytes?: number): Promise<Uint8Array>;Defined in: plugins/stronghold/guest-js/index.ts:241
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”A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.generateSLIP10SeedgetEd25519PublicKey()
Section titled “getEd25519PublicKey()”getEd25519PublicKey(privateKeyLocation: Location): Promise<Uint8Array>;Defined in: plugins/stronghold/guest-js/index.ts:342
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”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: RecordPath, secret: number[]): Promise<void>;Defined in: plugins/stronghold/guest-js/index.ts:615
Writes a secret to this vault. Note that the snapshot is only persisted when Stronghold.save is called.
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();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”recoverBIP39()
Section titled “recoverBIP39()”recoverBIP39( mnemonic: string, outputLocation: Location, passphrase?: string): Promise<Uint8Array>;Defined in: plugins/stronghold/guest-js/index.ts:295
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”A promise resolving to the bytes returned by the procedure.
Inherited from
Section titled “Inherited from”ProcedureExecutor.recoverBIP39remove()
Section titled “remove()”remove(location: Location): Promise<void>;Defined in: plugins/stronghold/guest-js/index.ts:641
Deletes a secret from this vault. Only the record path of the given location is used, the vault is always this one.
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'));Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
location |
Location |
The location of the record to delete. |
Returns
Section titled “Returns”signEd25519()
Section titled “signEd25519()”signEd25519(privateKeyLocation: Location, msg: string): Promise<Uint8Array>;Defined in: plugins/stronghold/guest-js/index.ts:363
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”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”Defined in: plugins/stronghold/guest-js/index.ts:82
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. | plugins/stronghold/guest-js/index.ts:84 |
relays |
string[] |
The identifiers of the peers that can be used as relays. | plugins/stronghold/guest-js/index.ts:86 |
ClientAccess
Section titled “ClientAccess”Defined in: plugins/stronghold/guest-js/index.ts:93
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”| Property | Type | Description | Defined in |
|---|---|---|---|
cloneVaultDefault? |
boolean |
The default permission to clone the secrets of a vault. | plugins/stronghold/guest-js/index.ts:103 |
cloneVaultExceptions? |
Map<VaultPath, boolean> |
Per-vault overrides of ClientAccess.cloneVaultDefault. | plugins/stronghold/guest-js/index.ts:105 |
readStore? |
boolean |
Whether the store of the client can be read. | plugins/stronghold/guest-js/index.ts:107 |
useVaultDefault? |
boolean |
The default permission to use the secrets stored in a vault. | plugins/stronghold/guest-js/index.ts:95 |
useVaultExceptions? |
Map<VaultPath, boolean> |
Per-vault overrides of ClientAccess.useVaultDefault. | plugins/stronghold/guest-js/index.ts:97 |
writeStore? |
boolean |
Whether the store of the client can be written to. | plugins/stronghold/guest-js/index.ts:109 |
writeVaultDefault? |
boolean |
The default permission to write secrets to a vault. | plugins/stronghold/guest-js/index.ts:99 |
writeVaultExceptions? |
Map<VaultPath, boolean> |
Per-vault overrides of ClientAccess.writeVaultDefault. | plugins/stronghold/guest-js/index.ts:101 |
ConnectionLimits
Section titled “ConnectionLimits”Defined in: plugins/stronghold/guest-js/index.ts:52
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. | plugins/stronghold/guest-js/index.ts:58 |
maxEstablishedOutgoing? |
number |
The maximum number of established outgoing connections. | plugins/stronghold/guest-js/index.ts:60 |
maxEstablishedPerPeer? |
number |
The maximum number of established connections per peer. | plugins/stronghold/guest-js/index.ts:62 |
maxEstablishedTotal? |
number |
The maximum number of established connections, incoming and outgoing combined. | plugins/stronghold/guest-js/index.ts:64 |
maxPendingIncoming? |
number |
The maximum number of incoming connections that can be pending at the same time. | plugins/stronghold/guest-js/index.ts:54 |
maxPendingOutgoing? |
number |
The maximum number of outgoing connections that can be pending at the same time. | plugins/stronghold/guest-js/index.ts:56 |
Duration
Section titled “Duration”Defined in: plugins/stronghold/guest-js/index.ts:150
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) | plugins/stronghold/guest-js/index.ts:154 |
secs |
number |
The number of whole seconds contained by this Duration. | plugins/stronghold/guest-js/index.ts:152 |
NetworkConfig
Section titled “NetworkConfig”Defined in: plugins/stronghold/guest-js/index.ts:130
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”| Property | Type | Description | Defined in |
|---|---|---|---|
addresses? |
AddressInfo |
The addresses of the known peers and of the available relays. | plugins/stronghold/guest-js/index.ts:142 |
connectionsLimit? |
ConnectionLimits |
The limits applied to pending and established connections. | plugins/stronghold/guest-js/index.ts:136 |
connectionTimeout? |
Duration |
The maximum time to wait when establishing a connection to a peer. | plugins/stronghold/guest-js/index.ts:134 |
enableMdns? |
boolean |
Whether peers on the local network are discovered through mDNS. | plugins/stronghold/guest-js/index.ts:138 |
enableRelay? |
boolean |
Whether connections relayed by another peer are enabled. | plugins/stronghold/guest-js/index.ts:140 |
peerPermissions? |
Map<string, Permissions> |
The permissions granted to specific peers, keyed by the peer identifier. | plugins/stronghold/guest-js/index.ts:144 |
permissionsDefault? |
Permissions |
The permissions granted to the peers that have no entry in NetworkConfig.peerPermissions. | plugins/stronghold/guest-js/index.ts:146 |
requestTimeout? |
Duration |
The maximum time to wait for the response to an outbound request. | plugins/stronghold/guest-js/index.ts:132 |
PeerAddress
Section titled “PeerAddress”Defined in: plugins/stronghold/guest-js/index.ts:71
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. | plugins/stronghold/guest-js/index.ts:73 |
use_relay_fallback |
boolean |
Whether the peer may be reached through a relay when its known addresses cannot be used. | plugins/stronghold/guest-js/index.ts:75 |
Permissions
Section titled “Permissions”Defined in: plugins/stronghold/guest-js/index.ts:116
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. | plugins/stronghold/guest-js/index.ts:118 |
exceptions? |
Map<VaultPath, ClientAccess> |
The access granted for specific paths, overriding Permissions.default. | plugins/stronghold/guest-js/index.ts:120 |
Type Aliases
Section titled “Type Aliases”ClientPath
Section titled “ClientPath”type ClientPath = | string | Iterable<number> | ArrayLike<number> | ArrayBuffer;Defined in: plugins/stronghold/guest-js/index.ts:17
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;Defined in: plugins/stronghold/guest-js/index.ts:33
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;Defined in: plugins/stronghold/guest-js/index.ts:42
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;Defined in: plugins/stronghold/guest-js/index.ts:25
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