feat(trust): full Duniter web-of-trust membership (params + referents)

Slice 4 of Block 2. The pure rule was already parameterised; this adds the
policy, cold-start and UI around it.

- commons_core: WotParams (sigQty/stepMax/sigValidity, Duniter defaults) +
  WebOfTrust.membersWith; npubToHex helper (NIP-19 decode) for adding roots.
- WotSettings (keystore): the active parameters, configurable — a young
  network loosens them and tightens as it grows, as Ğ1 did. Defaults Duniter.
- TrustReferents: the bootstrap 'seeds' membership is measured from — a
  bundled asset (empty until real founders are curated, no invented keys)
  unioned with referents the user adds by npub/QR. Honest cold-start.
- TrustCubit: computes the full membership verdict against referents+params
  alongside the personal circle, and exposes a TrustTier (networkMember >
  inYourCircle > vouched > unknown). Certifications issued with the active
  validity (they expire and renew, Duniter rule).
- UI: chat trust badge by tier; a 'Network of trust' screen (manage roots +
  advanced params) reached from the profile. i18n en/es/pt/ast.

Tests: WotParams/membersWith, npubToHex, TrustReferents, WotSettings, and
TrustCubit tiers/membership. Resolves the WoT-parameters decision
(open-decisions §B). Trust net stays empty/undetermined until seeded — by
design; users bootstrap their own roots.
This commit is contained in:
vjrj 2026-07-10 21:01:11 +02:00
parent f767ccd70e
commit e715b129f6
29 changed files with 1111 additions and 39 deletions

View file

@ -443,6 +443,28 @@
"count": "Avalada por {n}",
"vouch": "Conozo a esta persona",
"vouched": "Avales a esta persona",
"circle": "Nel to círculu"
"circle": "Nel to círculu",
"member": "Miembru de confianza de la rede"
},
"wot": {
"title": "Rede de confianza",
"open": "Rede de confianza",
"help": "Cómo se decide quién ye miembru de confianza: la xente aválase ente sí, y la confianza estiéndese dende un conxuntu de raíces fundadores.",
"roots": "Raíces de confianza",
"rootsHelp": "Les identidaes fundadores qu'anclen la rede. Amiesta a quien te fíes (apega'l so códigu d'identidá); la pertenencia mídese p'afuera dende elles.",
"noRoots": "Entá nun hai raíces de confianza — nun se pue calcular la pertenencia hasta semar la rede.",
"addRoot": "Amestar una raíz de confianza",
"rootHint": "Apega un códigu d'identidá (npub…)",
"add": "Amestar",
"rootAdded": "Raíz de confianza amestada",
"rootInvalid": "Esi nun ye un códigu d'identidá válidu",
"remove": "Quitar",
"params": "Parámetros avanzaos",
"paramsHelp": "Regles Duniter. Aflóxales pa una rede nueva; apriétales según crez.",
"sigQty": "Avales pa ser miembru",
"stepMax": "Distancia máxima a una raíz",
"validityDays": "Validez del aval (díes)",
"reset": "Reafitar a valores Duniter",
"saved": "Guardáu"
}
}

View file

@ -446,6 +446,28 @@
"count": "Vouched for by {n}",
"vouch": "I know this person",
"vouched": "You vouch for them",
"circle": "In your circle"
"circle": "In your circle",
"member": "Trusted member of the network"
},
"wot": {
"title": "Network of trust",
"open": "Network of trust",
"help": "How trusted membership is decided: people vouch for each other, and trust spreads outward from a set of founding roots.",
"roots": "Trust roots",
"rootsHelp": "The founding identities the network is anchored to. Add people you trust (paste their identity code); membership is measured outward from them.",
"noRoots": "No trust roots yet — membership can't be worked out until the network is seeded.",
"addRoot": "Add a trust root",
"rootHint": "Paste an identity code (npub…)",
"add": "Add",
"rootAdded": "Trust root added",
"rootInvalid": "That's not a valid identity code",
"remove": "Remove",
"params": "Advanced parameters",
"paramsHelp": "Duniter rules. Loosen them for a young network; tighten as it grows.",
"sigQty": "Vouches to become a member",
"stepMax": "Max distance from a root",
"validityDays": "Vouch validity (days)",
"reset": "Reset to Duniter defaults",
"saved": "Saved"
}
}

