Skip to main content

Overview

Error.GetSelector builds a selector function using a custom keccak256String implementation. Use this for alternate runtimes or WASM/native hashing.

Quick Start

import { Abi } from '@tevm/voltaire/Abi';

const getSelector = Abi.Error.GetSelector({
  keccak256String: (value) => myKeccak256String(value)
});

const error = {
  type: 'error',
  name: 'Unauthorized',
  inputs: []
} as const;

const selector = getSelector(error);

See Also