@dotrino/identity 0.121.6 → 0.121.7

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.121.6",
3
+ "version": "0.121.7",
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/vault/acta.js CHANGED
@@ -467,7 +467,7 @@ export function genesisActa ({ pub, encPub = null, sealPub = null, label = '', c
467
467
 
468
468
  /** Comprobaciones de FORMA (sin cripto): que el acta sea un acta. */
469
469
  export function checkShape (acta) {
470
- if (!acta || typeof acta !== 'object') return 'no-acta'
470
+ if (!acta || typeof acta !== 'object') return 'no-record'
471
471
  if (!ACTA_LEIBLES.includes(acta.v)) return 'version'
472
472
  if (!isPub(acta.profileId) || !isPub(acta.sealedBy)) return 'shape'
473
473
  if (acta.chainUrl != null && !isChainUrl(acta.chainUrl)) return 'chainurl'
@@ -252,7 +252,7 @@ export async function verifyDelegation ({ cert, expectedScope, expectedSub, acta
252
252
  // Sin esos datos no se puede juzgar, y se dice en vez de contestar «vale» a solas:
253
253
  // devolver `ok` sin haber comprobado nada es exactamente cómo un papel viejo seguía
254
254
  // entrando.
255
- if (typeof actaSeq !== 'number' || !Array.isArray(sealers)) return { ok: false, reason: 'no-acta' }
255
+ if (typeof actaSeq !== 'number' || !Array.isArray(sealers)) return { ok: false, reason: 'no-record' }
256
256
  // SOLO SE RECHAZA EL PAPEL DEL FUTURO. Si el cert nombra un acta MÁS NUEVA que la que
257
257
  // tengo, no puedo juzgarlo: mi política está atrasada y decir que sí sería fiarme de algo
258
258
  // que no he visto. Al revés no: un papel viejo es normal —el aparato estuvo apagado— y lo
package/vault/core.js CHANGED
@@ -1140,7 +1140,7 @@ export async function createIdentityCore ({ kv: hostKv, peers, makeSync = null,
1140
1140
  // es suya: que la llave que se va a instalar SEA de esta cuenta. Sin ello, el navegador
1141
1141
  // se quedaría con una identidad que ningún acta reconoce — y sin forma de notarlo.
1142
1142
  const v = await Acta.verifyActa({ acta: entrada?.acta })
1143
- if (!v.ok) throw Object.assign(new Error('the account record does not verify: ' + v.reason), { code: 'bad-acta' })
1143
+ if (!v.ok) throw Object.assign(new Error('the account record does not verify: ' + v.reason), { code: 'bad-record' })
1144
1144
  if (!(entrada.acta.members || []).some((m) => m?.pub === entrada.publickey)) {
1145
1145
  throw Object.assign(new Error('that key is not a member of the account record'), { code: 'not-a-member' })
1146
1146
  }
@@ -1416,7 +1416,7 @@ export async function createIdentityCore ({ kv: hostKv, peers, makeSync = null,
1416
1416
  // Ya no hay ventana de caducidad: el papel no vence. Lo único que obliga a pedir uno
1417
1417
  // nuevo es que el ACTA diga algo distinto de lo que lleva escrito.
1418
1418
  /** Rechazos de la bóveda que se arreglan con un papel nuevo (el mismo juego que la app nativa). */
1419
- const PAPER_REASONS = new Set(['scope', 'stale-record', 'untrusted-issuer', 'expired', 'legacy-cert-retired', 'no-acta'])
1419
+ const PAPER_REASONS = new Set(['scope', 'stale-record', 'untrusted-issuer', 'expired', 'legacy-cert-retired', 'no-record'])
1420
1420
  const RENEW_RETRY_MS = 60 * 60 * 1000 // si falla (vault apagado), no insistir >1 vez/hora
1421
1421
  let renewLastTry = 0
1422
1422
  /**