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
- React Native
- iOS
- Android
createTrustEntity(
request: CreateTrustEntityRequest
): Promise<TrustEntity["id"]>;
func createTrustEntity(request: CreateTrustEntityRequestBindingDto) throws -> String
fun `createTrustEntity`(`request`: CreateTrustEntityRequestBindingDto): kotlin.String
Parameters
- React Native
- iOS
- Android
export interface CreateTrustEntityRequest {
name: string;
logo?: string;
website?: string;
termsUrl?: string;
privacyUrl?: string;
role: TrustEntityRoleEnum;
trustAnchorId: TrustAnchor["id"];
didId: DidListItem["id"];
}
public struct CreateTrustEntityRequestBindingDto {
public var name: String
public var logo: String?
public var website: String?
public var termsUrl: String?
public var privacyUrl: String?
public var role: TrustEntityRoleBindingEnum
public var trustAnchorId: String
public var didId: String
}
data class CreateTrustEntityRequestBindingDto (
var `name`: kotlin.String,
var `logo`: kotlin.String?,
var `website`: kotlin.String?,
var `termsUrl`: kotlin.String?,
var `privacyUrl`: kotlin.String?,
var `role`: TrustEntityRoleBindingEnum,
var `trustAnchorId`: kotlin.String,
var `didId`: kotlin.String
)
-
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.