> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# AbiItem.getSignature

:::info
`AbiItem.getSignature` is a re-export of ox's [`AbiItem.getSignature`](https://oxlib.sh/api/AbiItem/getSignature). Refer to the ox documentation for the full reference.
:::

Computes the stringified signature for a given [`AbiItem.AbiItem`](/docs/utilities/abiitem/types#abiitem).

## Imports

```ts
import { AbiItem } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { AbiItem } from 'viem/utils'

const signature = AbiItem.getSignature(
  'function ownerOf(uint256 tokenId)'
)
// @log: 'ownerOf(uint256)'
```

```ts twoslash
// @noErrors
import { Abi, AbiItem } from 'viem/utils'

const erc20Abi = Abi.from([...])

const signature = AbiItem.getSignature(erc20Abi, 'ownerOf')
// @log: 'ownerOf(uint256)'
```

```ts twoslash
// @noErrors
import { AbiItem } from 'viem/utils'

const signature = AbiItem.getSignature({
  name: 'ownerOf',
  type: 'function',
  inputs: [{ name: 'tokenId', type: 'uint256' }],
  outputs: [],
  stateMutability: 'view'
})
// @log: 'ownerOf(uint256)'
```

## Definition

```ts
function getSignature<abi, name>(
  abi: abi | Abi.Abi | readonly unknown[],
  name: name,
): string
```

## Parameters

### abi

* **Type:** `abi | Abi.Abi | readonly unknown[]`

### name

* **Type:** `name`

## Return Type

The stringified signature of the ABI Item.

`string`
