Skip to content

PublicKey.fromBytes

Deserializes a PublicKey.PublicKey from a Bytes.Bytes value.

Imports

Named
import { PublicKey } from 'ox'

Examples

import { PublicKey } from 'ox'
 
const publicKey = PublicKey.fromBytes(new Uint8Array([128, 3, 131, ...]))
{
prefix: 4,
x: 59295962801117472859457908919941473389380284132224861839820747729565200149877n,
y: 24099691209996290925259367678540227198235484593389470330605641003500238088869n,
}

Definition

function fromBytes(
  publicKey: Bytes.Bytes,
): PublicKey

Source: src/core/PublicKey.ts

Parameters

publicKey

  • Type: Bytes.Bytes

The serialized public key.

Return Type

The deserialized public key.

PublicKey