Skip to content

@tauri-apps/plugin-stronghold

new Client(path, name): Client
Parameter Type
path string
name ClientPath

Client

Source: undefined

Property Type Defined in
name ClientPath Source: undefined
path string Source: undefined

getStore(): Store

Store

Source: undefined

getVault(name): Vault

Get a vault by name.

Parameter Type Description
name VaultPath

Vault

Source: undefined


new Location(type, payload): Location
Parameter Type
type string
payload Record<string, unknown>

Location

Source: undefined

Property Type Defined in
payload Record<string, unknown> Source: undefined
type string Source: undefined

static counter(vault, counter): Location
Parameter Type
vault VaultPath
counter number

Location

Source: undefined

static generic(vault, record): Location
Parameter Type
vault VaultPath
record RecordPath

Location

Source: undefined


new Store(path, client): Store
Parameter Type
path string
client ClientPath

Store

Source: undefined

Property Type Defined in
client ClientPath Source: undefined
path string Source: undefined

get(key): Promise<null | Uint8Array<ArrayBufferLike>>
Parameter Type
key StoreKey

Promise<null | Uint8Array<ArrayBufferLike>>

Source: undefined

insert(
key,
value,
lifetime?): Promise<void>
Parameter Type
key StoreKey
value number[]
lifetime? Duration

Promise<void>

Source: undefined

remove(key): Promise<null | Uint8Array<ArrayBufferLike>>
Parameter Type
key StoreKey

Promise<null | Uint8Array<ArrayBufferLike>>

Source: undefined


A representation of an access to a stronghold.

Property Type Defined in
path string Source: undefined

createClient(client): Promise<Client>
Parameter Type
client ClientPath

Promise<Client>

Source: undefined

loadClient(client): Promise<Client>
Parameter Type
client ClientPath

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.

Parameter Type Description
path string -
password string

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
Parameter Type
path string
client ClientPath
name VaultPath

Vault

ProcedureExecutor.constructor

Source: undefined

Property Type Description Inherited from Defined in
client ClientPath - - Source: undefined
name VaultPath The vault name. - Source: undefined
path string The vault path. - Source: undefined
procedureArgs Record<string, unknown> - ProcedureExecutor.procedureArgs Source: undefined

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

Derive a SLIP10 private key using a seed or key.

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.

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.deriveSLIP10

Source: undefined

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

Generate a BIP39 seed.

Parameter Type Description
outputLocation Location The location of the record where the BIP39 seed will be stored.
passphrase? string The optional mnemonic passphrase.

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.generateBIP39

Source: undefined

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

Generate a SLIP10 seed for the given location.

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.

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.generateSLIP10Seed

Source: undefined

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

Gets the Ed25519 public key of a SLIP10 private key.

Parameter Type Description
privateKeyLocation Location The location of the private key. Must be the outputLocation of a previous call to deriveSLIP10.

Promise<Uint8Array<ArrayBufferLike>>

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.

Parameter Type
recordPath RecordPath
secret number[]

Promise<void>

Source: undefined

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

Store a BIP39 mnemonic.

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.

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.recoverBIP39

Source: undefined

remove(location): Promise<void>

Remove a record from the vault.

Parameter Type Description
location Location The record location.

Promise<void>

Source: undefined

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

Creates a Ed25519 signature from a private key.

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.

Promise<Uint8Array<ArrayBufferLike>>

A promise resolving to the signature hex string.

2.0.0

ProcedureExecutor.signEd25519

Source: undefined

Property Type Defined in
peers Map<string, PeerAddress> Source: undefined
relays string[] Source: undefined

Property Type Defined in
cloneVaultDefault? boolean Source: undefined
cloneVaultExceptions? Map<VaultPath, boolean> Source: undefined
readStore? boolean Source: undefined
useVaultDefault? boolean Source: undefined
useVaultExceptions? Map<VaultPath, boolean> Source: undefined
writeStore? boolean Source: undefined
writeVaultDefault? boolean Source: undefined
writeVaultExceptions? Map<VaultPath, boolean> Source: undefined

Property Type Defined in
maxEstablishedIncoming? number Source: undefined
maxEstablishedOutgoing? number Source: undefined
maxEstablishedPerPeer? number Source: undefined
maxEstablishedTotal? number Source: undefined
maxPendingIncoming? number Source: undefined
maxPendingOutgoing? number Source: undefined

A duration definition.

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

Property Type Defined in
addresses? AddressInfo Source: undefined
connectionTimeout? Duration Source: undefined
connectionsLimit? ConnectionLimits Source: undefined
enableMdns? boolean Source: undefined
enableRelay? boolean Source: undefined
peerPermissions? Map<string, Permissions> Source: undefined
permissionsDefault? Permissions Source: undefined
requestTimeout? Duration Source: undefined

Property Type Defined in
known string[] Source: undefined
use_relay_fallback boolean Source: undefined

Property Type Defined in
default? ClientAccess Source: 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 中文网 - 粤ICP备13048890号
Nodejs.cn 旗下网站