View file

@ -445,6 +445,28 @@
"count": "Avalada por {n}",
"vouch": "Conozco a esta persona",
"vouched": "Avalas a esta persona",
"circle": "En tu círculo"
"circle": "En tu círculo",
"member": "Miembro de confianza de la red"
},
"wot": {
"title": "Red de confianza",
"open": "Red de confianza",
"help": "Cómo se decide quién es miembro de confianza: la gente se avala entre sí, y la confianza se extiende desde un conjunto de raíces fundadoras.",
"roots": "Raíces de confianza",
"rootsHelp": "Las identidades fundadoras que anclan la red. Añade a quien te fíes (pega su código de identidad); la membresía se mide hacia fuera desde ellas.",
"noRoots": "Aún no hay raíces de confianza — no se puede calcular la membresía hasta sembrar la red.",
"addRoot": "Añadir una raíz de confianza",
"rootHint": "Pega un código de identidad (npub…)",
"add": "Añadir",
"rootAdded": "Raíz de confianza añadida",
"rootInvalid": "Ese no es un código de identidad válido",
"remove": "Quitar",
"params": "Parámetros avanzados",
"paramsHelp": "Reglas Duniter. Aflójalas para una red joven; apriétalas según crece.",
"sigQty": "Avales para ser miembro",
"stepMax": "Distancia máxima a una raíz",
"validityDays": "Validez del aval (días)",
"reset": "Restablecer a valores Duniter",
"saved": "Guardado"
}
}

View file

@ -442,6 +442,28 @@
"count": "Avalizada por {n}",
"vouch": "Conheço esta pessoa",
"vouched": "Avalizas esta pessoa",
"circle": "No teu círculo"
"circle": "No teu círculo",
"member": "Membro de confiança da rede"
},
"wot": {
"title": "Rede de confiança",
"open": "Rede de confiança",
"help": "Como se decide quem é membro de confiança: as pessoas avalizam-se entre si, e a confiança estende-se a partir de um conjunto de raízes fundadoras.",
"roots": "Raízes de confiança",
"rootsHelp": "As identidades fundadoras que ancoram a rede. Adiciona quem confias (cola o seu código de identidade); a filiação mede-se para fora a partir delas.",
"noRoots": "Ainda não há raízes de confiança — não se pode calcular a filiação até semear a rede.",
"addRoot": "Adicionar uma raiz de confiança",
"rootHint": "Cola um código de identidade (npub…)",
"add": "Adicionar",
"rootAdded": "Raiz de confiança adicionada",
"rootInvalid": "Esse não é um código de identidade válido",
"remove": "Remover",
"params": "Parâmetros avançados",
"paramsHelp": "Regras Duniter. Afrouxa-as para uma rede jovem; aperta-as à medida que cresce.",
"sigQty": "Avais para ser membro",
"stepMax": "Distância máxima a uma raiz",
"validityDays": "Validade do aval (dias)",
"reset": "Repor para valores Duniter",
"saved": "Guardado"
}
}

View file

@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 4
/// Strings: 1580 (395 per locale)
/// Strings: 1660 (415 per locale)
///
/// Built on 2026-07-10 at 18:22 UTC
/// Built on 2026-07-10 at 19:01 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import

View file

