Create trust anchor
Create a trust anchor to subscribe to a published trust anchor.
Related guide: Trust management
Function
- React Native
- iOS
- Android
createTrustAnchor(
request: CreateTrustAnchorRequest
): Promise<TrustAnchor["id"]>;
func createTrustAnchor(anchor: CreateTrustAnchorRequestBindingDto) throws -> String
fun `createTrustAnchor`(`anchor`: CreateTrustAnchorRequestBindingDto): kotlin.String
Parameters
- React Native
- iOS
- Android
export type CreateTrustAnchorRequest = {
name: string;
type: string;
} & (
| {
isPublisher: true;
publisherReference?: never;
}
| {
isPublisher?: false;
publisherReference: string;
}
);
public struct CreateTrustAnchorRequestBindingDto {
public var name: String
public var type: String
public var isPublisher: Bool?
public var publisherReference: String?
}
data class CreateTrustAnchorRequestBindingDto (
var `name`: kotlin.String,
var `type`: kotlin.String,
var `isPublisher`: kotlin.Boolean?,
var `publisherReference`: kotlin.String?
)
-
isPublisher
- If true the created trust anchor will be published. If subscribing to an existing trust anchor, omit or set to false. For mobile devices, this should be set to false. The remote anchor must be specified viapublisherReference
. -
name
- Must be unique. -
type
- Specify the type of trust management anchor to publish or subscribe to. Possible values from the configuration. -
publisherReference
- URL of the remote trust anchor to subscribe to. It must be provided if and only ifisPublisher = false
.
Return value
The id of the created trust anchor is returned.