api_entities_Instruction.Instruction

@polymeshassociation/polymesh-sdk / Modules / api/entities/Instruction / Instruction

Class: Instruction

api/entities/Instruction.Instruction

Represents a settlement Instruction to be executed on a certain Venue

Hierarchy

Table of contents

Properties

Methods

Properties

id

• id: BigNumber

Identifier number of the venue

Defined in

api/entities/Instruction/index.ts:77arrow-up-right


uuid

• uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46arrow-up-right

Methods

affirm

â–¸ affirm(opts?): Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Affirm this instruction (authorize)

note this method is of type NoArgsProcedureMethod, which means you can call affirm.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

Returns

Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Defined in

api/entities/Instruction/index.ts:406arrow-up-right


details

â–¸ details(): Promise<InstructionDetails>

Retrieve information specific to this Instruction

Returns

Promise<InstructionDetails>

Defined in

api/entities/Instruction/index.ts:198arrow-up-right


exists

â–¸ exists(): Promise<boolean>

Determine whether this Instruction exists on chain (or existed and was pruned)

Returns

Promise<boolean>

Overrides

Entity.exists

Defined in

api/entities/Instruction/index.ts:180arrow-up-right


getAffirmations

â–¸ getAffirmations(paginationOpts?): Promise<ResultSet<InstructionAffirmation>>

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

note supports pagination

Parameters

Name
Type

paginationOpts?

Returns

Promise<ResultSet<InstructionAffirmation>>

Defined in

api/entities/Instruction/index.ts:257arrow-up-right


getLegs

â–¸ getLegs(paginationOpts?): Promise<ResultSet<Leg>>

Retrieve all legs of this Instruction

note supports pagination

Parameters

Name
Type

paginationOpts?

Returns

Promise<ResultSet<Leg>>

Defined in

api/entities/Instruction/index.ts:303arrow-up-right


getStatus

â–¸ getStatus(): Promise<InstructionStatusResult>

Retrieve current status of this Instruction

note uses the middleware

Returns

Promise<InstructionStatusResult>

Defined in

api/entities/Instruction/index.ts:354arrow-up-right


isEqual

â–¸ isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

Name
Type

entity

Entity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual

Defined in

api/entities/Entity.ts:61arrow-up-right


isExecuted

â–¸ isExecuted(): Promise<boolean>

Retrieve whether the Instruction has already been executed and pruned from the chain.

Returns

Promise<boolean>

Defined in

api/entities/Instruction/index.ts:135arrow-up-right


isPending

â–¸ isPending(): Promise<boolean>

Retrieve whether the Instruction is still pending on chain

Returns

Promise<boolean>

Defined in

api/entities/Instruction/index.ts:159arrow-up-right


reject

â–¸ reject(opts?): Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Reject this instruction

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

note reject on SettleOnBlock behaves just like unauthorize

note this method is of type NoArgsProcedureMethod, which means you can call reject.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

Returns

Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Defined in

api/entities/Instruction/index.ts:396arrow-up-right


reschedule

â–¸ reschedule(opts?): Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Reschedules a failed Instruction to be tried again

throws if the Instruction status is not InstructionStatus.Failed

note this method is of type NoArgsProcedureMethod, which means you can call reschedule.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

Returns

Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Defined in

api/entities/Instruction/index.ts:428arrow-up-right


toHuman

â–¸ toHuman(): string

Return the Instruction's ID

Returns

string

Overrides

Entity.toHuman

Defined in

api/entities/Instruction/index.ts:457arrow-up-right


withdraw

â–¸ withdraw(opts?): Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Withdraw affirmation from this instruction (unauthorize)

note this method is of type NoArgsProcedureMethod, which means you can call withdraw.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Name
Type

Returns

Promise<TransactionQueue<Instruction, Instruction, unknown[][]>>

Defined in

api/entities/Instruction/index.ts:416arrow-up-right


generateUuid

â–¸ Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name

Identifiers

Parameters

Name
Type

identifiers

Identifiers

Returns

string

Inherited from

Entity.generateUuid

Defined in

api/entities/Entity.ts:14arrow-up-right


unserialize

â–¸ Static unserialize<Identifiers>(serialized): Identifiers

Unserialize a UUID into its Unique Identifiers

Type parameters

Name

Identifiers

Parameters

Name
Type
Description

serialized

string

UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23arrow-up-right

Last updated

Was this helpful?