@ -75,6 +75,7 @@ class TranslationsAst extends Translations with BaseTranslations<AppLocale, Tran
@override late final _Translations$chatList$ast chatList = _Translations$chatList$ast._(_root);
@override late final _Translations$chat$ast chat = _Translations$chat$ast._(_root);
@override late final _Translations$trust$ast trust = _Translations$trust$ast._(_root);
@override late final _Translations$wot$ast wot = _Translations$wot$ast._(_root);
}
// Path: app
@ -762,6 +763,35 @@ class _Translations$trust$ast extends Translations$trust$en {
@override String get vouch => 'Conozo a esta persona';
@override String get vouched => 'Avales a esta persona';
@override String get circle => 'Nel to círculu';
@override String get member => 'Miembru de confianza de la rede';
}
// Path: wot
class _Translations$wot$ast extends Translations$wot$en {
_Translations$wot$ast._(TranslationsAst root) : this._root = root, super.internal(root);
final TranslationsAst _root; // ignore: unused_field
// Translations
@override String get title => 'Rede de confianza';
@override String get open => 'Rede de confianza';
@override String get help => 'Cómo se decide quién ye miembru de confianza: la xente aválase ente sí, y la confianza estiéndese dende un conxuntu de raíces fundadores.';
@override String get roots => 'Raíces de confianza';
@override String get rootsHelp => 'Les identidaes fundadores qu\'anclen la rede. Amiesta a quien te fíes (apega\'l so códigu d\'identidá); la pertenencia mídese p\'afuera dende elles.';
@override String get noRoots => 'Entá nun hai raíces de confianza — nun se pue calcular la pertenencia hasta semar la rede.';
@override String get addRoot => 'Amestar una raíz de confianza';
@override String get rootHint => 'Apega un códigu d\'identidá (npub…)';
@override String get add => 'Amestar';
@override String get rootAdded => 'Raíz de confianza amestada';
@override String get rootInvalid => 'Esi nun ye un códigu d\'identidá válidu';
@override String get remove => 'Quitar';
@override String get params => 'Parámetros avanzaos';
@override String get paramsHelp => 'Regles Duniter. Aflóxales pa una rede nueva; apriétales según crez.';
@override String get sigQty => 'Avales pa ser miembru';
@override String get stepMax => 'Distancia máxima a una raíz';
@override String get validityDays => 'Validez del aval (díes)';
@override String get reset => 'Reafitar a valores Duniter';
@override String get saved => 'Guardáu';
}
// Path: intro.slides
@ -1499,6 +1529,26 @@ extension on TranslationsAst {
'trust.vouch' => 'Conozo a esta persona',
'trust.vouched' => 'Avales a esta persona',
'trust.circle' => 'Nel to círculu',
'trust.member' => 'Miembru de confianza de la rede',
'wot.title' => 'Rede de confianza',
'wot.open' => 'Rede de confianza',
'wot.help' => 'Cómo se decide quién ye miembru de confianza: la xente aválase ente sí, y la confianza estiéndese dende un conxuntu de raíces fundadores.',
'wot.roots' => 'Raíces de confianza',
'wot.rootsHelp' => 'Les identidaes fundadores qu\'anclen la rede. Amiesta a quien te fíes (apega\'l so códigu d\'identidá); la pertenencia mídese p\'afuera dende elles.',
'wot.noRoots' => 'Entá nun hai raíces de confianza — nun se pue calcular la pertenencia hasta semar la rede.',
'wot.addRoot' => 'Amestar una raíz de confianza',
'wot.rootHint' => 'Apega un códigu d\'identidá (npub…)',
'wot.add' => 'Amestar',
'wot.rootAdded' => 'Raíz de confianza amestada',
'wot.rootInvalid' => 'Esi nun ye un códigu d\'identidá válidu',
'wot.remove' => 'Quitar',
'wot.params' => 'Parámetros avanzaos',
'wot.paramsHelp' => 'Regles Duniter. Aflóxales pa una rede nueva; apriétales según crez.',
'wot.sigQty' => 'Avales pa ser miembru',
'wot.stepMax' => 'Distancia máxima a una raíz',
'wot.validityDays' => 'Validez del aval (díes)',
'wot.reset' => 'Reafitar a valores Duniter',
'wot.saved' => 'Guardáu',
_ => null,
};
}

View file

