@tauri-apps/plugin-stronghold
Classes
Client
Constructors
new Client()
Parameters
Parameter | Type |
---|---|
path | string |
name | ClientPath |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L275
Properties
Property | Type |
---|---|
name | BytesDto |
path | string |
Methods
getStore()
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L290
getVault()
Get a vault by name.
Parameters
Parameter | Type | Description |
---|---|---|
name | VaultPath |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L286
Location
Constructors
new Location()
Parameters
Parameter | Type |
---|---|
type | string |
payload | Record <string , unknown > |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L96
Properties
Property | Type |
---|---|
payload | Record <string , unknown > |
type | string |
Methods
counter()
Parameters
Parameter | Type |
---|---|
vault | VaultPath |
counter | number |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L108
generic()
Parameters
Parameter | Type |
---|---|
vault | VaultPath |
record | RecordPath |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L101
Store
Constructors
new Store()
Parameters
Parameter | Type |
---|---|
path | string |
client | BytesDto |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L299
Properties
Property | Type |
---|---|
client | BytesDto |
path | string |
Methods
get()
Parameters
Parameter | Type |
---|---|
key | StoreKey |
Returns
Promise
<null
| Uint8Array
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L304
insert()
Parameters
Parameter | Type |
---|---|
key | StoreKey |
value | number [] |
lifetime ? | Duration |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L312
remove()
Parameters
Parameter | Type |
---|---|
key | StoreKey |
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()
Initializes a stronghold.
If the snapshot path located at path
exists, the password must match.
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L406
Properties
Property | Type |
---|---|
path | string |
Methods
createClient()
Parameters
Parameter | Type |
---|---|
client | ClientPath |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L438
loadClient()
Parameters
Parameter | Type |
---|---|
client | ClientPath |
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L431
save()
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()
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()
Load the snapshot if it exists (password must match), or start a fresh stronghold instance otherwise.
Parameters
Parameter | Type | Description |
---|---|---|
path | string | - |
password | string |
Returns
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()
Parameters
Parameter | Type |
---|---|
path | string |
client | ClientPath |
name | VaultPath |
Returns
Overrides
ProcedureExecutor.constructor
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L350
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
client | BytesDto | - | - |
name | BytesDto | The vault name. | - |
path | string | The vault path. | - |
procedureArgs | Record <string , unknown > | - | ProcedureExecutor.procedureArgs |
Methods
deriveSLIP10()
Derive a SLIP10 private key using a seed or key.
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
Inherited from
ProcedureExecutor.deriveSLIP10
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L155
generateBIP39()
Generate a BIP39 seed.
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
Inherited from
ProcedureExecutor.generateBIP39
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L210
generateSLIP10Seed()
Generate a SLIP10 seed for the given location.
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
Inherited from
ProcedureExecutor.generateSLIP10Seed
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L130
getEd25519PublicKey()
Gets the Ed25519 public key of a SLIP10 private key.
Parameters
Parameter | Type | Description |
---|---|---|
privateKeyLocation | Location | The location of the private key. Must be the outputLocation of a previous call to deriveSLIP10 . |
Returns
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 a record to this vault.
Parameters
Parameter | Type |
---|---|
recordPath | RecordPath |
secret | number [] |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L368
recoverBIP39()
Store a BIP39 mnemonic.
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
Inherited from
ProcedureExecutor.recoverBIP39
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L185
remove()
Remove a record from the vault.
Parameters
Parameter | Type | Description |
---|---|---|
location | Location | The record location. |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L384
signEd25519()
Creates a Ed25519 signature from a private key.
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
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
Property | Type |
---|---|
peers | Map <string , PeerAddress > |
relays | string [] |
ClientAccess
Properties
Property | Type |
---|---|
cloneVaultDefault? | boolean |
cloneVaultExceptions? | Map <VaultPath , boolean > |
readStore? | boolean |
useVaultDefault? | boolean |
useVaultExceptions? | Map <VaultPath , boolean > |
writeStore? | boolean |
writeVaultDefault? | boolean |
writeVaultExceptions? | Map <VaultPath , boolean > |
ConnectionLimits
Properties
Property | Type |
---|---|
maxEstablishedIncoming? | number |
maxEstablishedOutgoing? | number |
maxEstablishedPerPeer? | number |
maxEstablishedTotal? | number |
maxPendingIncoming? | number |
maxPendingOutgoing? | number |
Duration
A duration definition.
Properties
NetworkConfig
Properties
Property | Type |
---|---|
addresses? | AddressInfo |
connectionTimeout? | Duration |
connectionsLimit? | ConnectionLimits |
enableMdns? | boolean |
enableRelay? | boolean |
peerPermissions? | Map <string , Permissions > |
permissionsDefault? | Permissions |
requestTimeout? | Duration |
PeerAddress
Properties
Property | Type |
---|---|
known | string [] |
use_relay_fallback | boolean |
Permissions
Properties
Property | Type |
---|---|
default? | ClientAccess |
exceptions? | Map <VaultPath , ClientAccess > |
Type Aliases
ClientPath
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L8
RecordPath
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L18
StoreKey
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L23
VaultPath
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L13
© 2024 Tauri Contributors. CC-BY / MIT