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:
parent
a96049dd36
commit
4cf53f259f
29 changed files with 1111 additions and 39 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue