What are Trusted Assertions?

Trusted Assertions is one of several methods for delivery of personalized trust metrics for consumption by Nostr clients and users. Compared to API-based or DVM-based methods, Trusted Assertions is designed for simplicity, efficiency, versatility and ease of adoption.

How it works: Each "trusted assertion" is a kind 3038x event that contains a list of trust scores for a specific user. Score types can follow the NIP standards (User Rank, Follower Count, etc) or be customized (e.g. GrapeRank, hops, etc). Users can signal adoption of Trusted Assertions with support by a third-party provider like Brainstorm by publishing a kind 10040 event.

Sample Kind 10040 Event (Trust Score Discovery)
This event identifies the third-party pubkey, 1b74a50a86757bdfdf35fe7cfe412be485ce0b8fa4c52327f09807cebbb91837, as a trusted provider and publisher of trust scores on behalf of the user: 53dab47395542b4df9c9d5b32934403b751f0a882e69bb8dd8a660df3a95f02d. Each Brainstorm user receives a unique pubkey for this purpose.

                        
Sample Kind 30382 Event (Trust Score Data)
The d-tag identifies the pubkey being scored (fffbb9d3d416d7c232621a5929aff65a3edb184a2978abd79b7881201cfbc90a). Note that the event author, 1b74a50a86757bdfdf35fe7cfe412be485ce0b8fa4c52327f09807cebbb91837, matches the pubkey in the kind 10040 event.

                        

Key Benefits for Developers:

  • Separation of clients and trust Calculation of sophisticated personalized trust metrics by third party providers like Brainstorm makes your life easier.
  • Standardized Trust Data Access consistent trust scores and score formats across nostr
  • Enhanced User Experience Provide users with personalized content filtering and recommendations
  • Spam Prevention Leverage community trust scores to reduce spam and low-quality content
  • Decentralized Reputation Build reputation systems without centralized authorities

See the NIP-85: Trusted Assertions proposal and pull request for more information.

🌟 NIP-85 Adopters

See who's already using NIP-85 to publish personalized trust scores on the Nostr network:

Loading NIP-85 authors...

🚀 For Developers: Get Started with NIP-85

Ready to integrate NIP-85 trust scores into your Nostr application? Here's how to get started.

Let's assume you have a user: observer_pubkey, and you want to fetch personalized trust scores of one or more observee_pubkeys.

1. Look for the end-user Kind 10040 Event

Adopters of NIP-85 will have a kind 10040 event.

Filter:

{"kinds":[10040], "authors":[observer_pubkey]}

There are three salient pieces of information stored in tags:

  • A list of trust metrics. Some metrics will be NIP-85-standardized, like `rank` or `followers`, while others may be customized.
  • For each metric, the pubkey of the relay that publishes the metric; 30382_publisher_pubkey. In theory this could be the user pubkey, but in practice this will often not be the case. When a user signs up to Brainstorm, a new customer relay nsec is issued which will publish kind 30382 events periodically on behalf of the customer.
  • For each metric, a relay where the kind 30382 notes can be found; 30382_relay_url. This will be a huge number of notes, so we don't necessarily want all of them to be spread across all the relays of nostr. For Brainstorm, this will be the relay of the brainstorm relay instance, e.g. wss://straycat.brainstorm.social/relay.

For users who have not yet signed up to Brainstorm or adopted NIP-85 using some other provider, personalized scores will not be available. The easist fallback solution would be to use an existing NIP-85 enabled npub as your app's "global trust scores". Alternatively, you could search the user's follows list for a NIP-85 adopter, and use those scores.

2. Fetch Trust Scores

Connect to the referenced relay to fetch Kind 30382 events authored by the 30382 publisher pubkey, and extract the personalized trust score(s) of interest.

The filter should look something like this:

{"kinds":[30382], "authors":[30382_publisher_pubkey], "#d":[observee_pubkey]}

3. Apply Trust Metrics

Use the trust scores to filter, rank, or recommend content in your application.