nip85-trusted-assertions

Builds and parses NIP-85 trusted assertion events in the Quartz Kotlin library.

1.6k|222|Updated Jan 11, 2023
One-click install
npx skills add https://github.com/vitorpamplona/amethyst --skill nip85-trusted-assertions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nip85-trusted-assertions
Source: https://github.com/vitorpamplona/amethyst/tree/main/.claude/skills/nip85-trusted-assertions
Command: npx skills add https://github.com/vitorpamplona/amethyst --skill nip85-trusted-assertions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

NIP-85 is an evolving spec, so developers working with trust-provider lists, contact cards, and event assertions in the Amethyst/Quartz codebase lack a stable reference for the exact kind numbers, d-tag conventions, tag vocabulary, and authorization rules. This Skill documents the operative model so events are built and consumed correctly.

Core Features & Use Cases

  • Kind map and addressing: Defines kinds 10040 (trust provider lists), 30382 (contact cards/user assertions), 30383 (event assertions), 30384 (addressable assertions), and 30385 (external-id assertions), including d-tag semantics and latest-wins supersession.
  • Typed tag vocabulary: Documents RankTag, HopsTag, FollowerCountTag, ServiceProviderTag/ServiceType, and the full metric tag set with parse/assemble semantics (missing tag means unknown, never zero).
  • Authorization model: Explains that a 30382 is meaningful only when its author is listed in the observer's 10040 for a matching service type, with relay-hint-based fetching.
  • Use Case: When wiring a consumer that resolves a 10040 provider entry to the 30382 cards it signs, or when publishing GrapeRank contact cards, use this Skill to get the exact event construction and parsing patterns.

Quick Start

Ask the assistant to build a kind 30382 contact card event with rank, followers, and hops tags signed by a trust provider using the Quartz typed helpers.

Frequently Asked Questions about nip85-trusted-assertions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a NIP-85 contact card event in Quartz?

Use ContactCardEvent.create with the target user pubkey, a provider signer, and a publicInitializer setting tags like rank, followers, and hops. The event is addressable at 30382:<provider>:<target>, and the d-tag holds the subject's pubkey.

What is the kind 10040 trust provider list in Nostr?

Kind 10040 is a replaceable event where an observer declares which providers they trust for which metrics. Each entry is a ServiceProviderTag like ["30382:rank", provider pubkey, relay URL], and entries may be public tags or NIP-44 encrypted private content.

How does authorization work for NIP-85 assertions?

A 30382 or other assertion is meaningful only if its author is listed in the observer's 10040 for a matching service type such as 30382:rank. Quartz does not enforce this cryptographically; the consuming code checks author equality and ignores assertions from unlisted signers.

Does a missing rank tag mean a rank of zero?

No. A missing tag means unknown and the typed accessors return null, never zero. There is also no range validation on values, so consumers must defend against out-of-range or negative numbers themselves.

Where do petnames and nicknames live in kind 30382 events?

For an account's own contact cards, petname, summary, and their NIP-30 emoji mappings always live in the NIP-44 encrypted content, never in public tags. ContactCardEvent.build strips stray public copies, and provider-signed WoT cards use public metric tags instead.

How are stale NIP-85 assertions superseded?

All assertion kinds are addressable, so the latest event per (kind, author, d-tag) coordinate wins under standard NIP-01 rules. There is no expiry tag or prescribed refresh cadence; staleness policy is left to the consumer.