Skip to content
Tauri 中文网

@tauri-apps/plugin-stronghold

Classes

Client

Constructors

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

Client

Source: undefined

Properties

PropertyTypeDefined in
nameClientPathSource: undefined
pathstringSource: undefined

Methods

getStore()
getStore(): Store
Returns

Store

Source: undefined

getVault()
getVault(name): Vault

Get a vault by name.

Parameters
ParameterTypeDescription
nameVaultPath
Returns

Vault

Source: undefined


Location

Constructors

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

Location

Source: undefined

Properties

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

Methods

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

Location

Source: undefined

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

Location

Source: undefined


Store

Constructors

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

Store

Source: undefined

Properties

PropertyTypeDefined in
clientClientPathSource: undefined
pathstringSource: undefined

Methods

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

Promise<null | Uint8Array<ArrayBufferLike>>

Source: undefined

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

Promise<void>

Source: undefined

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

Promise<null | Uint8Array<ArrayBufferLike>>

Source: undefined


Stronghold

A representation of an access to a stronghold.

Properties

PropertyTypeDefined in
pathstringSource: undefined

Methods

createClient()
createClient(client): Promise<Client>
Parameters
ParameterType
clientClientPath
Returns

Promise<Client>

Source: undefined

loadClient()
loadClient(client): Promise<Client>
Parameters
ParameterType
clientClientPath
Returns

Promise<Client>

Source: undefined

save()
save(): Promise<void>

Persists the stronghold state to the snapshot.

Returns

Promise<void>

Source: undefined

unload()
unload(): Promise<void>

Remove this instance from the cache.

Returns

Promise<void>

Source: undefined

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: undefined


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: undefined

Properties

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

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: undefined

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: undefined

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: undefined

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: undefined

insert()
insert(recordPath, secret): Promise<void>

Insert a record to this vault.

Parameters
ParameterType
recordPathRecordPath
secretnumber[]
Returns

Promise<void>

Source: undefined

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: undefined

remove()
remove(location): Promise<void>

Remove a record from the vault.

Parameters
ParameterTypeDescription
locationLocationThe record location.
Returns

Promise<void>

Source: undefined

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: undefined

Interfaces

AddressInfo

Properties

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

ClientAccess

Properties

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

ConnectionLimits

Properties

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

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

NetworkConfig

Properties

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

PeerAddress

Properties

PropertyTypeDefined in
knownstring[]Source: undefined
use_relay_fallbackbooleanSource: undefined

Permissions

Properties

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

Type Aliases

ClientPath

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

Source: undefined


RecordPath

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

Source: undefined


StoreKey

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

Source: undefined


VaultPath

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

Source: undefined


Tauri 中文网 - 粤ICP备13048890号