When issuing a Digital Product Passport, you need to provide CredentialIssuer information. This is a representation of the organization that is issuing the VC, it requires a primary identifier (a did:web identifier) and a human readable name for the organization, and the optional of including other identifiers such as tax registration numbers, etc.

The structure of the CredentialIssuer is as follows:

{
  "type": ["CredentialIssuer"],
  "id": "did:web:trustdid.dev:o:<ORG_ID>:acme-farms",
  "name": "ACME Farms"
}

As always, to learn more about Digital Product Passports please refer to the UNTP as the authoritative source:

UNTP Digital Product Passports

For the lifecycle of a organization managed on the TrustStack, they are likely to issue many Digital Product Passports and to reduce boilerplate as a developer, you can create a CredentialIssuer profile for your organization. This profile can be reused for each Digital Product Passport issued by that organization.

Usage

With @truststack/sdk installed and configured, or alternatively, just the @truststack/untp package.

npm install @truststack/sdk
# or
npm install @truststack/untp

Creating

To create a CredentialIssuer profile, you can use the untp module.

import {UntpClient} from "@truststack/untp";

const client = new UntpClient();

const profile = await client.createCredentialIssuerProfile({
  name: "ACME Farms Profile",
  identifierId: "<DID_ID>",
});

where <DID_ID> is the id of the did:web identifier you want to use for the CredentialIssuer profile.

Deleting

To delete a CredentialIssuer profile, you can use the deleteCredentialIssuerProfile method.

const profile = await client.deleteCredentialIssuerProfile("<PROFILE_ID>");

where <PROFILE_ID> is the id of the CredentialIssuer profile you want to delete.

Retrieving

To retrieve a CredentialIssuer profile, you can use the getCredentialIssuerProfile method.

const profile = await client.getCredentialIssuerProfile("<PROFILE_ID>");

where <PROFILE_ID> is the id of the CredentialIssuer profile you want to retrieve.

Listing

To list all CredentialIssuer profiles, you can use the listCredentialIssuerProfiles method.

const profiles = await client.listCredentialIssuerProfiles({
  page: 1,
  pageSize: 10,
});

where page and pageSize are optional parameters to paginate the results.

Learn More

A CredentialIssuerProfile is a concept that is at the intersection of other features such as DID and Digital Product Passports. For a practical example refer to a guide on managing Organization DPPs