# encodeTokenType

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**@midnight-ntwrk/compact-runtime v0.9.0**](https://docs.midnight.network/api-reference/compact-runtime.md)

***

[@midnight-ntwrk/compact-runtime](https://docs.midnight.network/api-reference/compact-runtime/globals.md) / encodeTokenType

# Function: encodeTokenType()

```
function encodeTokenType(tt): Uint8Array;
```

Encode a [TokenType](https://docs.midnight.network/api-reference/compact-runtime/type-aliases/TokenType.md) into a `Uint8Array` for use in Compact's `TokenType` type

## Parameters[​](#parameters "Direct link to Parameters")

### tt[​](#tt "Direct link to tt")

`string`

## Returns[​](#returns "Direct link to Returns")

`Uint8Array`
