Struct polymesh_api::polymesh::api::settlement::SettlementCallApi
source · pub struct SettlementCallApi<'api> { /* private fields */ }
Implementations§
source§impl<'api> SettlementCallApi<'api>
impl<'api> SettlementCallApi<'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.
id
specifies the ID of the venue to edit.details
specifies 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.
id
specifies the ID of the venue to edit.type
specifies the new type of the venue.
sourcepub fn affirm_with_receipts(
&self,
id: InstructionId,
receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall<'api>>
pub fn affirm_with_receipts( &self, id: InstructionId, receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>, portfolios: Vec<PortfolioId> ) -> 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 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 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.
id
specifies the ID of the venue to edit.signers
specifies the signers to add/remove.add_signers
specifies the update type add/remove of venue where add is true and remove is false.
sourcepub fn execute_manual_instruction(
&self,
id: InstructionId,
portfolio: Option<PortfolioId>,
fungible_transfers: u32,
nfts_transfers: u32,
offchain_transfers: u32,
weight_limit: Option<Weight>
) -> Result<WrappedCall<'api>>
pub fn execute_manual_instruction( &self, id: InstructionId, portfolio: Option<PortfolioId>, fungible_transfers: u32, nfts_transfers: u32, offchain_transfers: u32, weight_limit: Option<Weight> ) -> Result<WrappedCall<'api>>
Manually executes an instruction.
Arguments
id
: The [InstructionId
] of the instruction to be executed.portfolio
: One of the caller’s [PortfolioId
] which is also a counter patry in the instruction. If None, the caller must be the venue creator or a counter party in a [Leg::OffChain
].fungible_transfers
: The number of fungible legs in the instruction.nfts_transfers
: The number of nfts being transferred in the instruction.offchain_transfers
: The number of offchain legs in the instruction.weight_limit
: An optional maximum [Weight
] value to be charged for executing the instruction. If theweight_limit
is less than the required amount, the instruction will fail execution.
Note: calling the rpc method get_execute_instruction_info
returns an instance of [ExecuteInstructionInfo
], which contains the count parameters.
sourcepub fn add_instruction(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
instruction_memo: Option<Memo>
) -> 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>, instruction_memo: Option<Memo> ) -> Result<WrappedCall<'api>>
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.memo
- Memo field for 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>,
instruction_memo: Option<Memo>
) -> 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>, instruction_memo: Option<Memo> ) -> 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.instruction_memo
- Memo field for this instruction.
Permissions
- Portfolio
sourcepub fn affirm_instruction(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall<'api>>
pub fn affirm_instruction( &self, id: InstructionId, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall<'api>>
Provide affirmation to an existing instruction.
Arguments
id
- TheInstructionId
of the instruction to be affirmed.portfolios
- Portfolios that the sender controls and wants to affirm this instruction.
Permissions
- Portfolio
sourcepub fn withdraw_affirmation(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall<'api>>
pub fn withdraw_affirmation( &self, id: InstructionId, portfolios: Vec<PortfolioId> ) -> 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.
Permissions
- Portfolio
sourcepub fn reject_instruction(
&self,
id: InstructionId,
portfolio: PortfolioId
) -> Result<WrappedCall<'api>>
pub fn reject_instruction( &self, id: InstructionId, portfolio: PortfolioId ) -> Result<WrappedCall<'api>>
Rejects an existing instruction.
Arguments
id
- Instruction id to reject.portfolio
- Portfolio to reject the instruction.
Permissions
- Portfolio
sourcepub fn execute_scheduled_instruction(
&self,
id: InstructionId,
weight_limit: Weight
) -> Result<WrappedCall<'api>>
pub fn execute_scheduled_instruction( &self, id: InstructionId, weight_limit: Weight ) -> Result<WrappedCall<'api>>
Root callable extrinsic, used as an internal call to execute a scheduled settlement instruction.
Trait Implementations§
source§impl<'api> Clone for SettlementCallApi<'api>
impl<'api> Clone for SettlementCallApi<'api>
source§fn clone(&self) -> SettlementCallApi<'api>
fn clone(&self) -> SettlementCallApi<'api>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'api> !RefUnwindSafe for SettlementCallApi<'api>
impl<'api> Send for SettlementCallApi<'api>
impl<'api> Sync for SettlementCallApi<'api>
impl<'api> Unpin for SettlementCallApi<'api>
impl<'api> !UnwindSafe for SettlementCallApi<'api>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§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, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, 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
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.source§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 moresource§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
.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
.