# Instruction

Represents a settlement Instruction to be executed on a certain Venue

## Hierarchy

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

  ↳ **Instruction**

## Index

### Properties

* [context](#protected-context)
* [id](#id)
* [uuid](#uuid)

### Methods

* [affirm](#affirm)
* [details](#details)
* [getAffirmations](#getaffirmations)
* [getLegs](#getlegs)
* [reject](#reject)
* [withdraw](#withdraw)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### `Protected` context

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

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/entity)*.*[*context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/entity#protected-context)

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

### id

• **id**: *BigNumber*

*Defined in* [*src/api/entities/Instruction/index.ts:50*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/src/api/entities/Instruction/index.ts#L50)

Identifier number of the venue

### uuid

• **uuid**: *string*

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/entity)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/entity#uuid)

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

## Methods

### affirm

▸ **affirm**(): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/transactionqueue)*‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/instruction)*››*

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

Affirm this instruction (authorize)

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/transactionqueue)*‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/instruction)*››*

### details

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

*Defined in* [*src/api/entities/Instruction/index.ts:66*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/src/api/entities/Instruction/index.ts#L66)

Retrieve information specific to this Instruction

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

### getAffirmations

▸ **getAffirmations**(): *Promise‹*[*InstructionAffirmation*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/interfaces/instructionaffirmation)*\[]›*

*Defined in* [*src/api/entities/Instruction/index.ts:109*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/src/api/entities/Instruction/index.ts#L109)

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

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

### getLegs

▸ **getLegs**(): *Promise‹*[*Leg*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/interfaces/leg)*\[]›*

*Defined in* [*src/api/entities/Instruction/index.ts:138*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/src/api/entities/Instruction/index.ts#L138)

Retrieve all legs of this Instruction

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

### reject

▸ **reject**(): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/transactionqueue)*‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/instruction)*››*

*Defined in* [*src/api/entities/Instruction/index.ts:173*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/src/api/entities/Instruction/index.ts#L173)

Reject this instruction

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

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

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/transactionqueue)*‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/instruction)*››*

### withdraw

▸ **withdraw**(): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/transactionqueue)*‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/instruction)*››*

*Defined in* [*src/api/entities/Instruction/index.ts:195*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/src/api/entities/Instruction/index.ts#L195)

Withdraw affirmation from this instruction (unauthorize)

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/transactionqueue)*‹*[*Instruction*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/instruction)*››*

### `Static` generateUuid

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

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/entity)*.*[*generateUuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/entity#static-generateuuid)

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/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* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/classes/entity)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v3/entity#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/1221e467/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*
