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

# CreateInstance

> Erstellt die Instance PDA, die das Private Channels Escrow verankert

Erstellt die `Instance` PDA, die das Escrow verankert. Muss vor jeder
anderen Operation aufgerufen werden.

## PDA Seeds

```
instance        -> ["instance", instance_seed: Pubkey]
allowed_mint    -> ["allowed_mint", instance_pda: Pubkey, mint: Pubkey]
operator        -> ["operator", instance_pda: Pubkey, operator: Pubkey]
event_authority -> ["event_authority"]
```

## Konten

| Konten                          | Beschreibbar | Signer | Beschreibung                                                                 |
| -------------------------------- | -------- | ------ | --------------------------------------------------------------------------- |
| `payer`                          | ✓        | ✓      | Gebühren- und rent-Zahler                                                    |
| `admin`                          |          | ✓      | Initialer Administrator der Instanz                                               |
| `instance_seed`                  |          | ✓      | Einweg-keypair, das nur zur PDA-Ableitung verwendet wird; sein pubkey wird zum seed |
| `instance`                       | ✓        |        | Instance PDA (abgeleitet aus `["instance", instance_seed.pubkey]`)            |
| `system_program`                 |          |        | System Program                                                              |
| `event_authority`                |          |        | Event-Authority-PDA                                                         |
| `private_channel_escrow_program` |          |        | Escrow-Programm                                                              |

## Parameter

| Parameter | Typ | Beschreibung                                                                             |
| --------- | ---- | --------------------------------------------------------------------------------------- |
| `bump`    | `u8` | bump seed für die Instance PDA. Optional: Der `Async`-Client leitet ihn automatisch ab, wenn er weggelassen wird |

> Die IDL enthält ein `discriminator: u8`-Argument (Wert `0`), das automatisch
> vom generierten Client gesetzt wird und nicht manuell übergeben werden sollte.

## Wichtige Hinweise

- `instance_seed` ist ein Einweg-keypair, das nur zur Ableitung der `Instance`
  PDA verwendet wird. Sein pubkey wird zum seed; das keypair selbst wird weder gespeichert noch wiederverwendet.
- Verwende `getCreateInstanceInstructionAsync`; es leitet `bump` und `instance`
  automatisch aus `instance_seed` ab, wenn diese nicht angegeben werden. Übergib einen eigenen `bump` nur, wenn
  du ihn bereits über
  `Pubkey::find_program_address(&[b"instance", instance_seed_pubkey.as_ref()], &PROGRAM_ID)` berechnet hast.
- Sendet ein Ereignis über `EmitEvent` CPI
