. . . . "This query returns the latest nanopublications from the given set of pubkey hashes." . . . "Get the latest nanopublications from pubkeys" . . "prefix rdfs: \r\nprefix np: \r\nprefix npa: \r\nprefix npx: \r\nprefix xsd: \r\nprefix dct: \r\n\r\nselect ?np ?label ?pubkey ?date where {\r\n\r\n bind(replace(str(?__endpoint_iri), \"/repo/.*$\", \"/repo/\") as ?servicebase)\r\n\r\n #==================== MULTI-VALUE PLACEHOLDER =====================#------ config: ------\r\n { select ?pkh { # <- VAR pkh\r\n bind(?_pubkeyhashes as ?vs) # <- VAR _pubkeyhashes\r\n {select*{optional{?a ?b ?c}}limit 1} # (for some Virtuoso ver.) #\r\n values ?x {0 1 2 3 4 5 6 7 8 9} values ?y {0 1 2 3 4 5 6 7 8 9} #\r\n bind((10*?x)+?y as ?n) # (works up to a maximum of 100 values) #\r\n bind(\" \" as ?sep) # (separator as single regex-compatible char) # <- CONST sep\r\n bind(concat(\"^([^\",?sep,\"]*\",?sep,\"){\",str(?n),\"}\") as ?p) #\r\n bind(concat(?sep,\".*\") as ?p0) #\r\n filter(if(?n=0,true,regex(?vs,?p))) # (?n=0 check for Viruoso) #\r\n bind(replace(if(?n=0,?vs,replace(?vs,?p,\"\")),?p0,\"\") as ?pkh) # <- VAR pkh\r\n } } #\r\n #==================================================================#---------------------\r\n bind(uri(concat(?servicebase, \"pubkey/\", ?pkh)) as ?service)\r\n \r\n service ?service {\r\n graph npa:graph {\r\n ?np rdfs:label ?label ;\r\n npa:hasValidSignatureForPublicKey ?pubkey ;\r\n dct:created ?date .\r\n filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKey ?pubkeyx . filter(contains(?_pubkeyhashes, sha256(str(?pubkeyx)))) }\r\n filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . }\r\n filter not exists { ?np npx:hasNanopubType npx:retracts . }\r\n }\r\n }\r\n}\r\norder by desc(?date)\r\nlimit 100" . . "Tobias Kuhn" . "RSA" . "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD4Wj537OijfOWVtsHMznuXKISqBhtGDQZfdO6pbb4hg9EHMcUFGTLbWaPrP783PHv8HMAAPjvEkHLaOHMIknqhaIa5236lfBO3r+ljVdYBElBcLvROmwG+ZGtmPNZf7lMhI15xf5TfoaSa84AFRd5J2EXekK6PhaFQhRm1IpSYtwIDAQAB" . "c6G6sTYvYZQwIHKtfh7Dl2qqGzkGRer8/GEhNbh+yNqrm1XbUHCUcpDsLgkEByhdRzAh06YFyrfA2iW/u7161x7eKJrylv5cnjQgVuDSIpHk6kwj/xtLX9czJpz1zVNahCzVrCVVVbFlHxgk1/vRLxrAUb98T9auWH2YbkhBhgQ=" . . . "2024-07-10T11:35:04.614Z"^^ . . . . . . . . . . .