pub struct SettlementCallApi<'api> { /* private fields */ }

Implementations§

source§

impl<'api> SettlementCallApi<'api>

source

pub fn create_venue( &self, details: VenueDetails, signers: Vec<AccountId>, typ: VenueType ) -> Result<WrappedCall>

Registers a new venue.

  • details - Extra details about a venue
  • signers - Array of signers that are allowed to sign receipts for this venue
  • typ - Type of venue being created
source

pub fn update_venue_details( &self, id: VenueId, details: VenueDetails ) -> Result<WrappedCall>

Edit a venue’s details.

  • id specifies the ID of the venue to edit.
  • details specifies the updated venue details.
source

pub fn update_venue_type( &self, id: VenueId, typ: VenueType ) -> Result<WrappedCall>

Edit a venue’s type.

  • id specifies the ID of the venue to edit.
  • type specifies the new type of the venue.
source

pub fn affirm_with_receipts( &self, id: InstructionId, receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall>

Accepts an instruction and claims a signed receipt.

Arguments
  • id - Target instruction id.
  • leg_id - Target leg id for the receipt
  • receipt_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
source

pub fn set_venue_filtering( &self, ticker: Ticker, enabled: bool ) -> Result<WrappedCall>

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
source

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
source

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
source

pub fn update_venue_signers( &self, id: VenueId, signers: Vec<AccountId>, add_signers: bool ) -> Result<WrappedCall>

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.
source

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 the weight_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.

source

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 - 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()

source

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 - 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
source

pub fn affirm_instruction( &self, id: InstructionId, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall>

Provide affirmation to an existing instruction.

Arguments
  • id - The InstructionId of the instruction to be affirmed.
  • portfolios - Portfolios that the sender controls and wants to affirm this instruction.
Permissions
  • Portfolio
source

pub fn withdraw_affirmation( &self, id: InstructionId, portfolios: Vec<PortfolioId> ) -> Result<WrappedCall>

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
source

pub fn reject_instruction( &self, id: InstructionId, portfolio: PortfolioId ) -> Result<WrappedCall>

Rejects an existing instruction.

Arguments
  • id - Instruction id to reject.
  • portfolio - Portfolio to reject the instruction.
Permissions
  • Portfolio
source

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.

Trait Implementations§

source§

impl<'api> Clone for SettlementCallApi<'api>

source§

fn clone(&self) -> SettlementCallApi<'api>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'api> From<&'api Api> for SettlementCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.

Auto 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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CheckedConversion for T

§

fn checked_from<T>(t: T) -> Option<Self>where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
§

fn checked_into<T>(self) -> Option<T>where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatedConversion for T

source§

fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
source§

fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
source§

impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,

source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeSend for Twhere T: Send,