Identifiers

The DSNP Identifiers form the basis for pseudo-anonymous streams of content. Graph connections are formed through the DSNP User Id.

DSNP User Id

  • 64-bit Unsigned Integer
  • MUST be serialized as decimal
  • MUST be unique per implementation

DSNP Content Hash

  • Variable length byte array (fixed length for a given hashing algorithm)
  • MUST be a valid multihash encoding of the hash output for the bytes of the content, generated with a Supported Hashing Algorithm

Supported Hashing Algorithms

AlgorithmMultihash NameLeading bytes (as varint)ReferenceDSNP Version Added
SHA-256sha2-2560x1220RFC 62341.2.0
BLAKE2bblake2b-2560xa0e40220RFC 76931.2.0

DSNP Protocol Scheme

  • MUST always be the string dsnp://

DSNP User URI

The DSNP User URI consists of two parts: the scheme and the user id. It is used to identify a user via a URI.

Example

dsnp://1311768467294899700
partvalue
Schemedsnp://
User Id1311768467294899700

DSNP Content URI

The DSNP Content URI consists of three parts: the scheme, the user id, and the content hash. It is used to uniquely identify an Announcement from a given user with content.

Any Announcement Types with a fromId and contentHash have a DSNP Content URI.

Example

dsnp://78187493520/0x1234567890abcdef0123456789abcdef0123456789abcdef0123456789abcdef
partvalue
Schemedsnp://
User Id78187493520
Content Hash0x1234567890abcdef0123456789abcdef0123456789abcdef0123456789abcdef