Skip to content

Bloom.validate

Checks if a string is a valid bloom filter value.

Imports

Named
import { Bloom } from 'ox'

Examples

import { Bloom } from 'ox'
 
Bloom.validate('0x')
false
Bloom.validate('0x00000000000000000000008000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000044000200000000000000000002000000000000000000000040000000000000000000000000000020000000000000000000800000000000800000000000800000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808002000000000400000000000000000000000060000000000000000000000000000000000000000000000100000000000002000000')
true

Definition

function validate(
  value: string,
): value is Hex.Hex

Source: src/core/Bloom.ts

Parameters

value

  • Type: string

Value to check.

Return Type

Whether the value is a valid bloom filter.

value is Hex.Hex