Class: Instruction
api/entities/Instruction.Instruction
Represents a settlement Instruction to be executed on a certain Venue
Hierarchy
-
Entity<UniqueIdentifiers,string>↳
Instruction
Properties
id
• id: BigNumber
Unique identifier number of the instruction
Defined in
api/entities/Instruction/index.ts:127
uuid
• uuid: string
Inherited from
Defined in
Methods
affirm
▸ affirm(args?, opts?): Promise<GenericPolymeshTransaction<Instruction, Instruction>>
Affirm this instruction (authorize)
Parameters
| Name | Type |
|---|---|
args? | AffirmInstructionParams |
opts? | ProcedureOpts |
Returns
Promise<GenericPolymeshTransaction<Instruction, Instruction>>
Note
this method is of type OptionalArgsProcedureMethod, 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
Defined in
api/entities/Instruction/index.ts:900
affirmAsMediator
▸ affirmAsMediator(args?, opts?): Promise<GenericPolymeshTransaction<Instruction, Instruction>>
Affirm this instruction as a mediator (authorize)
Parameters
| Name | Type |
|---|---|
args? | AffirmAsMediatorParams |
opts? | ProcedureOpts |
Returns
Promise<GenericPolymeshTransaction<Instruction, Instruction>>
Note
this method is of type OptionalArgsProcedureMethod, which means you can call affirmAsMediator.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Defined in
api/entities/Instruction/index.ts:934
details
▸ details(): Promise<InstructionDetails>
Retrieve information specific to this Instruction
Returns
Promise<InstructionDetails>
Note
uses middleware (if available) to retrieve information, otherwise directly queries from the chain
Throws
if
- instruction does not exists
- instruction is not yet processed by the middleware (when querying from middleware)
- instruction is executed/rejected and was pruned from chain (when querying from chain)
Defined in
api/entities/Instruction/index.ts:546
executeManually
▸ executeManually(args?, opts?): Promise<GenericPolymeshTransaction<Instruction, Instruction>>
Executes an Instruction either of type SettleManual or a Failed instruction
Parameters
| Name | Type |
|---|---|
args? | ExecuteManualInstructionParams |
opts? | ProcedureOpts |
Returns
Promise<GenericPolymeshTransaction<Instruction, Instruction>>
Note
this method is of type OptionalArgsProcedureMethod, which means you can call executeManually.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Defined in
api/entities/Instruction/index.ts:954
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:387
generateOffChainAffirmationReceipt
▸ generateOffChainAffirmationReceipt(args): Promise<OffChainAffirmationReceipt>
Generate an offchain affirmation receipt for a specific leg and UID
Parameters
| Name | Type | Description |
|---|---|---|
args | Object | - |
args.legId | BigNumber | index of the offchain leg in this instruction |
args.metadata? | string | (optional) metadata to be associated with the receipt |
args.signer? | string | Account | (optional) Signer to be used to generate receipt signature. Defaults to signing Account associated with the SDK |
args.signerKeyRingType? | SignerKeyRingType | (optional) keyring type of the signer. Defaults to 'Sr25519' |
args.uid | BigNumber | UID of the receipt |
Returns
Promise<OffChainAffirmationReceipt>
Defined in
api/entities/Instruction/index.ts:1309
getAffirmations
▸ getAffirmations(paginationOpts?): Promise<ResultSet<InstructionAffirmation>>
Retrieve every authorization generated by this Instruction (status and authorizing Identity)
Parameters
| Name | Type |
|---|---|
paginationOpts? | PaginationOptions | MiddlewarePaginationOptions |
Returns
Promise<ResultSet<InstructionAffirmation>>
Note
supports pagination.
Note
uses middleware (if available) to retrieve information, otherwise directly queries from the chain
Throws
if
- instruction does not exists
- instruction is executed/rejected and was pruned from chain (when querying from chain)
Defined in
api/entities/Instruction/index.ts:582
getInvolvedPortfolios
▸ getInvolvedPortfolios(args): Promise<(DefaultPortfolio | NumberedPortfolio)[]>
Retrieve all the involved portfolios in this Instruction where the given identity is a custodian of
Parameters
| Name | Type |
|---|---|
args | Object |
args.did | string |
Returns
Promise<(DefaultPortfolio | NumberedPortfolio)[]>
Defined in
api/entities/Instruction/index.ts:1028
getLegs
▸ getLegs(paginationOpts?): Promise<ResultSet<Leg>>
Retrieve all legs of this Instruction
Parameters
| Name | Type |
|---|---|
paginationOpts? | PaginationOptions | MiddlewarePaginationOptions |
Returns
Note
supports pagination
Note
uses middleware (if available) to retrieve information, otherwise directly queries from the chain
Throws
if
- instruction does not exists
- instruction is not yet processed by the middleware (when querying from middleware)
- instruction is executed/rejected and was pruned from chain (when querying from chain)