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

# ParamType

Each input and output of a [**Fragment**](/sdk/content/classes/Fragment) is an Array of [**ParamType**](/sdk/content/classes/ParamType).

## Properties

| Property        | Modifier   | Type                                                                | Description                                                                                           |
| :-------------- | :--------- | :------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------- |
| `arrayChildren` | `readonly` | `null` \| [`ParamType`](/sdk/content/classes/ParamType)             | The type of each child in the array.<br /><br />For non-array types this is `null`.                   |
| `arrayLength`   | `readonly` | `null` \| `number`                                                  | The array length, or `-1` for dynamic-lengthed arrays.<br /><br />For non-array types this is `null`. |
| `baseType`      | `readonly` | `string`                                                            | The base type (e.g. `"address"`, `"tuple"`, `"array"`)                                                |
| `components`    | `readonly` | `null` \| readonly [`ParamType`](/sdk/content/classes/ParamType)\[] | The components for the tuple.<br /><br />For non-tuple types this is `null`.                          |
| `indexed`       | `readonly` | `null` \| `boolean`                                                 | True if the parameters is indexed.<br /><br />For non-indexable types this is `null`.                 |
| `name`          | `readonly` | `string`                                                            | The local name of the parameter (or `""` if unbound)                                                  |
| `type`          | `readonly` | `string`                                                            | The fully qualified type (e.g. `"address"`, `"tuple(address)"`, `"uint256[3][]"`)                     |

## Methods

### format()

```ts theme={null}
format(format?): string
```

Return a string representation of this type.

For example,

`sighash" => "(uint256,address)"`

`"minimal" => "tuple(uint256,address) indexed"`

`"full" => "tuple(uint256 foo, address bar) indexed baz"`

#### Parameters

| Parameter | Type                                                 |
| :-------- | :--------------------------------------------------- |
| `format`? | [`FormatType`](/sdk/content/type-aliases/FormatType) |

#### Returns

`string`

The formatted type.

#### Source

[abi/fragments.ts:707](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L707)

***

### isArray()

```ts theme={null}
isArray(): this is ParamType & Object
```

This provides a type guard ensuring that [**arrayChildren**](/sdk/content/classes/ParamType) and
[**arrayLength**](/sdk/content/classes/ParamType) are non-null.

#### Returns

`this is ParamType & Object`

True if this is an Array type.

#### Source

[abi/fragments.ts:768](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L768)

***

### isIndexable()

```ts theme={null}
isIndexable(): this is ParamType & Object
```

This provides a type guard ensuring that [**indexed**](/sdk/content/classes/ParamType) is non-null.

#### Returns

`this is ParamType & Object`

True if this is an Indexable type.

#### Source

[abi/fragments.ts:786](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L786)

***

### isTuple()

```ts theme={null}
isTuple(): this is ParamType & Object
```

This provides a type guard ensuring that [**components**](/sdk/content/classes/ParamType) is non-null.

#### Returns

`this is ParamType & Object`

True if this is a Tuple type.

#### Source

[abi/fragments.ts:777](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L777)

***

### walk()

```ts theme={null}
walk(value, process): any
```

Walks the **ParamType** with `value`, calling `process` on each type, destructing the `value` recursively.

#### Parameters

| Parameter | Type                                                               |
| :-------- | :----------------------------------------------------------------- |
| `value`   | `any`                                                              |
| `process` | [`ParamTypeWalkFunc`](/sdk/content/type-aliases/ParamTypeWalkFunc) |

#### Returns

`any`

#### Source

[abi/fragments.ts:793](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L793)

***

### walkAsync()

```ts theme={null}
walkAsync(value, process): Promise<any>
```

Walks the **ParamType** with `value`, asynchronously calling `process` on each type, destructing the `value`
recursively.

This can be used to resolve ENS naes by walking and resolving each `"address"` type.

#### Parameters

| Parameter | Type                                                                         |
| :-------- | :--------------------------------------------------------------------------- |
| `value`   | `any`                                                                        |
| `process` | [`ParamTypeWalkAsyncFunc`](/sdk/content/type-aliases/ParamTypeWalkAsyncFunc) |

#### Returns

`Promise`\<`any`>

#### Source

[abi/fragments.ts:903](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L903)

***

### from()

```ts theme={null}
static from(obj, allowIndexed?): ParamType
```

Creates a new **ParamType** for `obj`.

If `allowIndexed` then the `indexed` keyword is permitted, otherwise the `indexed` keyword will throw an error.

#### Parameters

| Parameter       | Type      |
| :-------------- | :-------- |
| `obj`           | `any`     |
| `allowIndexed`? | `boolean` |

#### Returns

[`ParamType`](/sdk/content/classes/ParamType)

#### Source

[abi/fragments.ts:920](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L920)

***

### isParamType()

```ts theme={null}
static isParamType(value): value is ParamType
```

Returns true if `value` is a **ParamType**.

#### Parameters

| Parameter | Type  |
| :-------- | :---- |
| `value`   | `any` |

#### Returns

`value is ParamType`

#### Source

[abi/fragments.ts:1015](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/abi/fragments.ts#L1015)
