Associated Attachments

Audio

Activity Vocabulary: Audio

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Audio
urlActivity Vocabulary 2.0YESAn array of links for given audio content in different formatsMUST be an Audio Link AND MUST have at least one supported audio MIME type
nameActivity Vocabulary 2.0noThe display name for the audio file
durationActivity Vocabulary 2.0noApproximate duration of the audio
PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given audio contentMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href contentMUST follow
hashDSNP 1.0YESArray of hashes for linked content validationMUST include at least one supported hash

Supported Audio MIME Types

FormatMIME TypeSpecification(s)
MP3audio/mpegRFC3003
OGGaudio/oggRFC5334
WebMaudio/webmWebM standard

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "attachments": [
    {
      "type": "Audio",
      "name": "The Scream",
      "url": [
        {
          "type": "Link",
          "href": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Wilhelm_Scream.ogg",
          "mediaType": "audio/ogg",
          "hash": [
            "bdyqbcji3okmzxobvaqgduz5prixmumyndzopyufultmslndi4pdebii"
          ]
        }
      ],
      "duration": "1S"
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Image

Activity Vocabulary: Image

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Image
urlActivity Vocabulary 2.0YESAn array of links for given image content in different formatsMUST be an Image Link AND MUST have at least one supported image MIME type
nameActivity Vocabulary 2.0noThe display name or alt text for the image
PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given imageMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href content
hashDSNP 1.0YESArray of hashes for linked content validationMUST include at least one supported hash
heightActivity Vocabulary 2.0noA hint as to the rendering height in device-independent pixels
widthActivity Vocabulary 2.0noA hint as to the rendering width in device-independent pixels

Supported Image MIME Types

FormatMIME TypeSpecification(s)
JPEGimage/jpegRFC2045
PNGimage/pngW3C PNG Standard
SVGimage/svg+xmlW3C SVG standard
WebPimage/webpWebP standard
GIFimage/gifRFC2045

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "attachments": [
    {
      "type": "Image",
      "name": "One of the founders of DSNP",
      "url": [
        {
          "type": "Link",
          "href": "https://upload.wikimedia.org/wikipedia/commons/a/ae/Mccourt.jpg",
          "width": 350,
          "height": 228,
          "mediaType": "image/jpg",
          "hash": [
            "bciqjiqcidmzuqpvrl5cocu3l4z2uhj22xqruht3d5kx7qijvfbnjlda",
            "bdyqbjzt5drgji5w7xhsddsynusgx2vdmakcsrr4sfin5fyfkwlpup6q"
          ]
        }
      ]
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Video

Activity Vocabulary: Video

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Video
urlActivity Vocabulary 2.0YESAn array of links for given video content in different formatsMUST be a Video Link AND MUST have at least one supported video MIME type
nameActivity Vocabulary 2.0noThe display name for the video
durationActivity Vocabulary 2.0noApproximate duration of the video
PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given contentMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href content
hashDSNP 1.0YESArray of hashes for linked content validationMUST include at least one supported hash
heightActivity Vocabulary 2.0noA hint as to the rendering height in device-independent pixels
widthActivity Vocabulary 2.0noA hint as to the rendering width in device-independent pixels

Supported Video MIME Types

FormatMIME TypeSpecification(s)
MPEGvideo/mpegRFC2045
OGGvideo/oggRFC5334
WebMvideo/webmWebM standard
H265video/H265RFC7798
MP4video/mp4RFC4337

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "attachments": [
    {
      "type": "Video",
      "name": "One of the founders of DSNP",
      "duration": "PT10M32S",
      "url": [
        {
          "type": "Link",
          "href": "https://upload.wikimedia.org/wikipedia/commons/c/c0/Big_Buck_Bunny_4K.webm",
          "width": 4000,
          "height": 2250,
          "mediaType": "video/webm",
          "hash": [
            "bdyqed7dnok3batd7tr64trqmovfxam5tqsgxkiv2op5765pq43swtui"
          ]
        }
      ]
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Activity Vocabulary: Link

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given linkMUST be a Supported URL Schema
nameActivity Vocabulary 2.0noThe display name for the link

Examples

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "Check out the DSNP Website!",
  "mediaType": "text/plain",
  "attachment": [
    {
      "type": "Link",
      "name": "DSNP Website",
      "href": "https://dsnp.org"
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Attestations

Attestation attachments are DSNP extensions to the Activity Content model that allow users to attach Verifiable Credentials corresponding to an Attribute Set Type with their DSNP profile or a social media post.

The Verifiable Credential found at the indicated URL must include the user’s DSNP User URI in its credentialSubject.id field.

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Attestation
urlActivity Vocabulary 2.0YESAn array of links for the given credentialMUST be a Verifiable Credential Link
nameActivity Vocabulary 2.0noThe display name for the attestation

Attestation attachments must contain a link to a Verifiable Credential document. The link must contain a relationship identifier in the form of a DSNP Attribute Set Type (the rel field) to allow applications to determine the type of credential expected.

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
relActivity Vocabulary 2.0YESThe attestation’s attribute set typeMUST be a DSNP Attribute Set Type corresponding to the referenced credential document
hrefActivity Vocabulary 2.0YESThe URL for the associated Verifiable CredentialMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href contentMUST be set to
application/vc
hashDSNP extensionYESArray of hashes for linked content validationMUST include at least one supported hash

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Profile",
  "content": "I am a doctor. You're doing this all wrong.",
  "mediaType": "text/plain",
  "attachments": [
    {
      "type": "Attestation",
      "name": "My Degree",
      "url": [
        {
          "type": "Link",
          "rel": "did:dsnp:123456$AcmeMedicalAssociationPhysician",
          "href": "https://acmemedicalassn.org/credentials/degree-123.json",
          "mediaType": "application/vc",
          "hash": [
		    "bciqdnu347gcfmxzbkhgoubiobphm6readngitfywktdtbdocgogop2q"
          ]
        }
      ]
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}