> ## 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.

# Fragment

An abstract class to represent An individual fragment from a parse ABI.

## Extended by

* [`ConstructorFragment`](/sdk/content/classes/ConstructorFragment)
* [`FallbackFragment`](/sdk/content/classes/FallbackFragment)
* [`NamedFragment`](/sdk/content/classes/NamedFragment)

## Properties

| Property | Modifier   | Type                                                      | Description                  |
| :------- | :--------- | :-------------------------------------------------------- | :--------------------------- |
| `inputs` | `readonly` | readonly [`ParamType`](/sdk/content/classes/ParamType)\[] | The inputs for the fragment. |
| `type`   | `readonly` | [`FragmentType`](/sdk/content/type-aliases/FragmentType)  | The type of the fragment.    |

## Methods

### format()

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

Returns a string representation of this fragment as `format`.

#### Parameters

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

#### Returns

`string`

#### Source

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

***

### from()

```ts theme={null}
static from(obj): Fragment
```

Creates a new **Fragment** for `obj`, wich can be any supported ABI frgament type.

#### Parameters

| Parameter | Type  |
| :-------- | :---- |
| `obj`     | `any` |

#### Returns

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

#### Source

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

***

### isConstructor()

```ts theme={null}
static isConstructor(value): value is ConstructorFragment
```

Returns true if `value` is a [**ConstructorFragment**](/sdk/content/classes/ConstructorFragment).

#### Parameters

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

#### Returns

`value is ConstructorFragment`

#### Source

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

***

### isError()

```ts theme={null}
static isError(value): value is ErrorFragment
```

Returns true if `value` is an [**ErrorFragment**](/sdk/content/classes/ErrorFragment).

#### Parameters

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

#### Returns

`value is ErrorFragment`

#### Source

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

***

### isEvent()

```ts theme={null}
static isEvent(value): value is EventFragment
```

Returns true if `value` is an [**EventFragment**](/sdk/content/classes/EventFragment).

#### Parameters

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

#### Returns

`value is EventFragment`

#### Source

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

***

### isFunction()

```ts theme={null}
static isFunction(value): value is FunctionFragment
```

Returns true if `value` is a [**FunctionFragment**](/sdk/content/classes/FunctionFragment).

#### Parameters

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

#### Returns

`value is FunctionFragment`

#### Source

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

***

### isStruct()

```ts theme={null}
static isStruct(value): value is StructFragment
```

Returns true if `value` is a [**StructFragment**](/sdk/content/classes/StructFragment).

#### Parameters

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

#### Returns

`value is StructFragment`

#### Source

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