@ -76,6 +76,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
late final Translations$chatList$en chatList = Translations$chatList$en.internal(_root);
late final Translations$chat$en chat = Translations$chat$en.internal(_root);
late final Translations$trust$en trust = Translations$trust$en.internal(_root);
late final Translations$wot$en wot = Translations$wot$en.internal(_root);
}
// Path: app
@ -1423,6 +1424,75 @@ class Translations$trust$en {
/// en: 'In your circle'
String get circle => 'In your circle';
/// en: 'Trusted member of the network'
String get member => 'Trusted member of the network';
}
// Path: wot
class Translations$wot$en {
Translations$wot$en.internal(this._root);
final Translations _root; // ignore: unused_field
// Translations
/// en: 'Network of trust'
String get title => 'Network of trust';
/// en: 'Network of trust'
String get open => 'Network of trust';
/// en: 'How trusted membership is decided: people vouch for each other, and trust spreads outward from a set of founding roots.'
String get help => 'How trusted membership is decided: people vouch for each other, and trust spreads outward from a set of founding roots.';
/// en: 'Trust roots'
String get roots => 'Trust roots';
/// en: 'The founding identities the network is anchored to. Add people you trust (paste their identity code); membership is measured outward from them.'
String get rootsHelp => 'The founding identities the network is anchored to. Add people you trust (paste their identity code); membership is measured outward from them.';
/// en: 'No trust roots yet — membership can't be worked out until the network is seeded.'
String get noRoots => 'No trust roots yet — membership can\'t be worked out until the network is seeded.';
/// en: 'Add a trust root'
String get addRoot => 'Add a trust root';
/// en: 'Paste an identity code (npub…)'
String get rootHint => 'Paste an identity code (npub…)';
/// en: 'Add'
String get add => 'Add';
/// en: 'Trust root added'
String get rootAdded => 'Trust root added';
/// en: 'That's not a valid identity code'
String get rootInvalid => 'That\'s not a valid identity code';
/// en: 'Remove'
String get remove => 'Remove';
/// en: 'Advanced parameters'
String get params => 'Advanced parameters';
/// en: 'Duniter rules. Loosen them for a young network; tighten as it grows.'
String get paramsHelp => 'Duniter rules. Loosen them for a young network; tighten as it grows.';
/// en: 'Vouches to become a member'
String get sigQty => 'Vouches to become a member';
/// en: 'Max distance from a root'
String get stepMax => 'Max distance from a root';
/// en: 'Vouch validity (days)'
String get validityDays => 'Vouch validity (days)';
/// en: 'Reset to Duniter defaults'
String get reset => 'Reset to Duniter defaults';
/// en: 'Saved'
String get saved => 'Saved';
}
// Path: intro.slides
@ -2279,6 +2349,26 @@ extension on Translations {
'trust.vouch' => 'I know this person',
'trust.vouched' => 'You vouch for them',
'trust.circle' => 'In your circle',
'trust.member' => 'Trusted member of the network',
'wot.title' => 'Network of trust',
'wot.open' => 'Network of trust',
'wot.help' => 'How trusted membership is decided: people vouch for each other, and trust spreads outward from a set of founding roots.',
'wot.roots' => 'Trust roots',
'wot.rootsHelp' => 'The founding identities the network is anchored to. Add people you trust (paste their identity code); membership is measured outward from them.',
'wot.noRoots' => 'No trust roots yet — membership can\'t be worked out until the network is seeded.',
'wot.addRoot' => 'Add a trust root',
'wot.rootHint' => 'Paste an identity code (npub…)',
'wot.add' => 'Add',
'wot.rootAdded' => 'Trust root added',
'wot.rootInvalid' => 'That\'s not a valid identity code',
'wot.remove' => 'Remove',
'wot.params' => 'Advanced parameters',
'wot.paramsHelp' => 'Duniter rules. Loosen them for a young network; tighten as it grows.',
'wot.sigQty' => 'Vouches to become a member',
'wot.stepMax' => 'Max distance from a root',
'wot.validityDays' => 'Vouch validity (days)',
'wot.reset' => 'Reset to Duniter defaults',
'wot.saved' => 'Saved',
_ => null,
};
}

View file

