AbiItem Types
AbiItem.AbiItem
Root type for an item on an Abi.Abi
.
Source: src/AbiItem.ts
AbiItem.ExtractNames
Source: src/AbiItem.ts
AbiItem.FromAbi
Extracts an AbiItem.AbiItem
item from an Abi.Abi
, given a name.
Examples
import { Abi, AbiItem } from 'ox'
const abi = Abi.from([
'error Foo(string)',
'function foo(string)',
'event Bar(uint256)',
])
type type Foo = {
readonly name: "Foo";
readonly type: "error";
readonly inputs: readonly [{
readonly type: "string";
}];
}Foo = AbiItem.FromAbi<typeof abi, 'Foo'>
Source: src/AbiItem.ts
AbiItem.Name
Extracts the names of all AbiItem.AbiItem
items in an Abi.Abi
.
Examples
import { Abi, AbiItem } from 'ox'
const abi = Abi.from([
'error Foo(string)',
'function foo(string)',
'event Bar(uint256)',
])
type type names = "Foo" | "foo" | "Bar"names = AbiItem.Name<typeof abi>
Source: src/AbiItem.ts