> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

> Auto-generated TypeScript API documentation from source code

# Generated API Reference

[**@tevm/voltaire**](../../index.mdx)

***

[@tevm/voltaire](../../index.mdx) / primitives/Abi

# primitives/Abi

## Namespaces

* [Constructor](namespaces/Constructor.mdx)
* [Error](namespaces/Error.mdx)
* [Event](namespaces/Event.mdx)
* [Function](namespaces/Function.mdx)
* [Item](namespaces/Item.mdx)

## Classes

### Abi

Defined in: [src/primitives/Abi/Abi.js:36](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L36)

Factory function for creating Abi instances

#### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

#### Since

0.0.0

#### Param

ABI items

#### Throws

#### Example

```javascript theme={null}
import { Abi } from './primitives/Abi/index.js';
const abi = Abi([
  { type: 'function', name: 'transfer', inputs: [...], outputs: [...] }
]);
```

#### Constructors

##### Constructor

> **new Abi**(`items`): [`Abi`](#abi)

Defined in: [src/primitives/Abi/Abi.js:36](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L36)

Factory function for creating Abi instances

###### Parameters

###### items

readonly `Item`\[]

ABI items

###### Returns

[`Abi`](#abi)

Abi instance

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import { Abi } from './primitives/Abi/index.js';
const abi = Abi([
  { type: 'function', name: 'transfer', inputs: [...], outputs: [...] }
]);
```

#### Properties

##### Constructor

> `static` **Constructor**: [`Constructor`](namespaces/Constructor.mdx)

Defined in: [src/primitives/Abi/Abi.js:71](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L71)

##### decode()

> `static` **decode**: (`this`, `functionName`, `data`) => readonly `unknown`\[]

Defined in: [src/primitives/Abi/Abi.js:55](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L55)

Decode function return values (branded ABI method)

###### Parameters

###### this

readonly `Item`\[]

###### functionName

`string`

Function name

###### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded return data

###### Returns

readonly `unknown`\[]

Decoded return values

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

If function not found in ABI

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'function', name: 'balanceOf', outputs: [...] }];
const decoded = Abi.decode(abi, "balanceOf", encodedData);
```

##### decodeData()

> `static` **decodeData**: (`this`, `data`) => `object`

Defined in: [src/primitives/Abi/Abi.js:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L56)

Decode function call data and identify function (branded ABI method)

###### Parameters

###### this

readonly `Item`\[]

###### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded function call data

###### Returns

`object`

Decoded function name and arguments

###### args

> **args**: readonly `unknown`\[]

###### functionName

> **functionName**: `string`

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

If data is too short to contain selector

###### Throws

If function with selector not found in ABI

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'function', name: 'transfer', inputs: [...] }];
const decoded = Abi.decodeData(abi, calldata);
// { functionName: "transfer", args: [address, amount] }
```

##### decodeParameters()

> `static` **decodeParameters**: \<`TParams`>(`params`, `data`) => `ParametersToPrimitiveTypes`\<`TParams`>

Defined in: [src/primitives/Abi/Abi.js:61](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L61)

###### Type Parameters

###### TParams

`TParams` *extends* readonly `Parameter`\[]

###### Parameters

###### params

`TParams`

###### data

`Uint8Array`\<`ArrayBufferLike`>

###### Returns

`ParametersToPrimitiveTypes`\<`TParams`>

##### DecodeParameters()

> `static` **DecodeParameters**: \<`TParams`>(`params`, `data`) => `ParametersToPrimitiveTypes`\<`TParams`>

Defined in: [src/primitives/Abi/Abi.js:65](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L65)

###### Type Parameters

###### TParams

`TParams` *extends* readonly `Parameter`\[]

###### Parameters

###### params

`TParams`

###### data

`Uint8Array`\<`ArrayBufferLike`>

###### Returns

`ParametersToPrimitiveTypes`\<`TParams`>

##### encode()

> `static` **encode**: (`this`, `functionName`, `args`) => `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/Abi.js:54](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L54)

Encode function call data (branded ABI method)

###### Parameters

###### this

readonly `Item`\[]

###### functionName

`string`

Function name to encode

###### args

readonly `unknown`\[]

Function arguments

###### Returns

`Uint8Array`\<`ArrayBufferLike`>

Encoded function call data

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

If function not found in ABI

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'function', name: 'transfer', inputs: [...] }];
const encoded = Abi.encode(abi, "transfer", [address, amount]);
```

##### encodeParameters()

> `static` **encodeParameters**: \<`TParams`>(`params`, `values`) => `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/Abi.js:60](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L60)

###### Type Parameters

###### TParams

`TParams` *extends* readonly `Parameter`\[]

###### Parameters

###### params

`TParams`

###### values

`ParametersToPrimitiveTypes`\<`TParams`>

###### Returns

`Uint8Array`\<`ArrayBufferLike`>

##### Error

> `static` **Error**: `object`

Defined in: [src/primitives/Abi/Abi.js:70](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L70)

###### decodeParams()

> **decodeParams**: \<`TName`, `TInputs`>(`error`, `data`) => `ParametersToPrimitiveTypes`\<`TInputs`>

Decode error parameters from encoded data

###### Type Parameters

###### TName

`TName` *extends* `string`

###### TInputs

`TInputs` *extends* readonly `ParameterType`\<`AbiType`, `string`, `string`>\[]

