https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/Head
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://www.nanopub.org/nschema#hasAssertion
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/assertion
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://www.nanopub.org/nschema#hasProvenance
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/provenance
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://www.nanopub.org/nschema#hasPublicationInfo
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/pubinfo
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.nanopub.org/nschema#Nanopublication
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/assertion
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
http://purl.org/dc/terms/description
Returns recommended introduction actions for a given user, only when the viewer is that user themselves (owner gate ?__CURRENTUSER_multi_iri = ?_user_iri). One row per applicable recommendation, each carrying a ?recommendation text. A 'local introduction' is defined exactly as the UI's isIntroWithLocalKey: SIGNED BY the local key (?__LOCALPUBKEY_multi), DECLARING it, with the local-key declaration's location absent or matching ?__SITEURL_multi (nanobench->nanodash); localCount counts those. Branches: (1) create — localCount=0 (carries local-key bundle to prefill the create action); (2) get-approval — localCount=1 and the local key is not approved in the trust repo (carries the intro nanopub); (3) derive — localCount=0 but the user has introductions elsewhere; (4) retract — localCount>1; (5) update-approved — localCount>0, the local key is not approved, but the user has another approved key in the trust repo. No rows for non-owners or logged-out viewers. local_pubkey/short/site_url are action-mapping data (hidden from display).
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
http://purl.org/dc/terms/license
http://www.apache.org/licenses/LICENSE-2.0
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
https://w3id.org/kpxl/grlc/grlc-query
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
http://www.w3.org/2000/01/rdf-schema#label
Get introduction recommendations
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
https://w3id.org/kpxl/grlc/endpoint
https://w3id.org/np/l/nanopub-query-1.1/repo/type/77757cabf6184c51c20b8b0fe5dc5e1365b7f628448335184ad54319a0affdfc
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
https://w3id.org/kpxl/grlc/sparql
prefix np: <http://www.nanopub.org/nschema#>
prefix npx: <http://purl.org/nanopub/x/>
prefix npa: <http://purl.org/nanopub/admin/>
select ?recommendation ?intro_np ?local_pubkey ?local_pubkey_short ?site_url
where {
values ?__CURRENTUSER_multi_iri {}
filter(?_user_iri = ?__CURRENTUSER_multi_iri)
{
# (1) create: no local introduction yet
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
filter(bound(?__LOCALPUBKEY_multi))
{
select (count(distinct ?lnp) as ?localCount) where {
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
graph npa:graph {
?lnp npa:hasValidSignatureForPublicKey ?lsign .
filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lsign . }
?lnp np:hasAssertion ?la .
}
graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . optional { ?lkd npx:hasKeyLocation ?lloc . } }
filter(coalesce(str(?lsign) = str(?__LOCALPUBKEY_multi), false))
filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))
filter(!bound(?lloc) || coalesce(str(?lloc) = str(?__SITEURL_multi), false) || coalesce(replace(str(?lloc), "nanobench", "nanodash") = str(?__SITEURL_multi), false))
}
}
filter(?localCount = 0)
bind(coalesce(str(?__LOCALPUBKEY_multi), "") as ?local_pubkey)
bind(if(strlen(?local_pubkey) >= 45, concat(substr(?local_pubkey, 1, 1), "..", substr(?local_pubkey, 41, 5), ".."), "") as ?local_pubkey_short)
bind(coalesce(str(?__SITEURL_multi), "") as ?site_url)
bind("The local key from this site is not part of an introduction yet. Create one to link it to your identity." as ?recommendation)
} union {
# (2) get-approval: exactly one local introduction, not yet approved
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
filter(bound(?__LOCALPUBKEY_multi))
{
select (count(distinct ?lnp) as ?localCount) (sample(?lnp) as ?localIntroNp) where {
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
graph npa:graph {
?lnp npa:hasValidSignatureForPublicKey ?lsign .
filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lsign . }
?lnp np:hasAssertion ?la .
}
graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . optional { ?lkd npx:hasKeyLocation ?lloc . } }
filter(coalesce(str(?lsign) = str(?__LOCALPUBKEY_multi), false))
filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))
filter(!bound(?lloc) || coalesce(str(?lloc) = str(?__SITEURL_multi), false) || coalesce(replace(str(?lloc), "nanobench", "nanodash") = str(?__SITEURL_multi), false))
}
}
filter(?localCount = 1)
bind(lcase(sha256(str(?__LOCALPUBKEY_multi))) as ?lpkHash)
filter not exists {
service <https://w3id.org/np/l/nanopub-query-1.1/repo/trust> {
graph npa:graph { npa:thisRepo npa:hasCurrentTrustState ?tg . }
graph ?tg { ?acct npa:agent ?_user_iri ; npa:pubkey ?lpkHash ; npa:trustStatus npa:loaded . }
}
}
bind("Your introduction with the local key is not approved yet. Share it so a maintainer can approve it:" as ?recommendation)
bind(?localIntroNp as ?intro_np)
} union {
# (3) derive: no local introduction, but the user has introductions elsewhere
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
filter(bound(?__LOCALPUBKEY_multi))
{
select (count(distinct ?lnp) as ?localCount) where {
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
graph npa:graph {
?lnp npa:hasValidSignatureForPublicKey ?lsign .
filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lsign . }
?lnp np:hasAssertion ?la .
}
graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . optional { ?lkd npx:hasKeyLocation ?lloc . } }
filter(coalesce(str(?lsign) = str(?__LOCALPUBKEY_multi), false))
filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))
filter(!bound(?lloc) || coalesce(str(?lloc) = str(?__SITEURL_multi), false) || coalesce(replace(str(?lloc), "nanobench", "nanodash") = str(?__SITEURL_multi), false))
}
}
filter(?localCount = 0)
filter exists {
graph npa:graph {
?unp npa:hasValidSignatureForPublicKey ?uk .
filter not exists { ?unpx npx:invalidates ?unp ; npa:hasValidSignatureForPublicKey ?uk . }
?unp np:hasAssertion ?ua .
}
graph ?ua { ?ukd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?ukey . }
}
bind("You have introductions elsewhere, but none with this site's local key. Use 'derive new introduction' in the table below to declare those keys alongside the local key." as ?recommendation)
} union {
# (4) retract: more than one local introduction
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
filter(bound(?__LOCALPUBKEY_multi))
{
select (count(distinct ?lnp) as ?localCount) where {
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
graph npa:graph {
?lnp npa:hasValidSignatureForPublicKey ?lsign .
filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lsign . }
?lnp np:hasAssertion ?la .
}
graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . optional { ?lkd npx:hasKeyLocation ?lloc . } }
filter(coalesce(str(?lsign) = str(?__LOCALPUBKEY_multi), false))
filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))
filter(!bound(?lloc) || coalesce(str(?lloc) = str(?__SITEURL_multi), false) || coalesce(replace(str(?lloc), "nanobench", "nanodash") = str(?__SITEURL_multi), false))
}
}
filter(?localCount > 1)
bind("You have multiple introductions from this site. Use 'retract' in the table below to remove the redundant ones." as ?recommendation)
} union {
# (5) update-approved: local key not approved, but the user has another approved key
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
filter(bound(?__LOCALPUBKEY_multi))
{
select (count(distinct ?lnp) as ?localCount) where {
values ?__LOCALPUBKEY_multi {}
values ?__SITEURL_multi {}
graph npa:graph {
?lnp npa:hasValidSignatureForPublicKey ?lsign .
filter not exists { ?lnpx npx:invalidates ?lnp ; npa:hasValidSignatureForPublicKey ?lsign . }
?lnp np:hasAssertion ?la .
}
graph ?la { ?lkd npx:declaredBy ?_user_iri ; npx:hasPublicKey ?lpubkey . optional { ?lkd npx:hasKeyLocation ?lloc . } }
filter(coalesce(str(?lsign) = str(?__LOCALPUBKEY_multi), false))
filter(coalesce(str(?lpubkey) = str(?__LOCALPUBKEY_multi), false))
filter(!bound(?lloc) || coalesce(str(?lloc) = str(?__SITEURL_multi), false) || coalesce(replace(str(?lloc), "nanobench", "nanodash") = str(?__SITEURL_multi), false))
}
}
filter(?localCount > 0)
bind(lcase(sha256(str(?__LOCALPUBKEY_multi))) as ?lpkHash)
filter not exists {
service <https://w3id.org/np/l/nanopub-query-1.1/repo/trust> {
graph npa:graph { npa:thisRepo npa:hasCurrentTrustState ?tg . }
graph ?tg { ?acct npa:agent ?_user_iri ; npa:pubkey ?lpkHash ; npa:trustStatus npa:loaded . }
}
}
filter exists {
service <https://w3id.org/np/l/nanopub-query-1.1/repo/trust> {
graph npa:graph { npa:thisRepo npa:hasCurrentTrustState ?tg2 . }
graph ?tg2 { ?acct2 npa:agent ?_user_iri ; npa:pubkey ?okHash ; npa:trustStatus npa:loaded . filter(?okHash != ?lpkHash) }
}
}
bind("Your local key is not approved, but you have an approved introduction elsewhere. Add this site's local key to that approved introduction, at the site where you created it." as ?recommendation)
}
}
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/provenance
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/assertion
http://www.w3.org/ns/prov#wasAttributedTo
https://orcid.org/0000-0002-1267-0234
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/pubinfo
https://orcid.org/0000-0002-1267-0234
http://xmlns.com/foaf/0.1/name
Tobias Kuhn
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://purl.org/dc/terms/created
2026-06-09T06:40:01Z
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://purl.org/dc/terms/creator
https://orcid.org/0000-0002-1267-0234
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://purl.org/dc/terms/license
https://creativecommons.org/licenses/by/4.0/
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://purl.org/nanopub/x/embeds
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/get-intro-recommendations
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
http://purl.org/nanopub/x/supersedes
https://w3id.org/np/RA3TX49K5rlZrrN9cQXThPWAH__tBYRrnopEkOPDIayK8
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate
https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RA0J4vUn_dekg-U1kK3AOEt02p9mT2WO03uGxLDec1jLw
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RAoTD7udB2KtUuOuAe74tJi1t3VzK0DyWS7rYVAq1GRvw
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RAukAcWHRDlkqxk7H2XNSegc1WnHI569INvNr-xdptDGI
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate
https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/sig
http://purl.org/nanopub/x/hasAlgorithm
RSA
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/sig
http://purl.org/nanopub/x/hasPublicKey
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/sig
http://purl.org/nanopub/x/hasSignature
QEJJ4CFlBn3ML3vL9oK4NNEghAxsv7NCKbp0aFnmSCzbmbi8P6XU97g82QD5shIbex07c8Q6HIiMAQvz331oBMv843hhajnbmlno4CvoktphDp6yRZzUjGWNaryAPKf8iCwptkf15Gt/ofCpvZEj9SDjVxD/0ini9O1ZfIuACBw=
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/sig
http://purl.org/nanopub/x/hasSignatureTarget
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w
https://w3id.org/np/RA32MFuReWbczDt_TjUr_2syPR-Oe_z9PZZLQpPnh528w/sig
http://purl.org/nanopub/x/signedBy
https://orcid.org/0000-0002-1267-0234