@dotrino/identity 0.107.1 → 0.107.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +12 -0
- package/src/index.js +1 -0
- package/vault/vault.js +4 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -188,6 +188,18 @@ export class Identity {
|
|
|
188
188
|
canApproveVault (): Promise<boolean>
|
|
189
189
|
getVaultCert (): Promise<any>
|
|
190
190
|
onVault (handler: (payload: any) => void): () => void
|
|
191
|
+
/** El perfil ACTIVO de este aparato (el que usan las apps; `@dotrino/store` se ata a él). */
|
|
192
|
+
currentProfile (): Promise<{ id: string; name?: string; pubkey?: string } | null>
|
|
193
|
+
/** Los perfiles de este aparato. */
|
|
194
|
+
listProfiles (): Promise<Array<{ id: string; name?: string; pubkey?: string; current?: boolean; avatar?: string }>>
|
|
195
|
+
/** Cambia el perfil activo (la app recarga: no es reactivo). */
|
|
196
|
+
switchProfile (id: string): Promise<any>
|
|
197
|
+
/** Cifra con la llave de la CUENTA: el sobre lleva la marca `t: 'dotrino-cek'` y lo abren todos los aparatos del acta. */
|
|
198
|
+
sealContent (plaintext: string): Promise<{ t: 'dotrino-cek'; gen: number; iv: string; ct: string }>
|
|
199
|
+
/** Abre un sobre de la cuenta (cualquier generación que este aparato tenga). */
|
|
200
|
+
openContent (envelope: { gen: number; iv: string; ct: string; t?: string }): Promise<string>
|
|
201
|
+
/** Mi copia de la llave de la cuenta vigente, o null si todavía no me la han envuelto. */
|
|
202
|
+
contentKey (): Promise<{ gen: number; cek: string } | null>
|
|
191
203
|
// self-vault (este dispositivo ES el vault, daemon dentro del iframe)
|
|
192
204
|
selfVaultStatus (): Promise<{ enabled: boolean; running: boolean }>
|
|
193
205
|
setSelfVault (enabled: boolean): Promise<{ ok: true; enabled: boolean }>
|
package/src/index.js
CHANGED
package/vault/vault.js
CHANGED
|
@@ -540,7 +540,10 @@ import { useBackend as usePeerBackend } from './peerStore.js'
|
|
|
540
540
|
reply({
|
|
541
541
|
error: e?.message || String(e),
|
|
542
542
|
...(e?.code ? { code: e.code } : {}),
|
|
543
|
-
...(e?.detail ? { detail: e.detail } : {})
|
|
543
|
+
...(e?.detail ? { detail: e.detail } : {}),
|
|
544
|
+
// El MOTIVO de un rechazo de la bóveda (`expired`, `revoked`, `acta`…): sin él, «la
|
|
545
|
+
// bóveda te rechaza» no dice si hay que volver a enlazar o esperar.
|
|
546
|
+
...(e?.reason ? { reason: e.reason } : {})
|
|
544
547
|
})
|
|
545
548
|
}
|
|
546
549
|
})
|