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>
pub fn create_venue( &self, details: VenueDetails, signers: Vec<AccountId>, typ: VenueType ) -> Result<WrappedCall>
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>
pub fn update_venue_details( &self, id: VenueId, details: VenueDetails ) -> Result<WrappedCall>
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>
pub fn update_venue_type( &self, id: VenueId, typ: VenueType ) -> Result<WrappedCall>
Edit a venue’s type.
idspecifies the ID of the venue to edit.typespecifies 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>
pub fn affirm_with_receipts( &self, id: InstructionId, receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall>
Affirms an instruction using receipts for offchain transfers.
§Arguments
id- the [InstructionId] of the instruction being affirmed.receipt_details- a vector of [ReceiptDetails], which contain the details about the offchain transfer.portfolios- a vector of [PortfolioId] under the caller’s control and intended for affirmation.
§Permissions
- Portfolio
sourcepub fn set_venue_filtering(
&self,
ticker: Ticker,
enabled: bool
) -> Result<WrappedCall>
pub fn set_venue_filtering( &self, ticker: Ticker, enabled: bool ) -> Result<WrappedCall>
sourcepub fn allow_venues(
&self,
ticker: Ticker,
venues: Vec<VenueId>
) -> Result<WrappedCall>
pub fn allow_venues( &self, ticker: Ticker, venues: Vec<VenueId> ) -> Result<WrappedCall>
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>
pub fn disallow_venues( &self, ticker: Ticker, venues: Vec<VenueId> ) -> Result<WrappedCall>
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>
pub fn update_venue_signers( &self, id: VenueId, signers: Vec<AccountId>, add_signers: bool ) -> Result<WrappedCall>
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 execute_manual_instruction(
&self,
id: InstructionId,
portfolio: Option<PortfolioId>,
fungible_transfers: u32,
nfts_transfers: u32,
offchain_transfers: u32,
weight_limit: Option<Weight>
) -> Result<WrappedCall>
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>
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_limitis 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>
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>
Adds a new instruction.
§Arguments
venue_id: The [VenueId] of the venue this instruction belongs to.settlement_type: The [SettlementType] specifying when the instruction should be settled.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: A vector of all [Leg] included in this instruction.memo: An optional [Memo] field for this instruction.
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>
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>
Adds and affirms a new instruction.
§Arguments
venue_id: The [VenueId] of the venue this instruction belongs to.settlement_type: The [SettlementType] specifying when the instruction should be settled.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: A vector of all [Leg] included in this instruction.portfolios: A vector of [PortfolioId] under the caller’s control and intended for affirmation.memo: An optional [Memo] field for this instruction.
§Permissions
- Portfolio
sourcepub fn affirm_instruction(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall>
pub fn affirm_instruction( &self, id: InstructionId, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall>
sourcepub fn withdraw_affirmation(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>
) -> Result<WrappedCall>
pub fn withdraw_affirmation( &self, id: InstructionId, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall>
sourcepub fn reject_instruction(
&self,
id: InstructionId,
portfolio: PortfolioId
) -> Result<WrappedCall>
pub fn reject_instruction( &self, id: InstructionId, portfolio: PortfolioId ) -> Result<WrappedCall>
sourcepub fn execute_scheduled_instruction(
&self,
id: InstructionId,
weight_limit: Weight
) -> Result<WrappedCall>
pub fn execute_scheduled_instruction( &self, id: InstructionId, weight_limit: Weight ) -> Result<WrappedCall>
Root callable extrinsic, used as an internal call to execute a scheduled settlement instruction.
sourcepub fn affirm_with_receipts_with_count(
&self,
id: InstructionId,
receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>,
portfolios: Vec<PortfolioId>,
number_of_assets: Option<AffirmationCount>
) -> Result<WrappedCall>
pub fn affirm_with_receipts_with_count( &self, id: InstructionId, receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>, portfolios: Vec<PortfolioId>, number_of_assets: Option<AffirmationCount> ) -> Result<WrappedCall>
Affirms an instruction using receipts for offchain transfers.
§Arguments
id- the [InstructionId] of the instruction being affirmed.receipt_details- a vector of [ReceiptDetails], which contain the details about the offchain transfer.portfolios- a vector of [PortfolioId] under the caller’s control and intended for affirmation.number_of_assets- an optional [AffirmationCount] that will be used for a precise fee estimation before executing the extrinsic.
Note: calling the rpc method get_affirmation_count returns an instance of [AffirmationCount].
§Permissions
- Portfolio
sourcepub fn affirm_instruction_with_count(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>,
number_of_assets: Option<AffirmationCount>
) -> Result<WrappedCall>
pub fn affirm_instruction_with_count( &self, id: InstructionId, portfolios: Vec<PortfolioId>, number_of_assets: Option<AffirmationCount> ) -> Result<WrappedCall>
Provide affirmation to an existing instruction.
§Arguments
id- the [InstructionId] of the instruction being affirmed.portfolios- a vector of [PortfolioId] under the caller’s control and intended for affirmation.number_of_assets- an optional [AffirmationCount] that will be used for a precise fee estimation before executing the extrinsic.
Note: calling the rpc method get_affirmation_count returns an instance of [AffirmationCount].
§Permissions
- Portfolio
sourcepub fn reject_instruction_with_count(
&self,
id: InstructionId,
portfolio: PortfolioId,
number_of_assets: Option<AssetCount>
) -> Result<WrappedCall>
pub fn reject_instruction_with_count( &self, id: InstructionId, portfolio: PortfolioId, number_of_assets: Option<AssetCount> ) -> Result<WrappedCall>
Rejects an existing instruction.
§Arguments
id- the [InstructionId] of the instruction being rejected.portfolio- the [PortfolioId] that belongs to the instruction and is rejecting it.number_of_assets- an optional [AssetCount] that will be used for a precise fee estimation before executing the extrinsic.
Note: calling the rpc method get_execute_instruction_info returns an instance of [ExecuteInstructionInfo], which contain the asset count.
§Permissions
- Portfolio
sourcepub fn withdraw_affirmation_with_count(
&self,
id: InstructionId,
portfolios: Vec<PortfolioId>,
number_of_assets: Option<AffirmationCount>
) -> Result<WrappedCall>
pub fn withdraw_affirmation_with_count( &self, id: InstructionId, portfolios: Vec<PortfolioId>, number_of_assets: Option<AffirmationCount> ) -> Result<WrappedCall>
Withdraw an affirmation for a given instruction.
§Arguments
id- the [InstructionId] of the instruction getting an affirmation withdrawn.portfolios- a vector of [PortfolioId] under the caller’s control and intended for affirmation withdrawal.number_of_assets- an optional [AffirmationCount] that will be used for a precise fee estimation before executing the extrinsic.
Note: calling the rpc method get_affirmation_count returns an instance of [AffirmationCount].
§Permissions
- Portfolio
sourcepub fn add_instruction_with_mediators(
&self,
venue_id: VenueId,
settlement_type: SettlementType<u32>,
trade_date: Option<u64>,
value_date: Option<u64>,
legs: Vec<Leg>,
instruction_memo: Option<Memo>,
mediators: BTreeSet<IdentityId>
) -> Result<WrappedCall>
pub fn add_instruction_with_mediators( &self, venue_id: VenueId, settlement_type: SettlementType<u32>, trade_date: Option<u64>, value_date: Option<u64>, legs: Vec<Leg>, instruction_memo: Option<Memo>, mediators: BTreeSet<IdentityId> ) -> Result<WrappedCall>
Adds a new instruction with mediators.
§Arguments
venue_id: The [VenueId] of the venue this instruction belongs to.settlement_type: The [SettlementType] specifying when the instruction should be settled.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: A vector of all [Leg] included in this instruction.instruction_memo: An optional [Memo] field for this instruction.mediators: A set of [IdentityId] of all the mandatory mediators for the instruction.
sourcepub fn add_and_affirm_with_mediators(
&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>,
mediators: BTreeSet<IdentityId>
) -> Result<WrappedCall>
pub fn add_and_affirm_with_mediators( &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>, mediators: BTreeSet<IdentityId> ) -> Result<WrappedCall>
Adds and affirms a new instruction with mediators.
§Arguments
venue_id: The [VenueId] of the venue this instruction belongs to.settlement_type: The [SettlementType] specifying when the instruction should be settled.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: A vector of all [Leg] included in this instruction.portfolios: A vector of [PortfolioId] under the caller’s control and intended for affirmation.instruction_memo: An optional [Memo] field for this instruction.mediators: A set of [IdentityId] of all the mandatory mediators for the instruction.
§Permissions
- Portfolio
sourcepub fn affirm_instruction_as_mediator(
&self,
instruction_id: InstructionId,
expiry: Option<u64>
) -> Result<WrappedCall>
pub fn affirm_instruction_as_mediator( &self, instruction_id: InstructionId, expiry: Option<u64> ) -> Result<WrappedCall>
Affirms the instruction as a mediator - should only be called by mediators, otherwise it will fail.
§Arguments
origin: The secondary key of the sender.instruction_id: The [InstructionId] that will be affirmed by the mediator.expiry: An Optional value for defining when the affirmation will expire (None means it will always be valid).
sourcepub fn withdraw_affirmation_as_mediator(
&self,
instruction_id: InstructionId
) -> Result<WrappedCall>
pub fn withdraw_affirmation_as_mediator( &self, instruction_id: InstructionId ) -> Result<WrappedCall>
Removes the mediator’s affirmation for the instruction - should only be called by mediators, otherwise it will fail.
§Arguments
origin: The secondary key of the sender.instruction_id: The [InstructionId] that will have the affirmation removed.
sourcepub fn reject_instruction_as_mediator(
&self,
instruction_id: InstructionId,
number_of_assets: Option<AssetCount>
) -> Result<WrappedCall>
pub fn reject_instruction_as_mediator( &self, instruction_id: InstructionId, number_of_assets: Option<AssetCount> ) -> Result<WrappedCall>
Rejects an existing instruction - should only be called by mediators, otherwise it will fail.
§Arguments
instruction_id- the [InstructionId] of the instruction being rejected.number_of_assets- an optional [AssetCount] that will be used for a precise fee estimation before executing the extrinsic.
Note: calling the rpc method get_execute_instruction_info returns an instance of [ExecuteInstructionInfo], which contain the asset count.
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> Freeze for SettlementCallApi<'api>
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
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
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<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.