Aller au contenu
Tauri

@tauri-apps/plugin-stronghold

Ce contenu n’est pas encore disponible dans votre langue.

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#L265

Properties

PropertyTypeDefined in
nameClientPathSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L263
pathstringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L262

Methods

getStore()
getStore(): Store
Returns

Store

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

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#L276


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#L86

Properties

PropertyTypeDefined in
payloadRecord<string, unknown>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L84
typestringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L83

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#L98

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#L91


Store

Constructors

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

Store

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

Properties

PropertyTypeDefined in
clientClientPathSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L287
pathstringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L286

Methods

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

Promise<null | Uint8Array<ArrayBufferLike>>

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

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#L302

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

Promise<null | Uint8Array<ArrayBufferLike>>

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


Stronghold

A representation of an access to a stronghold.

Properties

PropertyTypeDefined in
pathstringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L388

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#L428

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#L421

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#L439

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#L415

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#L405


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#L340

Properties

PropertyTypeDescriptionInherited fromDefined in
clientClientPath--Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L336
nameVaultPathThe vault name.-Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L338
pathstringThe vault path.-Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L335
procedureArgsRecord<string, unknown>-ProcedureExecutor.procedureArgsSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L107

Methods

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

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<ArrayBufferLike>>

Inherited from

ProcedureExecutor.deriveSLIP10

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

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

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<ArrayBufferLike>>

Inherited from

ProcedureExecutor.generateBIP39

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

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

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<ArrayBufferLike>>

Inherited from

ProcedureExecutor.generateSLIP10Seed

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

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

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<ArrayBufferLike>>

A promise resolving to the public key hex string.

Since

2.0.0

Inherited from

ProcedureExecutor.getEd25519PublicKey

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

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#L358

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

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<ArrayBufferLike>>

Inherited from

ProcedureExecutor.recoverBIP39

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

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#L374

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

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<ArrayBufferLike>>

A promise resolving to the signature hex string.

Since

2.0.0

Inherited from

ProcedureExecutor.signEd25519

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

Interfaces

AddressInfo

Properties

PropertyTypeDefined in
peersMap<string, PeerAddress>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L43
relaysstring[]Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L44

ClientAccess

Properties

PropertyTypeDefined in
cloneVaultDefault?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L52
cloneVaultExceptions?Map<VaultPath, boolean>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L53
readStore?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L54
useVaultDefault?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L48
useVaultExceptions?Map<VaultPath, boolean>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L49
writeStore?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L55
writeVaultDefault?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L50
writeVaultExceptions?Map<VaultPath, boolean>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L51

ConnectionLimits

Properties

PropertyTypeDefined in
maxEstablishedIncoming?numberSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L31
maxEstablishedOutgoing?numberSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L32
maxEstablishedPerPeer?numberSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L33
maxEstablishedTotal?numberSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L34
maxPendingIncoming?numberSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L29
maxPendingOutgoing?numberSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L30

Duration

A duration definition.

Properties

PropertyTypeDescriptionDefined in
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)Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L79
secsnumberThe number of whole seconds contained by this Duration.Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L77

NetworkConfig

Properties

PropertyTypeDefined in
addresses?AddressInfoSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L69
connectionsLimit?ConnectionLimitsSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L66
connectionTimeout?DurationSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L65
enableMdns?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L67
enableRelay?booleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L68
peerPermissions?Map<string, Permissions>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L70
permissionsDefault?PermissionsSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L71
requestTimeout?DurationSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L64

PeerAddress

Properties

PropertyTypeDefined in
knownstring[]Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L38
use_relay_fallbackbooleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L39

Permissions

Properties

PropertyTypeDefined in
default?ClientAccessSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L59
exceptions?Map<VaultPath, ClientAccess>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L60

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#L7


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#L17


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#L22


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#L12


© 2024 Tauri Contributors. CC-BY / MIT