Struct SettlementCallApi

Source
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: BTreeSet<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
Source

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

Enables or disabled venue filtering for a token.

§Arguments
  • asset_id - AssetId of the token in question.
  • enabled - Boolean that decides if the filtering should be enabled.
§Permissions
  • Asset
Source

pub fn allow_venues( &self, asset_id: AssetId, venues: Vec<VenueId>, ) -> Result<WrappedCall>

Allows additional venues to create instructions involving an asset.

  • asset_id - AssetId 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, asset_id: AssetId, venues: Vec<VenueId>, ) -> Result<WrappedCall>

Revokes permission given to venues for creating instructions involving a particular asset.

  • asset_id - AssetId 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: Option<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 optional [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.
Source

pub fn add_and_affirm_instruction( &self, venue_id: Option<VenueId>, settlement_type: SettlementType<u32>, trade_date: Option<u64>, value_date: Option<u64>, legs: Vec<Leg>, portfolios: BTreeSet<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
Source

pub fn affirm_instruction( &self, id: InstructionId, portfolios: BTreeSet<PortfolioId>, ) -> 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.
§Permissions
  • Portfolio
Source

pub fn withdraw_affirmation( &self, id: InstructionId, portfolios: BTreeSet<PortfolioId>, ) -> 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.
§Permissions
  • Portfolio
Source

pub fn reject_instruction( &self, id: InstructionId, portfolio: PortfolioId, ) -> 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.
§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.

Source

pub fn affirm_with_receipts_with_count( &self, id: InstructionId, receipt_details: Vec<ReceiptDetails<AccountId, MultiSignature>>, portfolios: BTreeSet<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
Source

pub fn affirm_instruction_with_count( &self, id: InstructionId, portfolios: BTreeSet<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
Source

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
Source

pub fn withdraw_affirmation_with_count( &self, id: InstructionId, portfolios: BTreeSet<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
Source

pub fn add_instruction_with_mediators( &self, venue_id: Option<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.
Source

pub fn add_and_affirm_with_mediators( &self, venue_id: Option<VenueId>, settlement_type: SettlementType<u32>, trade_date: Option<u64>, value_date: Option<u64>, legs: Vec<Leg>, portfolios: BTreeSet<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
Source

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).
Source

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

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>

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CheckedConversion for T

Source§

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
Source§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where 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.

Source§

impl<T> Instrument for T

Source§

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

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

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 T
where 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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<Src, Dest> IntoTuple<Dest> for Src
where Dest: FromTuple<Src>,

Source§

fn into_tuple(self) -> Dest

Source§

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

Source§

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

Get a reference to the inner from the outer.

Source§

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

Get a mutable reference to the inner from the outer.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatedConversion for T

Source§

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

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

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

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

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
Source§

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

Source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSendSync for T