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

# CrossmintTEE

> Kotlin Interface

**Interface**

```kotlin theme={null}
interface CrossmintTEE
```

## Properties

| Property               | Type                 | Description                                                                                                                                      |
| ---------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `isHandshakeCompleted` | `Boolean`            | Indicates whether the handshake with the TEE service has been completed. Handshake must be completed before performing cryptographic operations. |
| `isOTPRequired`        | `StateFlow<Boolean>` | Observable state indicating whether the OTP prompt should be shown.                                                                              |

## Functions

| Function           | Description                                                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `awaitReady`       | Blocks continuation until a successful TEE load has completed. This method must be called before any signing operations. |
| `cancelOTP`        | Resets isOTPRequired to emit false                                                                                       |
| `performHandshake` | Performs the TEE handshake protocol. This is called automatically by load().                                             |
| `provideOTP`       | Provides the OTP code from the user to the TEE flow.                                                                     |
| `signTransaction`  | -                                                                                                                        |

### awaitReady

```kotlin theme={null}
abstract suspend fun awaitReady()
```

Blocks continuation until a successful TEE load has completed. This method must be called before any signing operations.

### cancelOTP

```kotlin theme={null}
abstract fun cancelOTP()
```

Resets isOTPRequired to emit false

### performHandshake

```kotlin theme={null}
abstract suspend fun performHandshake(): Result<Unit, TEEError>
```

Performs the TEE handshake protocol. This is called automatically by load().

### provideOTP

```kotlin theme={null}
abstract fun provideOTP(code: String)
```

Provides the OTP code from the user to the TEE flow.

### signTransaction

```kotlin theme={null}
abstract suspend fun signTransaction(messageBytes: String, keyType: String, encoding: String, otpAuth: String): Result<String, TEEError>
```
