> 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](/polymesh-sdk-api-reference/docs-v5/classes/entity.md)‹UniqueIdentifiers›

  ↳ **Instruction**

## Index

### Properties

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

### Methods

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

## Properties

### affirm

• **affirm**: *ProcedureMethod‹void,* [*Instruction*](/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*](/polymesh-sdk-api-reference/docs-v5/classes/context.md)

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*context*](/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*](/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*](/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*uuid*](/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*](/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*](/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*](/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](/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md)): *Promise‹*[*ResultSet*](/polymesh-sdk-api-reference/docs-v5/interfaces/resultset.md)*‹*[*InstructionAffirmation*](/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](/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md) |

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

### getLegs

▸ **getLegs**(`paginationOpts?`: [PaginationOptions](/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md)): *Promise‹*[*ResultSet*](/polymesh-sdk-api-reference/docs-v5/interfaces/resultset.md)*‹*[*Leg*](/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](/polymesh-sdk-api-reference/docs-v5/interfaces/paginationoptions.md) |

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

### isEqual

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

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*isEqual*](/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](/polymesh-sdk-api-reference/docs-v5/classes/entity.md)‹object› |

**Returns:** *boolean*

### `Static` generateUuid

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

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*generateUuid*](/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*](/polymesh-sdk-api-reference/docs-v5/classes/checkpointschedule.md)*.*[*unserialize*](/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*