@ -75,6 +75,7 @@ class TranslationsEs extends Translations with BaseTranslations<AppLocale, Trans
@override late final _Translations$chatList$es chatList = _Translations$chatList$es._(_root);
@override late final _Translations$chat$es chat = _Translations$chat$es._(_root);
@override late final _Translations$trust$es trust = _Translations$trust$es._(_root);
@override late final _Translations$wot$es wot = _Translations$wot$es._(_root);
}
// Path: app
@ -764,6 +765,35 @@ class _Translations$trust$es extends Translations$trust$en {
@override String get vouch => 'Conozco a esta persona';
@override String get vouched => 'Avalas a esta persona';
@override String get circle => 'En tu círculo';
@override String get member => 'Miembro de confianza de la red';
}
// Path: wot
class _Translations$wot$es extends Translations$wot$en {
_Translations$wot$es._(TranslationsEs root) : this._root = root, super.internal(root);
final TranslationsEs _root; // ignore: unused_field
// Translations
@override String get title => 'Red de confianza';
@override String get open => 'Red de confianza';
@override String get help => 'Cómo se decide quién es miembro de confianza: la gente se avala entre sí, y la confianza se extiende desde un conjunto de raíces fundadoras.';
@override String get roots => 'Raíces de confianza';
@override String get rootsHelp => 'Las identidades fundadoras que anclan la red. Añade a quien te fíes (pega su código de identidad); la membresía se mide hacia fuera desde ellas.';
@override String get noRoots => 'Aún no hay raíces de confianza — no se puede calcular la membresía hasta sembrar la red.';
@override String get addRoot => 'Añadir una raíz de confianza';
@override String get rootHint => 'Pega un código de identidad (npub…)';
@override String get add => 'Añadir';
@override String get rootAdded => 'Raíz de confianza añadida';
@override String get rootInvalid => 'Ese no es un código de identidad válido';
@override String get remove => 'Quitar';
@override String get params => 'Parámetros avanzados';
@override String get paramsHelp => 'Reglas Duniter. Aflójalas para una red joven; apriétalas según crece.';
@override String get sigQty => 'Avales para ser miembro';
@override String get stepMax => 'Distancia máxima a una raíz';
@override String get validityDays => 'Validez del aval (días)';
@override String get reset => 'Restablecer a valores Duniter';
@override String get saved => 'Guardado';
}
// Path: intro.slides
@ -1503,6 +1533,26 @@ extension on TranslationsEs {
'trust.vouch' => 'Conozco a esta persona',
'trust.vouched' => 'Avalas a esta persona',
'trust.circle' => 'En tu círculo',
'trust.member' => 'Miembro de confianza de la red',
'wot.title' => 'Red de confianza',
'wot.open' => 'Red de confianza',
'wot.help' => 'Cómo se decide quién es miembro de confianza: la gente se avala entre sí, y la confianza se extiende desde un conjunto de raíces fundadoras.',
'wot.roots' => 'Raíces de confianza',
'wot.rootsHelp' => 'Las identidades fundadoras que anclan la red. Añade a quien te fíes (pega su código de identidad); la membresía se mide hacia fuera desde ellas.',
'wot.noRoots' => 'Aún no hay raíces de confianza — no se puede calcular la membresía hasta sembrar la red.',
'wot.addRoot' => 'Añadir una raíz de confianza',
'wot.rootHint' => 'Pega un código de identidad (npub…)',
'wot.add' => 'Añadir',
'wot.rootAdded' => 'Raíz de confianza añadida',
'wot.rootInvalid' => 'Ese no es un código de identidad válido',
'wot.remove' => 'Quitar',
'wot.params' => 'Parámetros avanzados',
'wot.paramsHelp' => 'Reglas Duniter. Aflójalas para una red joven; apriétalas según crece.',
'wot.sigQty' => 'Avales para ser miembro',
'wot.stepMax' => 'Distancia máxima a una raíz',
'wot.validityDays' => 'Validez del aval (días)',
'wot.reset' => 'Restablecer a valores Duniter',
'wot.saved' => 'Guardado',
_ => null,
};
}

View file

