# AbiItem.getSignature

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

## Imports

:::code-group
```ts [Named]
import { AbiItem } from 'ox'
```

```ts [Entrypoint]
import * as AbiItem from 'ox/AbiItem'
```
:::

## Examples

```ts twoslash
import { AbiItem } from 'ox'

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

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

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

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

```ts twoslash
import { AbiItem } from 'ox'

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
```

**Source:** [src/core/AbiItem.ts](https://github.com/wevm/ox/blob/main/src/core/AbiItem.ts#L805)

## Parameters

### abi

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

### name

* **Type:** `name`

## Return Type

The stringified signature of the ABI Item.

`string`
