Skip to content

Blobs.toBytes

Transforms Ox-shaped Blobs.Blobs into the originating data.

Imports

Named
import { Blobs } from 'ox'

Examples

import { Blobs, Hex } from 'ox'
 
const blobs = Blobs.from('0xdeadbeef')
const data = Blobs.toBytes(blobs)
// @log: Uint8Array [ 13, 174, 190, 239 ]

Definition

function toBytes(
  blobs: Blobs<Hex.Hex> | Blobs<Bytes.Bytes>,
): toBytes.ReturnType

Source: src/Blobs.ts

Parameters

blobs

  • Type: Blobs<Hex.Hex> | Blobs<Bytes.Bytes>

Return Type

toBytes.ReturnType