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
Entity
<UniqueIdentifiers
,string
>↳
Instruction
Table of contents
Properties
Methods
Properties
id
• id: BigNumber
Identifier number of the venue
Defined in
api/entities/Instruction/index.ts:77
uuid
• uuid: string
Inherited from
Defined in
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
opts?
Returns
Promise
<TransactionQueue
<Instruction
, Instruction
, unknown
[][]>>
Defined in
api/entities/Instruction/index.ts:406
details
▸ details(): Promise
<InstructionDetails
>
Retrieve information specific to this Instruction
Returns
Promise
<InstructionDetails
>
Defined in
api/entities/Instruction/index.ts:198
exists
▸ exists(): Promise
<boolean
>
Determine whether this Instruction exists on chain (or existed and was pruned)
Returns
Promise
<boolean
>
Overrides
Defined in
api/entities/Instruction/index.ts:180
getAffirmations
▸ getAffirmations(paginationOpts?
): Promise
<ResultSet
<InstructionAffirmation
>>
Retrieve every authorization generated by this Instruction (status and authorizing Identity)
note
supports pagination
Parameters
paginationOpts?
Returns
Promise
<ResultSet
<InstructionAffirmation
>>
Defined in
api/entities/Instruction/index.ts:257
getLegs
▸ getLegs(paginationOpts?
): Promise
<ResultSet
<Leg
>>
Retrieve all legs of this Instruction
note
supports pagination
Parameters
paginationOpts?
Returns
Defined in
api/entities/Instruction/index.ts:303
getStatus
▸ getStatus(): Promise
<InstructionStatusResult
>
Retrieve current status of this Instruction
note
uses the middleware
Returns
Promise
<InstructionStatusResult
>
Defined in
api/entities/Instruction/index.ts:354
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
entity
Entity
<unknown
, unknown
>
Returns
boolean
Inherited from
Defined in
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:135
isPending
▸ isPending(): Promise
<boolean
>
Retrieve whether the Instruction is still pending on chain
Returns
Promise
<boolean
>
Defined in
api/entities/Instruction/index.ts:159
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
opts?
Returns
Promise
<TransactionQueue
<Instruction
, Instruction
, unknown
[][]>>
Defined in
api/entities/Instruction/index.ts:396
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
opts?
Returns
Promise
<TransactionQueue
<Instruction
, Instruction
, unknown
[][]>>
Defined in
api/entities/Instruction/index.ts:428
toHuman
▸ toHuman(): string
Return the Instruction's ID
Returns
string
Overrides
Defined in
api/entities/Instruction/index.ts:457
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
opts?
Returns
Promise
<TransactionQueue
<Instruction
, Instruction
, unknown
[][]>>
Defined in
api/entities/Instruction/index.ts:416
generateUuid
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Type parameters
Identifiers
Parameters
identifiers
Identifiers
Returns
string
Inherited from
Defined in
unserialize
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Type parameters
Identifiers
Parameters
serialized
string
UUID to unserialize
Returns
Identifiers
Inherited from
Defined in
Last updated