Skip to main content

Create trust entity

Adds a trust entity to a trust anchor. For mobile devices, use instead the create remote trust entity function.

Related guide: Trust management

Function

createTrustEntity(
request: CreateTrustEntityRequest
): Promise<TrustEntity["id"]>;

Parameters

export interface CreateTrustEntityRequest {
name: string;
logo?: string;
website?: string;
termsUrl?: string;
privacyUrl?: string;
role: TrustEntityRoleEnum;
trustAnchorId: TrustAnchor["id"];
didId: DidListItem["id"];
}
  • name - Specify the entity name.

  • logo - base64-encoded image.

  • website - Specify the entity's domain name.

  • termsUrl - Specify the Terms of Service url.

  • privacyUrl - Specify the Privacy Policy url.

  • role - Whether the trust entity issues credentials, verifies credentials, or both.

    • [ISSUER, VERIFIER, BOTH]
  • trustAnchorId - Specify the trust anchor on which to add the trust entity.

  • didId - Specify the DID with which to identify the trusted entity.

Return value

The id of the trust entity is returned.