跳到内容
Tauri

@tauri-apps/plugin-stronghold

new Client(path, name): Client
参数类型
pathstring
名称 (name)ClientPath

Client

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L265

属性类型定义于
nameClientPath来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L263
pathstring来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L262

getStore(): Store

存储 (Store)

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

getVault(name): Vault

根据名称获取库(vault)。

参数类型描述
名称 (name)VaultPath

Vault

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L276


new Location(type, payload): Location
参数类型
typestring
载荷 (payload)Record<string, unknown>

Location

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L86

属性类型定义于
payloadRecord<string, unknown>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L84
typestring来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L83

static counter(vault, counter): Location
参数类型
vaultVaultPath
counter数字

Location

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L98

static generic(vault, record): Location
参数类型
vaultVaultPath
recordRecordPath

Location

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L91


new Store(path, client): Store
参数类型
pathstring
clientClientPath

存储 (Store)

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

属性类型定义于
clientClientPath来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L287
pathstring来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L286

get(key): Promise<null | Uint8Array<ArrayBufferLike>>
参数类型
keyStoreKey

Promise<null | Uint8Array<ArrayBufferLike>>

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

insert(
key,
value,
lifetime?): Promise<void>
参数类型
keyStoreKey
value数字[]
lifetime?Duration

Promise<void>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L302

remove(key): Promise<null | Uint8Array<ArrayBufferLike>>
参数类型
keyStoreKey

Promise<null | Uint8Array<ArrayBufferLike>>

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


对 Stronghold 的访问的表现形式。

属性类型定义于
pathstring来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L388

createClient(client): Promise<Client>
参数类型
clientClientPath

Promise<Client>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L428

loadClient(client): Promise<Client>
参数类型
clientClientPath

Promise<Client>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L421

save(): Promise<void>

将 Stronghold 状态持久化到快照中。

Promise<void>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L439

unload(): Promise<void>

从缓存中移除此实例。

Promise<void>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L415

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

加载快照(如果存在,则密码必须匹配),否则启动一个新的 Stronghold 实例。

参数类型描述
pathstring-
passwordstring

Promise<Stronghold>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L405


一种键值存储,允许进行创建、更新和删除操作。它不允许直接读取数据,因此必须使用相关程序来操作存储的数据,从而实现对机密的安全存储。

  • ProcedureExecutor

new Vault(
path,
client,
name): Vault
参数类型
pathstring
clientClientPath
名称 (name)VaultPath

Vault

ProcedureExecutor.constructor

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L340

属性类型描述继承自 (Inherited from)定义于
clientClientPath--来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L336
nameVaultPath库(vault)名称。-来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L338
pathstring库(vault)路径。-来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L335
procedureArgsRecord<string, unknown>-ProcedureExecutor.procedureArgs来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L107

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

使用种子或密钥派生 SLIP10 私钥。

参数类型描述
chain数字[]链路径。
source"Seed" | "Key"源类型,可以是“Seed”或“Key”。
sourceLocationLocation源位置,必须是之前调用 generateSLIP10SeedderiveSLIP10 时的 outputLocation
outputLocationLocation存储私钥的记录位置。

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.deriveSLIP10

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

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

生成一个 BIP39 种子。

参数类型描述
outputLocationLocation存储 BIP39 种子的记录位置。
passphrase?string可选的助记词密码。

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.generateBIP39

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

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

为指定位置生成一个 SLIP10 种子。

参数类型描述
outputLocationLocation存储种子的记录位置。
sizeBytes?数字SLIP10 种子的大小(字节)。

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.generateSLIP10Seed

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

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

获取 SLIP10 私钥的 Ed25519 公钥。

参数类型描述
privateKeyLocationLocation私钥位置。必须是之前调用 deriveSLIP10 时的 outputLocation

Promise<Uint8Array<ArrayBufferLike>>

一个解析为公钥十六进制字符串的 Promise。

2.0.0

ProcedureExecutor.getEd25519PublicKey

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

insert(recordPath, secret): Promise<void>

向此库插入一条记录。

参数类型
recordPathRecordPath
secret数字[]

Promise<void>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L358

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

存储 BIP39 助记词。

参数类型描述
mnemonicstring助记词字符串。
outputLocationLocation存储 BIP39 助记词的记录位置。
passphrase?string可选的助记词密码。

Promise<Uint8Array<ArrayBufferLike>>

ProcedureExecutor.recoverBIP39

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

remove(location): Promise<void>

从库中移除记录。

参数类型描述
locationLocation记录位置。

Promise<void>

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L374

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

使用私钥创建 Ed25519 签名。

参数类型描述
privateKeyLocationLocation存储私钥的记录位置。必须是之前调用 deriveSLIP10 时的 outputLocation
msgstring要签名的消息。

Promise<Uint8Array<ArrayBufferLike>>

一个解析为签名十六进制字符串的 Promise。

2.0.0

ProcedureExecutor.signEd25519

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

属性类型定义于
peersMap<string, PeerAddress>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L43
relaysstring[]来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L44

属性类型定义于
cloneVaultDefault?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L52
cloneVaultExceptions?Map<VaultPath, boolean>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L53
readStore?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L54
useVaultDefault?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L48
useVaultExceptions?Map<VaultPath, boolean>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L49
writeStore?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L55
writeVaultDefault?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L50
writeVaultExceptions?Map<VaultPath, boolean>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L51

属性类型定义于
maxEstablishedIncoming?数字来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L31
maxEstablishedOutgoing?数字来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L32
maxEstablishedPerPeer?数字来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L33
maxEstablishedTotal?数字来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L34
maxPendingIncoming?数字来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L29
maxPendingOutgoing?数字来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L30

时长定义。

属性类型描述定义于
nanos数字此持续时间的分数部分,以纳秒为单位。必须大于或等于 0 且小于 1e+9(一秒钟内包含的最大纳秒数)。来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L79
secs数字此持续时间包含的整秒数。来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L77

属性类型定义于
addresses?AddressInfo来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L69
connectionTimeout?Duration来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L65
connectionsLimit?ConnectionLimits来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L66
enableMdns?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L67
enableRelay?布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L68
peerPermissions?Map<string, Permissions>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L70
permissionsDefault?Permissions来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L71
requestTimeout?Duration来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L64

属性类型定义于
knownstring[]来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L38
use_relay_fallback布尔值 (boolean)来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L39

属性类型定义于
default?ClientAccess来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L59
exceptions?Map<VaultPath, ClientAccess>来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L60

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

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L7


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

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L17


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

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L22


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

来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/stronghold/guest-js/index.ts#L12


© 2026 Tauri 贡献者。CC-BY / MIT