Rights

Description

Describes the rights that a user has to the hypercert, such as whether it can be sold, transferred, and under what conditions.

Lexicon

Lexicon ID: org.hypercerts.claim.rights

Key: any

Properties

PropertyTypeRequiredDescriptionComments
rightsNamestringFull name of the rights
rightsTypestringShort rights identifier for easier search
rightsDescriptionstringDescription of the rights of this hypercert
attachmentunionAn attachment to define the rights further, e.g. a legal documentURI or blob
createdAtstringClient-declared timestamp when this record was originally created

Code Example

The SDK is in active development. Package names and API methods may change.

Create a rights record:

TypeScript
import { BskyAgent } from '@atproto/api'


const agent = new BskyAgent({ service: 'https://pds.example.com' })
await agent.login({ identifier: 'your-handle', password: 'your-app-password' })


const response = await agent.api.com.atproto.repo.createRecord({
  repo: agent.session.did,
  collection: 'org.hypercerts.claim.rights',
  record: {
    // Full name of the rights
    rightsName: 'Public Display',
    // Short rights identifier for easier search
    rightsType: 'display',
    // Description of the rights
    rightsDescription: 'Right to publicly display this hypercert as proof of contribution',
    // Timestamp when this record was created
    createdAt: new Date().toISOString(),
  },
})


console.log('Created:', response.data.uri)