# convertFieldToBytes

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

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

***

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

# Function: convertFieldToBytes()

```
function convertFieldToBytes(

   n, 

   x, 

   src): Uint8Array;
```

**`Internal`**

Compiler internal for typecasts

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

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

`number`

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

`bigint`

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

`string`

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

`Uint8Array`
