Skip to main content

@idunion/tl-sdk / Exports / Client

Class: Client

DefaultApi - object-oriented interface

Export

DefaultApi

Hierarchy​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new Client(tokenUrl, audience, clientId, clientSecret, baseURL, axios?): Client

Parameters​

NameTypeDefault value
tokenUrlstringundefined
audiencestringundefined
clientIdstringundefined
clientSecretstringundefined
baseURLstringundefined
axiosAxiosInstanceglobalAxios

Returns​

Client

Overrides​

DefaultApi.constructor

Defined in​

client.ts:21

Properties​

axios​

• Protected axios: AxiosInstance = globalAxios

Inherited from​

DefaultApi.axios

Defined in​

client.ts:21


basePath​

• Protected basePath: string = BASE_PATH

Inherited from​

DefaultApi.basePath

Defined in​

base.ts:39


baseURL​

• Protected baseURL: string

Defined in​

client.ts:21


configuration​

• Protected configuration: undefined | Configuration

Inherited from​

DefaultApi.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

Inherited from​

DefaultApi.didGet

Defined in​

api.ts:1822


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

Inherited from​

DefaultApi.didSuggest

Defined in​

api.ts:1832


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

Inherited from​

DefaultApi.didVerificationMethodAdd

Defined in​

api.ts:1844


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

Inherited from​

DefaultApi.didVerificationMethodPatch

Defined in​

api.ts:1856


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

Inherited from​

DefaultApi.etsiTlGet

Defined in​

api.ts:1866


etsiTlSign​

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

Re-generates and re-signs the ETSI Trust List (TS 119-612 or TS 119-602 XML, depending on the trust list type) from its current records, using the Trust List's governance wallet. Only the Trust List owner can perform this operation. The list's scheme information (list type, status determination approach, scheme rules, etc.) and the profile-dependent fields of every listed entity and service are rebuilt from the Trust List's current type, so this also applies a type change made with PATCH /{tl_id} and picks up corrections to the list format. Scheme name, operator and sequence number are kept. Switching between the TS 119-612 and TS 119-602 formats is not possible: if the published list's format does not match the Trust List type, 400 is returned and the Trust List has to be deleted and recreated.

Parameters​

NameTypeDescription
tlIdstring
options?RawAxiosRequestConfigOverride http request option.

Returns​

Promise<AxiosResponse<object, any>>

Throws

Inherited from​

DefaultApi.etsiTlSign

Defined in​

api.ts:1876


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

Inherited from​

DefaultApi.healthCheck

Defined in​

api.ts:1885


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

Inherited from​

DefaultApi.onboardingInit

Defined in​

api.ts:1896


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

Inherited from​

DefaultApi.onboardingStatus

Defined in​

api.ts:1906


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

Inherited from​

DefaultApi.tlCreate

Defined in​

api.ts:1916


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

Inherited from​

DefaultApi.tlDelete

Defined in​

api.ts:1926


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

Inherited from​

DefaultApi.tlGet

Defined in​

api.ts:1936


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

Inherited from​

DefaultApi.tlGetPublicInfo

Defined in​

api.ts:1946


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

Inherited from​

DefaultApi.tlList

Defined in​

api.ts:1956


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

Inherited from​

DefaultApi.tlListByOwner

Defined in​

api.ts:1965


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

Inherited from​

DefaultApi.tlPatch

Defined in​

api.ts:1976


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

Inherited from​

DefaultApi.tlrCreate

Defined in​

api.ts:1987


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

Inherited from​

DefaultApi.tlrDelete

Defined in​

api.ts:1998


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

Inherited from​

DefaultApi.tlrGet

Defined in​

api.ts:2009


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

Inherited from​

DefaultApi.tlrSearch

Defined in​

api.ts:2019


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

Inherited from​

DefaultApi.tlrTrustChainGet

Defined in​

api.ts:2030


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

Inherited from​

DefaultApi.tlrsGet

Defined in​

api.ts:2040


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

Inherited from​

DefaultApi.vpGet

Defined in​

api.ts:2052