pub struct Client<C> { /* private fields */ }
Expand description
GMSOL Client.
Implementations§
Source§impl<C: Clone + Deref<Target = impl Signer>> Client<C>
impl<C: Clone + Deref<Target = impl Signer>> Client<C>
Sourcepub fn new_with_options(
cluster: Cluster,
payer: C,
options: ClientOptions,
) -> Result<Self>
pub fn new_with_options( cluster: Cluster, payer: C, options: ClientOptions, ) -> Result<Self>
Create a new Client
with the given options.
Sourcepub fn new(cluster: Cluster, payer: C) -> Result<Self>
pub fn new(cluster: Cluster, payer: C) -> Result<Self>
Create a new Client
with default options.
Sourcepub fn try_clone_with_payer<C2: Clone + Deref<Target = impl Signer>>(
&self,
payer: C2,
) -> Result<Client<C2>>
pub fn try_clone_with_payer<C2: Clone + Deref<Target = impl Signer>>( &self, payer: C2, ) -> Result<Client<C2>>
Try to clone a new client with a new payer.
Sourcepub fn set_subscription_config(
&mut self,
config: SubscriptionConfig,
) -> &mut Self
pub fn set_subscription_config( &mut self, config: SubscriptionConfig, ) -> &mut Self
Replace the subscription config.
Sourcepub fn program(&self, program_id: Pubkey) -> Program<C>
pub fn program(&self, program_id: Pubkey) -> Program<C>
Create a new Program
with the given program id.
Sourcepub fn commitment(&self) -> CommitmentConfig
pub fn commitment(&self) -> CommitmentConfig
Get the commitment config.
Sourcepub fn store_program(&self) -> &Program<C>
pub fn store_program(&self) -> &Program<C>
Get the store program.
Sourcepub fn treasury_program(&self) -> &Program<C>
pub fn treasury_program(&self) -> &Program<C>
Get the treasury program.
Sourcepub fn timelock_program(&self) -> &Program<C>
pub fn timelock_program(&self) -> &Program<C>
Get the timelock program.
Sourcepub fn new_store_program(&self) -> Result<Program<C>>
pub fn new_store_program(&self) -> Result<Program<C>>
Create a new store program.
Sourcepub fn new_treasury_program(&self) -> Result<Program<C>>
pub fn new_treasury_program(&self) -> Result<Program<C>>
Create a new treasury program.
Sourcepub fn store_program_id(&self) -> &Pubkey
pub fn store_program_id(&self) -> &Pubkey
Get the program id of the store program.
Sourcepub fn treasury_program_id(&self) -> &Pubkey
pub fn treasury_program_id(&self) -> &Pubkey
Get the program id of the treasury program.
Sourcepub fn timelock_program_id(&self) -> &Pubkey
pub fn timelock_program_id(&self) -> &Pubkey
Get the program id of the timelock program.
Sourcepub fn store_transaction(&self) -> TransactionBuilder<'_, C>
pub fn store_transaction(&self) -> TransactionBuilder<'_, C>
Create a transaction builder for the store program.
Sourcepub fn treasury_transaction(&self) -> TransactionBuilder<'_, C>
pub fn treasury_transaction(&self) -> TransactionBuilder<'_, C>
Create a transaction builder for the treasury program.
Sourcepub fn timelock_transaction(&self) -> TransactionBuilder<'_, C>
pub fn timelock_transaction(&self) -> TransactionBuilder<'_, C>
Create a transaction builder for the timelock program.
Sourcepub fn bundle_with_options(
&self,
options: BundleOptions,
) -> BundleBuilder<'_, C>
pub fn bundle_with_options( &self, options: BundleOptions, ) -> BundleBuilder<'_, C>
Create a bundle builder with the given options.
Sourcepub fn bundle(&self) -> BundleBuilder<'_, C>
pub fn bundle(&self) -> BundleBuilder<'_, C>
Create a BundleBuilder
Sourcepub fn find_store_address(&self, key: &str) -> Pubkey
pub fn find_store_address(&self, key: &str) -> Pubkey
Find PDA for Store
account.
Sourcepub fn find_store_wallet_address(&self, store: &Pubkey) -> Pubkey
pub fn find_store_wallet_address(&self, store: &Pubkey) -> Pubkey
Find PDA for store wallet account.
Get the event authority address for the Store
program.
Sourcepub fn find_market_vault_address(
&self,
store: &Pubkey,
token: &Pubkey,
) -> Pubkey
pub fn find_market_vault_address( &self, store: &Pubkey, token: &Pubkey, ) -> Pubkey
Find PDA for market vault account.
Sourcepub fn find_market_token_address(
&self,
store: &Pubkey,
index_token: &Pubkey,
long_token: &Pubkey,
short_token: &Pubkey,
) -> Pubkey
pub fn find_market_token_address( &self, store: &Pubkey, index_token: &Pubkey, long_token: &Pubkey, short_token: &Pubkey, ) -> Pubkey
Find PDA for market token mint account.
Sourcepub fn find_market_address(&self, store: &Pubkey, token: &Pubkey) -> Pubkey
pub fn find_market_address(&self, store: &Pubkey, token: &Pubkey) -> Pubkey
Find PDA for market account.
Sourcepub fn find_deposit_address(
&self,
store: &Pubkey,
user: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_deposit_address( &self, store: &Pubkey, user: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find PDA for deposit account.
Sourcepub fn find_first_deposit_owner_address(&self) -> Pubkey
pub fn find_first_deposit_owner_address(&self) -> Pubkey
Find first deposit owner address.
Sourcepub fn find_withdrawal_address(
&self,
store: &Pubkey,
user: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_withdrawal_address( &self, store: &Pubkey, user: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find DPA for withdrawal account.
Sourcepub fn find_order_address(
&self,
store: &Pubkey,
user: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_order_address( &self, store: &Pubkey, user: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find PDA for order.
Sourcepub fn find_shift_address(
&self,
store: &Pubkey,
owner: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_shift_address( &self, store: &Pubkey, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find PDA for shift.
Sourcepub fn find_position_address(
&self,
store: &Pubkey,
user: &Pubkey,
market_token: &Pubkey,
collateral_token: &Pubkey,
kind: PositionKind,
) -> Result<Pubkey>
pub fn find_position_address( &self, store: &Pubkey, user: &Pubkey, market_token: &Pubkey, collateral_token: &Pubkey, kind: PositionKind, ) -> Result<Pubkey>
Find PDA for position.
Sourcepub fn find_claimable_account_address(
&self,
store: &Pubkey,
mint: &Pubkey,
user: &Pubkey,
time_key: &[u8],
) -> Pubkey
pub fn find_claimable_account_address( &self, store: &Pubkey, mint: &Pubkey, user: &Pubkey, time_key: &[u8], ) -> Pubkey
Find claimable account address.
Sourcepub fn find_trade_event_buffer_address(
&self,
store: &Pubkey,
authority: &Pubkey,
index: u16,
) -> Pubkey
pub fn find_trade_event_buffer_address( &self, store: &Pubkey, authority: &Pubkey, index: u16, ) -> Pubkey
Find trade event buffer address.
Sourcepub fn find_user_address(&self, store: &Pubkey, owner: &Pubkey) -> Pubkey
pub fn find_user_address(&self, store: &Pubkey, owner: &Pubkey) -> Pubkey
Find User account address.
Sourcepub fn find_referral_code_address(
&self,
store: &Pubkey,
code: ReferralCodeBytes,
) -> Pubkey
pub fn find_referral_code_address( &self, store: &Pubkey, code: ReferralCodeBytes, ) -> Pubkey
Find referral code address.
Sourcepub fn find_glv_token_address(&self, store: &Pubkey, index: u16) -> Pubkey
pub fn find_glv_token_address(&self, store: &Pubkey, index: u16) -> Pubkey
Find GLV token address.
Sourcepub fn find_glv_address(&self, glv_token: &Pubkey) -> Pubkey
pub fn find_glv_address(&self, glv_token: &Pubkey) -> Pubkey
Find GLV address.
Sourcepub fn find_glv_deposit_address(
&self,
store: &Pubkey,
owner: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_glv_deposit_address( &self, store: &Pubkey, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find GLV deposit address.
Sourcepub fn find_glv_withdrawal_address(
&self,
store: &Pubkey,
owner: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_glv_withdrawal_address( &self, store: &Pubkey, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find GLV withdrawal address.
Sourcepub fn find_gt_exchange_vault_address(
&self,
store: &Pubkey,
time_window_index: i64,
time_window: u32,
) -> Pubkey
pub fn find_gt_exchange_vault_address( &self, store: &Pubkey, time_window_index: i64, time_window: u32, ) -> Pubkey
Find GT exchange vault address.
Sourcepub fn find_gt_exchange_address(&self, vault: &Pubkey, owner: &Pubkey) -> Pubkey
pub fn find_gt_exchange_address(&self, vault: &Pubkey, owner: &Pubkey) -> Pubkey
Find GT exchange address.
Sourcepub fn find_price_feed_address(
&self,
store: &Pubkey,
authority: &Pubkey,
index: u16,
provider: PriceProviderKind,
token: &Pubkey,
) -> Pubkey
pub fn find_price_feed_address( &self, store: &Pubkey, authority: &Pubkey, index: u16, provider: PriceProviderKind, token: &Pubkey, ) -> Pubkey
Find Custom Price Feed address.
Sourcepub fn find_treasury_config_address(&self, store: &Pubkey) -> Pubkey
pub fn find_treasury_config_address(&self, store: &Pubkey) -> Pubkey
Find treasury global config address.
Sourcepub fn find_treasury_vault_config_address(
&self,
config: &Pubkey,
index: u16,
) -> Pubkey
pub fn find_treasury_vault_config_address( &self, config: &Pubkey, index: u16, ) -> Pubkey
Find treasury vault config address.
Sourcepub fn find_gt_bank_address(
&self,
treasury_vault_config: &Pubkey,
gt_exchange_vault: &Pubkey,
) -> Pubkey
pub fn find_gt_bank_address( &self, treasury_vault_config: &Pubkey, gt_exchange_vault: &Pubkey, ) -> Pubkey
Find GT bank address.
Sourcepub fn find_treasury_receiver_address(&self, config: &Pubkey) -> Pubkey
pub fn find_treasury_receiver_address(&self, config: &Pubkey) -> Pubkey
Find treasury receiver address.
Sourcepub fn find_timelock_config_address(&self, store: &Pubkey) -> Pubkey
pub fn find_timelock_config_address(&self, store: &Pubkey) -> Pubkey
Find timelock config address.
Sourcepub fn find_executor_address(
&self,
store: &Pubkey,
role: &str,
) -> Result<Pubkey>
pub fn find_executor_address( &self, store: &Pubkey, role: &str, ) -> Result<Pubkey>
Find executor address.
Sourcepub fn find_executor_wallet_address(&self, executor: &Pubkey) -> Pubkey
pub fn find_executor_wallet_address(&self, executor: &Pubkey) -> Pubkey
Find the wallet address of the given executor.
Sourcepub async fn store_accounts_with_config<T>(
&self,
filter_by_store: Option<StoreFilter>,
other_filters: impl IntoIterator<Item = RpcFilterType>,
config: ProgramAccountsConfig,
) -> Result<WithContext<Vec<(Pubkey, T)>>>where
T: AccountDeserialize + Discriminator,
pub async fn store_accounts_with_config<T>(
&self,
filter_by_store: Option<StoreFilter>,
other_filters: impl IntoIterator<Item = RpcFilterType>,
config: ProgramAccountsConfig,
) -> Result<WithContext<Vec<(Pubkey, T)>>>where
T: AccountDeserialize + Discriminator,
Fetch accounts owned by the Store Program.
Sourcepub async fn account_with_config<T>(
&self,
address: &Pubkey,
config: RpcAccountInfoConfig,
) -> Result<WithContext<Option<T>>>where
T: AccountDeserialize,
pub async fn account_with_config<T>(
&self,
address: &Pubkey,
config: RpcAccountInfoConfig,
) -> Result<WithContext<Option<T>>>where
T: AccountDeserialize,
Fetch account at the given address with config.
The value inside the returned context will be None
if the account does not exist.
Sourcepub async fn account<T: AccountDeserialize>(
&self,
address: &Pubkey,
) -> Result<Option<T>>
pub async fn account<T: AccountDeserialize>( &self, address: &Pubkey, ) -> Result<Option<T>>
Fetch account at the given address.
Sourcepub async fn store_accounts<T>(
&self,
filter_by_store: Option<StoreFilter>,
other_filters: impl IntoIterator<Item = RpcFilterType>,
) -> Result<Vec<(Pubkey, T)>>where
T: AccountDeserialize + Discriminator,
pub async fn store_accounts<T>(
&self,
filter_by_store: Option<StoreFilter>,
other_filters: impl IntoIterator<Item = RpcFilterType>,
) -> Result<Vec<(Pubkey, T)>>where
T: AccountDeserialize + Discriminator,
Fetch accounts owned by the Store Program.
Sourcepub async fn store(&self, address: &Pubkey) -> Result<Arc<Store>>
pub async fn store(&self, address: &Pubkey) -> Result<Arc<Store>>
Fetch Store
account with its address.
Sourcepub async fn user(&self, address: &Pubkey) -> Result<UserHeader>
pub async fn user(&self, address: &Pubkey) -> Result<UserHeader>
Fetch user account with its address.
Fetch the TokenMap
address of the given store.
Sourcepub async fn token_map(&self, address: &Pubkey) -> Result<TokenMap>
pub async fn token_map(&self, address: &Pubkey) -> Result<TokenMap>
Fetch TokenMap
account with its address.
Fetch the authorized token map of the given store.
Sourcepub async fn markets_with_config(
&self,
store: &Pubkey,
config: ProgramAccountsConfig,
) -> Result<WithContext<BTreeMap<Pubkey, Market>>>
pub async fn markets_with_config( &self, store: &Pubkey, config: ProgramAccountsConfig, ) -> Result<WithContext<BTreeMap<Pubkey, Market>>>
Fetch all Market
accounts of the given store.
Sourcepub async fn markets(&self, store: &Pubkey) -> Result<BTreeMap<Pubkey, Market>>
pub async fn markets(&self, store: &Pubkey) -> Result<BTreeMap<Pubkey, Market>>
Fetch all Market
accounts of the given store.
Sourcepub async fn market_with_config<T>(
&self,
address: &Pubkey,
config: RpcAccountInfoConfig,
) -> Result<WithContext<Option<Market>>>
pub async fn market_with_config<T>( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithContext<Option<Market>>>
Fetch Market
at the given address with config.
The value inside the returned context will be None
if the account does not exist.
Sourcepub async fn market(&self, address: &Pubkey) -> Result<Arc<Market>>
pub async fn market(&self, address: &Pubkey) -> Result<Arc<Market>>
Fetch Market
account with its address.
Sourcepub async fn glvs_with_config(
&self,
store: &Pubkey,
config: ProgramAccountsConfig,
) -> Result<WithContext<BTreeMap<Pubkey, Glv>>>
pub async fn glvs_with_config( &self, store: &Pubkey, config: ProgramAccountsConfig, ) -> Result<WithContext<BTreeMap<Pubkey, Glv>>>
Fetch all Glv
accounts of the given store.
Sourcepub async fn glvs(&self, store: &Pubkey) -> Result<BTreeMap<Pubkey, Glv>>
pub async fn glvs(&self, store: &Pubkey) -> Result<BTreeMap<Pubkey, Glv>>
Fetch all Glv
accounts of the given store.
Sourcepub async fn market_status(
&self,
store: &Pubkey,
market_token: &Pubkey,
prices: Prices<u128>,
maximize_pnl: bool,
maximize_pool_value: bool,
) -> Result<MarketStatus>
pub async fn market_status( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, maximize_pnl: bool, maximize_pool_value: bool, ) -> Result<MarketStatus>
Fetch MarketStatus
with the market token address.
Sourcepub async fn market_token_price(
&self,
store: &Pubkey,
market_token: &Pubkey,
prices: Prices<u128>,
pnl_factor: PnlFactorKind,
maximize: bool,
) -> Result<u128>
pub async fn market_token_price( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, pnl_factor: PnlFactorKind, maximize: bool, ) -> Result<u128>
Fetch current market token price with the market token address.
Sourcepub async fn positions(
&self,
store: &Pubkey,
owner: Option<&Pubkey>,
market_token: Option<&Pubkey>,
) -> Result<BTreeMap<Pubkey, Position>>
pub async fn positions( &self, store: &Pubkey, owner: Option<&Pubkey>, market_token: Option<&Pubkey>, ) -> Result<BTreeMap<Pubkey, Position>>
Fetch all Position
accounts of the given owner of the given store.
Sourcepub async fn position(&self, address: &Pubkey) -> Result<Position>
pub async fn position(&self, address: &Pubkey) -> Result<Position>
Fetch Position
account with its address.
Sourcepub async fn order(&self, address: &Pubkey) -> Result<Order>
pub async fn order(&self, address: &Pubkey) -> Result<Order>
Fetch Order
account with its address.
Sourcepub async fn order_with_config(
&self,
address: &Pubkey,
config: RpcAccountInfoConfig,
) -> Result<WithContext<Option<Order>>>
pub async fn order_with_config( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithContext<Option<Order>>>
Fetch Order
account at the the given address with config.
The value inside the returned context will be None
if the account does not exist.
Sourcepub async fn orders(
&self,
store: &Pubkey,
owner: Option<&Pubkey>,
market_token: Option<&Pubkey>,
) -> Result<BTreeMap<Pubkey, Order>>
pub async fn orders( &self, store: &Pubkey, owner: Option<&Pubkey>, market_token: Option<&Pubkey>, ) -> Result<BTreeMap<Pubkey, Order>>
Fetch all Order
accounts of the given owner of the given store.
Sourcepub async fn deposit(&self, address: &Pubkey) -> Result<Deposit>
pub async fn deposit(&self, address: &Pubkey) -> Result<Deposit>
Fetch Depsoit
account with its address.
Sourcepub async fn withdrawal(&self, address: &Pubkey) -> Result<Withdrawal>
pub async fn withdrawal(&self, address: &Pubkey) -> Result<Withdrawal>
Fetch Withdrawal
account with its address.
Sourcepub async fn price_feed(&self, address: &Pubkey) -> Result<Option<PriceFeed>>
pub async fn price_feed(&self, address: &Pubkey) -> Result<Option<PriceFeed>>
Fetch PriceFeed
account with its address.
Sourcepub async fn instruction_buffer(
&self,
address: &Pubkey,
) -> Result<Option<InstructionBuffer>>
pub async fn instruction_buffer( &self, address: &Pubkey, ) -> Result<Option<InstructionBuffer>>
Fetch InstructionBuffer
account with its address.
Sourcepub async fn pub_sub(&self) -> Result<&PubsubClient>
pub async fn pub_sub(&self) -> Result<&PubsubClient>
Get the PubsubClient
.
Sourcepub async fn subscribe_store_cpi_events(
&self,
commitment: Option<CommitmentConfig>,
) -> Result<impl Stream<Item = Result<WithSlot<Vec<StoreCPIEvent>>>>>
pub async fn subscribe_store_cpi_events( &self, commitment: Option<CommitmentConfig>, ) -> Result<impl Stream<Item = Result<WithSlot<Vec<StoreCPIEvent>>>>>
Subscribe to StoreCPIEvent
s from the store program.
Sourcepub async fn historical_store_cpi_events(
&self,
address: &Pubkey,
commitment: Option<CommitmentConfig>,
) -> Result<impl Stream<Item = Result<WithSlot<Vec<StoreCPIEvent>>>>>
pub async fn historical_store_cpi_events( &self, address: &Pubkey, commitment: Option<CommitmentConfig>, ) -> Result<impl Stream<Item = Result<WithSlot<Vec<StoreCPIEvent>>>>>
Fetch historical StoreCPIEvent
s for the given account.
Sourcepub async fn complete_order(
&self,
address: &Pubkey,
commitment: Option<CommitmentConfig>,
) -> Result<Option<TradeEvent>>
pub async fn complete_order( &self, address: &Pubkey, commitment: Option<CommitmentConfig>, ) -> Result<Option<TradeEvent>>
Wait for an order to be completed using current slot as min context slot.
Sourcepub async fn last_order_events(
&self,
order: &Pubkey,
before_slot: u64,
commitment: CommitmentConfig,
) -> Result<Vec<StoreCPIEvent>>
pub async fn last_order_events( &self, order: &Pubkey, before_slot: u64, commitment: CommitmentConfig, ) -> Result<Vec<StoreCPIEvent>>
Get last order events.
Sourcepub async fn complete_order_with_config(
&self,
address: &Pubkey,
slot: u64,
polling: Duration,
commitment: Option<CommitmentConfig>,
) -> Result<Option<TradeEvent>>
pub async fn complete_order_with_config( &self, address: &Pubkey, slot: u64, polling: Duration, commitment: Option<CommitmentConfig>, ) -> Result<Option<TradeEvent>>
Wait for an order to be completed with the given config.
Sourcepub async fn gt_exchanges(
&self,
store: &Pubkey,
owner: &Pubkey,
) -> Result<BTreeMap<Pubkey, GtExchange>>
pub async fn gt_exchanges( &self, store: &Pubkey, owner: &Pubkey, ) -> Result<BTreeMap<Pubkey, GtExchange>>
Get GT exchanges.
Source§impl<C: Deref<Target = impl Signer> + Clone> Client<C>
impl<C: Deref<Target = impl Signer> + Clone> Client<C>
Sourcepub fn create_first_glv_deposit(
&self,
store: &Pubkey,
glv_token: &Pubkey,
market_token: &Pubkey,
) -> CreateGlvDepositBuilder<'_, C>
pub fn create_first_glv_deposit( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, ) -> CreateGlvDepositBuilder<'_, C>
Create first GLV deposit.
Source§impl<C: Deref<Target = impl Signer> + Clone> Client<C>
impl<C: Deref<Target = impl Signer> + Clone> Client<C>
Sourcepub fn create_first_deposit(
&self,
store: &Pubkey,
market_token: &Pubkey,
) -> CreateDepositBuilder<'_, C>
pub fn create_first_deposit( &self, store: &Pubkey, market_token: &Pubkey, ) -> CreateDepositBuilder<'_, C>
Create first deposit.
Trait Implementations§
Source§impl<C: Deref<Target = impl Signer> + Clone> AddressLookupTableOps<C> for Client<C>
impl<C: Deref<Target = impl Signer> + Clone> AddressLookupTableOps<C> for Client<C>
Source§async fn alt_with_config(
&self,
address: &Pubkey,
config: RpcAccountInfoConfig,
) -> Result<WithSlot<Option<AddressLookupTableAccount>>>
async fn alt_with_config( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithSlot<Option<AddressLookupTableAccount>>>
Source§async fn create_alt(&self) -> Result<(TransactionBuilder<'_, C>, Pubkey)>
async fn create_alt(&self) -> Result<(TransactionBuilder<'_, C>, Pubkey)>
TransactionBuilder
to create address lookup table.Source§fn extend_alt(
&self,
alt: &Pubkey,
new_addresses: Vec<Pubkey>,
chunk_size: Option<usize>,
) -> Result<BundleBuilder<'_, C>>
fn extend_alt( &self, alt: &Pubkey, new_addresses: Vec<Pubkey>, chunk_size: Option<usize>, ) -> Result<BundleBuilder<'_, C>>
BundleBuilder
to extend the given address lookup table with new addresses.Source§fn deactivate_alt(&self, alt: &Pubkey) -> TransactionBuilder<'_, C>
fn deactivate_alt(&self, alt: &Pubkey) -> TransactionBuilder<'_, C>
TransactionBuilder
to deactivate the given address lookup tableSource§fn close_alt(&self, alt: &Pubkey) -> TransactionBuilder<'_, C>
fn close_alt(&self, alt: &Pubkey) -> TransactionBuilder<'_, C>
TransactionBuilder
to close the given address lookup tableSource§impl<C, S> ConfigOps<C> for Client<C>
impl<C, S> ConfigOps<C> for Client<C>
Source§fn insert_global_amount(
&self,
store: &Pubkey,
key: &str,
amount: &Amount,
) -> TransactionBuilder<'_, C>
fn insert_global_amount( &self, store: &Pubkey, key: &str, amount: &Amount, ) -> TransactionBuilder<'_, C>
Source§fn insert_global_factor(
&self,
store: &Pubkey,
key: &str,
factor: &Factor,
) -> TransactionBuilder<'_, C>
fn insert_global_factor( &self, store: &Pubkey, key: &str, factor: &Factor, ) -> TransactionBuilder<'_, C>
Source§fn insert_global_address(
&self,
store: &Pubkey,
key: &str,
address: &Pubkey,
) -> TransactionBuilder<'_, C>
fn insert_global_address( &self, store: &Pubkey, key: &str, address: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn insert_global_amount_by_key(
&self,
store: &Pubkey,
key: AmountKey,
amount: &Amount,
) -> TransactionBuilder<'_, C>
fn insert_global_amount_by_key( &self, store: &Pubkey, key: AmountKey, amount: &Amount, ) -> TransactionBuilder<'_, C>
Source§fn insert_global_factor_by_key(
&self,
store: &Pubkey,
key: FactorKey,
factor: &Factor,
) -> TransactionBuilder<'_, C>
fn insert_global_factor_by_key( &self, store: &Pubkey, key: FactorKey, factor: &Factor, ) -> TransactionBuilder<'_, C>
Source§fn insert_global_address_by_key(
&self,
store: &Pubkey,
key: AddressKey,
address: &Pubkey,
) -> TransactionBuilder<'_, C>
fn insert_global_address_by_key( &self, store: &Pubkey, key: AddressKey, address: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§impl<S, C> ExchangeOps<C> for Client<C>
impl<S, C> ExchangeOps<C> for Client<C>
Source§fn toggle_feature(
&self,
store: &Pubkey,
domian: DomainDisabledFlag,
action: ActionDisabledFlag,
enable: bool,
) -> TransactionBuilder<'_, C>
fn toggle_feature( &self, store: &Pubkey, domian: DomainDisabledFlag, action: ActionDisabledFlag, enable: bool, ) -> TransactionBuilder<'_, C>
Source§fn claim_fees(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_long_token: bool,
) -> ClaimFeesBuilder<'_, C>
fn claim_fees( &self, store: &Pubkey, market_token: &Pubkey, is_long_token: bool, ) -> ClaimFeesBuilder<'_, C>
Source§fn create_deposit(
&self,
store: &Pubkey,
market_token: &Pubkey,
) -> CreateDepositBuilder<'_, C>
fn create_deposit( &self, store: &Pubkey, market_token: &Pubkey, ) -> CreateDepositBuilder<'_, C>
Source§fn close_deposit(
&self,
store: &Pubkey,
deposit: &Pubkey,
) -> CloseDepositBuilder<'_, C>
fn close_deposit( &self, store: &Pubkey, deposit: &Pubkey, ) -> CloseDepositBuilder<'_, C>
Source§fn execute_deposit(
&self,
store: &Pubkey,
oracle: &Pubkey,
deposit: &Pubkey,
cancel_on_execution_error: bool,
) -> ExecuteDepositBuilder<'_, C>
fn execute_deposit( &self, store: &Pubkey, oracle: &Pubkey, deposit: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteDepositBuilder<'_, C>
Source§fn create_withdrawal(
&self,
store: &Pubkey,
market_token: &Pubkey,
amount: u64,
) -> CreateWithdrawalBuilder<'_, C>
fn create_withdrawal( &self, store: &Pubkey, market_token: &Pubkey, amount: u64, ) -> CreateWithdrawalBuilder<'_, C>
Source§fn close_withdrawal(
&self,
store: &Pubkey,
withdrawal: &Pubkey,
) -> CloseWithdrawalBuilder<'_, C>
fn close_withdrawal( &self, store: &Pubkey, withdrawal: &Pubkey, ) -> CloseWithdrawalBuilder<'_, C>
Source§fn execute_withdrawal(
&self,
store: &Pubkey,
oracle: &Pubkey,
withdrawal: &Pubkey,
cancel_on_execution_error: bool,
) -> ExecuteWithdrawalBuilder<'_, C>
fn execute_withdrawal( &self, store: &Pubkey, oracle: &Pubkey, withdrawal: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteWithdrawalBuilder<'_, C>
Source§async fn create_market(
&self,
store: &Pubkey,
name: &str,
index_token: &Pubkey,
long_token: &Pubkey,
short_token: &Pubkey,
enable: bool,
token_map: Option<&Pubkey>,
) -> Result<(TransactionBuilder<'_, C>, Pubkey)>
async fn create_market( &self, store: &Pubkey, name: &str, index_token: &Pubkey, long_token: &Pubkey, short_token: &Pubkey, enable: bool, token_map: Option<&Pubkey>, ) -> Result<(TransactionBuilder<'_, C>, Pubkey)>
Source§async fn fund_market(
&self,
store: &Pubkey,
market_token: &Pubkey,
source_account: &Pubkey,
amount: u64,
token: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn fund_market( &self, store: &Pubkey, market_token: &Pubkey, source_account: &Pubkey, amount: u64, token: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§fn create_order(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_output_token_long: bool,
params: OrderParams,
) -> CreateOrderBuilder<'_, C>
fn create_order( &self, store: &Pubkey, market_token: &Pubkey, is_output_token_long: bool, params: OrderParams, ) -> CreateOrderBuilder<'_, C>
Source§fn update_order(
&self,
store: &Pubkey,
market_token: &Pubkey,
order: &Pubkey,
params: UpdateOrderParams,
) -> Result<TransactionBuilder<'_, C>>
fn update_order( &self, store: &Pubkey, market_token: &Pubkey, order: &Pubkey, params: UpdateOrderParams, ) -> Result<TransactionBuilder<'_, C>>
Source§fn execute_order(
&self,
store: &Pubkey,
oracle: &Pubkey,
order: &Pubkey,
cancel_on_execution_error: bool,
) -> Result<ExecuteOrderBuilder<'_, C>>
fn execute_order( &self, store: &Pubkey, oracle: &Pubkey, order: &Pubkey, cancel_on_execution_error: bool, ) -> Result<ExecuteOrderBuilder<'_, C>>
Source§fn close_order(&self, order: &Pubkey) -> Result<CloseOrderBuilder<'_, C>>
fn close_order(&self, order: &Pubkey) -> Result<CloseOrderBuilder<'_, C>>
Source§async fn cancel_order_if_no_position(
&self,
store: &Pubkey,
order: &Pubkey,
position_hint: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn cancel_order_if_no_position( &self, store: &Pubkey, order: &Pubkey, position_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§fn liquidate(
&self,
oracle: &Pubkey,
position: &Pubkey,
) -> Result<PositionCutBuilder<'_, C>>
fn liquidate( &self, oracle: &Pubkey, position: &Pubkey, ) -> Result<PositionCutBuilder<'_, C>>
Source§fn auto_deleverage(
&self,
oracle: &Pubkey,
position: &Pubkey,
size_delta_usd: u128,
) -> Result<PositionCutBuilder<'_, C>>
fn auto_deleverage( &self, oracle: &Pubkey, position: &Pubkey, size_delta_usd: u128, ) -> Result<PositionCutBuilder<'_, C>>
Source§fn update_adl(
&self,
store: &Pubkey,
oracle: &Pubkey,
market_token: &Pubkey,
for_long: bool,
for_short: bool,
) -> Result<UpdateAdlBuilder<'_, C>>
fn update_adl( &self, store: &Pubkey, oracle: &Pubkey, market_token: &Pubkey, for_long: bool, for_short: bool, ) -> Result<UpdateAdlBuilder<'_, C>>
Source§fn create_shift(
&self,
store: &Pubkey,
from_market_token: &Pubkey,
to_market_token: &Pubkey,
amount: u64,
) -> CreateShiftBuilder<'_, C>
fn create_shift( &self, store: &Pubkey, from_market_token: &Pubkey, to_market_token: &Pubkey, amount: u64, ) -> CreateShiftBuilder<'_, C>
Source§fn close_shift(&self, shift: &Pubkey) -> CloseShiftBuilder<'_, C>
fn close_shift(&self, shift: &Pubkey) -> CloseShiftBuilder<'_, C>
Source§fn execute_shift(
&self,
oracle: &Pubkey,
shift: &Pubkey,
cancel_on_execution_error: bool,
) -> ExecuteShiftBuilder<'_, C>
fn execute_shift( &self, oracle: &Pubkey, shift: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteShiftBuilder<'_, C>
Source§fn market_increase(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_collateral_token_long: bool,
initial_collateral_amount: u64,
is_long: bool,
increment_size_in_usd: u128,
) -> CreateOrderBuilder<'_, C>
fn market_increase( &self, store: &Pubkey, market_token: &Pubkey, is_collateral_token_long: bool, initial_collateral_amount: u64, is_long: bool, increment_size_in_usd: u128, ) -> CreateOrderBuilder<'_, C>
Source§fn market_decrease(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_collateral_token_long: bool,
collateral_withdrawal_amount: u64,
is_long: bool,
decrement_size_in_usd: u128,
) -> CreateOrderBuilder<'_, C>
fn market_decrease( &self, store: &Pubkey, market_token: &Pubkey, is_collateral_token_long: bool, collateral_withdrawal_amount: u64, is_long: bool, decrement_size_in_usd: u128, ) -> CreateOrderBuilder<'_, C>
Source§fn market_swap<'a, S>(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_output_token_long: bool,
initial_swap_in_token: &Pubkey,
initial_swap_in_token_amount: u64,
swap_path: impl IntoIterator<Item = &'a Pubkey>,
) -> CreateOrderBuilder<'_, C>
fn market_swap<'a, S>( &self, store: &Pubkey, market_token: &Pubkey, is_output_token_long: bool, initial_swap_in_token: &Pubkey, initial_swap_in_token_amount: u64, swap_path: impl IntoIterator<Item = &'a Pubkey>, ) -> CreateOrderBuilder<'_, C>
Source§fn limit_increase(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_long: bool,
increment_size_in_usd: u128,
price: u128,
is_collateral_token_long: bool,
initial_collateral_amount: u64,
) -> CreateOrderBuilder<'_, C>
fn limit_increase( &self, store: &Pubkey, market_token: &Pubkey, is_long: bool, increment_size_in_usd: u128, price: u128, is_collateral_token_long: bool, initial_collateral_amount: u64, ) -> CreateOrderBuilder<'_, C>
Source§fn limit_decrease(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_long: bool,
decrement_size_in_usd: u128,
price: u128,
is_collateral_token_long: bool,
collateral_withdrawal_amount: u64,
) -> CreateOrderBuilder<'_, C>
fn limit_decrease( &self, store: &Pubkey, market_token: &Pubkey, is_long: bool, decrement_size_in_usd: u128, price: u128, is_collateral_token_long: bool, collateral_withdrawal_amount: u64, ) -> CreateOrderBuilder<'_, C>
Source§fn stop_loss(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_long: bool,
decrement_size_in_usd: u128,
price: u128,
is_collateral_token_long: bool,
collateral_withdrawal_amount: u64,
) -> CreateOrderBuilder<'_, C>
fn stop_loss( &self, store: &Pubkey, market_token: &Pubkey, is_long: bool, decrement_size_in_usd: u128, price: u128, is_collateral_token_long: bool, collateral_withdrawal_amount: u64, ) -> CreateOrderBuilder<'_, C>
Source§fn limit_swap<'a, S>(
&self,
store: &Pubkey,
market_token: &Pubkey,
is_output_token_long: bool,
min_output_amount: u64,
initial_swap_in_token: &Pubkey,
initial_swap_in_token_amount: u64,
swap_path: impl IntoIterator<Item = &'a Pubkey>,
) -> CreateOrderBuilder<'_, C>
fn limit_swap<'a, S>( &self, store: &Pubkey, market_token: &Pubkey, is_output_token_long: bool, min_output_amount: u64, initial_swap_in_token: &Pubkey, initial_swap_in_token_amount: u64, swap_path: impl IntoIterator<Item = &'a Pubkey>, ) -> CreateOrderBuilder<'_, C>
Source§impl<C: Deref<Target = impl Signer> + Clone> GlvOps<C> for Client<C>
impl<C: Deref<Target = impl Signer> + Clone> GlvOps<C> for Client<C>
Source§fn initialize_glv(
&self,
store: &Pubkey,
index: u16,
market_tokens: impl IntoIterator<Item = Pubkey>,
) -> Result<(TransactionBuilder<'_, C>, Pubkey)>
fn initialize_glv( &self, store: &Pubkey, index: u16, market_tokens: impl IntoIterator<Item = Pubkey>, ) -> Result<(TransactionBuilder<'_, C>, Pubkey)>
Source§fn update_glv_market_config(
&self,
store: &Pubkey,
glv_token: &Pubkey,
market_token: &Pubkey,
max_amount: Option<u64>,
max_value: Option<u128>,
) -> TransactionBuilder<'_, C>
fn update_glv_market_config( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, max_amount: Option<u64>, max_value: Option<u128>, ) -> TransactionBuilder<'_, C>
Source§fn toggle_glv_market_flag(
&self,
store: &Pubkey,
glv_token: &Pubkey,
market_token: &Pubkey,
flag: GlvMarketFlag,
enable: bool,
) -> TransactionBuilder<'_, C>
fn toggle_glv_market_flag( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, flag: GlvMarketFlag, enable: bool, ) -> TransactionBuilder<'_, C>
Source§fn update_glv_config(
&self,
store: &Pubkey,
glv_token: &Pubkey,
params: UpdateGlvParams,
) -> TransactionBuilder<'_, C>
fn update_glv_config( &self, store: &Pubkey, glv_token: &Pubkey, params: UpdateGlvParams, ) -> TransactionBuilder<'_, C>
Source§fn insert_glv_market(
&self,
store: &Pubkey,
glv_token: &Pubkey,
market_token: &Pubkey,
token_program_id: Option<&Pubkey>,
) -> TransactionBuilder<'_, C>
fn insert_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>
Source§fn remove_glv_market(
&self,
store: &Pubkey,
glv_token: &Pubkey,
market_token: &Pubkey,
token_program_id: Option<&Pubkey>,
) -> TransactionBuilder<'_, C>
fn remove_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>
Source§fn create_glv_deposit(
&self,
store: &Pubkey,
glv_token: &Pubkey,
market_token: &Pubkey,
) -> CreateGlvDepositBuilder<'_, C>
fn create_glv_deposit( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, ) -> CreateGlvDepositBuilder<'_, C>
Source§fn close_glv_deposit(
&self,
glv_deposit: &Pubkey,
) -> CloseGlvDepositBuilder<'_, C>
fn close_glv_deposit( &self, glv_deposit: &Pubkey, ) -> CloseGlvDepositBuilder<'_, C>
Source§fn execute_glv_deposit(
&self,
oracle: &Pubkey,
glv_deposit: &Pubkey,
cancel_on_execution_error: bool,
) -> ExecuteGlvDepositBuilder<'_, C>
fn execute_glv_deposit( &self, oracle: &Pubkey, glv_deposit: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvDepositBuilder<'_, C>
fn create_glv_withdrawal( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, amount: u64, ) -> CreateGlvWithdrawalBuilder<'_, C>
Source§fn close_glv_withdrawal(
&self,
glv_withdrawal: &Pubkey,
) -> CloseGlvWithdrawalBuilder<'_, C>
fn close_glv_withdrawal( &self, glv_withdrawal: &Pubkey, ) -> CloseGlvWithdrawalBuilder<'_, C>
Source§fn execute_glv_withdrawal(
&self,
oracle: &Pubkey,
glv_withdrawal: &Pubkey,
cancel_on_execution_error: bool,
) -> ExecuteGlvWithdrawalBuilder<'_, C>
fn execute_glv_withdrawal( &self, oracle: &Pubkey, glv_withdrawal: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvWithdrawalBuilder<'_, C>
fn create_glv_shift( &self, store: &Pubkey, glv_token: &Pubkey, from_market_token: &Pubkey, to_market_token: &Pubkey, amount: u64, ) -> CreateGlvShiftBuilder<'_, C>
fn close_glv_shift(&self, glv_shift: &Pubkey) -> CloseGlvShiftBuilder<'_, C>
fn execute_glv_shift( &self, oracle: &Pubkey, glv_shift: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvShiftBuilder<'_, C>
Source§impl<C: Deref<Target = impl Signer> + Clone> GtOps<C> for Client<C>
impl<C: Deref<Target = impl Signer> + Clone> GtOps<C> for Client<C>
Source§fn initialize_gt(
&self,
store: &Pubkey,
decimals: u8,
initial_minting_cost: u128,
grow_factor: u128,
grow_step: u64,
ranks: Vec<u64>,
) -> TransactionBuilder<'_, C>
fn initialize_gt( &self, store: &Pubkey, decimals: u8, initial_minting_cost: u128, grow_factor: u128, grow_step: u64, ranks: Vec<u64>, ) -> TransactionBuilder<'_, C>
Source§fn gt_set_order_fee_discount_factors(
&self,
store: &Pubkey,
factors: Vec<u128>,
) -> TransactionBuilder<'_, C>
fn gt_set_order_fee_discount_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>
Source§fn gt_set_referral_reward_factors(
&self,
store: &Pubkey,
factors: Vec<u128>,
) -> TransactionBuilder<'_, C>
fn gt_set_referral_reward_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>
Source§fn gt_set_exchange_time_window(
&self,
store: &Pubkey,
window: u32,
) -> TransactionBuilder<'_, C>
fn gt_set_exchange_time_window( &self, store: &Pubkey, window: u32, ) -> TransactionBuilder<'_, C>
Source§fn prepare_gt_exchange_vault_with_time_window_index(
&self,
store: &Pubkey,
time_window_index: i64,
time_window: u32,
) -> TransactionBuilder<'_, C, Pubkey>
fn prepare_gt_exchange_vault_with_time_window_index( &self, store: &Pubkey, time_window_index: i64, time_window: u32, ) -> TransactionBuilder<'_, C, Pubkey>
Source§fn confirm_gt_exchange_vault(
&self,
store: &Pubkey,
vault: &Pubkey,
) -> TransactionBuilder<'_, C>
fn confirm_gt_exchange_vault( &self, store: &Pubkey, vault: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn request_gt_exchange_with_time_window_index(
&self,
store: &Pubkey,
time_window_index: i64,
time_window: u32,
amount: u64,
) -> TransactionBuilder<'_, C>
fn request_gt_exchange_with_time_window_index( &self, store: &Pubkey, time_window_index: i64, time_window: u32, amount: u64, ) -> TransactionBuilder<'_, C>
Source§async fn close_gt_exchange(
&self,
store: &Pubkey,
exchange: &Pubkey,
hint_owner: Option<&Pubkey>,
hint_vault: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn close_gt_exchange( &self, store: &Pubkey, exchange: &Pubkey, hint_owner: Option<&Pubkey>, hint_vault: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§fn prepare_gt_exchange_vault_with_time_window(
&self,
store: &Pubkey,
time_window: u32,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
fn prepare_gt_exchange_vault_with_time_window( &self, store: &Pubkey, time_window: u32, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Source§fn request_gt_exchange_with_time_window(
&self,
store: &Pubkey,
time_window: u32,
amount: u64,
) -> Result<TransactionBuilder<'_, C>>
fn request_gt_exchange_with_time_window( &self, store: &Pubkey, time_window: u32, amount: u64, ) -> Result<TransactionBuilder<'_, C>>
Source§impl<C: Deref<Target = impl Signer> + Clone> IdlOps<C> for Client<C>
impl<C: Deref<Target = impl Signer> + Clone> IdlOps<C> for Client<C>
Source§fn create_idl_account(
&self,
program_id: &Pubkey,
data_len: u64,
) -> Result<TransactionBuilder<'_, C>>
fn create_idl_account( &self, program_id: &Pubkey, data_len: u64, ) -> Result<TransactionBuilder<'_, C>>
Source§fn resize_idl_account(
&self,
program_id: &Pubkey,
account: Option<&Pubkey>,
data_len: u64,
) -> Result<TransactionBuilder<'_, C>>
fn resize_idl_account( &self, program_id: &Pubkey, account: Option<&Pubkey>, data_len: u64, ) -> Result<TransactionBuilder<'_, C>>
Source§fn set_idl_buffer(
&self,
program_id: &Pubkey,
buffer: &Pubkey,
) -> Result<TransactionBuilder<'_, C>>
fn set_idl_buffer( &self, program_id: &Pubkey, buffer: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>
Source§fn close_idl_account(
&self,
program_id: &Pubkey,
account: Option<&Pubkey>,
sol_destination: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
fn close_idl_account( &self, program_id: &Pubkey, account: Option<&Pubkey>, sol_destination: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§impl<C, S> MarketOps<C> for Client<C>
impl<C, S> MarketOps<C> for Client<C>
Source§fn get_market_status(
&self,
store: &Pubkey,
market_token: &Pubkey,
prices: Prices<u128>,
maximize_pnl: bool,
maximize_pool_value: bool,
) -> TransactionBuilder<'_, C>
fn get_market_status( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, maximize_pnl: bool, maximize_pool_value: bool, ) -> TransactionBuilder<'_, C>
Source§fn get_market_token_price(
&self,
store: &Pubkey,
market_token: &Pubkey,
prices: Prices<u128>,
pnl_factor: PnlFactorKind,
maximize: bool,
) -> TransactionBuilder<'_, C>
fn get_market_token_price( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, pnl_factor: PnlFactorKind, maximize: bool, ) -> TransactionBuilder<'_, C>
Source§fn update_market_config(
&self,
store: &Pubkey,
market_token: &Pubkey,
key: &str,
value: &Factor,
) -> Result<TransactionBuilder<'_, C>>
fn update_market_config( &self, store: &Pubkey, market_token: &Pubkey, key: &str, value: &Factor, ) -> Result<TransactionBuilder<'_, C>>
Source§fn update_market_config_flag(
&self,
store: &Pubkey,
market_token: &Pubkey,
key: &str,
value: bool,
) -> Result<TransactionBuilder<'_, C>>
fn update_market_config_flag( &self, store: &Pubkey, market_token: &Pubkey, key: &str, value: bool, ) -> Result<TransactionBuilder<'_, C>>
Source§fn toggle_market(
&self,
store: &Pubkey,
market_token: &Pubkey,
enable: bool,
) -> TransactionBuilder<'_, C>
fn toggle_market( &self, store: &Pubkey, market_token: &Pubkey, enable: bool, ) -> TransactionBuilder<'_, C>
Source§fn toggle_gt_minting(
&self,
store: &Pubkey,
market_token: &Pubkey,
enable: bool,
) -> TransactionBuilder<'_, C>
fn toggle_gt_minting( &self, store: &Pubkey, market_token: &Pubkey, enable: bool, ) -> TransactionBuilder<'_, C>
Source§fn initialize_market_config_buffer<'a>(
&'a self,
store: &Pubkey,
buffer: &'a dyn Signer,
expire_after_secs: u32,
) -> TransactionBuilder<'a, C>
fn initialize_market_config_buffer<'a>( &'a self, store: &Pubkey, buffer: &'a dyn Signer, expire_after_secs: u32, ) -> TransactionBuilder<'a, C>
Source§fn close_marekt_config_buffer(
&self,
buffer: &Pubkey,
receiver: Option<&Pubkey>,
) -> TransactionBuilder<'_, C>
fn close_marekt_config_buffer( &self, buffer: &Pubkey, receiver: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>
Source§fn push_to_market_config_buffer<K: ToString>(
&self,
buffer: &Pubkey,
new_configs: impl IntoIterator<Item = (K, Factor)>,
) -> TransactionBuilder<'_, C>
fn push_to_market_config_buffer<K: ToString>( &self, buffer: &Pubkey, new_configs: impl IntoIterator<Item = (K, Factor)>, ) -> TransactionBuilder<'_, C>
Source§fn update_market_config_with_buffer(
&self,
store: &Pubkey,
market_token: &Pubkey,
buffer: &Pubkey,
) -> TransactionBuilder<'_, C>
fn update_market_config_with_buffer( &self, store: &Pubkey, market_token: &Pubkey, buffer: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn update_market_config_by_key(
&self,
store: &Pubkey,
market_token: &Pubkey,
key: MarketConfigKey,
value: &Factor,
) -> Result<TransactionBuilder<'_, C>>
fn update_market_config_by_key( &self, store: &Pubkey, market_token: &Pubkey, key: MarketConfigKey, value: &Factor, ) -> Result<TransactionBuilder<'_, C>>
Source§fn update_market_config_flag_by_key(
&self,
store: &Pubkey,
market_token: &Pubkey,
key: MarketConfigFlag,
value: bool,
) -> Result<TransactionBuilder<'_, C>>
fn update_market_config_flag_by_key( &self, store: &Pubkey, market_token: &Pubkey, key: MarketConfigFlag, value: bool, ) -> Result<TransactionBuilder<'_, C>>
Source§impl<C, S> OracleOps<C> for Client<C>
impl<C, S> OracleOps<C> for Client<C>
Source§async fn initialize_oracle<'a>(
&'a self,
store: &Pubkey,
oracle: &'a dyn Signer,
authority: Option<&Pubkey>,
) -> Result<(TransactionBuilder<'a, C>, Pubkey)>
async fn initialize_oracle<'a>( &'a self, store: &Pubkey, oracle: &'a dyn Signer, authority: Option<&Pubkey>, ) -> Result<(TransactionBuilder<'a, C>, Pubkey)>
Oracle
account.Source§fn initialize_price_feed(
&self,
store: &Pubkey,
index: u16,
provider: PriceProviderKind,
token: &Pubkey,
feed_id: &Pubkey,
) -> (TransactionBuilder<'_, C>, Pubkey)
fn initialize_price_feed( &self, store: &Pubkey, index: u16, provider: PriceProviderKind, token: &Pubkey, feed_id: &Pubkey, ) -> (TransactionBuilder<'_, C>, Pubkey)
Source§fn update_price_feed_with_chainlink(
&self,
store: &Pubkey,
price_feed: &Pubkey,
chainlink: &Pubkey,
access_controller: &Pubkey,
signed_report: &[u8],
) -> Result<TransactionBuilder<'_, C>>
fn update_price_feed_with_chainlink( &self, store: &Pubkey, price_feed: &Pubkey, chainlink: &Pubkey, access_controller: &Pubkey, signed_report: &[u8], ) -> Result<TransactionBuilder<'_, C>>
Source§impl<C, S> RolesOps<C> for Client<C>
impl<C, S> RolesOps<C> for Client<C>
Source§fn enable_role(&self, store: &Pubkey, role: &str) -> TransactionBuilder<'_, C>
fn enable_role(&self, store: &Pubkey, role: &str) -> TransactionBuilder<'_, C>
Source§fn disable_role(&self, store: &Pubkey, role: &str) -> TransactionBuilder<'_, C>
fn disable_role(&self, store: &Pubkey, role: &str) -> TransactionBuilder<'_, C>
Source§fn grant_role(
&self,
store: &Pubkey,
user: &Pubkey,
role: &str,
) -> TransactionBuilder<'_, C>
fn grant_role( &self, store: &Pubkey, user: &Pubkey, role: &str, ) -> TransactionBuilder<'_, C>
Source§fn revoke_role(
&self,
store: &Pubkey,
user: &Pubkey,
role: &str,
) -> TransactionBuilder<'_, C>
fn revoke_role( &self, store: &Pubkey, user: &Pubkey, role: &str, ) -> TransactionBuilder<'_, C>
Source§impl<C, S> StoreOps<C> for Client<C>
impl<C, S> StoreOps<C> for Client<C>
Source§fn initialize_store<S2: Signer + 'static>(
&self,
key: &str,
authority: Option<S2>,
receiver: Option<S2>,
holding: Option<S2>,
) -> TransactionBuilder<'_, C>
fn initialize_store<S2: Signer + 'static>( &self, key: &str, authority: Option<S2>, receiver: Option<S2>, holding: Option<S2>, ) -> TransactionBuilder<'_, C>
Store
account.Source§fn transfer_receiver(
&self,
store: &Pubkey,
new_receiver: &Pubkey,
) -> TransactionBuilder<'_, C>
fn transfer_receiver( &self, store: &Pubkey, new_receiver: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn set_token_map(
&self,
store: &Pubkey,
token_map: &Pubkey,
) -> TransactionBuilder<'_, C>
fn set_token_map( &self, store: &Pubkey, token_map: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn insert_factor(
&self,
store: &Pubkey,
key: FactorKey,
factor: Factor,
) -> TransactionBuilder<'_, C>
fn insert_factor( &self, store: &Pubkey, key: FactorKey, factor: Factor, ) -> TransactionBuilder<'_, C>
Source§impl<C: Deref<Target = impl Signer> + Clone> TimelockOps<C> for Client<C>
impl<C: Deref<Target = impl Signer> + Clone> TimelockOps<C> for Client<C>
Source§fn initialize_timelock_config(
&self,
store: &Pubkey,
initial_delay: u32,
) -> TransactionBuilder<'_, C, Pubkey>
fn initialize_timelock_config( &self, store: &Pubkey, initial_delay: u32, ) -> TransactionBuilder<'_, C, Pubkey>
TimelockConfig
account.Source§fn increase_timelock_delay(
&self,
store: &Pubkey,
delta: u32,
) -> TransactionBuilder<'_, C>
fn increase_timelock_delay( &self, store: &Pubkey, delta: u32, ) -> TransactionBuilder<'_, C>
Source§fn initialize_executor(
&self,
store: &Pubkey,
role: &str,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
fn initialize_executor( &self, store: &Pubkey, role: &str, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Executor
account.Source§fn create_timelocked_instruction(
&self,
store: &Pubkey,
role: &str,
buffer: impl Signer + 'static,
instruction: Instruction,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
fn create_timelocked_instruction( &self, store: &Pubkey, role: &str, buffer: impl Signer + 'static, instruction: Instruction, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Source§async fn approve_timelocked_instruction(
&self,
store: &Pubkey,
buffer: &Pubkey,
role_hint: Option<&str>,
) -> Result<TransactionBuilder<'_, C>>
async fn approve_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, role_hint: Option<&str>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn approve_timelocked_instructions(
&self,
store: &Pubkey,
buffers: impl IntoIterator<Item = Pubkey>,
role_hint: Option<&str>,
) -> Result<TransactionBuilder<'_, C>>
async fn approve_timelocked_instructions( &self, store: &Pubkey, buffers: impl IntoIterator<Item = Pubkey>, role_hint: Option<&str>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn cancel_timelocked_instruction(
&self,
store: &Pubkey,
buffer: &Pubkey,
executor_hint: Option<&Pubkey>,
rent_receiver_hint: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn cancel_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn cancel_timelocked_instructions(
&self,
store: &Pubkey,
buffers: impl IntoIterator<Item = Pubkey>,
executor_hint: Option<&Pubkey>,
rent_receiver_hint: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn cancel_timelocked_instructions( &self, store: &Pubkey, buffers: impl IntoIterator<Item = Pubkey>, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn execute_timelocked_instruction(
&self,
store: &Pubkey,
buffer: &Pubkey,
hint: Option<ExecuteTimelockedInstructionHint<'_>>,
) -> Result<TransactionBuilder<'_, C>>
async fn execute_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, hint: Option<ExecuteTimelockedInstructionHint<'_>>, ) -> Result<TransactionBuilder<'_, C>>
Source§fn timelock_bypassed_revoke_role(
&self,
store: &Pubkey,
role: &str,
address: &Pubkey,
) -> TransactionBuilder<'_, C>
fn timelock_bypassed_revoke_role( &self, store: &Pubkey, role: &str, address: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn timelock_bypassed_set_epxected_price_provider(
&self,
store: &Pubkey,
token_map: &Pubkey,
token: &Pubkey,
new_expected_price_provider: PriceProviderKind,
) -> TransactionBuilder<'_, C>
fn timelock_bypassed_set_epxected_price_provider( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, new_expected_price_provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>
Source§impl<C, S> TokenAccountOps<C> for Client<C>
impl<C, S> TokenAccountOps<C> for Client<C>
Source§fn use_claimable_account(
&self,
store: &Pubkey,
mint: &Pubkey,
owner: &Pubkey,
timestamp: i64,
account: &Pubkey,
amount: u64,
) -> TransactionBuilder<'_, C>
fn use_claimable_account( &self, store: &Pubkey, mint: &Pubkey, owner: &Pubkey, timestamp: i64, account: &Pubkey, amount: u64, ) -> TransactionBuilder<'_, C>
Source§fn close_empty_claimable_account(
&self,
store: &Pubkey,
mint: &Pubkey,
owner: &Pubkey,
timestamp: i64,
account: &Pubkey,
) -> TransactionBuilder<'_, C>
fn close_empty_claimable_account( &self, store: &Pubkey, mint: &Pubkey, owner: &Pubkey, timestamp: i64, account: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn prepare_associated_token_account(
&self,
mint: &Pubkey,
token_program_id: &Pubkey,
owner: Option<&Pubkey>,
) -> TransactionBuilder<'_, C>
fn prepare_associated_token_account( &self, mint: &Pubkey, token_program_id: &Pubkey, owner: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>
Source§impl<C, S> TokenConfigOps<C> for Client<C>
impl<C, S> TokenConfigOps<C> for Client<C>
Source§fn initialize_token_map<'a>(
&'a self,
store: &Pubkey,
token_map: &'a dyn Signer,
) -> (TransactionBuilder<'a, C>, Pubkey)
fn initialize_token_map<'a>( &'a self, store: &Pubkey, token_map: &'a dyn Signer, ) -> (TransactionBuilder<'a, C>, Pubkey)
TokenMap
account.Source§fn insert_token_config(
&self,
store: &Pubkey,
token_map: &Pubkey,
name: &str,
token: &Pubkey,
builder: UpdateTokenConfigParams,
enable: bool,
new: bool,
) -> TransactionBuilder<'_, C>
fn insert_token_config( &self, store: &Pubkey, token_map: &Pubkey, name: &str, token: &Pubkey, builder: UpdateTokenConfigParams, enable: bool, new: bool, ) -> TransactionBuilder<'_, C>
Source§fn insert_synthetic_token_config(
&self,
store: &Pubkey,
token_map: &Pubkey,
name: &str,
token: &Pubkey,
decimals: u8,
builder: UpdateTokenConfigParams,
enable: bool,
new: bool,
) -> TransactionBuilder<'_, C>
fn insert_synthetic_token_config( &self, store: &Pubkey, token_map: &Pubkey, name: &str, token: &Pubkey, decimals: u8, builder: UpdateTokenConfigParams, enable: bool, new: bool, ) -> TransactionBuilder<'_, C>
Source§fn toggle_token_config(
&self,
store: &Pubkey,
token_map: &Pubkey,
token: &Pubkey,
enable: bool,
) -> TransactionBuilder<'_, C>
fn toggle_token_config( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, enable: bool, ) -> TransactionBuilder<'_, C>
Source§fn set_expected_provider(
&self,
store: &Pubkey,
token_map: &Pubkey,
token: &Pubkey,
provider: PriceProviderKind,
) -> TransactionBuilder<'_, C>
fn set_expected_provider( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>
Source§fn token_name(
&self,
token_map: &Pubkey,
token: &Pubkey,
) -> TransactionBuilder<'_, C>
fn token_name( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn token_decimals(
&self,
token_map: &Pubkey,
token: &Pubkey,
) -> TransactionBuilder<'_, C>
fn token_decimals( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn token_precision(
&self,
token_map: &Pubkey,
token: &Pubkey,
) -> TransactionBuilder<'_, C>
fn token_precision( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn is_token_config_enabled(
&self,
token_map: &Pubkey,
token: &Pubkey,
) -> TransactionBuilder<'_, C>
fn is_token_config_enabled( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn token_expected_provider(
&self,
token_map: &Pubkey,
token: &Pubkey,
) -> TransactionBuilder<'_, C>
fn token_expected_provider( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn token_feed(
&self,
token_map: &Pubkey,
token: &Pubkey,
provider: PriceProviderKind,
) -> TransactionBuilder<'_, C>
fn token_feed( &self, token_map: &Pubkey, token: &Pubkey, provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>
Source§fn token_timestamp_adjustment(
&self,
token_map: &Pubkey,
token: &Pubkey,
provider: PriceProviderKind,
) -> TransactionBuilder<'_, C>
fn token_timestamp_adjustment( &self, token_map: &Pubkey, token: &Pubkey, provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>
Source§async fn token_config(
&self,
token_map: &Pubkey,
token: &Pubkey,
) -> Result<TokenConfig>
async fn token_config( &self, token_map: &Pubkey, token: &Pubkey, ) -> Result<TokenConfig>
Source§impl<S, C> TreasuryOps<C> for Client<C>
impl<S, C> TreasuryOps<C> for Client<C>
Source§fn initialize_config(&self, store: &Pubkey) -> TransactionBuilder<'_, C, Pubkey>
fn initialize_config(&self, store: &Pubkey) -> TransactionBuilder<'_, C, Pubkey>
Config
account.Source§fn set_treasury_vault_config(
&self,
store: &Pubkey,
treasury_vault_config: &Pubkey,
) -> TransactionBuilder<'_, C>
fn set_treasury_vault_config( &self, store: &Pubkey, treasury_vault_config: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn set_gt_factor(
&self,
store: &Pubkey,
factor: u128,
) -> Result<TransactionBuilder<'_, C>>
fn set_gt_factor( &self, store: &Pubkey, factor: u128, ) -> Result<TransactionBuilder<'_, C>>
Source§fn set_buyback_factor(
&self,
store: &Pubkey,
factor: u128,
) -> Result<TransactionBuilder<'_, C>>
fn set_buyback_factor( &self, store: &Pubkey, factor: u128, ) -> Result<TransactionBuilder<'_, C>>
Source§fn initialize_treasury_vault_config(
&self,
store: &Pubkey,
index: u16,
) -> TransactionBuilder<'_, C, Pubkey>
fn initialize_treasury_vault_config( &self, store: &Pubkey, index: u16, ) -> TransactionBuilder<'_, C, Pubkey>
TreasuryVaultConfig
.Source§async fn insert_token_to_treasury(
&self,
store: &Pubkey,
treasury_vault_config: Option<&Pubkey>,
token_mint: &Pubkey,
) -> Result<TransactionBuilder<'_, C>>
async fn insert_token_to_treasury( &self, store: &Pubkey, treasury_vault_config: Option<&Pubkey>, token_mint: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn remove_token_from_treasury(
&self,
store: &Pubkey,
treasury_vault_config: Option<&Pubkey>,
token_mint: &Pubkey,
) -> Result<TransactionBuilder<'_, C>>
async fn remove_token_from_treasury( &self, store: &Pubkey, treasury_vault_config: Option<&Pubkey>, token_mint: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn toggle_token_flag(
&self,
store: &Pubkey,
treasury_vault_config: Option<&Pubkey>,
token_mint: &Pubkey,
flag: TokenFlag,
value: bool,
) -> Result<TransactionBuilder<'_, C>>
async fn toggle_token_flag( &self, store: &Pubkey, treasury_vault_config: Option<&Pubkey>, token_mint: &Pubkey, flag: TokenFlag, value: bool, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn deposit_to_treasury_valut(
&self,
store: &Pubkey,
treasury_vault_config_hint: Option<&Pubkey>,
token_mint: &Pubkey,
token_program_id: Option<&Pubkey>,
time_window: u32,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
async fn deposit_to_treasury_valut( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, token_mint: &Pubkey, token_program_id: Option<&Pubkey>, time_window: u32, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Source§async fn withdraw_from_treasury_vault(
&self,
store: &Pubkey,
treasury_vault_config_hint: Option<&Pubkey>,
token_mint: &Pubkey,
token_program_id: Option<&Pubkey>,
amount: u64,
decimals: u8,
target: &Pubkey,
) -> Result<TransactionBuilder<'_, C>>
async fn withdraw_from_treasury_vault( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, token_mint: &Pubkey, token_program_id: Option<&Pubkey>, amount: u64, decimals: u8, target: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>
Source§fn confirm_gt_buyback(
&self,
store: &Pubkey,
gt_exchange_vault: &Pubkey,
oracle: &Pubkey,
) -> ConfirmGtBuybackBuilder<'_, C>
fn confirm_gt_buyback( &self, store: &Pubkey, gt_exchange_vault: &Pubkey, oracle: &Pubkey, ) -> ConfirmGtBuybackBuilder<'_, C>
Source§fn transfer_receiver(
&self,
store: &Pubkey,
new_receiver: &Pubkey,
) -> TransactionBuilder<'_, C>
fn transfer_receiver( &self, store: &Pubkey, new_receiver: &Pubkey, ) -> TransactionBuilder<'_, C>
Source§fn set_referral_reward(
&self,
store: &Pubkey,
factors: Vec<u128>,
) -> TransactionBuilder<'_, C>
fn set_referral_reward( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>
Source§fn claim_fees_to_receiver_vault(
&self,
store: &Pubkey,
market_token: &Pubkey,
token_mint: &Pubkey,
min_amount: u64,
) -> TransactionBuilder<'_, C>
fn claim_fees_to_receiver_vault( &self, store: &Pubkey, market_token: &Pubkey, token_mint: &Pubkey, min_amount: u64, ) -> TransactionBuilder<'_, C>
Source§async fn prepare_gt_bank(
&self,
store: &Pubkey,
treasury_vault_config_hint: Option<&Pubkey>,
gt_exchange_vault: &Pubkey,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
async fn prepare_gt_bank( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, gt_exchange_vault: &Pubkey, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Source§async fn sync_gt_bank(
&self,
store: &Pubkey,
treasury_vault_config_hint: Option<&Pubkey>,
gt_exchange_vault: &Pubkey,
token_mint: &Pubkey,
token_program_id: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn sync_gt_bank( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, gt_exchange_vault: &Pubkey, token_mint: &Pubkey, token_program_id: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn complete_gt_exchange(
&self,
store: &Pubkey,
exchange: &Pubkey,
treasury_vault_config_hint: Option<&Pubkey>,
tokens_hint: Option<Vec<(Pubkey, Pubkey)>>,
gt_exchange_vault_hint: Option<&Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn complete_gt_exchange( &self, store: &Pubkey, exchange: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, tokens_hint: Option<Vec<(Pubkey, Pubkey)>>, gt_exchange_vault_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn create_treasury_swap(
&self,
store: &Pubkey,
market_token: &Pubkey,
swap_in_token: &Pubkey,
swap_out_token: &Pubkey,
swap_in_token_amount: u64,
options: CreateTreasurySwapOptions,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
async fn create_treasury_swap( &self, store: &Pubkey, market_token: &Pubkey, swap_in_token: &Pubkey, swap_out_token: &Pubkey, swap_in_token_amount: u64, options: CreateTreasurySwapOptions, ) -> Result<TransactionBuilder<'_, C, Pubkey>>
Source§async fn cancel_treasury_swap(
&self,
store: &Pubkey,
order: &Pubkey,
hint: Option<(&Pubkey, &Pubkey)>,
) -> Result<TransactionBuilder<'_, C>>
async fn cancel_treasury_swap( &self, store: &Pubkey, order: &Pubkey, hint: Option<(&Pubkey, &Pubkey)>, ) -> Result<TransactionBuilder<'_, C>>
Source§impl<C: Deref<Target = impl Signer> + Clone> UserOps<C> for Client<C>
impl<C: Deref<Target = impl Signer> + Clone> UserOps<C> for Client<C>
Source§fn prepare_user(&self, store: &Pubkey) -> Result<TransactionBuilder<'_, C>>
fn prepare_user(&self, store: &Pubkey) -> Result<TransactionBuilder<'_, C>>
Source§fn initialize_referral_code(
&self,
store: &Pubkey,
code: ReferralCodeBytes,
) -> Result<TransactionBuilder<'_, C>>
fn initialize_referral_code( &self, store: &Pubkey, code: ReferralCodeBytes, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn set_referrer(
&self,
store: &Pubkey,
code: ReferralCodeBytes,
hint_referrer_user: Option<Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn set_referrer( &self, store: &Pubkey, code: ReferralCodeBytes, hint_referrer_user: Option<Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn transfer_referral_code(
&self,
store: &Pubkey,
receiver: &Pubkey,
hint_code: Option<ReferralCodeBytes>,
) -> Result<TransactionBuilder<'_, C>>
async fn transfer_referral_code( &self, store: &Pubkey, receiver: &Pubkey, hint_code: Option<ReferralCodeBytes>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn cancel_referral_code_transfer(
&self,
store: &Pubkey,
hint_code: Option<ReferralCodeBytes>,
) -> Result<TransactionBuilder<'_, C>>
async fn cancel_referral_code_transfer( &self, store: &Pubkey, hint_code: Option<ReferralCodeBytes>, ) -> Result<TransactionBuilder<'_, C>>
Source§async fn accept_referral_code(
&self,
store: &Pubkey,
code: ReferralCodeBytes,
hint_owner: Option<Pubkey>,
) -> Result<TransactionBuilder<'_, C>>
async fn accept_referral_code( &self, store: &Pubkey, code: ReferralCodeBytes, hint_owner: Option<Pubkey>, ) -> Result<TransactionBuilder<'_, C>>
Source§impl<C, S> VaultOps<C> for Client<C>
impl<C, S> VaultOps<C> for Client<C>
Source§fn initialize_market_vault(
&self,
store: &Pubkey,
token: &Pubkey,
) -> (TransactionBuilder<'_, C>, Pubkey)
fn initialize_market_vault( &self, store: &Pubkey, token: &Pubkey, ) -> (TransactionBuilder<'_, C>, Pubkey)
Auto Trait Implementations§
impl<C> !Freeze for Client<C>
impl<C> !RefUnwindSafe for Client<C>
impl<C> Send for Client<C>
impl<C> Sync for Client<C>
impl<C> Unpin for Client<C>where
C: Unpin,
impl<C> !UnwindSafe for Client<C>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more