# BlsPoint.fromBytes

Converts [`Bytes.Bytes`](/api/Bytes/types#bytes) to a BLS point.

## Imports

:::code-group
```ts [Named]
import { BlsPoint } from 'ox'
```

```ts [Entrypoint]
import * as BlsPoint from 'ox/BlsPoint'
```
:::

## Examples

### Bytes to Public Key

```ts twoslash
// @noErrors
import { BlsPoint } from 'ox'

const publicKey = BlsPoint.fromBytes(Bytes.from([172, 175, 255, ...]), 'G1')
// @log: {
// @log:   x: '0x00...ac',
// @log:   y: '0x00...af',
// @log:   z: '0x00...01',
// @log: }
```

### Bytes to Signature

```ts twoslash
// @noErrors
import { BlsPoint } from 'ox'

const signature = BlsPoint.fromBytes(Bytes.from([172, 175, 255, ...]), 'G2')
// @log: {
// @log:   x: { c0: '0x00...11', c1: '0x00...22' },
// @log:   y: { c0: '0x00...33', c1: '0x00...44' },
// @log:   z: { c0: '0x00...01', c1: '0x00...00' },
// @log: }
```

## Definition

```ts
function fromBytes<group>(
  bytes: Bytes.Bytes,
  group: group,
): group extends 'G1' ? G1 : G2
```

**Source:** [src/core/BlsPoint.ts](https://github.com/wevm/ox/blob/main/src/core/BlsPoint.ts#L311)

## Parameters

### bytes

* **Type:** `Bytes.Bytes`

The bytes to convert.

### group

* **Type:** `group`

## Return Type

The BLS point.

`group extends 'G1' ? G1 : G2`
