Instruction

Represents a settlement Instruction to be executed on a certain Venue

Hierarchy

  • Entity‹UniqueIdentifiers, string›

    Instruction

Index

Properties

Methods

Properties

Protected context

context: Context

Inherited from CheckpointSchedule.context

Defined in src/api/entities/Entity.ts:48arrow-up-right


id

id: BigNumber

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

Identifier number of the venue


uuid

uuid: string

Inherited from CheckpointSchedule.uuid

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

Methods

affirm

affirm(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueueInstruction››

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

Affirm this instruction (authorize)

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

Parameters:

Returns: Promise‹TransactionQueueInstruction››


details

details(): Promise‹InstructionDetails

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

Retrieve information specific to this Instruction

Returns: Promise‹InstructionDetails


exists

exists(): Promise‹boolean›

Overrides Entity.exists

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

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

Returns: Promise‹boolean›


getAffirmations

getAffirmations(paginationOpts?: PaginationOptionsarrow-up-right): Promise‹ResultSetarrow-up-rightInstructionAffirmationarrow-up-right››

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

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

note supports pagination

Parameters:

Name
Type

Returns: Promise‹ResultSetarrow-up-rightInstructionAffirmationarrow-up-right››


getLegs

getLegs(paginationOpts?: PaginationOptionsarrow-up-right): Promise‹ResultSetarrow-up-rightLegarrow-up-right››

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

Retrieve all legs of this Instruction

note supports pagination

Parameters:

Name
Type

Returns: Promise‹ResultSetarrow-up-rightLegarrow-up-right››


getStatus

getStatus(): Promise‹InstructionStatusResult

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

Retrieve current status of this Instruction

note uses the middleware

Returns: Promise‹InstructionStatusResult


isEqual

isEqual(entity: Entity‹unknown, unknown›): boolean

Inherited from CheckpointSchedule.isEqual

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

Determine whether this Entity is the same as another one

Parameters:

Name
Type

entity

Entity‹unknown, unknown›

Returns: boolean


isExecuted

isExecuted(): Promise‹boolean›

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

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

Returns: Promise‹boolean›


isPending

isPending(): Promise‹boolean›

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

Retrieve whether the Instruction is still pending on chain

Returns: Promise‹boolean›


reject

reject(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueueInstruction››

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

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 NoArgsProcedureMethodarrow-up-right, which means you can call reject.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueueInstruction››


reschedule

reschedule(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueueInstruction››

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

Reschedules a failed Instruction to be tried again

throws if the Instruction status is not InstructionStatus.Failed

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

Parameters:

Returns: Promise‹TransactionQueueInstruction››


toJson

toJson(): string

Overrides Entity.toJson

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

Return the Instruction's ID

Returns: string


withdraw

withdraw(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueueInstruction››

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

Withdraw affirmation from this instruction (unauthorize)

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

Parameters:

Returns: Promise‹TransactionQueueInstruction››


Static generateUuid

generateUuidIdentifiers›(identifiers: Identifiers): string

Inherited from CheckpointSchedule.generateUuid

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

Generate the Entity's UUID from its identifying properties

Type parameters:

Identifiers

Parameters:

Name
Type
Description

identifiers

Identifiers

Returns: string


Static unserialize

unserializeIdentifiers›(serialized: string): Identifiers

Inherited from CheckpointSchedule.unserialize

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

Unserialize a UUID into its Unique Identifiers

Type parameters:

Identifiers

Parameters:

Name
Type
Description

serialized

string

UUID to unserialize

Returns: Identifiers

Last updated

Was this helpful?