Skip to main content

@idunion/tl-sdk / Exports / DefaultApi

Class: DefaultApi

DefaultApi - object-oriented interface

Hierarchy

  • BaseAPI

    DefaultApi

    ↳↳ Client

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DefaultApi(configuration?, basePath?, axios?): DefaultApi

Parameters

NameTypeDefault value
configuration?Configurationundefined
basePathstringBASE_PATH
axiosAxiosInstanceglobalAxios

Returns

DefaultApi

Inherited from

BaseAPI.constructor

Defined in

base.ts:39

Properties

axios

Protected axios: AxiosInstance = globalAxios

Inherited from

BaseAPI.axios

Defined in

base.ts:39


basePath

Protected basePath: string = BASE_PATH

Inherited from

BaseAPI.basePath

Defined in

base.ts:39


configuration

Protected configuration: undefined | Configuration

Inherited from

BaseAPI.configuration

Defined in

base.ts:37

Methods

didGet

didGet(tlId, tlrId, options?): Promise<AxiosResponse<DidDocument, any>>

Returns the W3C DID Document for the specified Trust List Record. The document contains the entity's DID, cryptographic verification methods, and service endpoints. This endpoint follows the did:web resolution convention and is used by DID resolvers to look up the entity's public key material and service information.

Parameters

NameTypeDescription
tlIdstringTrust List Identifier
tlrIdstringTrust List Record Identifier
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<DidDocument, any>>

Throws

Defined in

api.ts:1762


didSuggest

didSuggest(tlId, options?): Promise<AxiosResponse<string, any>>

Returns a suggested DID for a new Trust List Record within the specified Trust List. The suggested DID is derived from the Trust List's DID base and can be used to pre-fill the DID field when creating a new record.

Parameters

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<string, any>>

Throws

Defined in

api.ts:1772


didVerificationMethodAdd

didVerificationMethodAdd(tlId, tlrId, verificationMethodCreatePayload?, options?): Promise<AxiosResponse<void, any>>

Adds a new verification method to the DID Document of the specified Trust List Record. The verification method includes cryptographic key material (e.g. Ed25519, RSA, or ES256K) and is registered under the assertionMethod, authentication, and capabilityInvocation relationships in the DID Document.

Parameters

NameTypeDescription
tlIdstringTrust List Identifier
tlrIdstringTrust List Record Identifier
verificationMethodCreatePayload?VerificationMethodCreatePayloadVerification method to add, including its type, controller DID, key ID, and key material.
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<void, any>>

Throws

Defined in

api.ts:1784


didVerificationMethodPatch

didVerificationMethodPatch(tlId, tlrId, verificationMethodPatchPayload?, options?): Promise<AxiosResponse<void, any>>

Updates an existing verification method on the DID Document of a Trust List Record. Primarily used to revoke a verification method by setting the revoked timestamp, which marks the key as no longer valid and transitions the Trust List Record status to revoked. The Trust List Record's status in the ETSI trust list XML is updated accordingly.

Parameters

NameTypeDescription
tlIdstringTrust List Identifier
tlrIdstringTrust List Record Identifier
verificationMethodPatchPayload?VerificationMethodPatchPayloadPartial verification method update payload. Provide the key ID and the fields to update, such as the `revoked` timestamp to revoke the key.
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<void, any>>

Throws

Defined in

api.ts:1796


etsiTlGet

etsiTlGet(tlId, options?): Promise<AxiosResponse<object, any>>

Returns the Trust List in either ETSI TS 119-612 or ETSI TS 119-602 XML format, Depending on the trust list type. The XML document includes Trust List Records with their DID-based cryptographic material and accreditation information, suitable for consumption by wallet verifiers and trust framework participants.

Parameters

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<object, any>>

Throws

Defined in

api.ts:1806


healthCheck

healthCheck(options?): Promise<AxiosResponse<HealthStatus, any>>

