orbis.getCredentials()

Returns the list of verified credentials emitted on Ceramic for a user.

How to use?

let { data, error } = await orbis.getCredentials(did);

Parameters

  • did: User ID you want to get the credentials for

Returns

/** Returns an array of verified credentials created for a user */
[
  {
    stream_id: "kj...5c",
    family: "krebit",
    content: {
      issuer: {
        id: "did:...",
        ethereumAddress: "0x..."
      },
      @context: [
        "https://www.w3.org/2018/credentials/v1",
        "https://w3id.org/security/suites/eip712sig-2021"
      ],
      issuanceDate: "2022-11-02T17:12:54.794Z",
      expirationDate: "2025-11-02T17:17:54.742Z",
      credentialSchema: {
        id: "https://github.com/KrebitDAO/eip712-vc",
        type: "Eip712SchemaValidator2021"
      },
      credentialSubject: {
        id: "did:...",
        did: "did:...",
        exp: 1762103874,
        nbf: 1667409174,
        tags: [
          "DigitalProperty",
          "Personhood"
        ],
        type: "Twitter",
        price: 0,
        stake: 1,
        trust: 100,
        value: "...",
        encrypted: "none",
        typeSchema: "krebit://schemas/digitalProperty",
        expirationDate: "2025-11-02T17:17:54.742Z",
        ethereumAddress: "0x..."
      }
    },
    issuer: "did:...",
    creator: "did:...",
    subject_id: "did:...",
    type: "Twitter"
  },
  ...
]

How to get my credentials on Orbis?

Orbis is automatically detecting verifiable credentials emitted on Ceramic as long as each credential is created as an independent stream on Ceramic mainnet. Here is how we recommend to structure your credentials for them to be displayed well on applications built on the Orbis Protocol:

/** Suggested minimal structure for verifiable credentials */
{
  "@context": ["..."],
  "issuer": {
    "id": "did:pkh:...",
    "name": "Orbis",
    "logo": "https://..."
  },
  "issuanceDate": "...",
  "expirationDate": "...",
  "credentialSubject": {
    "id": "did:pkh:...",
    "name": "Name of the credential",
    "image": "https://..."
  },
  "proof": {
    ...
  }
}