Skip to content

credential.list()

[Source]

List credentials an account holds (default) or issued.

Signature

credential.list(
  params?: CredentialListParams,
): Promise<CredentialListResult>

Parameters

ParameterTypeRequiredDescription
role'holder' | 'issuer'NoQuery as holder (default) or issuer.
accountstringNoThe account whose credentials to list. Defaults to the primary signer's account.

Returns

Resolves to a CredentialListResult, where credentials[i] corresponds to data[i]:

FieldTypeDescription
credentialsreadonly CredentialRef[]The identifier of each credential (credType, issuer, holder).
datareadonly CredentialData[]The shaped credentials. See credential.retrieve for CredentialData.

Underlying XRPL request

Read-only — no signer is required and nothing is submitted. Queries the ledger with account_objects.

Example

const { data } = await client.credential.list({ role: 'holder' })

for (const cred of data) {
  console.log(cred.credType, cred.accepted)
}