Returns the operational health status of the Trust List API service. Useful for monitoring, load balancer checks, and readiness probes.

Parameters

NameTypeDescription
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<HealthStatus, any>>

Throws

Defined in

api.ts:1815


onboardingInit

onboardingInit(tlId, onboardingPayload?, options?): Promise<AxiosResponse<OnboardingResponse, any>>

Initiates the credential-based onboarding process for an organization joining the specified Trust List. Returns a verifier URL to redirect the holder to, where they must present an onboarding Verifiable Credential (VC) proving their eligibility. After presenting the credential, the status can be polled via GET /onboarding/{verifier_state}. On successful verification, a Trust List Record is automatically created for the organization.

Parameters

NameTypeDescription
tlIdstringTrust List identifier
onboardingPayload?OnboardingPayloadOnboarding initiation payload specifying the verifier to use and optionally the holder&#39;s entity identifier (did:key).
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<OnboardingResponse, any>>

Throws

Defined in

api.ts:1826


onboardingStatus

onboardingStatus(verifierState, options?): Promise<AxiosResponse<OnboardingStatus, any>>

Polls the status of an ongoing onboarding process using the verifier state token returned by POST /{tl_id}/onboarding. Returns the current status (in_progress, completed, or error) along with the assigned DID once onboarding is complete. Clients should poll this endpoint periodically until a terminal status is reached.

Parameters

NameTypeDescription
verifierStatestringVerifier state
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<OnboardingStatus, any>>

Throws

Defined in

api.ts:1836


tlCreate

tlCreate(tlPayload?, options?): Promise<AxiosResponse<Tl, any>>

Creates a new Trust List owned by the authenticated user. A Trust List groups organizations (Trust List Records) of a specific role type (e.g. Wallet Provider, PID Provider). It requires a governance wallet for VC interactions and a verifier to validate onboarding credentials presented by joining organizations.

Parameters

NameTypeDescription
tlPayload?TlPayloadTrust List create payload including name, type, description, and references to the governance wallet and verifier services.
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<Tl, any>>

Throws

Defined in

api.ts:1846


tlDelete

tlDelete(tlId, options?): Promise<AxiosResponse<void, any>>

Permanently deletes the specified Trust List and all its associated records. Only the Trust List owner can perform this operation.

Parameters

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<void, any>>

Throws

Defined in

api.ts:1856


tlGet

tlGet(tlId, options?): Promise<AxiosResponse<Tl, any>>

Returns the full representation of a specific Trust List for the authenticated owner, including the verifier ID not exposed in the public directory endpoints.

Parameters

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<Tl, any>>

Throws

Defined in

api.ts:1866


tlGetPublicInfo

tlGetPublicInfo(tlId, options?): Promise<AxiosResponse<TlPublicInfo, any>>

Returns publicly accessible metadata for a specific Trust List. No authentication is required. Returns the same fields as the directory listing but for a single Trust List, excluding sensitive fields such as the verifier ID.

Parameters

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<TlPublicInfo, any>>

Throws

Defined in

api.ts:1876


tlList

tlList(search?, options?): Promise<AxiosResponse<TlPublicInfoList, any>>

Returns a publicly accessible directory of all Trust Lists. No authentication is required. An optional search query parameter filters results by name or description. Used by clients to display a browseable catalog of available trust ecosystems.

Parameters

NameTypeDescription
search?string
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<TlPublicInfoList, any>>

Throws

Defined in

api.ts:1886


tlListByOwner

tlListByOwner(options?): Promise<AxiosResponse<TlList, any>>

Returns all Trust Lists owned by the authenticated user. Unlike the public directory, this response includes the full Trust List representation with the verifier ID. Used to populate the authenticated user's management dashboard.

Parameters

NameTypeDescription
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<TlList, any>>

Throws

Defined in

api.ts:1895


tlPatch

tlPatch(tlId, tlPayload?, options?): Promise<AxiosResponse<Tl, any>>

