> For the complete documentation index, see [llms.txt](https://developers.polymath.network/polymesh-sdk-api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md).

# Instruction

Represents a settlement Instruction to be executed on a certain Venue

## Hierarchy

* [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/entity.md)‹UniqueIdentifiers›

  ↳ **Instruction**

## Index

### Properties

* [affirm](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#affirm)
* [context](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#protected-context)
* [id](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#id)
* [reject](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#reject)
* [uuid](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#uuid)
* [withdraw](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#withdraw)

### Methods

* [details](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#details)
* [exists](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#exists)
* [getAffirmations](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#getaffirmations)
* [getLegs](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#getlegs)
* [isEqual](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#isequal)
* [generateUuid](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#static-generateuuid)
* [unserialize](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md#static-unserialize)

## Properties

### affirm

• **affirm**: *ProcedureMethod‹void,* [*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md)*›*

*Defined in* [*src/api/entities/Instruction/index.ts:289*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L289)

Affirm this instruction (authorize)

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/context.md)

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md#protected-context)

*Defined in* [*src/api/entities/Entity.ts:48*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Entity.ts#L48)

### id

• **id**: *BigNumber*

*Defined in* [*src/api/entities/Instruction/index.ts:60*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L60)

Identifier number of the venue

### reject

• **reject**: *ProcedureMethod‹void,* [*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md)*›*

*Defined in* [*src/api/entities/Instruction/index.ts:283*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L283)

Reject this instruction

**`note`** reject on `SettleOnAffirmation` will execute the settlement and it will fail immediately.

**`note`** reject on `SettleOnBlock` behaves just like unauthorize

### uuid

• **uuid**: *string*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md#uuid)

*Defined in* [*src/api/entities/Entity.ts:46*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Entity.ts#L46)

### withdraw

• **withdraw**: *ProcedureMethod‹void,* [*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/instruction.md)*›*

*Defined in* [*src/api/entities/Instruction/index.ts:294*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L294)

Withdraw affirmation from this instruction (unauthorize)

## Methods

### details

▸ **details**(): *Promise‹*[*InstructionDetails*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/globals.md#instructiondetails)*›*

*Defined in* [*src/api/entities/Instruction/index.ts:128*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L128)

Retrieve information specific to this Instruction

**Returns:** *Promise‹*[*InstructionDetails*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/globals.md#instructiondetails)*›*

### exists

▸ **exists**(): *Promise‹boolean›*

*Defined in* [*src/api/entities/Instruction/index.ts:107*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L107)

Retrieve whether the Instruction still exists on chain. Executed/rejected instructions are pruned from the storage

**Returns:** *Promise‹boolean›*

### getAffirmations

▸ **getAffirmations**(`paginationOpts?`: [PaginationOptions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md)): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/resultset.md)*‹*[*InstructionAffirmation*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/instructionaffirmation.md)*››*

*Defined in* [*src/api/entities/Instruction/index.ts:184*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L184)

Retrieve every authorization generated by this Instruction (status and authorizing Identity)

**`note`** supports pagination

**Parameters:**

| Name              | Type                                                                                                                        |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `paginationOpts?` | [PaginationOptions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md) |

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/resultset.md)*‹*[*InstructionAffirmation*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/instructionaffirmation.md)*››*

### getLegs

▸ **getLegs**(`paginationOpts?`: [PaginationOptions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md)): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/resultset.md)*‹*[*Leg*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/leg.md)*››*

*Defined in* [*src/api/entities/Instruction/index.ts:230*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Instruction/index.ts#L230)

Retrieve all legs of this Instruction

**`note`** supports pagination

**Parameters:**

| Name              | Type                                                                                                                        |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `paginationOpts?` | [PaginationOptions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md) |

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/resultset.md)*‹*[*Leg*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/interfaces/leg.md)*››*

### isEqual

▸ **isEqual**(`entity`: [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/entity.md)‹object›): *boolean*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*isEqual*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md#isequal)

*Defined in* [*src/api/entities/Entity.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Entity.ts#L61)

Whether this Entity is the same as another one

**Parameters:**

| Name     | Type                                                                                                       |
| -------- | ---------------------------------------------------------------------------------------------------------- |
| `entity` | [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/entity.md)‹object› |

**Returns:** *boolean*

### `Static` generateUuid

▸ **generateUuid**‹**Identifiers**›(`identifiers`: Identifiers): *string*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*generateUuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md#static-generateuuid)

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Entity.ts#L14)

Generate the Entity's UUID from its identifying properties

**Type parameters:**

▪ **Identifiers**: *object*

**Parameters:**

| Name          | Type        | Description |
| ------------- | ----------- | ----------- |
| `identifiers` | Identifiers |             |

**Returns:** *string*

### `Static` unserialize

▸ **unserialize**‹**Identifiers**›(`serialized`: string): *Identifiers*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/524b0225/src/api/entities/Entity.ts#L23)

Unserialize a UUID into its Unique Identifiers

**Type parameters:**

▪ **Identifiers**: *object*

**Parameters:**

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| `serialized` | string | UUID to unserialize |

**Returns:** *Identifiers*
