# takeBytes | @aa-sdk/core

> Overview of the takeBytes function from @aa-sdk/core

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

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function takeBytes(bytes, opts): `0x${string}`;
```

Defined in: [aa-sdk/core/src/utils/bytes.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/utils/bytes.ts#L17)

Given a bytes string, returns a slice of the bytes

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `bytes`
      </td>

      <td>
        `` `0x${string}` ``
      </td>

      <td>
        the hex string representing bytes
      </td>
    </tr>

    <tr>
      <td>
        `opts`
      </td>

      <td>
        `TakeBytesOpts`
      </td>

      <td>
        optional parameters for slicing the bytes
      </td>
    </tr>

  </tbody>
</table>

## Returns

`` `0x${string}` ``

the sliced bytes