Skip to content
Tauri 中文网

@tauri-apps/plugin-stronghold

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

Client

Source: undefined

PropertyTypeDefined in
nameClientPathSource: undefined
pathstringSource: undefined

getStore(): Store

Store

Source: undefined

getVault(name): Vault

Get a vault by name.

ParameterTypeDescription
nameVaultPath

Vault

Source: undefined


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

Location

Source: undefined

PropertyTypeDefined in
payloadRecord<string, unknown>Source: undefined
typestringSource: undefined

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

Location

Source: undefined

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

Location

Source: undefined


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

Store

Source: undefined

PropertyTypeDefined in
clientClientPathSource: undefined
pathstringSource: undefined

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

Promise<null | Uint8Array>

Source: undefined

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

Promise<void>

Source: undefined

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

Promise<null | Uint8Array>

Source: undefined


A representation of an access to a stronghold.

PropertyTypeDefined in
pathstringSource: undefined

createClient(client): Promise<Client>
ParameterType
clientClientPath

Promise<Client>

Source: undefined

loadClient(client): Promise<Client>
ParameterType
clientClientPath

Promise<Client>

Source: undefined

save(): Promise<void>

Persists the stronghold state to the snapshot.

Promise<void>

Source: undefined

unload(): Promise<void>

Remove this instance from the cache.

Promise<void>

Source: undefined

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

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

ParameterTypeDescription
pathstring-
passwordstring

Promise<Stronghold>

Source: undefined


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.

  • ProcedureExecutor

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

Vault

ProcedureExecutor.constructor

Source: undefined

PropertyTypeDescriptionInherited fromDefined in
clientClientPath--Source: undefined
nameVaultPathThe vault name.-Source: undefined
pathstringThe vault path.-Source: undefined
procedureArgsRecord<string, unknown>-ProcedureExecutor.procedureArgsSource: undefined

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

Derive a SLIP10 private key using a seed or key.

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.

Promise<Uint8Array>

ProcedureExecutor.deriveSLIP10

Source: undefined

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

Generate a BIP39 seed.

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

Promise<Uint8Array>

ProcedureExecutor.generateBIP39

Source: undefined

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

Generate a SLIP10 seed for the given location.

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

Promise<Uint8Array>

ProcedureExecutor.generateSLIP10Seed

Source: undefined

getEd25519PublicKey(privateKeyLocation): Promise<Uint8Array>

Gets the Ed25519 public key of a SLIP10 private key.

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

Promise<Uint8Array>

A promise resolving to the public key hex string.

2.0.0

ProcedureExecutor.getEd25519PublicKey

Source: undefined

insert(recordPath, secret): Promise<void>

Insert a record to this vault.

ParameterType
recordPathRecordPath
secretnumber[]

Promise<void>

Source: undefined

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

Store a BIP39 mnemonic.

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

Promise<Uint8Array>

ProcedureExecutor.recoverBIP39

Source: undefined

remove(location): Promise<void>

Remove a record from the vault.

ParameterTypeDescription
locationLocationThe record location.

Promise<void>

Source: undefined

signEd25519(privateKeyLocation, msg): Promise<Uint8Array>

Creates a Ed25519 signature from a private key.

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.

Promise<Uint8Array>

A promise resolving to the signature hex string.

2.0.0

ProcedureExecutor.signEd25519

Source: undefined

PropertyTypeDefined in
peersMap<string, PeerAddress>Source: undefined
relaysstring[]Source: undefined

PropertyTypeDefined in
cloneVaultDefault?booleanSource: undefined
cloneVaultExceptions?Map<VaultPath, boolean>Source: undefined
readStore?booleanSource: undefined
useVaultDefault?booleanSource: undefined
useVaultExceptions?Map<VaultPath, boolean>Source: undefined
writeStore?booleanSource: undefined
writeVaultDefault?booleanSource: undefined
writeVaultExceptions?Map<VaultPath, boolean>Source: undefined

PropertyTypeDefined in
maxEstablishedIncoming?numberSource: undefined
maxEstablishedOutgoing?numberSource: undefined
maxEstablishedPerPeer?numberSource: undefined
maxEstablishedTotal?numberSource: undefined
maxPendingIncoming?numberSource: undefined
maxPendingOutgoing?numberSource: undefined

A duration definition.

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: undefined
secsnumberThe number of whole seconds contained by this Duration.Source: undefined

PropertyTypeDefined in
addresses?AddressInfoSource: undefined
connectionTimeout?DurationSource: undefined
connectionsLimit?ConnectionLimitsSource: undefined
enableMdns?booleanSource: undefined
enableRelay?booleanSource: undefined
peerPermissions?Map<string, Permissions>Source: undefined
permissionsDefault?PermissionsSource: undefined
requestTimeout?DurationSource: undefined

PropertyTypeDefined in
knownstring[]Source: undefined
use_relay_fallbackbooleanSource: undefined

PropertyTypeDefined in
default?ClientAccessSource: undefined
exceptions?Map<VaultPath, ClientAccess>Source: undefined

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

Source: undefined


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

Source: undefined


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

Source: undefined


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

Source: undefined


Tauri v2.8 中文网 - 粤ICP备13048890号
Nodejs.cn 旗下网站