@dotrino/identity 0.128.1 → 0.129.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotrino/identity",
3
- "version": "0.128.1",
3
+ "version": "0.129.0",
4
4
  "description": "Identidad y rating de usuarios compartidos entre apps de Dotrino (vault iframe + postMessage)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.d.ts CHANGED
@@ -196,7 +196,7 @@ export class Identity {
196
196
  /** El perfil ACTIVO de este aparato (el que usan las apps; `@dotrino/store` se ata a él). */
197
197
  currentProfile (): Promise<{ id: string; name?: string; pubkey?: string } | null>
198
198
  /** Los perfiles de este aparato. */
199
- listProfiles (): Promise<Array<{ id: string; name?: string; pubkey?: string; current?: boolean; avatar?: string }>>
199
+ listProfiles (): Promise<Array<{ id: string; name?: string; pubkey?: string; current?: boolean; avatar?: string; vault?: boolean; approve?: boolean; vaults?: Array<{ comm: string; master: string; id: string; label: string }> }>>
200
200
  /** Cambia el perfil activo (la app recarga: no es reactivo). */
201
201
  switchProfile (id: string): Promise<any>
202
202
  /** Cifra con la llave de la CUENTA: el sobre lleva la marca `t: 'dotrino-cek'` y lo abren todos los aparatos del acta. */
package/vault/core.js CHANGED
@@ -2389,7 +2389,22 @@ export async function createIdentityCore ({ kv: hostKv, peers, makeSync = null,
2389
2389
  * hubieras subido— porque el avatar vive en el `me` de cada perfil, no en el registro.
2390
2390
  */
2391
2391
  async listProfiles () {
2392
- return loadProfiles().map((p) => {
2392
+ // LAS BÓVEDAS DE CADA PERFIL, para que una pantalla deje elegir a cuál hablarle antes de
2393
+ // nada, aunque sea de otro perfil (vault.dotrino.com/vault, dueño 2026-10-26). Salen del
2394
+ // ACTA de cada uno, que está en claro en el kv igual que el cert de abajo: es un documento
2395
+ // firmado y no un secreto. Solo lectura: no se cambia el activo ni se firma nada.
2396
+ const vaultsOf = async (pid) => {
2397
+ try {
2398
+ const raw = pid === currentPid ? kv.getItem(ACTA_STORAGE) : rawKv.getItem(`dotrino.identity.p.${pid}.acta`)
2399
+ const acta = raw ? JSON.parse(raw) : null
2400
+ const members = acta?.members || []
2401
+ return await Promise.all(members.filter((m) => m.cn === Acta.VAULT_CN && m.vault).map(async (m) => {
2402
+ const owner = members.find((x) => x.pub === m.vault)
2403
+ return { comm: m.pub, master: m.vault, id: await Acta.memberId(m.vault), label: owner?.label || '' }
2404
+ }))
2405
+ } catch (_) { return [] }
2406
+ }
2407
+ return Promise.all(loadProfiles().map(async (p) => {
2393
2408
  let avatar = null
2394
2409
  try {
2395
2410
  const raw = p.id === currentPid ? JSON.stringify(me || null) : rawKv.getItem(`dotrino.identity.p.${p.id}.me`)
@@ -2418,10 +2433,10 @@ export async function createIdentityCore ({ kv: hostKv, peers, makeSync = null,
2418
2433
  const login = loginMetaOf(p.id)
2419
2434
  return {
2420
2435
  id: p.id, name: p.name || '', pubkey: p.pubkey || null, avatar, current: p.id === currentPid,
2421
- pendingJoin: !!p.pendingJoin, vault, approve,
2436
+ pendingJoin: !!p.pendingJoin, vault, approve, vaults: await vaultsOf(p.id),
2422
2437
  ...(login ? { login: { user: login.user, address: login.address, volatile: !!login.volatile } } : {})
2423
2438
  }
2424
- })
2439
+ }))
2425
2440
  },
2426
2441
  async currentProfile () {
2427
2442
  const e = loadProfiles().find((p) => p.id === currentPid) || {}
@@ -1,3 +1,3 @@
1
- Copia vendorizada de @dotrino/roadmap@0.4.71 (dotrino-roadmap/src/{index,manifests}.js).
1
+ Copia vendorizada de @dotrino/roadmap@0.4.74 (dotrino-roadmap/src/{index,manifests}.js).
2
2
  NO se edita a mano: la escribe `node vendor.mjs` y la vigila test/vendor-up-to-date.test.mjs.
3
3
  El registro de versiones rotas que viaja con cada versión. Importa @dotrino/compat/ranges.
@@ -22,16 +22,16 @@ export const MANIFESTS = Object.freeze({
22
22
  "env": {
23
23
  "repo": "imdotrino/dotrino-vault",
24
24
  "npm": "@dotrino/env",
25
- "current": "0.93.1",
25
+ "current": "0.105.0",
26
26
  "protocol": 1,
27
27
  "requires": {
28
- "vault": ">=0.93.0"
28
+ "vault": ">=0.105.0"
29
29
  }
30
30
  },
31
31
  "identity": {
32
32
  "repo": "imdotrino/dotrino-identity",
33
33
  "npm": "@dotrino/identity",
34
- "current": "0.127.1",
34
+ "current": "0.128.1",
35
35
  "protocol": 1,
36
36
  "requires": {
37
37
  "proxy-client": ">=0.13.1"
@@ -269,12 +269,12 @@ export const MANIFESTS = Object.freeze({
269
269
  "vault": {
270
270
  "repo": "imdotrino/dotrino-vault",
271
271
  "npm": "@dotrino/vault",
272
- "current": "0.104.0",
272
+ "current": "0.105.0",
273
273
  "protocol": 1,
274
274
  "requires": {
275
275
  "vaultd": ">=0.105.0",
276
276
  "proxy-client": ">=0.44.1",
277
- "identity": ">=0.127.0",
277
+ "identity": ">=0.128.0",
278
278
  "opaque": ">=0.1.0",
279
279
  "compat": ">=0.4.0",
280
280
  "roadmap": ">=0.4.26",
@@ -285,10 +285,10 @@ export const MANIFESTS = Object.freeze({
285
285
  "vaultd": {
286
286
  "repo": "imdotrino/dotrino-vault",
287
287
  "npm": "@dotrino/vaultd",
288
- "current": "0.176.1",
288
+ "current": "0.178.0",
289
289
  "protocol": 1,
290
290
  "requires": {
291
- "identity": ">=0.127.0",
291
+ "identity": ">=0.128.0",
292
292
  "proxy-client": ">=0.44.1",
293
293
  "store": ">=0.11.0",
294
294
  "passmanager": ">=0.18.6",
@@ -338,12 +338,12 @@ export const MANIFESTS = Object.freeze({
338
338
  },
339
339
  "passmanager-extension": {
340
340
  "repo": "imdotrino/dotrino-passmanager",
341
- "current": "0.58.0",
341
+ "current": "0.58.1",
342
342
  "protocol": 1,
343
343
  "requires": {
344
- "identity": ">=0.118.0",
344
+ "identity": ">=0.128.0",
345
345
  "proxy-client": ">=0.36.1",
346
- "vault": ">=0.90.0",
346
+ "vault": ">=0.105.0",
347
347
  "proxy": "1.1.0+",
348
348
  "vaultd": ">=0.160.2"
349
349
  }
@@ -360,7 +360,7 @@ export const MANIFESTS = Object.freeze({
360
360
  },
361
361
  "app-ios": {
362
362
  "repo": "imdotrino/dotrino-app",
363
- "current": "0.4.17",
363
+ "current": "0.4.19",
364
364
  "protocol": 1,
365
365
  "requires": {
366
366
  "proxy": "1.6.0+",