@ -75,6 +75,7 @@ class TranslationsPt extends Translations with BaseTranslations<AppLocale, Trans
@override late final _Translations$chatList$pt chatList = _Translations$chatList$pt._(_root);
@override late final _Translations$chat$pt chat = _Translations$chat$pt._(_root);
@override late final _Translations$trust$pt trust = _Translations$trust$pt._(_root);
@override late final _Translations$wot$pt wot = _Translations$wot$pt._(_root);
}
// Path: app
@ -761,6 +762,35 @@ class _Translations$trust$pt extends Translations$trust$en {
@override String get vouch => 'Conheço esta pessoa';
@override String get vouched => 'Avalizas esta pessoa';
@override String get circle => 'No teu círculo';
@override String get member => 'Membro de confiança da rede';
}
// Path: wot
class _Translations$wot$pt extends Translations$wot$en {
_Translations$wot$pt._(TranslationsPt root) : this._root = root, super.internal(root);
final TranslationsPt _root; // ignore: unused_field
// Translations
@override String get title => 'Rede de confiança';
@override String get open => 'Rede de confiança';
@override String get help => 'Como se decide quem é membro de confiança: as pessoas avalizam-se entre si, e a confiança estende-se a partir de um conjunto de raízes fundadoras.';
@override String get roots => 'Raízes de confiança';
@override String get rootsHelp => 'As identidades fundadoras que ancoram a rede. Adiciona quem confias (cola o seu código de identidade); a filiação mede-se para fora a partir delas.';
@override String get noRoots => 'Ainda não há raízes de confiança — não se pode calcular a filiação até semear a rede.';
@override String get addRoot => 'Adicionar uma raiz de confiança';
@override String get rootHint => 'Cola um código de identidade (npub…)';
@override String get add => 'Adicionar';
@override String get rootAdded => 'Raiz de confiança adicionada';
@override String get rootInvalid => 'Esse não é um código de identidade válido';
@override String get remove => 'Remover';
@override String get params => 'Parâmetros avançados';
@override String get paramsHelp => 'Regras Duniter. Afrouxa-as para uma rede jovem; aperta-as à medida que cresce.';
@override String get sigQty => 'Avais para ser membro';
@override String get stepMax => 'Distância máxima a uma raiz';
@override String get validityDays => 'Validade do aval (dias)';
@override String get reset => 'Repor para valores Duniter';
@override String get saved => 'Guardado';
}
// Path: intro.slides
@ -1497,6 +1527,26 @@ extension on TranslationsPt {
'trust.vouch' => 'Conheço esta pessoa',
'trust.vouched' => 'Avalizas esta pessoa',
'trust.circle' => 'No teu círculo',
'trust.member' => 'Membro de confiança da rede',
'wot.title' => 'Rede de confiança',
'wot.open' => 'Rede de confiança',
'wot.help' => 'Como se decide quem é membro de confiança: as pessoas avalizam-se entre si, e a confiança estende-se a partir de um conjunto de raízes fundadoras.',
'wot.roots' => 'Raízes de confiança',
'wot.rootsHelp' => 'As identidades fundadoras que ancoram a rede. Adiciona quem confias (cola o seu código de identidade); a filiação mede-se para fora a partir delas.',
'wot.noRoots' => 'Ainda não há raízes de confiança — não se pode calcular a filiação até semear a rede.',
'wot.addRoot' => 'Adicionar uma raiz de confiança',
'wot.rootHint' => 'Cola um código de identidade (npub…)',
'wot.add' => 'Adicionar',
'wot.rootAdded' => 'Raiz de confiança adicionada',
'wot.rootInvalid' => 'Esse não é um código de identidade válido',
'wot.remove' => 'Remover',
'wot.params' => 'Parâmetros avançados',
'wot.paramsHelp' => 'Regras Duniter. Afrouxa-as para uma rede jovem; aperta-as à medida que cresce.',
'wot.sigQty' => 'Avais para ser membro',
'wot.stepMax' => 'Distância máxima a uma raiz',
'wot.validityDays' => 'Validade do aval (dias)',
'wot.reset' => 'Repor para valores Duniter',
'wot.saved' => 'Guardado',
_ => null,
};
}