###### Parameters

###### error

[`ErrorType`](namespaces/Error.mdx#errortype)\<`TName`, `TInputs`>

ABI error definition

###### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded error data with selector prefix

###### Returns

`ParametersToPrimitiveTypes`\<`TInputs`>

Decoded parameter values

###### Throws

If data is too short for selector

###### Throws

If selector doesn't match expected

###### Example

```typescript theme={null}
const error = { type: "error", name: "InsufficientBalance", inputs: [{ type: "uint256", name: "balance" }] };
const decoded = decodeParams(error, encodedData); // [100n]
```

###### encodeParams()

> **encodeParams**: \<`TName`, `TInputs`>(`error`, `args`) => `Uint8Array`\<`ArrayBufferLike`>

Encode error parameters with selector prefix

###### Type Parameters

###### TName

`TName` *extends* `string`

###### TInputs

`TInputs` *extends* readonly `ParameterType`\<`AbiType`, `string`, `string`>\[]

###### Parameters

###### error

[`ErrorType`](namespaces/Error.mdx#errortype)\<`TName`, `TInputs`>

ABI error definition

###### args

`ParametersToPrimitiveTypes`\<`TInputs`>

Parameter values to encode

###### Returns

`Uint8Array`\<`ArrayBufferLike`>

Encoded error data with 4-byte selector prefix

###### Example

```typescript theme={null}
const error = { type: "error", name: "InsufficientBalance", inputs: [{ type: "uint256", name: "balance" }] };
const encoded = encodeParams(error, [100n]); // Uint8Array with selector + encoded params
```

###### getSelector()

> **getSelector**: (`error`) => `Uint8Array`

###### Parameters

###### error

`any`

###### Returns

`Uint8Array`

###### GetSelector()

> **GetSelector**: (`deps`) => (`error`) => `Uint8Array`

Factory: Get the 4-byte selector for an error

###### Parameters

###### deps

Crypto dependencies

###### keccak256String

(`str`) => `Uint8Array`

Keccak256 hash function for strings

###### Returns

Function that computes error selector

> (`error`): `Uint8Array`

###### Parameters

###### error

`any`

###### Returns

`Uint8Array`

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Example

```javascript theme={null}
import { GetSelector } from './primitives/Abi/error/index.js';
import { keccak256String } from './primitives/Hash/index.js';

const getSelector = GetSelector({ keccak256String });
const error = { type: "error", name: "Unauthorized", inputs: [] };
const selector = getSelector(error);
```

###### getSignature()

> **getSignature**: \<`TName`, `TInputs`>(`error`) => `string`

Get the signature string for an error (e.g., "MyError(uint256,address)")

###### Type Parameters

###### TName

`TName` *extends* `string`

###### TInputs

`TInputs` *extends* readonly `ParameterType`\<`AbiType`, `string`, `string`>\[]

###### Parameters

###### error

[`ErrorType`](namespaces/Error.mdx#errortype)\<`TName`, `TInputs`>

ABI error definition

###### Returns

`string`

Error signature string

###### Example

```typescript theme={null}
const error = { type: "error", name: "Unauthorized", inputs: [{ type: "address", name: "sender" }] };
const sig = getSignature(error); // "Unauthorized(address)"
```

##### Event

> `static` **Event**: `object`

Defined in: [src/primitives/Abi/Abi.js:69](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L69)

###### decodeLog()

> **decodeLog**: (`event`, `data`, `topics`) => [`DecodeLogResult`](namespaces/Event.mdx#decodelogresult)\<`any`>

Decode event log data and topics into event arguments

###### Parameters

###### event

[`EventType`](namespaces/Event.mdx#eventtype)\<`string`, readonly `Parameter`\[]>

Event definition

###### data

`Uint8Array`\<`ArrayBufferLike`>

Log data bytes

###### topics

readonly [`HashType`](../../index/namespaces/HashType.mdx#hashtype)\[]

Log topics

###### Returns

[`DecodeLogResult`](namespaces/Event.mdx#decodelogresult)\<`any`>

Decoded event arguments

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

If topics are missing or invalid

###### Throws

If event selector doesn't match topic0

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const event = { type: "event", name: "Transfer", inputs: [
  { type: "address", name: "from", indexed: true },
  { type: "address", name: "to", indexed: true },
  { type: "uint256", name: "value" }
]};
const decoded = Abi.Event.decodeLog(event, logData, logTopics);
// { from: "0x...", to: "0x...", value: 1000n }
```

###### DecodeLog()

> **DecodeLog**: (`event`, `data`, `topics`) => [`DecodeLogResult`](namespaces/Event.mdx#decodelogresult)\<`any`> = `decodeLog`

Decode event log data and topics into event arguments

###### Parameters

###### event

[`EventType`](namespaces/Event.mdx#eventtype)\<`string`, readonly `Parameter`\[]>

Event definition

###### data

`Uint8Array`\<`ArrayBufferLike`>

Log data bytes

###### topics

readonly [`HashType`](../../index/namespaces/HashType.mdx#hashtype)\[]

Log topics

###### Returns

[`DecodeLogResult`](namespaces/Event.mdx#decodelogresult)\<`any`>

Decoded event arguments

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

If topics are missing or invalid

###### Throws

If event selector doesn't match topic0

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const event = { type: "event", name: "Transfer", inputs: [
  { type: "address", name: "from", indexed: true },
  { type: "address", name: "to", indexed: true },
  { type: "uint256", name: "value" }
]};
const decoded = Abi.Event.decodeLog(event, logData, logTopics);
// { from: "0x...", to: "0x...", value: 1000n }
```

###### encodeTopics()

> **encodeTopics**: (`event`, `args`) => ([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[]

###### Parameters

###### event

`any`

###### args

`any`

###### Returns

([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[]

###### EncodeTopics()

> **EncodeTopics**: (`deps`) => (`event`, `args`) => ([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[]

Factory: Encode event arguments into topics array

###### Parameters

###### deps

Crypto dependencies

###### keccak256

(`data`) => `Uint8Array`

Keccak256 hash function

###### keccak256String

(`str`) => `Uint8Array`

Keccak256 hash function for strings

###### Returns

Function that encodes event topics

> (`event`, `args`): ([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[]

###### Parameters

###### event

`any`

###### args

`any`

###### Returns

([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[]

###### Example

```typescript theme={null}
import { EncodeTopics } from './primitives/Abi/event/index.js';
import { hash as keccak256, keccak256String } from './primitives/Hash/index.js';

const encodeTopics = EncodeTopics({ keccak256, keccak256String });
const event = { type: "event", name: "Transfer", inputs: [...], anonymous: false };
const topics = encodeTopics(event, { from: "0x...", to: "0x..." });
// [selector, encodedFrom, encodedTo]
```

###### getSelector()

> **getSelector**: (`event`) => [`HashType`](../../index/namespaces/HashType.mdx#hashtype)

Factory function for creating Event instances
Note: Event is a plain object, not a class instance
This namespace provides convenient methods for working with events

###### Parameters

###### event

`any`

###### Returns

[`HashType`](../../index/namespaces/HashType.mdx#hashtype)

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const event = {
  type: 'event',
  name: 'Transfer',
  inputs: [
    { type: 'address', name: 'from', indexed: true },
    { type: 'address', name: 'to', indexed: true },
    { type: 'uint256', name: 'value' }
  ]
};
const selector = Abi.Event.getSelector(event);
```

###### GetSelector()

> **GetSelector**: (`deps`) => (`event`) => [`HashType`](../../index/namespaces/HashType.mdx#hashtype)

Factory: Get event selector (keccak256 hash of signature)

###### Parameters

###### deps

Crypto dependencies

###### keccak256String

(`str`) => `Uint8Array`

Keccak256 hash function for strings

###### Returns

Function that computes event selector

> (`event`): [`HashType`](../../index/namespaces/HashType.mdx#hashtype)

###### Parameters

###### event

`any`

###### Returns

[`HashType`](../../index/namespaces/HashType.mdx#hashtype)

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Example

```javascript theme={null}
import { GetSelector } from './primitives/Abi/event/index.js';
import { keccak256String } from './primitives/Hash/index.js';

const getSelector = GetSelector({ keccak256String });
const event = { type: "event", name: "Transfer", inputs: [{ type: "address", indexed: true }] };
const selector = getSelector(event);
```

###### getSignature()

> **getSignature**: (`event`) => `string`

Get event signature string (e.g., "Transfer(address,address,uint256)")

###### Parameters

###### event

[`EventType`](namespaces/Event.mdx#eventtype)\<`string`, readonly `Parameter`\[]>

Event definition

###### Returns

`string`

Event signature

###### Example

```typescript theme={null}
const event = { type: "event", name: "Transfer", inputs: [...] };
const sig = Event.getSignature(event); // "Transfer(address,address,uint256)"
```

###### Signature()

> **Signature**: (`event`) => `string` = `getSignature`

Get event signature string (e.g., "Transfer(address,address,uint256)")

###### Parameters

###### event

[`EventType`](namespaces/Event.mdx#eventtype)\<`string`, readonly `Parameter`\[]>

Event definition

###### Returns

`string`

Event signature

###### Example

```typescript theme={null}
const event = { type: "event", name: "Transfer", inputs: [...] };
const sig = Event.getSignature(event); // "Transfer(address,address,uint256)"
```

###### Topics()

> **Topics**: (`event`, `args`) => ([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[] = `encodeTopics`

###### Parameters

###### event

`any`

###### args

`any`

###### Returns

([`HashType`](../../index/namespaces/HashType.mdx#hashtype) | `null`)\[]

##### format()

> `static` **format**: (`item`) => `string`

Defined in: [src/primitives/Abi/Abi.js:52](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L52)

Format an ABI item as a human-readable string

###### Parameters

###### item

`Item`

ABI item to format

###### Returns

`string`

Formatted string representation

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const formatted = Abi.Item.format({
  type: 'function',
  name: 'transfer',
  inputs: [{ type: 'address', name: 'to' }, { type: 'uint256', name: 'amount' }],
  outputs: [{ type: 'bool' }]
});
// => "function transfer(address to, uint256 amount) returns (bool)"
```

##### formatWithArgs()

> `static` **formatWithArgs**: (`item`, `args`) => `string`

Defined in: [src/primitives/Abi/Abi.js:53](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L53)

Format an ABI item with arguments as a human-readable string

###### Parameters

###### item

`Item`

ABI item to format

###### args

readonly `unknown`\[]

Arguments to display

###### Returns

`string`

Formatted string with arguments

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const formatted = Abi.Item.formatWithArgs(
  { type: 'function', name: 'transfer', inputs: [{ type: 'address' }, { type: 'uint256' }] },
  ['0x123...', 100n]
);
// => "transfer(0x123..., 100)"
```

##### Function

> `static` **Function**: *typeof* [`Function`](namespaces/Function.mdx#function)

Defined in: [src/primitives/Abi/Abi.js:68](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L68)

##### getItem()

> `static` **getItem**: \<`TAbi`, `TName`, `TType`>(`abi`, `name`, `type?`) => `Extract`\<`TAbi`\[`number`], \{ `name`: `TName`; }> | `undefined`

Defined in: [src/primitives/Abi/Abi.js:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L51)

Get a specific ABI item by name and optional type

###### Type Parameters

###### TAbi

`TAbi` *extends* readonly `Item`\[]

###### TName

`TName` *extends* `string`

###### TType

`TType` *extends* `"function"` | `"event"` | `"constructor"` | `"error"` | `"fallback"` | `"receive"` | `undefined`

###### Parameters

###### abi

`TAbi`

ABI array to search

###### name

`TName`

Name of the item to find

###### type?

`TType`

Optional type filter (function, event, error, constructor)

###### Returns

`Extract`\<`TAbi`\[`number`], \{ `name`: `TName`; }> | `undefined`

The found item or undefined

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const transferFn = Abi.Item.getItem(abi, 'transfer', 'function');
const transferEvent = Abi.Item.getItem(abi, 'Transfer', 'event');
```

##### Item

> `static` **Item**: [`Item`](namespaces/Item.mdx)

Defined in: [src/primitives/Abi/Abi.js:72](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L72)

##### Parameters()

> `static` **Parameters**: \<`TParams`>(`params`, `values`) => `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/Abi.js:64](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L64)

###### Type Parameters

###### TParams

`TParams` *extends* readonly `Parameter`\[]

###### Parameters

###### params

`TParams`

###### values

`ParametersToPrimitiveTypes`\<`TParams`>

###### Returns

`Uint8Array`\<`ArrayBufferLike`>

##### parseLogs()

> `static` **parseLogs**: (`this`, `logs`) => readonly `object`\[]

Defined in: [src/primitives/Abi/Abi.js:57](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L57)

Parse event logs (branded ABI method)

###### Parameters

###### this

readonly `Item`\[]

###### logs

readonly `object`\[]

Array of log objects

###### Returns

readonly `object`\[]

Parsed event logs

###### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'event', name: 'Transfer', inputs: [...] }];
const parsed = Abi.parseLogs(abi, logs);
// [{ eventName: "Transfer", args: { from, to, value } }]
```

#### Methods

##### decode()

> **decode**(`functionName`, `data`): readonly `unknown`\[]

Defined in: [src/primitives/Abi/Abi.js:107](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L107)

###### Parameters

###### functionName

`string`

###### data

`Uint8Array`\<`ArrayBufferLike`>

###### Returns

readonly `unknown`\[]

##### decodeData()

> **decodeData**(`data`): `object`

Defined in: [src/primitives/Abi/Abi.js:112](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L112)

###### Parameters

###### data

`Uint8Array`\<`ArrayBufferLike`>

###### Returns

`object`

###### args

> **args**: readonly `unknown`\[]

###### functionName

> **functionName**: `string`

##### encode()

> **encode**(`functionName`, `args`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/Abi.js:102](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L102)

###### Parameters

###### functionName

`string`

###### args

`unknown`\[]

###### Returns

`Uint8Array`\<`ArrayBufferLike`>

##### format()

> **format**(): `any`

Defined in: [src/primitives/Abi/Abi.js:83](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L83)

###### Returns

`any`

##### formatWithArgs()

> **formatWithArgs**(`args`): `any`

Defined in: [src/primitives/Abi/Abi.js:90](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L90)

###### Parameters

###### args

`Record`\<`string`, `unknown`\[]>

###### Returns

`any`

##### getConstructor()

> **getConstructor**(): `any`

Defined in: [src/primitives/Abi/Abi.js:137](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L137)

###### Returns

`any`

##### getError()

> **getError**(`name`): `any`

Defined in: [src/primitives/Abi/Abi.js:133](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L133)

###### Parameters

###### name

`string`

###### Returns

`any`

##### getEvent()

> **getEvent**(`name`): `any`

Defined in: [src/primitives/Abi/Abi.js:128](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L128)

###### Parameters

###### name

`string`

###### Returns

`any`

##### getFallback()

> **getFallback**(): `any`

Defined in: [src/primitives/Abi/Abi.js:143](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L143)

###### Returns

`any`

##### getFunction()

> **getFunction**(`name`): `any`

Defined in: [src/primitives/Abi/Abi.js:123](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L123)

###### Parameters

###### name

`string`

###### Returns

`any`

##### getItem()

> **getItem**(`name`, `type?`): `any`

Defined in: [src/primitives/Abi/Abi.js:79](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L79)

###### Parameters

###### name

`string`

###### type?

`"function"` | `"event"` | `"constructor"` | `"error"` | `"fallback"` | `"receive"`

###### Returns

`any`

##### getReceive()

> **getReceive**(): `any`

Defined in: [src/primitives/Abi/Abi.js:149](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L149)

###### Returns

`any`

##### parseLogs()

> **parseLogs**(`logs`): readonly `object`\[]

Defined in: [src/primitives/Abi/Abi.js:117](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L117)

###### Parameters

###### logs

readonly `object`\[]

###### Returns

readonly `object`\[]

##### toString()

> **toString**(): `string`

Defined in: [src/primitives/Abi/Abi.js:162](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L162)

###### Returns

`string`

##### from()

> `static` **from**(`items`): `any`

Defined in: [src/primitives/Abi/Abi.js:44](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/Abi.js#L44)

###### Parameters

###### items

readonly [`ItemType`](namespaces/Item.mdx#itemtype)\[]

###### Returns

`any`

## Type Aliases

### WrappedErrorType

> **WrappedErrorType** = `object`

Defined in: [src/primitives/Abi/error/wrapped/WrappedErrorType.ts:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/WrappedErrorType.ts#L14)

ERC-7751 Wrapped Error type

Represents a wrapped execution error with additional context about the failing contract,
function, and original revert reason.

#### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

#### Since

0.0.0

#### Properties

##### details

> **details**: [`BytesType`](../Bytes.mdx#bytestype)

Defined in: [src/primitives/Abi/error/wrapped/WrappedErrorType.ts:22](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/WrappedErrorType.ts#L22)

Additional error details/context

##### reason

> **reason**: [`BytesType`](../Bytes.mdx#bytestype)

Defined in: [src/primitives/Abi/error/wrapped/WrappedErrorType.ts:20](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/WrappedErrorType.ts#L20)

Original revert reason data

##### selector

> **selector**: [`SelectorType`](../Selector.mdx#selectortype)

Defined in: [src/primitives/Abi/error/wrapped/WrappedErrorType.ts:18](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/WrappedErrorType.ts#L18)

Function selector that was called

##### target

> **target**: [`AddressType`](../Address.mdx#addresstype)

Defined in: [src/primitives/Abi/error/wrapped/WrappedErrorType.ts:16](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/WrappedErrorType.ts#L16)

Address of contract that reverted

## Variables

### ERC1155InsufficientBalance

> `const` **ERC1155InsufficientBalance**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L14)

Insufficient balance for transfer
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; }, \{ `name`: `"balance"`; `type`: `"uint256"`; }, \{ `name`: `"needed"`; `type`: `"uint256"`; }, \{ `name`: `"tokenId"`; `type`: `"uint256"`; }]

##### name

> `readonly` **name**: `"ERC1155InsufficientBalance"` = `"ERC1155InsufficientBalance"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC1155InvalidApprover

> `const` **ERC1155InvalidApprover**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:62](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L62)

Invalid approver address
error ERC1155InvalidApprover(address approver)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"approver"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC1155InvalidApprover"` = `"ERC1155InvalidApprover"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC1155InvalidArrayLength

> `const` **ERC1155InvalidArrayLength**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:82](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L82)

Array length mismatch
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"idsLength"`; `type`: `"uint256"`; }, \{ `name`: `"valuesLength"`; `type`: `"uint256"`; }]

##### name

> `readonly` **name**: `"ERC1155InvalidArrayLength"` = `"ERC1155InvalidArrayLength"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC1155InvalidOperator

> `const` **ERC1155InvalidOperator**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:72](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L72)

Invalid operator address
error ERC1155InvalidOperator(address operator)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"operator"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC1155InvalidOperator"` = `"ERC1155InvalidOperator"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC1155InvalidReceiver

> `const` **ERC1155InvalidReceiver**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L39)

Invalid receiver address
error ERC1155InvalidReceiver(address receiver)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"receiver"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC1155InvalidReceiver"` = `"ERC1155InvalidReceiver"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC1155InvalidSender

> `const` **ERC1155InvalidSender**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:29](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L29)

Invalid sender address
error ERC1155InvalidSender(address sender)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC1155InvalidSender"` = `"ERC1155InvalidSender"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC1155MissingApprovalForAll

> `const` **ERC1155MissingApprovalForAll**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC1155Errors.ts:49](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC1155Errors.ts#L49)

Missing approval for all tokens
error ERC1155MissingApprovalForAll(address operator, address owner)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"operator"`; `type`: `"address"`; }, \{ `name`: `"owner"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC1155MissingApprovalForAll"` = `"ERC1155MissingApprovalForAll"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC20InsufficientAllowance

> `const` **ERC20InsufficientAllowance**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC20Errors.ts:48](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC20Errors.ts#L48)

Insufficient allowance for transfer
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"spender"`; `type`: `"address"`; }, \{ `name`: `"allowance"`; `type`: `"uint256"`; }, \{ `name`: `"needed"`; `type`: `"uint256"`; }]

##### name

> `readonly` **name**: `"ERC20InsufficientAllowance"` = `"ERC20InsufficientAllowance"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC20InsufficientBalance

> `const` **ERC20InsufficientBalance**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC20Errors.ts:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC20Errors.ts#L14)

Insufficient balance for transfer
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; }, \{ `name`: `"balance"`; `type`: `"uint256"`; }, \{ `name`: `"needed"`; `type`: `"uint256"`; }]

##### name

> `readonly` **name**: `"ERC20InsufficientBalance"` = `"ERC20InsufficientBalance"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC20InvalidApprover

> `const` **ERC20InvalidApprover**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC20Errors.ts:62](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC20Errors.ts#L62)

Invalid approver address
error ERC20InvalidApprover(address approver)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"approver"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC20InvalidApprover"` = `"ERC20InvalidApprover"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC20InvalidReceiver

> `const` **ERC20InvalidReceiver**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC20Errors.ts:38](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC20Errors.ts#L38)

Invalid receiver address
error ERC20InvalidReceiver(address receiver)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"receiver"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC20InvalidReceiver"` = `"ERC20InvalidReceiver"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC20InvalidSender

> `const` **ERC20InvalidSender**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC20Errors.ts:28](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC20Errors.ts#L28)

Invalid sender address
error ERC20InvalidSender(address sender)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC20InvalidSender"` = `"ERC20InvalidSender"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC20InvalidSpender

> `const` **ERC20InvalidSpender**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC20Errors.ts:72](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC20Errors.ts#L72)

Invalid spender address
error ERC20InvalidSpender(address spender)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"spender"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC20InvalidSpender"` = `"ERC20InvalidSpender"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721IncorrectOwner

> `const` **ERC721IncorrectOwner**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:34](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L34)

Sender is not the owner
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; }, \{ `name`: `"tokenId"`; `type`: `"uint256"`; }, \{ `name`: `"owner"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC721IncorrectOwner"` = `"ERC721IncorrectOwner"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721InsufficientApproval

> `const` **ERC721InsufficientApproval**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:68](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L68)

Insufficient approval for operation
error ERC721InsufficientApproval(address operator, uint256 tokenId)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"operator"`; `type`: `"address"`; }, \{ `name`: `"tokenId"`; `type`: `"uint256"`; }]

##### name

> `readonly` **name**: `"ERC721InsufficientApproval"` = `"ERC721InsufficientApproval"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721InvalidApprover

> `const` **ERC721InvalidApprover**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:81](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L81)

Invalid approver address
error ERC721InvalidApprover(address approver)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"approver"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC721InvalidApprover"` = `"ERC721InvalidApprover"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721InvalidOperator

> `const` **ERC721InvalidOperator**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:91](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L91)

Invalid operator address
error ERC721InvalidOperator(address operator)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"operator"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC721InvalidOperator"` = `"ERC721InvalidOperator"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721InvalidOwner

> `const` **ERC721InvalidOwner**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L14)

Invalid owner address
error ERC721InvalidOwner(address owner)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC721InvalidOwner"` = `"ERC721InvalidOwner"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721InvalidReceiver

> `const` **ERC721InvalidReceiver**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:58](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L58)

Invalid receiver address
error ERC721InvalidReceiver(address receiver)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"receiver"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC721InvalidReceiver"` = `"ERC721InvalidReceiver"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721InvalidSender

> `const` **ERC721InvalidSender**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:48](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L48)

Invalid sender address
error ERC721InvalidSender(address sender)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; }]

##### name

> `readonly` **name**: `"ERC721InvalidSender"` = `"ERC721InvalidSender"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### ERC721NonexistentToken

> `const` **ERC721NonexistentToken**: `object`

Defined in: [src/primitives/Abi/error/standards/ERC721Errors.ts:24](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/standards/ERC721Errors.ts#L24)

Token does not exist
error ERC721NonexistentToken(uint256 tokenId)

#### Type Declaration

##### inputs

> `readonly` **inputs**: readonly \[\{ `name`: `"tokenId"`; `type`: `"uint256"`; }]

##### name

> `readonly` **name**: `"ERC721NonexistentToken"` = `"ERC721NonexistentToken"`

##### type

> `readonly` **type**: `"error"` = `"error"`

***

### Interface

> `const` **Interface**: `object`

Defined in: [src/primitives/Abi/interface/index.ts:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/interface/index.ts#L19)

#### Type Declaration

##### ERC1155\_INTERFACE\_ID

> **ERC1155\_INTERFACE\_ID**: [`SelectorType`](../Selector.mdx#selectortype)

ERC-1155 Multi Token Standard interface ID

###### See

[https://eips.ethereum.org/EIPS/eip-1155](https://eips.ethereum.org/EIPS/eip-1155)

##### ERC165\_INTERFACE\_ID

> **ERC165\_INTERFACE\_ID**: [`SelectorType`](../Selector.mdx#selectortype)

ERC-165 supportsInterface(bytes4) interface ID

###### See

[https://eips.ethereum.org/EIPS/eip-165](https://eips.ethereum.org/EIPS/eip-165)

##### ERC20\_INTERFACE\_ID

> **ERC20\_INTERFACE\_ID**: [`SelectorType`](../Selector.mdx#selectortype)

ERC-20 Token Standard interface ID

###### See

[https://eips.ethereum.org/EIPS/eip-20](https://eips.ethereum.org/EIPS/eip-20)

##### ERC721\_INTERFACE\_ID

> **ERC721\_INTERFACE\_ID**: [`SelectorType`](../Selector.mdx#selectortype)

ERC-721 Non-Fungible Token Standard interface ID

###### See

[https://eips.ethereum.org/EIPS/eip-721](https://eips.ethereum.org/EIPS/eip-721)

##### getInterfaceId()

> **getInterfaceId**: (`selectors`) => [`SelectorType`](../Selector.mdx#selectortype)

Calculate ERC-165 interface ID from function selectors

Interface ID is computed by XORing all function selectors in the interface.
Per ERC-165 specification.

###### Parameters

###### selectors

[`SelectorLike`](../Selector.mdx#selectorlike)\[]

Array of function selectors

###### Returns

[`SelectorType`](../Selector.mdx#selectortype)

Interface ID (4-byte XOR result)

###### Throws

If no selectors provided

###### See

[https://eips.ethereum.org/EIPS/eip-165](https://eips.ethereum.org/EIPS/eip-165)

###### Example

```javascript theme={null}
import * as Interface from './primitives/Abi/interface/index.js';

// ERC-20 interface
const erc20 = Interface.getInterfaceId([
  '0x70a08231', // balanceOf(address)
  '0x095ea7b3', // approve(address,uint256)
  '0xa9059cbb', // transfer(address,uint256)
  '0xdd62ed3e', // allowance(address,address)
  '0x23b872dd', // transferFrom(address,address,uint256)
  '0x18160ddd', // totalSupply()
]);
// Returns ERC20_INTERFACE_ID: 0x36372b07
```

***

### WRAPPED\_ERROR\_SELECTOR

> `const` **WRAPPED\_ERROR\_SELECTOR**: [`SelectorType`](../Selector.mdx#selectortype)

Defined in: [src/primitives/Abi/error/wrapped/constants.js:11](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/constants.js#L11)

ERC-7751 WrappedError selector

Selector for: error WrappedError(address target, bytes4 selector, bytes reason, bytes details)

#### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

***

### WrappedError

> `const` **WrappedError**: `object`

Defined in: [src/primitives/Abi/error/wrapped/index.ts:21](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/index.ts#L21)

#### Type Declaration

##### decodeWrappedError()

> **decodeWrappedError**: (`data`) => [`WrappedErrorType`](#wrappederrortype)

Decode ERC-7751 wrapped error data

Decodes a WrappedError from encoded bytes following the ERC-7751 specification.
Expects data to start with the WrappedError selector (0x90bfb865).

###### Parameters

###### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded error data (selector + ABI-encoded params)

###### Returns

[`WrappedErrorType`](#wrappederrortype)

Decoded wrapped error

###### Throws

If selector doesn't match or data is invalid

###### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

###### Example

```javascript theme={null}
import * as WrappedError from './primitives/Abi/error/wrapped/index.js';

const decoded = WrappedError.decodeWrappedError(errorData);
console.log(decoded.target); // Address of failing contract
console.log(decoded.selector); // Function selector
console.log(decoded.reason); // Original revert reason
```

##### encodeWrappedError()

> **encodeWrappedError**: (`wrappedError`) => `Uint8Array`\<`ArrayBufferLike`>

Encode ERC-7751 wrapped error data

Encodes a WrappedError following the ERC-7751 specification:
error WrappedError(address target, bytes4 selector, bytes reason, bytes details)

###### Parameters

###### wrappedError

[`WrappedErrorType`](#wrappederrortype)

Wrapped error data

###### Returns

`Uint8Array`\<`ArrayBufferLike`>

Encoded error data (selector + ABI-encoded params)

###### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

###### Example

```javascript theme={null}
import * as WrappedError from './primitives/Abi/error/wrapped/index.js';
import * as Address from './primitives/Address/index.js';
import * as Selector from './primitives/Selector/index.js';

const encoded = WrappedError.encodeWrappedError({
  target: Address.from('0x1234...'),
  selector: Selector.fromHex('0xabcd1234'),
  reason: new Uint8Array([...]),
  details: new Uint8Array([...])
});
```

##### WRAPPED\_ERROR\_SELECTOR

> **WRAPPED\_ERROR\_SELECTOR**: [`SelectorType`](../Selector.mdx#selectortype)

ERC-7751 WrappedError selector

Selector for: error WrappedError(address target, bytes4 selector, bytes reason, bytes details)

###### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

## Functions

### decode()

> **decode**(`this`, `functionName`, `data`): readonly `unknown`\[]

Defined in: [src/primitives/Abi/decode.js:23](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/decode.js#L23)

Decode function return values (branded ABI method)

#### Parameters

##### this

readonly `Item`\[]

##### functionName

`string`

Function name

##### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded return data

#### Returns

readonly `unknown`\[]

Decoded return values

#### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

#### Since

0.0.0

#### Throws

If function not found in ABI

#### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'function', name: 'balanceOf', outputs: [...] }];
const decoded = Abi.decode(abi, "balanceOf", encodedData);
```

***

### decodeData()

> **decodeData**(`this`, `data`): `object`

Defined in: [src/primitives/Abi/decodeData.js:25](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/decodeData.js#L25)

Decode function call data and identify function (branded ABI method)

#### Parameters

##### this

readonly `Item`\[]

##### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded function call data

#### Returns

`object`

Decoded function name and arguments

##### args

> **args**: readonly `unknown`\[]

##### functionName

> **functionName**: `string`

#### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

#### Since

0.0.0

#### Throws

If data is too short to contain selector

#### Throws

If function with selector not found in ABI

#### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'function', name: 'transfer', inputs: [...] }];
const decoded = Abi.decodeData(abi, calldata);
// { functionName: "transfer", args: [address, amount] }
```

***

### decodeParameters()

> **decodeParameters**\<`TParams`>(`params`, `data`): `ParametersToPrimitiveTypes`\<`TParams`>

Defined in: [src/primitives/Abi/decodeParameters.js:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/decodeParameters.js#L14)

#### Type Parameters

##### TParams

`TParams` *extends* readonly `Parameter`\[]

#### Parameters

##### params

`TParams`

##### data

`Uint8Array`\<`ArrayBufferLike`>

#### Returns

`ParametersToPrimitiveTypes`\<`TParams`>

***

### DecodeParameters()

> **DecodeParameters**\<`TParams`>(`params`, `data`): `ParametersToPrimitiveTypes`\<`TParams`>

Defined in: [src/primitives/Abi/decodeParameters.js:14](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/decodeParameters.js#L14)

#### Type Parameters

##### TParams

`TParams` *extends* readonly `Parameter`\[]

#### Parameters

##### params

`TParams`

##### data

`Uint8Array`\<`ArrayBufferLike`>

#### Returns

`ParametersToPrimitiveTypes`\<`TParams`>

***

### decodeWrappedError()

> **decodeWrappedError**(`data`): [`WrappedErrorType`](#wrappederrortype)

Defined in: [src/primitives/Abi/error/wrapped/decodeWrappedError.js:26](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/decodeWrappedError.js#L26)

Decode ERC-7751 wrapped error data

Decodes a WrappedError from encoded bytes following the ERC-7751 specification.
Expects data to start with the WrappedError selector (0x90bfb865).

#### Parameters

##### data

`Uint8Array`\<`ArrayBufferLike`>

Encoded error data (selector + ABI-encoded params)

#### Returns

[`WrappedErrorType`](#wrappederrortype)

Decoded wrapped error

#### Throws

If selector doesn't match or data is invalid

#### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

#### Example

```javascript theme={null}
import * as WrappedError from './primitives/Abi/error/wrapped/index.js';

const decoded = WrappedError.decodeWrappedError(errorData);
console.log(decoded.target); // Address of failing contract
console.log(decoded.selector); // Function selector
console.log(decoded.reason); // Original revert reason
```

***

### encode()

> **encode**(`this`, `functionName`, `args`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/encode.js:22](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/encode.js#L22)

Encode function call data (branded ABI method)

#### Parameters

##### this

readonly `Item`\[]

##### functionName

`string`

Function name to encode

##### args

readonly `unknown`\[]

Function arguments

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

Encoded function call data

#### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

#### Since

0.0.0

#### Throws

If function not found in ABI

#### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'function', name: 'transfer', inputs: [...] }];
const encoded = Abi.encode(abi, "transfer", [address, amount]);
```

***

### encodeParameters()

> **encodeParameters**\<`TParams`>(`params`, `values`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/encodeParameters.js:15](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/encodeParameters.js#L15)

#### Type Parameters

##### TParams

`TParams` *extends* readonly `Parameter`\[]

#### Parameters

##### params

`TParams`

##### values

`ParametersToPrimitiveTypes`\<`TParams`>

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

***

### encodeWrappedError()

> **encodeWrappedError**(`wrappedError`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/error/wrapped/encodeWrappedError.js:27](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/error/wrapped/encodeWrappedError.js#L27)

Encode ERC-7751 wrapped error data

Encodes a WrappedError following the ERC-7751 specification:
error WrappedError(address target, bytes4 selector, bytes reason, bytes details)

#### Parameters

##### wrappedError

[`WrappedErrorType`](#wrappederrortype)

Wrapped error data

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

Encoded error data (selector + ABI-encoded params)

#### See

[https://eips.ethereum.org/EIPS/eip-7751](https://eips.ethereum.org/EIPS/eip-7751)

#### Example

```javascript theme={null}
import * as WrappedError from './primitives/Abi/error/wrapped/index.js';
import * as Address from './primitives/Address/index.js';
import * as Selector from './primitives/Selector/index.js';

const encoded = WrappedError.encodeWrappedError({
  target: Address.from('0x1234...'),
  selector: Selector.fromHex('0xabcd1234'),
  reason: new Uint8Array([...]),
  details: new Uint8Array([...])
});
```

***

### Parameters()

> **Parameters**\<`TParams`>(`params`, `values`): `Uint8Array`\<`ArrayBufferLike`>

Defined in: [src/primitives/Abi/encodeParameters.js:15](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/encodeParameters.js#L15)

#### Type Parameters

##### TParams

`TParams` *extends* readonly `Parameter`\[]

#### Parameters

##### params

`TParams`

##### values

`ParametersToPrimitiveTypes`\<`TParams`>

#### Returns

`Uint8Array`\<`ArrayBufferLike`>

***

### parseLogs()

> **parseLogs**(`this`, `logs`): readonly `object`\[]

Defined in: [src/primitives/Abi/parseLogs.js:21](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/Abi/parseLogs.js#L21)

Parse event logs (branded ABI method)

#### Parameters

##### this

readonly `Item`\[]

##### logs

readonly `object`\[]

Array of log objects

#### Returns

readonly `object`\[]

Parsed event logs

#### See

[https://voltaire.tevm.sh/primitives/abi](https://voltaire.tevm.sh/primitives/abi)

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import * as Abi from './primitives/Abi/index.js';
const abi = [{ type: 'event', name: 'Transfer', inputs: [...] }];
const parsed = Abi.parseLogs(abi, logs);
// [{ eventName: "Transfer", args: { from, to, value } }]
```
