> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Create Credential

> Creates a new credential that defines an attestation authority

Creates a new credential that defines an attestation authority. This instruction
allows users to create credentials that specify who can issue attestations and
what types of attestations they can issue.

## Parameters

| Parameter       | Type                | Description                                                                 |
| --------------- | ------------------- | --------------------------------------------------------------------------- |
| `payer`         | `TransactionSigner` | The account that will pay for the transaction                               |
| `credential`    | `Address`           | The credential account to create                                            |
| `authority`     | `TransactionSigner` | The authority who will control the credential                               |
| `systemProgram` | `Address`           | The System Program account (defaults to '11111111111111111111111111111111') |
| `name`          | `string`            | The name of the credential                                                  |
| `signers`       | `Address[]`         | The list of authorized signers who can create attestations                  |

## Returns

Returns an `Instruction` (`{ accounts, data, programAddress }`). Add it to a
transaction and send it with your client, for example
`client.sendTransaction(instruction)`. There is no `sendAndConfirm()` method.
[Create a Client](/developers/docs/tools/attestations/quickstart/installation#create-a-client) sets up `client`, `payerSigner`, and `authoritySigner`.

## Example

```typescript
import {
  deriveCredentialPda,
  getCreateCredentialInstruction
} from "sas-lib";

// The credential account is a PDA derived from the authority and name
const [credentialPda] = await deriveCredentialPda({
  authority: authoritySigner.address,
  name: "My Credential"
});

const instruction = getCreateCredentialInstruction({
  payer: payerSigner,
  credential: credentialPda,
  authority: authoritySigner,
  name: "My Credential",
  signers: [signer1Address, signer2Address]
});

// Send the instruction with your Kit client
await client.sendTransaction(instruction);
```

## Important Notes

- The payer must be a signer of the transaction
- The authority must be a signer of the transaction
- The credential account must be writable
- This operation requires the System Program for rent exemption calculations
- The authority will have control over the credential and can:
  - Modify the list of authorized signers
  - Create schemas under this credential
  - Close the credential
- The authorized signers can:
  - Create attestations under this credential
  - Close attestations they created
- The name should be descriptive of the credential's purpose
- The list of signers can be empty initially and modified later
- The authority can be one of the authorized signers
