SDK Reference
Methods
GetCredentials

getCredentials

Returns an array of Credentials for the given DID.

How to use?

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

Parameters

  • did - DID of the user you want to get the credentials of

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"
  },
  ...
]