Skip to content

fromBlobs

Transforms Viem-shaped blobs into the originating data.

Import

import { fromBlobs } from 'viem'

Usage

example.ts
import { fromBlobs } from 'viem'
 
const data = fromBlobs({ blobs: ['0x...'] })

Returns

Hex | ByteArray

Data extracted from blobs.

Parameters

blobs

  • Type: Hex[] | ByteArray[]

Transforms blobs into the originating data.

import { fromBlobs } from 'viem'
 
const data = fromBlobs({ 
  blobs: ['0x...'] 
})

to

  • Type: "bytes" | "hex"

The output type.

import { fromBlobs } from 'viem'
 
const data = fromBlobs({ 
  blobs: ['0x...'],
  to: 'bytes'
})
 
const data: Uint8Array
data