Struct polymesh_api::polymesh::api::settlement::CallApi
source · pub struct CallApi<'api> { /* private fields */ }Implementations§
source§impl<'api> CallApi<'api>
impl<'api> CallApi<'api>
sourcepub fn create_venue(
&self,
details: VenueDetails,
signers: Vec<AccountId>,
typ: VenueType
) -> Result<WrappedCall<'api>>
pub fn create_venue(
&self,
details: VenueDetails,
signers: Vec<AccountId>,
typ: VenueType
) -> Result<WrappedCall<'api>>
Registers a new venue.
details- Extra details about a venuesigners- Array of signers that are allowed to sign receipts for this venuetyp- Type of venue being created
sourcepub fn update_venue_details(
&self,
id: VenueId,
details: VenueDetails
) -> Result<WrappedCall<'api>>
pub fn update_venue_details(
&self,
id: VenueId,
details: VenueDetails
) -> Result<WrappedCall<'api>>
Edit a venue’s details.
idspecifies the ID of the venue to edit.detailsspecifies the updated venue details.
sourcepub fn update_venue_type(
&self,
id: VenueId,
typ: VenueType
) -> Result<WrappedCall<'api>>
pub fn update_venue_type(
&self,
id: VenueId,
typ: VenueType
) -> Result<WrappedCall<'api>>
Edit a venue’s type.
idspecifies the ID of the venue to edit.typespecifies the new type of the venue.
sourcepub fn add_instruction(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>
) -> Result<WrappedCall<'api>>
pub fn add_instruction(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>
) -> Result<WrappedCall<'api>>
Deprecated. Use add_instruction_with_memo instead.
Adds a new instruction.
Arguments
venue_id- ID of the venue this instruction belongs to.settlement_type- Defines if the instruction should be settled in the next block after receiving all affirmations or waiting till a specific block.trade_date- Optional date from which people can interact with this instruction.value_date- Optional date after which the instruction should be settled (not enforced)legs- Legs included in this instruction.
Weight
950_000_000 + 1_000_000 * legs.len()
sourcepub fn add_and_affirm_instruction(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall<'api>>
pub fn add_and_affirm_instruction(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall<'api>>
Deprecated. Use add_and_affirm_instruction_with_memo instead.
Adds and affirms a new instruction.
Arguments
venue_id- ID of the venue this instruction belongs to.settlement_type- Defines if the instruction should be settled in the next block after receiving all affirmations or waiting till a specific block.trade_date- Optional date from which people can interact with this instruction.value_date- Optional date after which the instruction should be settled (not enforced)legs- Legs included in this instruction.portfolios- Portfolios that the sender controls and wants to use in this affirmations.
Permissions
- Portfolio
sourcepub fn affirm_instruction(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>,
max_legs_count: u32
) -> Result<WrappedCall<'api>>
pub fn affirm_instruction(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>,
max_legs_count: u32
) -> Result<WrappedCall<'api>>
Provide affirmation to an existing instruction.
Arguments
id- Instruction id to affirm.portfolios- Portfolios that the sender controls and wants to affirm this instruction.max_legs_count- Number of legs that need to be affirmed.
Permissions
- Portfolio
sourcepub fn withdraw_affirmation(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>,
max_legs_count: u32
) -> Result<WrappedCall<'api>>
pub fn withdraw_affirmation(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>,
max_legs_count: u32
) -> Result<WrappedCall<'api>>
Withdraw an affirmation for a given instruction.
Arguments
id- Instruction id for that affirmation get withdrawn.portfolios- Portfolios that the sender controls and wants to withdraw affirmation.max_legs_count- Number of legs that need to be un-affirmed.
Permissions
- Portfolio
sourcepub fn reject_instruction(
&self,
id: InstructionId,
portfolio: PortfolioId,
num_of_legs: u32
) -> Result<WrappedCall<'api>>
pub fn reject_instruction(
&self,
id: InstructionId,
portfolio: PortfolioId,
num_of_legs: u32
) -> Result<WrappedCall<'api>>
Rejects an existing instruction.
Arguments
id- Instruction id to reject.portfolio- Portfolio to reject the instruction.num_of_legs- Number of legs in the instruction.
Permissions
- Portfolio
sourcepub fn affirm_with_receipts(
&self,
id: InstructionId,
receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>,
portfolios: Vec<PortfolioId>,
max_legs_count: u32
) -> Result<WrappedCall<'api>>
pub fn affirm_with_receipts(
&self,
id: InstructionId,
receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>,
portfolios: Vec<PortfolioId>,
max_legs_count: u32
) -> Result<WrappedCall<'api>>
Accepts an instruction and claims a signed receipt.
Arguments
id- Target instruction id.leg_id- Target leg id for the receiptreceipt_uid- Receipt ID generated by the signer.signer- Signer of the receipt.signed_data- Signed receipt.portfolios- Portfolios that the sender controls and wants to accept this instruction with
Permissions
- Portfolio
sourcepub fn claim_receipt(
&self,
id: InstructionId,
receipt_details: ReceiptDetails<AccountId, MultiSignature>
) -> Result<WrappedCall<'api>>
pub fn claim_receipt(
&self,
id: InstructionId,
receipt_details: ReceiptDetails<AccountId, MultiSignature>
) -> Result<WrappedCall<'api>>
Claims a signed receipt.
Arguments
id- Target instruction id for the receipt.leg_id- Target leg id for the receiptreceipt_uid- Receipt ID generated by the signer.signer- Signer of the receipt.signed_data- Signed receipt.
Permissions
- Portfolio
sourcepub fn unclaim_receipt(
&self,
instruction_id: InstructionId,
leg_id: LegId
) -> Result<WrappedCall<'api>>
pub fn unclaim_receipt(
&self,
instruction_id: InstructionId,
leg_id: LegId
) -> Result<WrappedCall<'api>>
Unclaims a previously claimed receipt.
Arguments
instruction_id- Target instruction id for the receipt.leg_id- Target leg id for the receipt
Permissions
- Portfolio
sourcepub fn set_venue_filtering(
&self,
ticker: Ticker,
enabled: bool
) -> Result<WrappedCall<'api>>
pub fn set_venue_filtering(
&self,
ticker: Ticker,
enabled: bool
) -> Result<WrappedCall<'api>>
Enables or disabled venue filtering for a token.
Arguments
ticker- Ticker of the token in question.enabled- Boolean that decides if the filtering should be enabled.
Permissions
- Asset
sourcepub fn allow_venues(
&self,
ticker: Ticker,
venues: Vec<VenueId>
) -> Result<WrappedCall<'api>>
pub fn allow_venues(
&self,
ticker: Ticker,
venues: Vec<VenueId>
) -> Result<WrappedCall<'api>>
Allows additional venues to create instructions involving an asset.
ticker- Ticker of the token in question.venues- Array of venues that are allowed to create instructions for the token in question.
Permissions
- Asset
sourcepub fn disallow_venues(
&self,
ticker: Ticker,
venues: Vec<VenueId>
) -> Result<WrappedCall<'api>>
pub fn disallow_venues(
&self,
ticker: Ticker,
venues: Vec<VenueId>
) -> Result<WrappedCall<'api>>
Revokes permission given to venues for creating instructions involving a particular asset.
ticker- Ticker of the token in question.venues- Array of venues that are no longer allowed to create instructions for the token in question.
Permissions
- Asset
sourcepub fn change_receipt_validity(
&self,
receipt_uid: u64,
validity: bool
) -> Result<WrappedCall<'api>>
pub fn change_receipt_validity(
&self,
receipt_uid: u64,
validity: bool
) -> Result<WrappedCall<'api>>
Marks a receipt issued by the caller as claimed or not claimed. This allows the receipt issuer to invalidate an already issued receipt or revalidate an already claimed receipt.
receipt_uid- Unique ID of the receipt.validity- New validity of the receipt.
sourcepub fn execute_scheduled_instruction(
&self,
id: InstructionId,
_legs_count: u32
) -> Result<WrappedCall<'api>>
pub fn execute_scheduled_instruction(
&self,
id: InstructionId,
_legs_count: u32
) -> Result<WrappedCall<'api>>
Root callable extrinsic, used as an internal call to execute a scheduled settlement instruction.
sourcepub fn reschedule_instruction(
&self,
id: InstructionId
) -> Result<WrappedCall<'api>>
pub fn reschedule_instruction(
&self,
id: InstructionId
) -> Result<WrappedCall<'api>>
Reschedules a failed instruction.
Arguments
id- Target instruction id to reschedule.
Permissions
- Portfolio
Errors
InstructionNotFailed- Instruction not in a failed state or does not exist.
sourcepub fn update_venue_signers(
&self,
id: VenueId,
signers: Vec<AccountId>,
add_signers: bool
) -> Result<WrappedCall<'api>>
pub fn update_venue_signers(
&self,
id: VenueId,
signers: Vec<AccountId>,
add_signers: bool
) -> Result<WrappedCall<'api>>
Edit a venue’s signers.
idspecifies the ID of the venue to edit.signersspecifies the signers to add/remove.add_signersspecifies the update type add/remove of venue where add is true and remove is false.
sourcepub fn add_instruction_with_memo(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
instruction_memo: Option<InstructionMemo>
) -> Result<WrappedCall<'api>>
pub fn add_instruction_with_memo(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
instruction_memo: Option<InstructionMemo>
) -> Result<WrappedCall<'api>>
Adds a new instruction with memo.
Arguments
venue_id- ID of the venue this instruction belongs to.settlement_type- Defines if the instruction should be settled in the next block after receiving all affirmations or waiting till a specific block.trade_date- Optional date from which people can interact with this instruction.value_date- Optional date after which the instruction should be settled (not enforced)legs- Legs included in this instruction.memo- Memo field for this instruction.
Weight
950_000_000 + 1_000_000 * legs.len()
sourcepub fn add_and_affirm_instruction_with_memo(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
portfolios: Vec<PortfolioId>,
instruction_memo: Option<InstructionMemo>
) -> Result<WrappedCall<'api>>
pub fn add_and_affirm_instruction_with_memo(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
portfolios: Vec<PortfolioId>,
instruction_memo: Option<InstructionMemo>
) -> Result<WrappedCall<'api>>
Adds and affirms a new instruction.
Arguments
venue_id- ID of the venue this instruction belongs to.settlement_type- Defines if the instruction should be settled in the next block after receiving all affirmations or waiting till a specific block.trade_date- Optional date from which people can interact with this instruction.value_date- Optional date after which the instruction should be settled (not enforced)legs- Legs included in this instruction.portfolios- Portfolios that the sender controls and wants to use in this affirmations.memo- Memo field for this instruction.
Permissions
- Portfolio
Trait Implementations§
Auto Trait Implementations§
impl<'api> !RefUnwindSafe for CallApi<'api>
impl<'api> Send for CallApi<'api>
impl<'api> Sync for CallApi<'api>
impl<'api> Unpin for CallApi<'api>
impl<'api> !UnwindSafe for CallApi<'api>
Blanket Implementations§
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read moresource§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.