. . . . "Returns a single result row with one 'svg' column holding a complete SVG diagram of the whole trust network of the nanopublication ecosystem, computed entirely from the current trust state. This is the query behind the 'Trust network overview' SVG view (gen:SvgView). Every agent in the trust state is drawn as one equally sized tilted square (a diamond, echoing the profile-picture mask), linking root-relatively (/user?id=...) to that agent's user page. Agents are grouped into horizontal bands by their minimum depth from the trust seed; within a band they are ordered by the number of agents they endorsed, descending, and laid out left-aligned at a fixed spacing, wrapping onto as many rows as the band needs. The highest-endorsing agents therefore sit at the left of each band. A line is drawn for every endorsement between two distinct agents, so the fan below an agent shows the agents it brought into the network. Node color encodes depth, with contested agents in red and skipped (rejected) agents in gray. The diagram carries no title, caption or labels: it is a pure node-and-link rendering meant to sit under the view's own heading, and its height adapts to the number of rows needed. The query reads npa:EndorsementLink nodes (npa:fromAgent / npa:toAgent) together with the npa:AccountState rows of the current trust state, so it needs no federated SERVICE call and no scan of the full repository. Per-pubkey duplicate rows are collapsed to one node per agent, self-endorsements across an agent's own keys are not drawn as edges, and positions come from rank subqueries, so the output is deterministic. The 'resource' parameter is the page the view is shown on; it is not used by the diagram, which always shows the whole network." . . . "Get trust network overview diagram as SVG" . . "prefix npa: \nprefix xsd: \nselect (concat(\n \"\", ?edgesvg, ?nodesvg, \"\") as ?svg) where {\n bind(?_resource_iri as ?pageResource)\n\n { select (((30 + (?nd - 1) * 60) + ?totalRows * 16 + 20) as ?h) where {\n { select (sum(?rr) as ?totalRows) (count(*) as ?nd) where {\n { select ?dh (count(*) as ?ch) where {\n { select ?aH (min(?dH) as ?depH) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsH .\n graph ?tsH { ?stH a npa:AccountState ; npa:agent ?aH ; npa:depth ?dH }\n } group by ?aH }\n bind(?depH as ?dh)\n } group by ?dh }\n bind(xsd:integer(ceil(?ch / 126)) as ?rr)\n } }\n } }\n\n { select (group_concat(?eline; separator=\"\") as ?edgesvg) where {\n { select ?aF ?depF ?outF\n ((14 + (?rankF - 1 - ?rowF * 126) * 14 + 7) as ?xF)\n ((30 + (?depF - 1) * 60 + (?rowsBeforeF + ?rowF) * 16) as ?yF) where {\n { select ?aF ?depF ?outF (count(distinct ?a2F) as ?rankF) where {\n { select ?aFa (min(?dFa) as ?depFa) (count(distinct ?tFa) as ?outFa) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsFa .\n graph ?tsFa { ?stFa a npa:AccountState ; npa:agent ?aFa ; npa:depth ?dFa }\n optional { graph ?tsFa { ?lFa a npa:EndorsementLink ; npa:fromAgent ?aFa ; npa:toAgent ?tFa } }\n } group by ?aFa }\n bind(str(1000 - ?outFa) as ?pnFa)\n bind(concat(substr(concat(\"0000\", ?pnFa), strlen(?pnFa) + 1), str(?aFa)) as ?kFa)\n bind(?aFa as ?aF) bind(?depFa as ?depF) bind(?outFa as ?outF)\n { select ?aFb (min(?dFb) as ?depFb) (count(distinct ?tFb) as ?outFb) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsFb .\n graph ?tsFb { ?stFb a npa:AccountState ; npa:agent ?aFb ; npa:depth ?dFb }\n optional { graph ?tsFb { ?lFb a npa:EndorsementLink ; npa:fromAgent ?aFb ; npa:toAgent ?tFb } }\n } group by ?aFb }\n bind(str(1000 - ?outFb) as ?pnFb)\n bind(concat(substr(concat(\"0000\", ?pnFb), strlen(?pnFb) + 1), str(?aFb)) as ?kFb)\n bind(?aFb as ?a2F)\n filter(?depFb = ?depF && ?kFb <= ?kFa)\n } group by ?aF ?depF ?outF }\n bind(xsd:integer(floor((?rankF - 1) / 126)) as ?rowF)\n { select ?depRF (sum(?r2F) as ?rowsBeforeF) where {\n { select ?dAF (count(*) as ?cAF) where {\n { select ?aFp (min(?dFp) as ?depFp) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsFp .\n graph ?tsFp { ?stFp a npa:AccountState ; npa:agent ?aFp ; npa:depth ?dFp }\n } group by ?aFp }\n bind(?depFp as ?dAF)\n } group by ?dAF }\n bind(?dAF as ?depRF)\n { select ?dBF (count(*) as ?cBF) where {\n { select ?aFq (min(?dFq) as ?depFq) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsFq .\n graph ?tsFq { ?stFq a npa:AccountState ; npa:agent ?aFq ; npa:depth ?dFq }\n } group by ?aFq }\n bind(?depFq as ?dBF)\n } group by ?dBF }\n filter(?dBF <= ?depRF)\n bind(if(?dBF = ?depRF, 0, xsd:integer(ceil(?cBF / 126))) as ?r2F)\n } group by ?depRF }\n filter(?depRF = ?depF)\n } }\n { select ?aT ?depT ?outT\n ((14 + (?rankT - 1 - ?rowT * 126) * 14 + 7) as ?xT)\n ((30 + (?depT - 1) * 60 + (?rowsBeforeT + ?rowT) * 16) as ?yT) where {\n { select ?aT ?depT ?outT (count(distinct ?a2T) as ?rankT) where {\n { select ?aTa (min(?dTa) as ?depTa) (count(distinct ?tTa) as ?outTa) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsTa .\n graph ?tsTa { ?stTa a npa:AccountState ; npa:agent ?aTa ; npa:depth ?dTa }\n optional { graph ?tsTa { ?lTa a npa:EndorsementLink ; npa:fromAgent ?aTa ; npa:toAgent ?tTa } }\n } group by ?aTa }\n bind(str(1000 - ?outTa) as ?pnTa)\n bind(concat(substr(concat(\"0000\", ?pnTa), strlen(?pnTa) + 1), str(?aTa)) as ?kTa)\n bind(?aTa as ?aT) bind(?depTa as ?depT) bind(?outTa as ?outT)\n { select ?aTb (min(?dTb) as ?depTb) (count(distinct ?tTb) as ?outTb) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsTb .\n graph ?tsTb { ?stTb a npa:AccountState ; npa:agent ?aTb ; npa:depth ?dTb }\n optional { graph ?tsTb { ?lTb a npa:EndorsementLink ; npa:fromAgent ?aTb ; npa:toAgent ?tTb } }\n } group by ?aTb }\n bind(str(1000 - ?outTb) as ?pnTb)\n bind(concat(substr(concat(\"0000\", ?pnTb), strlen(?pnTb) + 1), str(?aTb)) as ?kTb)\n bind(?aTb as ?a2T)\n filter(?depTb = ?depT && ?kTb <= ?kTa)\n } group by ?aT ?depT ?outT }\n bind(xsd:integer(floor((?rankT - 1) / 126)) as ?rowT)\n { select ?depRT (sum(?r2T) as ?rowsBeforeT) where {\n { select ?dAT (count(*) as ?cAT) where {\n { select ?aTp (min(?dTp) as ?depTp) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsTp .\n graph ?tsTp { ?stTp a npa:AccountState ; npa:agent ?aTp ; npa:depth ?dTp }\n } group by ?aTp }\n bind(?depTp as ?dAT)\n } group by ?dAT }\n bind(?dAT as ?depRT)\n { select ?dBT (count(*) as ?cBT) where {\n { select ?aTq (min(?dTq) as ?depTq) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsTq .\n graph ?tsTq { ?stTq a npa:AccountState ; npa:agent ?aTq ; npa:depth ?dTq }\n } group by ?aTq }\n bind(?depTq as ?dBT)\n } group by ?dBT }\n filter(?dBT <= ?depRT)\n bind(if(?dBT = ?depRT, 0, xsd:integer(ceil(?cBT / 126))) as ?r2T)\n } group by ?depRT }\n filter(?depRT = ?depT)\n } }\n { select distinct ?aF ?aT where {\n npa:thisRepo npa:hasCurrentTrustState ?tsE .\n graph ?tsE { ?lE a npa:EndorsementLink ; npa:fromAgent ?aF ; npa:toAgent ?aT }\n filter(?aF != ?aT)\n } }\n bind(concat(\"\") as ?eline)\n } }\n\n { select (group_concat(?nline; separator=\"\") as ?nodesvg) where {\n { select ?aN ?depN ?outN\n ((14 + (?rankN - 1 - ?rowN * 126) * 14 + 7) as ?xN)\n ((30 + (?depN - 1) * 60 + (?rowsBeforeN + ?rowN) * 16) as ?yN) where {\n { select ?aN ?depN ?outN (count(distinct ?a2N) as ?rankN) where {\n { select ?aNa (min(?dNa) as ?depNa) (count(distinct ?tNa) as ?outNa) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsNa .\n graph ?tsNa { ?stNa a npa:AccountState ; npa:agent ?aNa ; npa:depth ?dNa }\n optional { graph ?tsNa { ?lNa a npa:EndorsementLink ; npa:fromAgent ?aNa ; npa:toAgent ?tNa } }\n } group by ?aNa }\n bind(str(1000 - ?outNa) as ?pnNa)\n bind(concat(substr(concat(\"0000\", ?pnNa), strlen(?pnNa) + 1), str(?aNa)) as ?kNa)\n bind(?aNa as ?aN) bind(?depNa as ?depN) bind(?outNa as ?outN)\n { select ?aNb (min(?dNb) as ?depNb) (count(distinct ?tNb) as ?outNb) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsNb .\n graph ?tsNb { ?stNb a npa:AccountState ; npa:agent ?aNb ; npa:depth ?dNb }\n optional { graph ?tsNb { ?lNb a npa:EndorsementLink ; npa:fromAgent ?aNb ; npa:toAgent ?tNb } }\n } group by ?aNb }\n bind(str(1000 - ?outNb) as ?pnNb)\n bind(concat(substr(concat(\"0000\", ?pnNb), strlen(?pnNb) + 1), str(?aNb)) as ?kNb)\n bind(?aNb as ?a2N)\n filter(?depNb = ?depN && ?kNb <= ?kNa)\n } group by ?aN ?depN ?outN }\n bind(xsd:integer(floor((?rankN - 1) / 126)) as ?rowN)\n { select ?depRN (sum(?r2N) as ?rowsBeforeN) where {\n { select ?dAN (count(*) as ?cAN) where {\n { select ?aNp (min(?dNp) as ?depNp) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsNp .\n graph ?tsNp { ?stNp a npa:AccountState ; npa:agent ?aNp ; npa:depth ?dNp }\n } group by ?aNp }\n bind(?depNp as ?dAN)\n } group by ?dAN }\n bind(?dAN as ?depRN)\n { select ?dBN (count(*) as ?cBN) where {\n { select ?aNq (min(?dNq) as ?depNq) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsNq .\n graph ?tsNq { ?stNq a npa:AccountState ; npa:agent ?aNq ; npa:depth ?dNq }\n } group by ?aNq }\n bind(?depNq as ?dBN)\n } group by ?dBN }\n filter(?dBN <= ?depRN)\n bind(if(?dBN = ?depRN, 0, xsd:integer(ceil(?cBN / 126))) as ?r2N)\n } group by ?depRN }\n filter(?depRN = ?depN)\n } }\n { select ?aN (min(?statN0) as ?statN) where {\n npa:thisRepo npa:hasCurrentTrustState ?tsN .\n graph ?tsN { ?stN0 a npa:AccountState ; npa:agent ?aN ; npa:trustStatus ?statN0 }\n } group by ?aN }\n bind(if(?statN = npa:contested, \"#c8553d\",\n if(?statN = npa:skipped, \"#8a8a8a\",\n if(?depN = 1, \"#0d4f8b\",\n if(?depN = 2, \"#2f7fc4\",\n if(?depN = 3, \"#5fa3da\",\n if(?depN = 4, \"#8fc0e8\", \"#bcd9f0\")))))) as ?fill)\n bind(concat(\n \"\",\n \"\",\n \"\") as ?nline)\n } }\n}" . . "Tobias Kuhn" . "2026-08-25T15:08:19Z"^^ . . . . . "Get trust network overview diagram as SVG" . . . . . "RSA" . "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" . "nNfgMZNnBBBIZ0euXe9z3Qse+ouWnNlQOTSto81epHOiChWWeomlEBEHCCa1jineYZVhVKlFD1i45apNMLbMzQISW8PAxdd2WJvtverqdS2swlcrAOtw2VNW/vmsZeaoBXnxmYakh+AJWpGZVB0mhCncxqte7cAdUNm9OXS9BMk=" . . .