VaultCliHandler

Struct VaultCliHandler 

Source
pub struct VaultCliHandler { /* private fields */ }

Implementations§

Source§

impl VaultCliHandler

Source

pub const fn new( cli_config: CliConfig, restaking_program_id: Pubkey, vault_program_id: Pubkey, print_tx: bool, print_json: bool, print_json_with_reserves: bool, ) -> Self

Source

pub async fn handle(&self, action: VaultCommands) -> Result<()>

Source

pub async fn initialize_config( &self, program_fee_bps: u16, program_fee_wallet: Pubkey, ) -> Result<()>

Source

pub async fn initialize_vault( &self, token_mint: String, deposit_fee_bps: u16, withdrawal_fee_bps: u16, reward_fee_bps: u16, decimals: u8, initialize_token_amount: u64, vrt_mint_address_file_path: Option<PathBuf>, ) -> Result<()>

Source

pub async fn initialize_vault_update_state_tracker( &self, vault: String, ) -> Result<()>

Source

pub async fn crank_vault_update_state_tracker( &self, vault: String, operator: String, ) -> Result<()>

Source

pub async fn close_vault_update_state_tracker( &self, vault: String, ncn_epoch: Option<u64>, ) -> Result<()>

Source

pub async fn mint_vrt( &self, vault: String, amount_in: u64, min_amount_out: u64, ) -> Result<()>

Source

pub async fn initialize_vault_ncn_ticket( &self, vault: String, ncn: String, ) -> Result<()>

Source

pub async fn warmup_vault_ncn_ticket( &self, vault: String, ncn: String, ) -> Result<()>

Source

pub async fn cooldown_vault_ncn_ticket( &self, vault: String, ncn: String, ) -> Result<()>

Source

pub async fn initialize_vault_operator_delegation( &self, vault: String, operator: String, ) -> Result<()>

Source

pub async fn delegate_to_operator( &self, vault: String, operator: String, amount: u64, ) -> Result<()>

Source

pub async fn cooldown_operator_delegation( &self, vault: String, operator: String, amount: u64, ) -> Result<()>

Source

pub async fn delegate_token_account( &self, vault: String, delegate: String, token_mint: String, token_account: String, ) -> Result<()>

Source

pub async fn delegated_token_transfer( &self, token_account: String, recipient_pubkey: String, amount: u64, ) -> Result<()>

Source

pub async fn enqueue_withdrawal(&self, vault: String, amount: u64) -> Result<()>

Source

pub async fn change_withdrawal_ticket_owner( &self, vault: &Pubkey, old_ticket_owner: &str, new_ticket_owner: &Pubkey, ) -> Result<()>

Changes the owner of a withdrawal ticket

Transfers ownership of a vault staker withdrawal ticket from one account to another. This operation requires the signature of both the current ticket owner and the signer configured in the client.

Source

pub async fn burn_withdrawal_ticket(&self, vault: String) -> Result<()>

Source

pub async fn get_vault(&self, pubkey: String) -> Result<()>

Source

pub async fn list_vaults(&self) -> Result<()>

Source

pub async fn get_vault_update_state_tracker(&self, vault: String) -> Result<()>

Source

pub async fn get_vault_operator_delegations( &self, vault: String, operator: Option<String>, ) -> Result<()>

Source

pub async fn get_withdrawal_ticket( &self, vault: String, staker: Option<String>, ) -> Result<()>

Source

pub async fn set_capacity(&self, vault: String, amount: u64) -> Result<()>

Set the capacity for Vault

Updates the maximum deposit capacity for a specific vault. This operation can only be performed by the vault admin.

Auto Trait Implementations§

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> 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<T> Same for T

Source§

type Output = T

Should always be Self
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<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