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

Implementations§

source§

impl<'api> CallApi<'api>

source

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

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<'api>>

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<'api>>

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

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

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
source

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
source

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
source

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 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 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 receipt
  • receipt_uid - Receipt ID generated by the signer.
  • signer - Signer of the receipt.
  • signed_data - Signed receipt.
Permissions
  • Portfolio
source

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
source

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
source

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
source

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
source

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

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.

source

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

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

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

source

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
source

pub fn execute_manual_instruction(
    &self,
    id: InstructionId,
    legs_count: u32,
    portfolio: Option<PortfolioId>
) -> Result<WrappedCall<'api>>

Manually execute settlement

Arguments
  • id - Target instruction id to reschedule.
  • _legs_count - Legs included in this instruction.
Errors
  • InstructionNotFailed - Instruction not in a failed state or does not exist.

Trait Implementations§

source§

impl<'api> Clone for CallApi<'api>

source§

fn clone(&self) -> CallApi<'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 CallApi<'api>

source§

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

Converts to this type from the input type.

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§

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · 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
§

impl<T> Downcast for Twhere
    T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert 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>) -> Rc<dyn Any + 'static>

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

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere
    T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for Twhere
    T: Clone,

source§

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

source§

impl<T> From<T> for T

const: unstable · 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 Twhere
    U: From<T>,

const: unstable · 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<T> 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.
const: unstable · 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.
const: unstable · 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

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
§

impl<T> MaybeSend for Twhere
    T: Send,