# domain.setCredentials()

[[Source]](https://github.com/ripple/simpleXRPL/blob/95b977b15f8950c5bc076b25165217869c0b06d3/src/verticals/domain.ts#L96)

Update the accepted credentials of an existing permissioned domain.

## Signature

```ts
domain.setCredentials(
  params: DomainSetCredentialsParams,
  options?: DomainWriteOptions,
): Promise<SubmissionResult<DomainIntent>>
```

## Parameters

| Parameter | Type | Required | Description |
|  --- | --- | --- | --- |
| `domain` | `string` | Yes | The domain id to update. |
| `credList` | `AcceptedCredential[]` | Yes | The credentials the domain accepts (at least one). |


Each `AcceptedCredential` is:

| Field | Type | Required | Description |
|  --- | --- | --- | --- |
| `issuer` | `string` | Yes | The issuer r-address. |
| `credType` | `string` | Yes | The credential type, as a plain string (hex-encoded on the ledger). |


## Options

`options` is an optional second argument that sets the source account and overrides the fee.

| Option | Type | Required | Description |
|  --- | --- | --- | --- |
| `from` | `AccountSelector` | No | The account to act as — an r-address string, or an object `{ address }` or `{ signer, account? }`. Defaults to the primary signer's primary account. (For IOU operations, this is the issuer.) |
| `fee` | `FeeIntent` | No | Fee override — a priority tier and/or a `maxFeeDrops` cap. |
| `idempotencyKey` | `string` | No | A prior submission's `idempotencyKey`, to retry to the same intent instead of creating a duplicate. Auto-generated when omitted. |


## Returns

Resolves to a `SubmissionResult<DomainIntent>`.

Every simpleXRPL write resolves to a `SubmissionResult<T>` — a union tagged by `source`, with the backend's raw response preserved verbatim. Its common fields are:

| Field | Type | Description |
|  --- | --- | --- |
| `intent` | `T` | The operation-specific output — see the operation's own return fields. |
| `source` | `'xrpld' | 'custody' | 'palisade'` | Which backend produced the result; discriminates `response`. |
| `response` | `TxResponse` | custody record | Palisade record | The backend's raw response, preserved verbatim. |
| `txHash` | `string` *(optional)* | The XRPL transaction hash, once the transaction is on-ledger. |
| `intentId` | `string` *(optional)* | The custodian intent id, when the path produced one. Hold onto this to resume via `client.intent`. |
| `idempotencyKey` | `string` *(optional)* | The UUIDv7 this submission carried. Pass it back as a later call's `idempotencyKey` to retry to the same intent rather than creating a duplicate. |


### Return fields

For `Domain.setCredentials`, the `intent` (`DomainIntent`) echoes:

| Field | Type | Description |
|  --- | --- | --- |
| `domainID` | `string` | The domain id that was updated. |


## Underlying XRPL transactor

Builds and submits a single [PermissionedDomainSet](https://xrpl.org/docs/references/protocol/transactions/types/permissioneddomainset) transaction naming the existing domain id.

## Example

```ts
await client.domain.setCredentials({
  domain: 'A1B2...',
  credList: [{ issuer: 'rIssuer...', credType: 'KYC' }],
})
```