Updates the metadata of an existing Trust List. Only the Trust List owner can perform this operation. Fields provided in the payload will overwrite current values.

Parameters

NameTypeDescription
tlIdstring
tlPayload?TlPayloadTrust List update payload. Provide only the fields to update.
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<Tl, any>>

Throws

Defined in

api.ts:1906


tlrCreate

tlrCreate(tlId, tlrCreatePayload?, options?): Promise<AxiosResponse<TlrCreatedResult, any>>

Directly creates a new Trust List Record in the specified Trust List, bypassing the credential-based onboarding flow. The public key material must be provided either as a did:key or a Certificate Signing Request (CSR) in PEM format. When a CSR is provided, the API issues an x509 certificate and registers it in the ETSI TS 119-612 trust list XML. Returns the generated DID and, if a CSR was provided, the issued certificate.

Parameters

NameTypeDescription
tlIdstring
tlrCreatePayload?TlrCreatePayloadTrust List Record create payload. Includes organization details and either a did:key or a CSR for key material provisioning.
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<TlrCreatedResult, any>>

Throws

Defined in

api.ts:1917


tlrDelete

tlrDelete(tlId, tlrId, options?): Promise<AxiosResponse<void, any>>

Permanently removes a specific Trust List Record from the Trust List. Only the Trust List owner can perform this operation. The associated DID Document and all related data will be deleted.

Parameters

NameTypeDescription
tlIdstringTrust List Identifier
tlrIdstringTrust List Record Identifier
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<void, any>>

Throws

Defined in

api.ts:1928


tlrGet

tlrGet(tlId, tlrId, options?): Promise<AxiosResponse<Tlr, any>>

Returns a specific Trust List Record including organization details, DID, current status (onboarded, trusted, revoked, or expired), accreditations, and onboarding credentials. No authentication is required; used to display public entity detail pages.

Parameters

NameTypeDescription
tlIdstringTrust List Identifier
tlrIdstringTrust List Record Identifier
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<Tlr, any>>

Throws

Defined in

api.ts:1939


tlrSearch

tlrSearch(orgName?, options?): Promise<AxiosResponse<TlrList, any>>

Searches for Trust List Records across all Trust Lists by organization name. No authentication is required. Used by public-facing directory or search features to find entities registered under a given organization name.

Parameters

NameTypeDescription
orgName?string
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<TlrList, any>>

Throws

Defined in

api.ts:1949


tlrTrustChainGet

tlrTrustChainGet(tlId, tlrId, options?): Promise<AxiosResponse<Tlr[], any>>

Returns the full chain of Trust List Records from the root trust anchor down to the specified record. Each element in the array represents one step in the chain of trust, showing which entities issued or accredited the next. Used to visualize and verify the complete trust path for a given organization.

Parameters

NameTypeDescription
tlIdstringTrust List Identifier
tlrIdstringTrust List Record Identifier
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<Tlr[], any>>

Throws

Defined in

api.ts:1960


tlrsGet

tlrsGet(tlId, options?): Promise<AxiosResponse<TlrList, any>>

Returns all Trust List Records belonging to a specific Trust List. Each record represents an organization with its DID, status (onboarded, trusted, revoked, or expired), accreditations, and onboarding credentials. Used to display the list of entities participating in a trust ecosystem.

Parameters

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<TlrList, any>>

Throws

Defined in

api.ts:1970


vpGet

vpGet(tlId, did, id, options?): Promise<AxiosResponse<VpResponse, any>>

Retrieves the Verifiable Presentation (VP) stored for a specific Trust List Record. The VP is encoded as a JWT and represents the credential presented during the onboarding process, proving the entity's eligibility to join the Trust List. Used to audit or display the onboarding evidence for a given record.

Parameters

NameTypeDescription
tlIdstring
didstring
idstring
options?RawAxiosRequestConfigOverride http request option.

Returns

Promise<AxiosResponse<VpResponse, any>>

Throws

Defined in

api.ts:1982