diff --git a/.github/workflows/on-sdk-update.yml b/.github/workflows/on-sdk-update.yml index e5517b00..ef89a9fa 100644 --- a/.github/workflows/on-sdk-update.yml +++ b/.github/workflows/on-sdk-update.yml @@ -16,7 +16,7 @@ jobs: - name: Setup node uses: actions/setup-node@v2 with: - node-version: '16.x' + node-version: '18.x' registry-url: 'https://registry.npmjs.org' - name: Determine sdk version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..00b28144 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release +on: + release: + types: [published] +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.5.0 + + - name: Set up Python + uses: actions/setup-python@v4.3.0 + with: + python-version: '3.10.10' + + - name: Install and configure Poetry + run: | + cd python + curl -sSL https://install.python-poetry.org | python3 - + env: + POETRY_VERSION: 1.4.2 + + - name: Build + run: poetry build + working-directory: python + + - name: Publish + run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} + working-directory: python diff --git a/.gitignore b/.gitignore index 164612bb..c67edfba 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ python/poetry.lock __pycache__/ *.pyc *.pyo -*.pyd \ No newline at end of file +*.pyd +rust/.env \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index ef17a63c..fed0d729 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,9 @@ members = [ "programs/*" ] +exclude = [ + "rust" +] [profile.release] overflow-checks = true diff --git a/programs/jit-proxy/src/error.rs b/programs/jit-proxy/src/error.rs index 594a7a6a..1155ec4f 100644 --- a/programs/jit-proxy/src/error.rs +++ b/programs/jit-proxy/src/error.rs @@ -21,4 +21,6 @@ pub enum ErrorCode { UnprofitableArb, #[msg("PositionLimitBreached")] PositionLimitBreached, + #[msg("NoFill")] + NoFill, } diff --git a/programs/jit-proxy/src/instructions/jit.rs b/programs/jit-proxy/src/instructions/jit.rs index b797185d..5f2ef522 100644 --- a/programs/jit-proxy/src/instructions/jit.rs +++ b/programs/jit-proxy/src/instructions/jit.rs @@ -32,6 +32,27 @@ pub fn jit<'c: 'info, 'info>( let market_index = taker_order.market_index; let taker_direction = taker_order.direction; + let slots_left = taker_order + .slot + .safe_add(taker_order.auction_duration.cast()?)? + .cast::()? + .safe_sub(slot.cast()?)?; + msg!( + "slot = {} auction duration = {} slots_left = {}", + slot, + taker_order.auction_duration, + slots_left + ); + + msg!( + "taker order type {:?} auction start {} auction end {} limit price {} oracle price offset {}", + taker_order.order_type, + taker_order.auction_start_price, + taker_order.auction_end_price, + taker_order.price, + taker_order.oracle_price_offset + ); + let remaining_accounts_iter = &mut ctx.remaining_accounts.iter().peekable(); let AccountMaps { perp_market_map, @@ -45,20 +66,45 @@ pub fn jit<'c: 'info, 'info>( None, )?; - let (oracle_price, tick_size) = if market_type == DriftMarketType::Perp { + let (oracle_price, tick_size, min_order_size) = if market_type == DriftMarketType::Perp { let perp_market = perp_market_map.get_ref(&market_index)?; let oracle_price = oracle_map.get_price_data(&perp_market.amm.oracle)?.price; - (oracle_price, perp_market.amm.order_tick_size) + ( + oracle_price, + perp_market.amm.order_tick_size, + perp_market.amm.min_order_size, + ) } else { let spot_market = spot_market_map.get_ref(&market_index)?; let oracle_price = oracle_map.get_price_data(&spot_market.oracle)?.price; - (oracle_price, spot_market.order_tick_size) + ( + oracle_price, + spot_market.order_tick_size, + spot_market.min_order_size, + ) }; let taker_price = - taker_order.force_get_limit_price(Some(oracle_price), None, slot, tick_size)?; + match taker_order.get_limit_price(Some(oracle_price), None, slot, tick_size)? { + Some(price) => price, + None if market_type == DriftMarketType::Perp => { + msg!("taker order didnt have price. deriving fallback"); + // if the order doesn't have a price, drift users amm price for taker price + let perp_market = perp_market_map.get_ref(&market_index)?; + let reserve_price = perp_market.amm.reserve_price()?; + match taker_direction { + PositionDirection::Long => perp_market.amm.ask_price(reserve_price)?, + PositionDirection::Short => perp_market.amm.bid_price(reserve_price)?, + } + } + None => { + // Shouldnt be possible for spot + msg!("taker order didnt have price"); + return Err(ErrorCode::TakerOrderNotFound.into()); + } + }; let maker_direction = taker_direction.opposite(); let maker_worst_price = params.get_worst_price(oracle_price, taker_direction)?; @@ -84,9 +130,39 @@ pub fn jit<'c: 'info, 'info>( } } } - let maker_price = taker_price; - let taker_base_asset_amount_unfilled = taker_order.get_base_asset_amount_unfilled(None)?; + let maker_price = if market_type == DriftMarketType::Perp { + let perp_market = perp_market_map.get_ref(&market_index)?; + let reserve_price = perp_market.amm.reserve_price()?; + + match maker_direction { + PositionDirection::Long => { + let amm_bid_price = perp_market.amm.bid_price(reserve_price)?; + + // if amm price is better than maker, use amm price to ensure fill + if taker_price <= amm_bid_price { + amm_bid_price.min(maker_worst_price) + } else { + taker_price + } + } + PositionDirection::Short => { + let amm_ask_price = perp_market.amm.ask_price(reserve_price)?; + + if taker_price >= amm_ask_price { + amm_ask_price.max(maker_worst_price) + } else { + taker_price + } + } + } + } else { + taker_price + }; + + let taker_base_asset_amount_unfilled = taker_order + .get_base_asset_amount_unfilled(None)? + .max(min_order_size); let maker_existing_position = if market_type == DriftMarketType::Perp { let perp_market = perp_market_map.get_ref(&market_index)?; let perp_position = maker.get_perp_position(market_index); @@ -111,6 +187,7 @@ pub fn jit<'c: 'info, 'info>( maker_direction, taker_base_asset_amount_unfilled, maker_existing_position, + min_order_size, ) { Ok(size) => size, Err(e) => { @@ -129,7 +206,7 @@ pub fn jit<'c: 'info, 'info>( reduce_only: false, post_only: params .post_only - .unwrap_or(PostOnlyParam::Slide) + .unwrap_or(PostOnlyParam::MustPostOnly) .to_drift_param(), immediate_or_cancel: true, max_ts: None, @@ -144,7 +221,36 @@ pub fn jit<'c: 'info, 'info>( drop(taker); drop(maker); - place_and_make(ctx, params.taker_order_id, order_params)?; + place_and_make(&ctx, params.taker_order_id, order_params)?; + + let taker = ctx.accounts.taker.load()?; + + let taker_base_asset_amount_unfilled_after = match taker.get_order(params.taker_order_id) { + Some(order) => order.get_base_asset_amount_unfilled(None)?, + None => 0, + }; + + if taker_base_asset_amount_unfilled_after == taker_base_asset_amount_unfilled { + // taker order failed to fill + msg!( + "taker price = {} maker price = {} oracle price = {}", + taker_price, + maker_price, + oracle_price + ); + msg!("jit params {:?}", params); + if market_type == DriftMarketType::Perp { + let perp_market = perp_market_map.get_ref(&market_index)?; + let reserve_price = perp_market.amm.reserve_price()?; + let (bid_price, ask_price) = perp_market.amm.bid_ask_price(reserve_price)?; + msg!( + "vamm bid price = {} vamm ask price = {}", + bid_price, + ask_price + ); + } + return Err(ErrorCode::NoFill.into()); + } Ok(()) } @@ -213,15 +319,17 @@ fn check_position_limits( maker_direction: PositionDirection, taker_base_asset_amount_unfilled: u64, maker_existing_position: i64, + min_order_size: u64, ) -> Result { if maker_direction == PositionDirection::Long { let size = params.max_position.safe_sub(maker_existing_position)?; - if size <= 0 { + if size <= min_order_size.cast()? { msg!( - "maker existing position {} >= max position {}", + "maker existing position {} >= max position {} + min order size {}", maker_existing_position, - params.max_position + params.max_position, + min_order_size ); return Err(ErrorCode::PositionLimitBreached.into()); } @@ -230,11 +338,12 @@ fn check_position_limits( } else { let size = maker_existing_position.safe_sub(params.min_position)?; - if size <= 0 { + if size <= min_order_size.cast()? { msg!( - "maker existing position {} <= min position {}", + "maker existing position {} <= min position {} + min order size {}", maker_existing_position, - params.min_position + params.min_position, + min_order_size ); return Err(ErrorCode::PositionLimitBreached.into()); } @@ -256,55 +365,55 @@ mod tests { }; // same direction, doesn't breach - let result = check_position_limits(params, PositionDirection::Long, 10, 40); + let result = check_position_limits(params, PositionDirection::Long, 10, 40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 10); - let result = check_position_limits(params, PositionDirection::Short, 10, -40); + let result = check_position_limits(params, PositionDirection::Short, 10, -40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 10); // same direction, whole order breaches, only takes enough to hit limit - let result = check_position_limits(params, PositionDirection::Long, 100, 40); + let result = check_position_limits(params, PositionDirection::Long, 100, 40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 60); - let result = check_position_limits(params, PositionDirection::Short, 100, -40); + let result = check_position_limits(params, PositionDirection::Short, 100, -40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 60); // opposite direction, doesn't breach - let result = check_position_limits(params, PositionDirection::Long, 10, -40); + let result = check_position_limits(params, PositionDirection::Long, 10, -40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 10); - let result = check_position_limits(params, PositionDirection::Short, 10, 40); + let result = check_position_limits(params, PositionDirection::Short, 10, 40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 10); // opposite direction, whole order breaches, only takes enough to take flipped limit - let result = check_position_limits(params, PositionDirection::Long, 200, -40); + let result = check_position_limits(params, PositionDirection::Long, 200, -40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 140); - let result = check_position_limits(params, PositionDirection::Short, 200, 40); + let result = check_position_limits(params, PositionDirection::Short, 200, 40, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 140); // opposite direction, maker already breached, allows reducing - let result = check_position_limits(params, PositionDirection::Long, 200, -150); + let result = check_position_limits(params, PositionDirection::Long, 200, -150, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 200); - let result = check_position_limits(params, PositionDirection::Short, 200, 150); + let result = check_position_limits(params, PositionDirection::Short, 200, 150, 0); assert!(result.is_ok()); assert_eq!(result.unwrap(), 200); // same direction, maker already breached, errors - let result = check_position_limits(params, PositionDirection::Long, 200, 150); + let result = check_position_limits(params, PositionDirection::Long, 200, 150, 0); assert!(result.is_err()); - let result = check_position_limits(params, PositionDirection::Short, 200, -150); + let result = check_position_limits(params, PositionDirection::Short, 200, -150, 0); assert!(result.is_err()); } } fn place_and_make<'info>( - ctx: Context<'_, '_, '_, 'info, Jit<'info>>, + ctx: &Context<'_, '_, '_, 'info, Jit<'info>>, taker_order_id: u32, order_params: OrderParams, ) -> Result<()> { diff --git a/python/pyproject.toml b/python/pyproject.toml index b689db2a..65c2a929 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] -name = "jit_proxy" -version = "0.1.0" +name = "drift_jit_proxy" +version = "0.1.5" description = "python sdk for drift protocol v2 jit proxy program" authors = ["Frank "] readme = "README.md" @@ -11,12 +11,12 @@ packages = [ [tool.poetry.dependencies] python = "^3.10" python-dotenv = "^1.0.0" -solana = "^0.30.1" -anchorpy = "^0.17.1" -driftpy = "0.7.17" +solana = "^0.34.0" +anchorpy = "^0.20.1" +driftpy = "^0.7.52" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" -# \ No newline at end of file +# diff --git a/python/sdk/jit_proxy/__init__.py b/python/sdk/jit_proxy/__init__.py index 3dc1f76b..485f44ac 100644 --- a/python/sdk/jit_proxy/__init__.py +++ b/python/sdk/jit_proxy/__init__.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "0.1.1" diff --git a/python/sdk/jit_proxy/jit_proxy_client.py b/python/sdk/jit_proxy/jit_proxy_client.py index d6d2e686..158a5bc5 100644 --- a/python/sdk/jit_proxy/jit_proxy_client.py +++ b/python/sdk/jit_proxy/jit_proxy_client.py @@ -2,9 +2,9 @@ from typing import Optional, cast from borsh_construct.enum import _rust_enum -from sumtypes import constructor +from sumtypes import constructor # type: ignore -from solders.pubkey import Pubkey +from solders.pubkey import Pubkey # type: ignore from anchorpy import Context, Program @@ -74,7 +74,7 @@ async def jit(self, params: JitIxParams): await self.init() sub_account_id = self.drift_client.get_sub_account_id_for_ix( - params.sub_account_id + params.sub_account_id # type: ignore ) order = next( @@ -90,19 +90,35 @@ async def jit(self, params: JitIxParams): params.taker, self.drift_client.get_user_account(sub_account_id), ], - writable_spot_market_indexes=[order.market_index, QUOTE_SPOT_MARKET_INDEX] - if is_variant(order.market_type, "Spot") + writable_spot_market_indexes=[order.market_index, QUOTE_SPOT_MARKET_INDEX] # type: ignore + if is_variant(order.market_type, "Spot") # type: ignore else [], - writable_perp_market_indexes=[order.market_index] - if is_variant(order.market_type, "Perp") + writable_perp_market_indexes=[order.market_index] # type: ignore + if is_variant(order.market_type, "Perp") # type: ignore else [], ) - if is_variant(order.market_type, "Spot"): + if params.referrer_info is not None: remaining_accounts.append( AccountMeta( - pubkey=self.drift_client.get_spot_market_account( - order.market_index + pubkey=params.referrer_info.referrer, + is_writable=True, + is_signer=False, + ) + ) + remaining_accounts.append( + AccountMeta( + pubkey=params.referrer_info.referrer_stats, + is_writable=True, + is_signer=False, + ) + ) + + if is_variant(order.market_type, "Spot"): # type: ignore + remaining_accounts.append( + AccountMeta( + pubkey=self.drift_client.get_spot_market_account( # type: ignore + order.market_index # type: ignore ).vault, is_writable=False, is_signer=False, @@ -110,23 +126,23 @@ async def jit(self, params: JitIxParams): ) remaining_accounts.append( AccountMeta( - pubkey=self.drift_client.get_quote_spot_market_account().vault, + pubkey=self.drift_client.get_quote_spot_market_account().vault, # type: ignore is_writable=False, is_signer=False, ) ) - jit_params = self.program.type["JitParams"]( + jit_params = self.program.type["JitParams"]( # type: ignore taker_order_id=params.taker_order_id, max_position=cast(int, params.max_position), min_position=cast(int, params.min_position), bid=cast(int, params.bid), ask=cast(int, params.ask), - price_type=self.get_price_type(params.price_type), + price_type=self.get_price_type(params.price_type), # type: ignore post_only=self.get_post_only(params.post_only), ) - ix = self.program.instruction["jit"]( + ix = self.program.instruction["jit"]( # type: ignore jit_params, ctx=Context( accounts={ @@ -140,7 +156,7 @@ async def jit(self, params: JitIxParams): "authority": self.drift_client.wallet.public_key, "drift_program": self.drift_client.program_id, }, - signers={self.drift_client.wallet}, + signers={self.drift_client.wallet}, # type: ignore remaining_accounts=remaining_accounts, ), ) @@ -151,16 +167,16 @@ async def jit(self, params: JitIxParams): def get_price_type(self, price_type: PriceType): if is_variant(price_type, "Oracle"): - return self.program.type["PriceType"].Oracle() + return self.program.type["PriceType"].Oracle() # type: ignore elif is_variant(price_type, "Limit"): - return self.program.type["PriceType"].Limit() - else: + return self.program.type["PriceType"].Limit() # type: ignore + else: raise ValueError(f"Unknown price type: {str(price_type)}") def get_post_only(self, post_only: PostOnlyParams): if is_variant(post_only, "MustPostOnly"): - return self.program.type["PostOnlyParam"].MustPostOnly() + return self.program.type["PostOnlyParam"].MustPostOnly() # type: ignore elif is_variant(post_only, "TryPostOnly"): - return self.program.type["PostOnlyParam"].TryPostOnly() + return self.program.type["PostOnlyParam"].TryPostOnly() # type: ignore elif is_variant(post_only, "Slide"): - return self.program.type["PostOnlyParam"].Slide() + return self.program.type["PostOnlyParam"].Slide() # type: ignore diff --git a/python/sdk/jit_proxy/jitter/base_jitter.py b/python/sdk/jit_proxy/jitter/base_jitter.py index f2702022..59214ed3 100644 --- a/python/sdk/jit_proxy/jitter/base_jitter.py +++ b/python/sdk/jit_proxy/jitter/base_jitter.py @@ -5,12 +5,12 @@ from abc import ABC, abstractmethod from dataclasses import dataclass -from solders.pubkey import Pubkey +from solders.pubkey import Pubkey # type: ignore from driftpy.types import is_variant, UserAccount, Order, UserStatsAccount, ReferrerInfo from driftpy.drift_client import DriftClient from driftpy.auction_subscriber.auction_subscriber import AuctionSubscriber -from driftpy.addresses import get_user_stats_account_public_key +from driftpy.addresses import get_user_stats_account_public_key, get_user_account_public_key from driftpy.math.orders import has_auction_price from driftpy.math.conversion import convert_to_number @@ -72,20 +72,16 @@ async def on_account_update(self, taker: UserAccount, taker_key: Pubkey, slot: i taker_key_str = str(taker_key) taker_stats_key = get_user_stats_account_public_key( - self.drift_client.program_id, taker.authority + self.drift_client.program_id, taker.authority # type: ignore ) self.logger.info(f"Taker: {taker.authority}") for order in taker.orders: if not is_variant(order.status, "Open"): - self.logger.info("Order is closed.") - self.logger.info("----------------------------") continue if not has_auction_price(order, slot): - self.logger.info("Order does not have auction price.") - self.logger.info("----------------------------") continue if self.user_filter is not None: @@ -114,7 +110,7 @@ async def on_account_update(self, taker: UserAccount, taker_key: Pubkey, slot: i if ( order.base_asset_amount - order.base_asset_amount_filled - <= perp_market_account.amm.min_order_size + <= perp_market_account.amm.min_order_size # type: ignore ): self.logger.info("Order filled within min_order_size") self.logger.info("----------------------------") @@ -142,7 +138,7 @@ async def on_account_update(self, taker: UserAccount, taker_key: Pubkey, slot: i if ( order.base_asset_amount - order.base_asset_amount_filled - <= spot_market_account.min_order_size + <= spot_market_account.min_order_size # type: ignore ): self.logger.info("Order filled within min_order_size") self.logger.info("----------------------------") @@ -181,7 +177,7 @@ async def create_try_fill( order: Order, order_sig: str, ): - future = asyncio.Future() + future = asyncio.Future() # type: ignore future.set_result(None) return future @@ -204,8 +200,12 @@ def get_referrer_info( return None else: return ReferrerInfo( - taker_stats.referrer, + get_user_account_public_key( + self.drift_client.program_id, # type: ignore + taker_stats.referrer, + 0 + ), get_user_stats_account_public_key( - self.drift_client.program_id, taker_stats.referrer + self.drift_client.program_id, taker_stats.referrer # type: ignore ), ) diff --git a/python/sdk/jit_proxy/jitter/jitter_shotgun.py b/python/sdk/jit_proxy/jitter/jitter_shotgun.py index 1dd219b8..4adc493c 100644 --- a/python/sdk/jit_proxy/jitter/jitter_shotgun.py +++ b/python/sdk/jit_proxy/jitter/jitter_shotgun.py @@ -2,7 +2,7 @@ from typing import Any, Coroutine -from solders.pubkey import Pubkey +from solders.pubkey import Pubkey # type: ignore from driftpy.drift_client import DriftClient from driftpy.auction_subscriber.auction_subscriber import AuctionSubscriber @@ -37,7 +37,13 @@ async def create_try_fill( self.logger.info("JitterShotgun: Creating Try Fill") async def try_fill(): - for i in range(10): + taker_stats = await get_user_stats_account( + self.drift_client.program, taker.authority + ) + + referrer_info = self.get_referrer_info(taker_stats) + + for i in range(order.auction_duration): params = ( self.perp_params.get(order.market_index) if is_variant(order.market_type, "Perp") @@ -48,12 +54,6 @@ async def try_fill(): self.ongoing_auctions.pop(order_sig) return - taker_stats = await get_user_stats_account( - self.drift_client.program, taker.authority - ) - - referrer_info = self.get_referrer_info(taker_stats) - self.logger.info(f"Trying to fill {order_sig} -> Attempt: {i + 1}") try: @@ -73,7 +73,7 @@ async def try_fill(): params.price_type, referrer_info, params.sub_account_id, - PostOnlyParams.TryPostOnly(), + PostOnlyParams.MustPostOnly(), ) ) @@ -86,6 +86,8 @@ async def try_fill(): self.logger.error(f"Failed to fill Order: {order_sig}") if "0x1770" in str(e) or "0x1771" in str(e): self.logger.error(f"Order: {order_sig} does not cross params yet, retrying") + elif "0x1779" in str(e): + self.logger.error(f"Order: {order_sig} could not fill, retrying") elif "0x1793" in str(e): self.logger.error("Oracle invalid, retrying") elif "0x1772" in str(e): diff --git a/python/sdk/jit_proxy/jitter/jitter_sniper.py b/python/sdk/jit_proxy/jitter/jitter_sniper.py index 57f9e88f..1168312a 100644 --- a/python/sdk/jit_proxy/jitter/jitter_sniper.py +++ b/python/sdk/jit_proxy/jitter/jitter_sniper.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from typing import Any, Coroutine -from solders.pubkey import Pubkey +from solders.pubkey import Pubkey # type: ignore from driftpy.drift_client import DriftClient from driftpy.auction_subscriber.auction_subscriber import AuctionSubscriber @@ -205,6 +205,8 @@ async def try_fill(): self.logger.error(f"Failed to fill {order_sig}: {e}") if "0x1770" in str(e) or "0x1771" in str(e): self.logger.error("Order does not cross params yet") + elif "0x1779" in str(e): + self.logger.error("Order could not fill, retrying") elif "0x1793" in str(e): self.logger.error("Oracle invalid") elif "0x1772" in str(e): @@ -241,7 +243,7 @@ def get_auction_and_order_details(self, order: Order) -> AuctionAndOrderDetails: auction_start_price = convert_to_number( get_auction_price_for_oracle_offset_auction( - order, order.slot, oracle_price.price + order, order.slot, oracle_price.price # type: ignore ) if is_variant(order.order_type, "Oracle") else order.auction_start_price, @@ -250,7 +252,7 @@ def get_auction_and_order_details(self, order: Order) -> AuctionAndOrderDetails: auction_end_price = convert_to_number( get_auction_price_for_oracle_offset_auction( - order, order.slot + order.auction_duration - 1, oracle_price.price + order, order.slot + order.auction_duration - 1, oracle_price.price # type: ignore ) if is_variant(order.order_type, "Oracle") else order.auction_end_price, @@ -258,15 +260,15 @@ def get_auction_and_order_details(self, order: Order) -> AuctionAndOrderDetails: ) bid = ( - convert_to_number(oracle_price.price + params.bid, PRICE_PRECISION) - if is_variant(params.price_type, "Oracle") - else convert_to_number(params.bid, PRICE_PRECISION) + convert_to_number(oracle_price.price + params.bid, PRICE_PRECISION) # type: ignore + if is_variant(params.price_type, "Oracle") # type: ignore + else convert_to_number(params.bid, PRICE_PRECISION) # type: ignore ) ask = ( - convert_to_number(oracle_price.price + params.ask, PRICE_PRECISION) - if is_variant(params.price_type, "Oracle") - else convert_to_number(params.ask, PRICE_PRECISION) + convert_to_number(oracle_price.price + params.ask, PRICE_PRECISION) # type: ignore + if is_variant(params.price_type, "Oracle") # type: ignore + else convert_to_number(params.ask, PRICE_PRECISION) # type: ignore ) slots_until_cross = 0 @@ -280,7 +282,7 @@ def get_auction_and_order_details(self, order: Order) -> AuctionAndOrderDetails: if ( convert_to_number( get_auction_price( - order, order.slot + slots_until_cross, oracle_price.price + order, order.slot + slots_until_cross, oracle_price.price # type: ignore ), PRICE_PRECISION, ) @@ -292,7 +294,7 @@ def get_auction_and_order_details(self, order: Order) -> AuctionAndOrderDetails: if ( convert_to_number( get_auction_price( - order, order.slot + slots_until_cross, oracle_price.price + order, order.slot + slots_until_cross, oracle_price.price # type: ignore ), PRICE_PRECISION, ) @@ -310,12 +312,12 @@ def get_auction_and_order_details(self, order: Order) -> AuctionAndOrderDetails: auction_start_price, auction_end_price, step_size, - oracle_price, + oracle_price, # type: ignore ) async def wait_for_slot_or_cross_or_expiry( self, target_slot: int, order: Order, initial_details: AuctionAndOrderDetails - ) -> (int, AuctionAndOrderDetails): + ) -> (int, AuctionAndOrderDetails): # type: ignore auction_end_slot = order.auction_duration + order.slot current_details: AuctionAndOrderDetails = initial_details will_cross = initial_details.will_cross diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 00000000..3ec8995a --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,5194 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +dependencies = [ + "aead", + "aes", + "cipher 0.3.0", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.12", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "alloc-traits" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483" + +[[package]] +name = "anchor-attribute-access-control" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5e1a413b311b039d29b61d0dbb401c9dbf04f792497ceca87593454bf6d7dd" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.79", + "quote 1.0.35", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cca9aeaf633c6e2365fed0525dcac68610be58eee5dc69d3b86fe0b1d4b320b9" +dependencies = [ + "anchor-syn", + "anyhow", + "bs58 0.4.0", + "proc-macro2 1.0.79", + "quote 1.0.35", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "788e44f9e8501dabeb6f9229da0f3268fb2ae3208912608ffaa056a72031296f" +dependencies = [ + "anchor-syn", + "proc-macro2 1.0.79", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0c4d8c7e4a2605ede6fcdced9690288b2f74e24768619a85229d57e597bc97" +dependencies = [ + "anchor-syn", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3b07d5c5d87b5edc72428b447b8e9ee1143b83dd1afc6a6b1d352c6a6164d8" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b22ad0445115dbea5869b1d062da49ae125abed9132fc20c33227f25e42dfa6b" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "anchor-client" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c06e06497b5b4f392845e0d04dde8374fd244fa2832dd0e5c27bfd99cb0342" +dependencies = [ + "anchor-lang", + "anyhow", + "regex", + "serde", + "solana-account-decoder", + "solana-client", + "solana-sdk", + "thiserror", + "url", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48daeff6781ba2f02961b0ad211feb9a2de75af345d42c62b1a252fd4dfb0724" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4fe2886f92c4f33ec1b2b8b2b43ca1b9070cf4929e63c7eaaa09a9f2c0d5123" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbbe5d1c7c057c6d63b4f2f538a320e4a22111126c9966340c3d9490e2f15ed1" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-space", + "arrayref", + "base64 0.13.1", + "bincode", + "borsh", + "bytemuck", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-spl" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cc8066fbd45e0e03edf48342c79265aa34ca76cefeace48ef6c402b6946665" +dependencies = [ + "anchor-lang", + "solana-program", + "spl-associated-token-account", + "spl-token", + "spl-token-2022", +] + +[[package]] +name = "anchor-syn" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11cb31fe143aedb36fc41409ea072aa0b840cbea727e62eb2ff6e7b6cea036ff" +dependencies = [ + "anyhow", + "bs58 0.3.1", + "heck", + "proc-macro2 1.0.79", + "quote 1.0.35", + "serde", + "serde_json", + "sha2 0.9.9", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-compression" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86a9249d1447a85f95810c620abea82e001fe58a31713fcce614caf52499f905" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.79", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "brotli" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bumpalo" +version = "3.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "caps" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.4", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.1", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher 0.3.0", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.4", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "dlopen" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +dependencies = [ + "dlopen_derive", + "lazy_static", + "libc", + "winapi", +] + +[[package]] +name = "dlopen_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" +dependencies = [ + "libc", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "drift" +version = "2.75.0" +source = "git+https://github.com/drift-labs/protocol-v2.git#8c4cf61b84cdd2aac1f08b653bdc5052e2395be9" +dependencies = [ + "anchor-lang", + "anchor-spl", + "arrayref", + "base64 0.13.1", + "borsh", + "bytemuck", + "drift-macros", + "enumflags2", + "num-derive", + "num-integer", + "num-traits", + "phoenix-v1", + "pyth-client", + "serum_dex", + "solana-program", + "solana-security-txt", + "static_assertions", + "switchboard", + "thiserror", + "uint", +] + +[[package]] +name = "drift-macros" +version = "0.1.0" +source = "git+https://github.com/drift-labs/drift-macros.git?rev=c57d87#c57d87e073d13d43f4d1fb09fe6822915a4ccc11" +dependencies = [ + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "drift-sdk" +version = "0.1.0" +source = "git+https://github.com/drift-labs/drift-rs#755d40d4a94c98e5d417cc9a89fdfeb48e9dcace" +dependencies = [ + "anchor-lang", + "base64 0.13.1", + "bytemuck", + "dashmap", + "drift", + "env_logger 0.10.2", + "fnv", + "futures-util", + "log", + "rayon", + "regex", + "reqwest 0.12.2", + "serde", + "serde_json", + "solana-account-decoder", + "solana-client", + "solana-sdk", + "solana-transaction-status", + "thiserror", + "tokio", + "tokio-tungstenite 0.21.0", +] + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.8", +] + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "ellipsis-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598d7f4a52f256bc6d065f0ee1c8dd07275952f9425bdfc1639595c924e1498e" +dependencies = [ + "bs58 0.4.0", + "proc-macro2 1.0.79", + "quote 1.0.35", + "rustversion", + "solana-program", + "syn 1.0.109", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "enumflags2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" +dependencies = [ + "enumflags2_derive", +] + +[[package]] +name = "enumflags2_derive" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset 0.9.1", + "rustc_version", +] + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "h2" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.1.0", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.25", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.6", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.3", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.28", + "rustls 0.21.10", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.2.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.2.0", + "pin-project-lite", + "socket2 0.5.6", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "indicatif" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jit-proxy" +version = "0.10.2" +source = "git+https://github.com/drift-labs/jit-proxy#8d5234f68d11d9f5c9311425c074ae34998d697f" +dependencies = [ + "anchor-lang", + "anchor-spl", + "bytemuck", + "drift", + "static_assertions", +] + +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lib-sokoban" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6295db13f26aaa8bb4fb38e0c9ff50253814aa490eef7b4d6aa106ba6fc843" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "thiserror", +] + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "phoenix-v1" +version = "0.2.4" +source = "git+https://github.com/drift-labs/phoenix-v1?rev=bf6b84#bf6b8447047aa16485d8d976528e43f5d53331d9" +dependencies = [ + "borsh", + "bytemuck", + "ellipsis-macros", + "itertools 0.10.5", + "lib-sokoban", + "num_enum", + "shank", + "solana-program", + "solana-security-txt", + "spl-associated-token-account", + "spl-token", + "static_assertions", + "thiserror", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pyth-client" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44de48029c54ec1ca570786b5baeb906b0fc2409c8e0145585e287ee7a526c72" + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quinn" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "fxhash", + "quinn-proto", + "quinn-udp", + "rustls 0.20.9", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55" +dependencies = [ + "bytes", + "fxhash", + "rand 0.8.5", + "ring 0.16.20", + "rustls 0.20.9", + "rustls-native-certs", + "rustls-pemfile 0.2.1", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07946277141531aea269befd949ed16b2c85a780ba1043244eda0969e538e54" +dependencies = [ + "futures-util", + "libc", + "quinn-proto", + "socket2 0.4.10", + "tokio", + "tracing", +] + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2 1.0.79", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.12", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rcgen" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom 0.2.12", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "async-compression", + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.25", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.28", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.3", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.2.0", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.12", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rpassword" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" +dependencies = [ + "libc", + "serde", + "serde_json", + "winapi", +] + +[[package]] +name = "rust" +version = "0.1.0" +dependencies = [ + "anchor-client", + "async-trait", + "dashmap", + "dotenv", + "drift", + "drift-sdk", + "env_logger 0.10.2", + "futures", + "futures-util", + "jit-proxy", + "log", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "safe-transmute" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8" + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "serde_json" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap 1.9.3", + "ryu", + "serde", + "yaml-rust", +] + +[[package]] +name = "serum_dex" +version = "0.5.6" +source = "git+https://github.com/project-serum/serum-dex?rev=85b4f14#85b4f1499017f22da4b355781bdb5973b3b2646f" +dependencies = [ + "arrayref", + "bincode", + "bytemuck", + "byteorder", + "enumflags2", + "field-offset", + "itertools 0.9.0", + "num-traits", + "num_enum", + "safe-transmute", + "serde", + "solana-program", + "spl-token", + "static_assertions", + "thiserror", + "without-alloc", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shank" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439c00542aa8b4c777750b3130ce36fcff86ba215d54006d47d67359513b70be" +dependencies = [ + "shank_macro", +] + +[[package]] +name = "shank_macro" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3498d6ea2ba012f26ad3d79a19773ba8e1c7a69f14dec67e3ed51c723cc9f30a" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "shank_macro_impl", + "shank_render", + "syn 1.0.109", +] + +[[package]] +name = "shank_macro_impl" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271c0b0b47ef930d7455d11a02164e3f0e71704d639bcaa6581f23e4b2073227" +dependencies = [ + "anyhow", + "proc-macro2 1.0.79", + "quote 1.0.35", + "serde", + "syn 1.0.109", +] + +[[package]] +name = "shank_render" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142e11124c70d1702424011209621551adf775988033dedea428ce4a21d3acdf" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "shank_macro_impl", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "solana-account-decoder" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec36d5c2ec5469dacc4fd2bdfcaaf4b253a4814d86d88686d50fd407cf7b3330" +dependencies = [ + "Inflector", + "base64 0.13.1", + "bincode", + "bs58 0.4.0", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-config-program", + "solana-sdk", + "solana-vote-program", + "spl-token", + "spl-token-2022", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf23fb5a4ff0e902bf94fbc63ba51b10b1f86c6bca18574b583ec3baf6383a0b" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-clap-utils" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e6537858df8634c4cf7e9e8a84a9f1967b8983bcb4e4833cad3ae200b7170d" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-perf", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2234deff9765c25fc6189322689d1b702490f4389680dfdef0af582856041844" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-client" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e706f894fe68d518c125e27a7186d07a56f5b179d67c8fb2cf719cef8e1ee7cd" +dependencies = [ + "async-mutex", + "async-trait", + "base64 0.13.1", + "bincode", + "bs58 0.4.0", + "bytes", + "clap 2.34.0", + "crossbeam-channel", + "enum_dispatch", + "futures", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "itertools 0.10.5", + "jsonrpc-core", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rayon", + "reqwest 0.11.27", + "rustls 0.20.9", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-clap-utils", + "solana-faucet", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "spl-token-2022", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite 0.17.2", + "tungstenite 0.17.3", + "url", +] + +[[package]] +name = "solana-config-program" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c2d438fdfa4f5774c70fb0eeb2325caa073c838a229ef6a876c65c8703294" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-faucet" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ba3e5e2acc09b2fcb54957d05c0943b194d48f825f879fc2cf5d255e2608b05" +dependencies = [ + "bincode", + "byteorder", + "clap 2.34.0", + "crossbeam-channel", + "log", + "serde", + "serde_derive", + "solana-clap-utils", + "solana-cli-config", + "solana-logger", + "solana-metrics", + "solana-sdk", + "solana-version", + "spl-memo", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b4953578272ac0fadec245e85e83ae86454611f0c0a7fff7d906835124bdcf" +dependencies = [ + "ahash", + "blake3", + "block-buffer 0.9.0", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "hashbrown 0.12.3", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57892538250428ad3dc3cbe05f6cd75ad14f4f16734fcb91bc7cd5fbb63d6315" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "solana-logger" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06aa701c49493e93085dd1e800c05475baca15a9d4d527b59794f2ed0b66e055" +dependencies = [ + "env_logger 0.9.3", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7300180957635b33c88bd6844a5dff4f1f5c6352d0861ee7845eab84185aa6a" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2960981c4bbe9177dafe986542ba11a10afcae320f4201aa809cd5b650e202e1" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest 0.11.27", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31062ce5ddceb92bdb78df2eaf33e9889c1519e8a8d89baa783e2d08a76cfc62" +dependencies = [ + "bincode", + "clap 3.2.25", + "crossbeam-channel", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2 0.4.10", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-perf" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2b84a3d7a24523b9117c0ae4608f1e561ae492638acea2bb2960a0c0c8eb6" +dependencies = [ + "ahash", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen", + "dlopen_derive", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.7.3", + "rayon", + "serde", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f99052873619df68913cb8e92e28ff251a5483828925e87fa97ba15a9cbad51" +dependencies = [ + "base64 0.13.1", + "bincode", + "bitflags 1.3.2", + "blake3", + "borsh", + "borsh-derive", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.12", + "itertools 0.10.5", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset 0.6.5", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d57d0b6ef85b50f9ad6b9a75fc9d5051dc26f8b1a4ddf03656e3d603e139eb3" +dependencies = [ + "base64 0.13.1", + "bincode", + "eager", + "enum-iterator", + "itertools 0.10.5", + "libc", + "libloading", + "log", + "num-derive", + "num-traits", + "rand 0.7.3", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10e1d068ba8080ca1e41703c600cc9b263ff7ce26b6811cd83221723ae0d10ae" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "661cd486da7419134663f1c3684d71d3fd6d13b8e557da23070f4c920b1d2baa" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-sdk" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb47da3e18cb669f6ace0b40cee0610e278903783e0c9f7fce1e1beb881a1b7" +dependencies = [ + "assert_matches", + "base64 0.13.1", + "bincode", + "bitflags 1.3.2", + "borsh", + "bs58 0.4.0", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools 0.10.5", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive", + "num-traits", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d41a09b9cecd0a4df63c78a192adee99ebf2d3757c19713a68246e1d9789c7c" +dependencies = [ + "bs58 0.4.0", + "proc-macro2 1.0.79", + "quote 1.0.35", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "solana-security-txt" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e0461f3afb29d8591300b3dd09b5472b3772d65688a2826ad960b8c0d5fa605" + +[[package]] +name = "solana-streamer" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ffb2c6918eda6aa8b18219790b7a4e4d74914aeae97cb1a0e09fdb943b18cc" +dependencies = [ + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap 1.9.3", + "itertools 0.10.5", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "rand 0.7.3", + "rcgen", + "rustls 0.20.9", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-transaction-status" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1a6ee396d436ae4ee36350043c3cb34ad66b7515f045c1e5006695559d88ac" +dependencies = [ + "Inflector", + "base64 0.13.1", + "bincode", + "borsh", + "bs58 0.4.0", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-program", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana-vote-program", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-version" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d177dc97f7facd8fbc3148f3d44a9ff5bbbc72c1db7e2889dc4911ae641cea8a" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6280815d28c90ea8f51c8eb2026258e8693cab5a8456ee7b207a791b20f9c576" +dependencies = [ + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab38abd096769f79fd8e3fe8465070f04742395db724606a5263c8ebc215567" +dependencies = [ + "aes-gcm-siv", + "arrayref", + "base64 0.13.1", + "bincode", + "bytemuck", + "byteorder", + "cipher 0.4.4", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools 0.10.5", + "lazy_static", + "merlin", + "num-derive", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" +dependencies = [ + "assert_matches", + "borsh", + "num-derive", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-token" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-token", + "thiserror", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "switchboard" +version = "0.1.0" +source = "git+https://github.com/drift-labs/protocol-v2.git#8c4cf61b84cdd2aac1f08b653bdc5052e2395be9" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 1.0.109", + "unicode-xid 0.2.4", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" + +[[package]] +name = "thiserror" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "time" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.6", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls 0.20.9", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "rustls 0.20.9", + "tokio", + "tokio-rustls 0.23.4", + "tungstenite 0.17.3", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "native-tls", + "tokio", + "tokio-native-tls", + "tungstenite 0.21.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.20.9", + "sha-1", + "thiserror", + "url", + "utf-8", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "native-tls", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "unsize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fa7a7a734c1a5664a662ddcea0b6c9472a21da8888c957c7f1eaa09dba7a939" +dependencies = [ + "autocfg", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote 1.0.35", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "without-alloc" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375db0478b203b950ef10d1cce23cdbe5f30c2454fd9e7673ff56656df23adbb" +dependencies = [ + "alloc-traits", + "unsize", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2 1.0.79", + "quote 1.0.35", + "syn 2.0.57", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 00000000..68c7ddc0 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "rust" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anchor-client = "0.27.0" +jit-proxy = { git = "https://github.com/drift-labs/jit-proxy", commit = "8c38e3e" } +solana-sdk = "1.14.16" +drift-sdk = { git = "https://github.com/drift-labs/drift-rs", commit = "755d40d" } +tokio = { version = "1.35.1", features = ["full"] } +drift = { git = "https://github.com/drift-labs/protocol-v2.git", commit = "2bbe28c", features = ["mainnet-beta"]} +thiserror = "1.0.38" +log = "0.4.20" +async-trait = "0.1.75" +env_logger = "0.10.1" +futures-util = "0.3.30" +dashmap = "5.5.3" +futures = "0.3.30" +dotenv = "0.15.0" diff --git a/rust/README.md b/rust/README.md new file mode 100644 index 00000000..6e730700 --- /dev/null +++ b/rust/README.md @@ -0,0 +1,5 @@ +# QUICK START + +1. Create .env file in rust/ with your RPC_KEY (example uses Helius) and your PRIVATE_KEY (as a [u8, u8, u8, u8]) +2. run `cargo install` to install all necessary dependencies +3. run `bash run.sh` to start the jitter \ No newline at end of file diff --git a/rust/run.sh b/rust/run.sh new file mode 100644 index 00000000..e2ff62bc --- /dev/null +++ b/rust/run.sh @@ -0,0 +1 @@ +RUST_LOG=info cargo run --release \ No newline at end of file diff --git a/rust/src/jit_proxy_client.rs b/rust/src/jit_proxy_client.rs new file mode 100644 index 00000000..a68d64dc --- /dev/null +++ b/rust/src/jit_proxy_client.rs @@ -0,0 +1,213 @@ +use anchor_client::anchor_lang::InstructionData; +use drift::math::constants::QUOTE_SPOT_MARKET_INDEX; +use drift::state::user::{MarketType, User}; +use drift_sdk::types::{MarketId, ReferrerInfo, RpcSendTransactionConfig, VersionedMessage}; +use drift_sdk::{ + build_accounts, + constants::{state_account, PROGRAM_ID}, + AccountProvider, DriftClient, Pubkey, +}; +use jit_proxy::state::PostOnlyParam; +use jit_proxy::state::PriceType; +use solana_sdk::compute_budget::ComputeBudgetInstruction; +use solana_sdk::instruction::{AccountMeta, Instruction}; +use solana_sdk::message::v0; +use solana_sdk::signature::Signature; + +use crate::types::{ComputeBudgetParams, JitError, JitResult}; + +pub struct JitIxParams { + taker_key: Pubkey, + taker_stats_key: Pubkey, + taker: User, + taker_order_id: u32, + max_position: i64, + min_position: i64, + bid: i64, + ask: i64, + price_type: Option, + referrer_info: Option, + post_only: Option, +} + +impl JitIxParams { + pub fn new( + taker_key: Pubkey, + taker_stats_key: Pubkey, + taker: User, + taker_order_id: u32, + max_position: i64, + min_position: i64, + bid: i64, + ask: i64, + price_type: Option, + referrer_info: Option, + post_only: Option, + ) -> Self { + Self { + taker_key, + taker_stats_key, + taker, + taker_order_id, + max_position, + min_position, + bid, + ask, + price_type, + referrer_info, + post_only, + } + } +} + +#[derive(Clone)] +pub struct JitProxyClient { + drift_client: DriftClient, + config: Option, + cu_params: Option, +} + +impl JitProxyClient { + pub fn new( + drift_client: DriftClient, + config: Option, + cu_params: Option, + ) -> Self { + Self { + drift_client, + config, + cu_params, + } + } + + pub fn update_config(&mut self, config: RpcSendTransactionConfig) { + self.config = Some(config); + } + + pub fn update_cu_params(&mut self, cu_params: ComputeBudgetParams) { + self.cu_params = Some(cu_params); + } + + pub async fn jit(&self, params: JitIxParams) -> JitResult { + if let Some(order) = params + .taker + .orders + .iter() + .find(|order| order.order_id == params.taker_order_id) + { + let tx_builder = self + .drift_client + .init_tx(&self.drift_client.wallet().default_sub_account(), false) + .await + .unwrap(); + let program_data = tx_builder.program_data(); + let account_data = tx_builder.account_data(); + + let wallet = self.drift_client.wallet(); + + let writable_markets = match order.market_type { + MarketType::Perp => { + vec![MarketId::perp(order.market_index)] + } + MarketType::Spot => { + vec![MarketId::spot(order.market_index), MarketId::QUOTE_SPOT] + } + }; + + let mut accounts = build_accounts( + program_data, + jit_proxy::accounts::Jit { + state: *state_account(), + user: wallet.default_sub_account(), + user_stats: drift_sdk::Wallet::derive_stats_account( + wallet.authority(), + &PROGRAM_ID, + ), + taker: params.taker_key, + taker_stats: params.taker_stats_key, + authority: *wallet.authority(), + drift_program: PROGRAM_ID, + }, + &[¶ms.taker, account_data], + &[], + &writable_markets.as_slice(), + ); + + if let Some(referrer_info) = params.referrer_info { + accounts.push(AccountMeta::new(referrer_info.referrer(), false)); + accounts.push(AccountMeta::new(referrer_info.referrer_stats(), false)); + } + + if order.market_type == MarketType::Spot { + let spot_market_vault = self + .drift_client + .get_spot_market_account(order.market_index) + .expect("spot market") + .vault; + let quote_spot_market_vault = self + .drift_client + .get_spot_market_account(QUOTE_SPOT_MARKET_INDEX) + .expect("spot market") + .vault; + accounts.push(AccountMeta::new_readonly(spot_market_vault, false)); + accounts.push(AccountMeta::new_readonly(quote_spot_market_vault, false)); + } + + let jit_params = jit_proxy::instructions::JitParams { + taker_order_id: params.taker_order_id, + max_position: params.max_position, + min_position: params.min_position, + bid: params.bid, + ask: params.ask, + price_type: params.price_type.unwrap(), + post_only: params.post_only, + }; + + let ix = Instruction { + program_id: jit_proxy::id(), + accounts, + data: jit_proxy::instruction::Jit { params: jit_params }.data(), + }; + + let mut ixs = vec![ix]; + if let Some(cu_params) = self.cu_params { + let cu_limit_ix = ComputeBudgetInstruction::set_compute_unit_price( + cu_params.microlamports_per_cu(), + ); + let cu_price_ix = + ComputeBudgetInstruction::set_compute_unit_limit(cu_params.cu_limit()); + + ixs.insert(0, cu_limit_ix); + ixs.insert(1, cu_price_ix); + } + + let lut = program_data.lookup_table.clone(); + + let message = v0::Message::try_compile( + &self.drift_client.wallet().authority(), + &ixs.as_slice(), + &[lut], + Default::default(), + ) + .expect("failed to compile message"); + + let tx = VersionedMessage::V0(message); + + let sig = self + .drift_client + .sign_and_send_with_config( + tx, + self.config.unwrap_or(RpcSendTransactionConfig::default()), + ) + .await; + + sig.map_err(|e| { + log::error!("Error: {}", e); + JitError::Sdk(e.to_string()) + }) + } else { + log::warn!("Order: {} not found", params.taker_order_id); + Ok(Signature::default()) // this is checked against in the jitters, a default signature isn't a successful fill, i just don't want to return errors + } + } +} diff --git a/rust/src/jitter.rs b/rust/src/jitter.rs new file mode 100644 index 00000000..3c76f9e5 --- /dev/null +++ b/rust/src/jitter.rs @@ -0,0 +1,463 @@ +use std::{ + str::FromStr, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, +}; + +use async_trait::async_trait; +use dashmap::DashMap; +use drift::state::user::{OrderStatus, User, UserStats}; +use drift_sdk::{ + auction_subscriber::{AuctionSubscriber, AuctionSubscriberConfig}, + constants::PROGRAM_ID as drift_program, + event_emitter::Event, + slot_subscriber::SlotSubscriber, + types::{ + CommitmentConfig, MarketType, Order, PerpMarket, ReferrerInfo, RpcSendTransactionConfig, + }, + websocket_program_account_subscriber::ProgramAccountUpdate, + AccountProvider, DriftClient, Pubkey, Wallet, +}; +pub use jit_proxy::state::PriceType; +use solana_sdk::signature::Signature; +use tokio::sync::mpsc::{self, Receiver, Sender}; +use tokio::task::JoinHandle; + +use crate::types::JitResult; +use crate::{ + jit_proxy_client::{JitIxParams, JitProxyClient}, + types::ComputeBudgetParams, +}; + +pub type ExcludeAuctionFn = dyn Fn(&User, &String, Order) -> bool + Send + Sync; + +#[inline(always)] +fn log_details(order: &Order) { + log::info!( + "Order Details:\n\ + Market Type: {:?}\n\ + Market index: {}\n\ + Order price: {}\n\ + Order direction: {:?}\n\ + Auction start price: {}\n\ + Auction end price: {}\n\ + Auction duration: {} slots\n\ + Order base asset amount: {}\n\ + Order base asset amount filled: {}", + order.market_type, + order.market_index, + order.price, + order.direction, + order.auction_start_price, + order.auction_end_price, + order.auction_duration, + order.base_asset_amount, + order.base_asset_amount_filled + ); +} + +#[inline(always)] +fn check_err(err: String, order_sig: String) -> Option<()> { + if err.contains("0x1770") || err.contains("0x1771") { + log::error!("Order: {} does not cross params yet, retrying", order_sig); + None + } else if err.contains("0x1779") { + log::error!("Order: {} could not fill, retrying", order_sig); + None + } else if err.contains("0x1793") { + log::error!("Oracle invalid, retrying: {}", order_sig); + None + } else if err.contains("0x1772") { + log::error!("Order: {} already filled", order_sig); + Some(()) + } else { + log::error!("Order: {}, Error: {}", order_sig, err); + Some(()) + } +} + +#[derive(Clone)] +pub struct JitParams { + bid: i64, + ask: i64, + min_position: i64, + max_position: i64, + price_type: PriceType, +} + +impl JitParams { + pub fn new( + bid: i64, + ask: i64, + min_position: i64, + max_position: i64, + price_type: PriceType, + ) -> Self { + Self { + bid, + ask, + min_position, + max_position, + price_type, + } + } +} + +pub struct Jitter { + drift_client: DriftClient, + perp_params: DashMap, + spot_params: DashMap, + ongoing_auctions: DashMap>, + exclusion_criteria: AtomicBool, + jitter: Arc, +} + +#[async_trait] +pub trait JitterStrategy { + async fn try_fill( + &self, + taker: User, + taker_key: Pubkey, + taker_stats_key: Pubkey, + order: Order, + order_sig: String, + referrer_info: Option, + params: JitParams, + ) -> JitResult<()>; +} + +impl Jitter { + pub fn new( + drift_client: DriftClient, + jitter: Arc, + ) -> Arc { + Arc::new(Jitter { + drift_client, + perp_params: DashMap::new(), + spot_params: DashMap::new(), + ongoing_auctions: DashMap::new(), + exclusion_criteria: AtomicBool::new(false), + jitter, + }) + } + + /// Set up a Jitter with the Shotgun strategy + pub fn new_with_shotgun( + drift_client: DriftClient, + config: Option, + cu_params: Option, + ) -> Arc { + let jit_proxy_client = JitProxyClient::new(drift_client.clone(), config, cu_params); + let shotgun: Arc = Arc::new(Shotgun { jit_proxy_client }); + + Arc::new(Jitter { + drift_client, + perp_params: DashMap::new(), + spot_params: DashMap::new(), + ongoing_auctions: DashMap::new(), + exclusion_criteria: AtomicBool::new(false), + jitter: shotgun, + }) + } + + // Subscribe to auction events and start listening for them + pub async fn subscribe(self: Arc, url: String) -> JitResult<()> { + let (auction_sender, mut auction_receiver): ( + Sender>, + Receiver>, + ) = mpsc::channel(100); + + // Set up a receiver to bounce the auction events to the trampoline + tokio::spawn(async move { + while let Some(event) = auction_receiver.recv().await { + let _ = self.on_auction_sync(event); + } + }); + + let auction_subscriber_config = AuctionSubscriberConfig { + commitment: CommitmentConfig::processed(), + resub_timeout_ms: None, + url, + }; + + let mut auction_subscriber = AuctionSubscriber::new(auction_subscriber_config); + auction_subscriber.subscribe().await?; + + let auction_sender: Sender> = auction_sender.clone(); + + // Send auction events to the receiver to be processed + auction_subscriber + .event_emitter + .subscribe("auction", move |event| { + let _ = auction_sender.try_send(event); + }); + + futures::future::pending::<()>().await; // Keep the event loop alive forever + + Ok(()) + } + + // Simple trampoline to the async function we need from the auction event + pub fn on_auction_sync(self: &Arc, event: Box) -> JitResult<()> { + let jitter = self.clone(); + tokio::spawn(async move { + let _ = jitter.on_auction(event).await; + }); + + Ok(()) + } + + // Process the auction event & attempt to fill with JIT if possible + pub async fn on_auction(&self, event: Box) -> JitResult<()> { + if let Some(auction) = event.as_any().downcast_ref::>() { + log::info!("Auction received"); + let user_pubkey = &auction.pubkey; + let user = auction.data_and_slot.data.clone(); + let user_stats_key = Wallet::derive_stats_account(&user.authority, &drift_program); + + for order in user.orders { + if order.status != OrderStatus::Open + || !order.has_auction() + || self.exclusion_criteria.load(Ordering::Relaxed) + { + continue; + } + + let order_sig = self.get_order_signatures(&user_pubkey, order.order_id); + + if self.ongoing_auctions.contains_key(&order_sig) { + continue; + } + + match order.market_type { + MarketType::Perp => { + if let Some(param) = self.perp_params.get(&order.market_index) { + let perp_market: PerpMarket = self + .drift_client + .get_perp_market_account(order.market_index) + .expect("perp market"); + let remaining = + order.base_asset_amount - order.base_asset_amount_filled; + let min_order_size = perp_market.amm.min_order_size; + + if remaining < min_order_size { + log::warn!( + "Order filled within min order size\nRemaining: {}\nMinimum order size: {}", + remaining, + min_order_size + ); + return Ok(()); + } + + if (remaining as i128) < param.min_position.into() { + log::warn!( + "Order filled within min position\nRemaining: {}\nMin position: {}", + remaining, + param.min_position + ); + return Ok(()); + } + + let jitter = self.jitter.clone(); + let taker = user_pubkey.clone(); + let order_signature = order_sig.clone(); + + let taker_stats: UserStats = self + .drift_client + .get_user_stats(&user.authority) + .await + .expect("user stats"); + let referrer_info = ReferrerInfo::get_referrer_info(taker_stats); + + let param = param.clone(); + let ongoing_auction = tokio::spawn(async move { + let _ = jitter + .try_fill( + user.clone(), + Pubkey::from_str(&taker).unwrap(), + user_stats_key.clone(), + order.clone(), + order_signature.clone(), + referrer_info, + param.clone(), + ) + .await; + }); + + self.ongoing_auctions.insert(order_sig, ongoing_auction); + } else { + log::warn!("Jitter not listening to {}", order.market_index); + return Ok(()); + } + } + MarketType::Spot => { + if let Some(param) = self.spot_params.get(&order.market_index) { + let spot_market = self + .drift_client + .get_spot_market_account(order.market_index) + .expect("spot market"); + + if order.base_asset_amount - order.base_asset_amount_filled + < spot_market.min_order_size + { + log::warn!( + "Order filled within min order size\nRemaining: {}\nMinimum order size: {}", + order.base_asset_amount - order.base_asset_amount_filled, + spot_market.min_order_size + ); + return Ok(()); + } + + if (order.base_asset_amount as i128) + - (order.base_asset_amount_filled as i128) + < param.min_position.into() + { + log::warn!( + "Order filled within min order size\nRemaining: {}\nMinimum order size: {}", + order.base_asset_amount - order.base_asset_amount_filled, + spot_market.min_order_size + ); + return Ok(()); + } + + let jitter = self.jitter.clone(); + let taker = user_pubkey.clone(); + let order_signature = order_sig.clone(); + + let taker_stats: UserStats = + self.drift_client.get_user_stats(&user.authority).await?; + let referrer_info = ReferrerInfo::get_referrer_info(taker_stats); + + let param = param.clone(); + let ongoing_auction = tokio::spawn(async move { + let _ = jitter + .try_fill( + user.clone(), + Pubkey::from_str(&taker).unwrap(), + user_stats_key.clone(), + order.clone(), + order_signature.clone(), + referrer_info, + param.clone(), + ) + .await; + }); + + self.ongoing_auctions.insert(order_sig, ongoing_auction); + } else { + log::warn!("Jitter not listening to {}", order.market_index); + return Ok(()); + } + } + } + } + } + + Ok(()) + } + + // Helper functions + pub fn update_perp_params(&self, market_index: u16, params: JitParams) { + self.perp_params.insert(market_index, params); + } + + pub fn update_spot_params(&self, market_index: u16, params: JitParams) { + self.spot_params.insert(market_index, params); + } + + pub fn set_exclusion_criteria(&self, exclusion_criteria: bool) { + self.exclusion_criteria + .store(exclusion_criteria, Ordering::Relaxed); + } + + pub fn get_order_signatures(&self, taker_key: &str, order_id: u32) -> String { + format!("{}-{}", taker_key, order_id) + } +} + +/// Aggressive JIT making strategy +pub struct Shotgun { + pub jit_proxy_client: JitProxyClient, +} + +/// Implementing the Sniper is left as an exercise for the reader. +/// Good luck! +pub struct Sniper { + pub jit_proxy_client: JitProxyClient, + pub slot_subscriber: SlotSubscriber, +} + +#[async_trait] +impl JitterStrategy for Shotgun { + async fn try_fill( + &self, + taker: User, + taker_key: Pubkey, + taker_stats_key: Pubkey, + order: Order, + order_sig: String, + referrer_info: Option, + params: JitParams, + ) -> JitResult<()> { + log::info!("Trying to fill with Shotgun:"); + log_details(&order); + + for i in 0..order.auction_duration { + let referrer_info = referrer_info.clone(); + log::info!( + "Trying to fill: {:?} -> Attempt: {}", + order_sig.clone(), + i + 1 + ); + + if params.max_position == 0 || params.min_position == 0 { + log::warn!( + "min or max position is 0 -> min: {} max: {}", + params.min_position, + params.max_position + ); + return Ok(()); + } + + let jit_ix_params = JitIxParams::new( + taker_key.clone(), + taker_stats_key.clone(), + taker.clone(), + order.order_id, + params.max_position, + params.min_position, + params.bid, + params.ask, + Some(params.price_type), + referrer_info, + None, + ); + + let jit_result = self.jit_proxy_client.jit(jit_ix_params).await; + + match jit_result { + Ok(sig) => { + if sig == Signature::default() { + continue; + } + log::info!("Order filled"); + log::info!("Signature: {:?}", sig); + return Ok(()); + } + Err(e) => { + let err = e.to_string(); + match check_err(err, order_sig.clone()) { + Some(_) => return Ok(()), + None => { + tokio::time::sleep(tokio::time::Duration::from_secs(1)).await; + continue; + } + } + } + } + } + Ok(()) + } +} diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 00000000..25c85403 --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1,3 @@ +pub mod jit_proxy_client; +pub mod jitter; +pub mod types; diff --git a/rust/src/main.rs b/rust/src/main.rs new file mode 100644 index 00000000..f9a3f3fd --- /dev/null +++ b/rust/src/main.rs @@ -0,0 +1,74 @@ +use std::env; +use std::str::FromStr; + +use anchor_client::Cluster; +use dotenv::dotenv; +use solana_sdk::signature::Keypair; + +use drift_sdk::types::{CommitmentConfig, Context, RpcSendTransactionConfig}; +use drift_sdk::{DriftClient, RpcAccountProvider}; +use jitter::{JitParams, Jitter}; +use types::ComputeBudgetParams; + +pub mod jit_proxy_client; +pub mod jitter; +pub mod types; + +#[tokio::main] +async fn main() { + env_logger::init(); + dotenv().ok(); + + let rpc_url = env::var("RPC_URL").expect("RPC_KEY must be set"); + let private_key = env::var("PRIVATE_KEY").expect("PRIVATE_KEY must be set"); + + let pk_vec: Vec = private_key + .trim_matches(|c| c == '[' || c == ']') + .split(',') + .map(|s| s.trim().parse::().expect("Failed to parse u8")) + .collect(); + + let pk_bytes: &[u8] = &pk_vec; + let keypair = Keypair::from_bytes(pk_bytes).unwrap(); + + let drift_client = DriftClient::new( + Context::MainNet, + RpcAccountProvider::with_commitment(&rpc_url, CommitmentConfig::finalized()), + keypair.into(), + ) + .await + .unwrap(); + + drift_client.subscribe().await.unwrap(); + + let config = RpcSendTransactionConfig::default(); + + let cu_params = ComputeBudgetParams::new(100_000, 1_400_000); + + let jitter = Jitter::new_with_shotgun(drift_client, Some(config), Some(cu_params)); + + let cluster = Cluster::from_str(&rpc_url).unwrap(); + let url = cluster.ws_url().to_string(); + + let jit_params = JitParams::new( + 0, + 0, + -1_000_000, + 1_000_000, + jit_proxy::state::PriceType::Oracle, + ); + + jitter.update_perp_params(0, jit_params.clone()); + jitter.update_perp_params(1, jit_params.clone()); + jitter.update_perp_params(2, jit_params.clone()); + jitter.update_perp_params(3, jit_params.clone()); + jitter.update_perp_params(4, jit_params.clone()); + jitter.update_perp_params(5, jit_params.clone()); + jitter.update_perp_params(6, jit_params.clone()); + jitter.update_perp_params(7, jit_params.clone()); + jitter.update_perp_params(8, jit_params.clone()); + jitter.update_perp_params(9, jit_params.clone()); + jitter.update_perp_params(10, jit_params.clone()); + + let _ = jitter.subscribe(url).await.unwrap(); +} diff --git a/rust/src/types.rs b/rust/src/types.rs new file mode 100644 index 00000000..01a53e3e --- /dev/null +++ b/rust/src/types.rs @@ -0,0 +1,47 @@ +use drift_sdk::types::SdkError; +use thiserror::Error; + +pub type JitResult = Result; + +#[derive(Debug, Error)] +pub enum JitError { + #[error("{0}")] + Drift(String), + #[error("{0}")] + Sdk(String), +} + +impl From for JitError { + fn from(error: drift::error::ErrorCode) -> Self { + JitError::Drift(error.to_string()) + } +} + +impl From for JitError { + fn from(error: SdkError) -> Self { + JitError::Sdk(error.to_string()) + } +} + +#[derive(Clone, Copy)] +pub struct ComputeBudgetParams { + microlamports_per_cu: u64, + cu_limit: u32, +} + +impl ComputeBudgetParams { + pub fn new(microlamports_per_cu: u64, cu_limit: u32) -> Self { + Self { + microlamports_per_cu, + cu_limit, + } + } + + pub fn microlamports_per_cu(&self) -> u64 { + self.microlamports_per_cu + } + + pub fn cu_limit(&self) -> u32 { + self.cu_limit + } +} diff --git a/ts/sdk/package.json b/ts/sdk/package.json index 754902d2..6e6dfd3a 100644 --- a/ts/sdk/package.json +++ b/ts/sdk/package.json @@ -1,16 +1,16 @@ { "name": "@drift-labs/jit-proxy", - "version": "0.10.195", + "version": "0.10.414", "scripts": { "clean": "rm -rf lib", "build": "yarn clean && tsc" }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@drift-labs/sdk": "2.56.0-beta.0", - "@solana/web3.js": "1.73.2" + "@drift-labs/sdk": "2.84.0-beta.2", + "@solana/web3.js": "1.91.7" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/ts/sdk/src/jitter/baseJitter.ts b/ts/sdk/src/jitter/baseJitter.ts index e8ee2c48..2295bf13 100644 --- a/ts/sdk/src/jitter/baseJitter.ts +++ b/ts/sdk/src/jitter/baseJitter.ts @@ -5,17 +5,12 @@ import { AuctionSubscriber, BN, BulkAccountLoader, - convertToNumber, DriftClient, - getAuctionPrice, - getAuctionPriceForOracleOffsetAuction, getUserStatsAccountPublicKey, hasAuctionPrice, isVariant, - OraclePriceData, Order, - PRICE_PRECISION, - SlotSubscriber, + PostOnlyParams, UserAccount, UserStatsMap, } from '@drift-labs/sdk'; @@ -33,6 +28,7 @@ export type JitParams = { maxPosition; priceType: PriceType; subAccountId?: number; + postOnlyParams?: PostOnlyParams; }; export abstract class BaseJitter { @@ -44,10 +40,14 @@ export abstract class BaseJitter { perpParams = new Map(); spotParams = new Map(); + seenOrders = new Set(); onGoingAuctions = new Map>(); userFilter: UserFilter; + computeUnits: number; + computeUnitsPrice: number; + constructor({ auctionSubscriber, jitProxyClient, @@ -62,6 +62,12 @@ export abstract class BaseJitter { this.auctionSubscriber = auctionSubscriber; this.driftClient = driftClient; this.jitProxyClient = jitProxyClient; + this.userStatsMap = + userStatsMap || + new UserStatsMap( + this.driftClient, + new BulkAccountLoader(this.driftClient.connection, 'confirmed', 0) + ); } async subscribe(): Promise { @@ -97,6 +103,11 @@ export abstract class BaseJitter { order.orderId ); + if (this.seenOrders.has(orderSignature)) { + continue; + } + this.seenOrders.add(orderSignature); + if (this.onGoingAuctions.has(orderSignature)) { continue; } @@ -165,6 +176,11 @@ export abstract class BaseJitter { throw new Error('Not implemented'); } + deleteOnGoingAuction(orderSignature: string): void { + this.onGoingAuctions.delete(orderSignature); + this.seenOrders.delete(orderSignature); + } + getOrderSignatures(takerKey: string, orderId: number): string { return `${takerKey}-${orderId}`; } @@ -180,4 +196,12 @@ export abstract class BaseJitter { public setUserFilter(userFilter: UserFilter | undefined): void { this.userFilter = userFilter; } + + public setComputeUnits(computeUnits: number): void { + this.computeUnits = computeUnits; + } + + public setComputeUnitsPrice(computeUnitsPrice: number): void { + this.computeUnitsPrice = computeUnitsPrice; + } } diff --git a/ts/sdk/src/jitter/jitterShotgun.ts b/ts/sdk/src/jitter/jitterShotgun.ts index 78594b8a..5fc0a6df 100644 --- a/ts/sdk/src/jitter/jitterShotgun.ts +++ b/ts/sdk/src/jitter/jitterShotgun.ts @@ -1,30 +1,15 @@ -import { JitProxyClient, PriceType } from '../jitProxyClient'; +import { JitProxyClient } from '../jitProxyClient'; import { PublicKey } from '@solana/web3.js'; import { AuctionSubscriber, - BN, DriftClient, Order, + PostOnlyParams, UserAccount, UserStatsMap, } from '@drift-labs/sdk'; import { BaseJitter } from './baseJitter'; -export type UserFilter = ( - userAccount: UserAccount, - userKey: string, - order: Order -) => boolean; - -export type JitParams = { - bid: BN; - ask: BN; - minPosition: BN; - maxPosition; - priceType: PriceType; - subAccountId?: number; -}; - export class JitterShotgun extends BaseJitter { constructor({ auctionSubscriber, @@ -54,55 +39,69 @@ export class JitterShotgun extends BaseJitter { ): () => Promise { return async () => { let i = 0; - while (i < 10) { + + const takerStats = await this.userStatsMap.mustGet( + taker.authority.toString() + ); + const referrerInfo = takerStats.getReferrerInfo(); + + // assumes each preflight simulation takes ~1 slot + while (i < order.auctionDuration) { const params = this.perpParams.get(order.marketIndex); if (!params) { - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } - const takerStats = await this.userStatsMap.mustGet( - taker.authority.toString() - ); - const referrerInfo = takerStats.getReferrerInfo(); + const txParams = { + computeUnits: this.computeUnits, + computeUnitsPrice: this.computeUnitsPrice, + }; console.log(`Trying to fill ${orderSignature}`); try { - const { txSig } = await this.jitProxyClient.jit({ - takerKey, - takerStatsKey, - taker, - takerOrderId: order.orderId, - maxPosition: params.maxPosition, - minPosition: params.minPosition, - bid: params.bid, - ask: params.ask, - postOnly: null, - priceType: params.priceType, - referrerInfo, - subAccountId: params.subAccountId, - }); + const { txSig } = await this.jitProxyClient.jit( + { + takerKey, + takerStatsKey, + taker, + takerOrderId: order.orderId, + maxPosition: params.maxPosition, + minPosition: params.minPosition, + bid: params.bid, + ask: params.ask, + postOnly: params.postOnlyParams ?? PostOnlyParams.MUST_POST_ONLY, + priceType: params.priceType, + referrerInfo, + subAccountId: params.subAccountId, + }, + txParams + ); - console.log(`Filled ${orderSignature} txSig ${txSig}`); + console.log( + `Successfully sent tx for ${orderSignature} txSig ${txSig}` + ); await sleep(10000); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } catch (e) { console.error(`Failed to fill ${orderSignature}`); if (e.message.includes('0x1770') || e.message.includes('0x1771')) { console.log('Order does not cross params yet, retrying'); + } else if (e.message.includes('0x1779')) { + console.log('Order could not fill'); } else if (e.message.includes('0x1793')) { console.log('Oracle invalid, retrying'); } else { await sleep(10000); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } } i++; } - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); }; } } diff --git a/ts/sdk/src/jitter/jitterSniper.ts b/ts/sdk/src/jitter/jitterSniper.ts index 0787a72f..da836a51 100644 --- a/ts/sdk/src/jitter/jitterSniper.ts +++ b/ts/sdk/src/jitter/jitterSniper.ts @@ -6,10 +6,12 @@ import { DriftClient, getAuctionPrice, getAuctionPriceForOracleOffsetAuction, + getLimitPrice, getVariant, isVariant, OraclePriceData, Order, + PostOnlyParams, PRICE_PRECISION, SlotSubscriber, UserAccount, @@ -65,7 +67,7 @@ export class JitterSniper extends BaseJitter { return async () => { const params = this.perpParams.get(order.marketIndex); if (!params) { - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } @@ -87,9 +89,9 @@ export class JitterSniper extends BaseJitter { // don't increase risk if we're past max positions if (isVariant(order.marketType, 'perp')) { - const currPerpPos = this.driftClient - .getUser() - .getPerpPosition(order.marketIndex); + const currPerpPos = + this.driftClient.getUser().getPerpPosition(order.marketIndex) || + this.driftClient.getUser().getEmptyPosition(order.marketIndex); if ( currPerpPos.baseAssetAmount.lt(ZERO) && isVariant(order.direction, 'short') @@ -100,7 +102,7 @@ export class JitterSniper extends BaseJitter { order.marketType )}-${order.marketIndex}) too much` ); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } } else if ( @@ -113,7 +115,7 @@ export class JitterSniper extends BaseJitter { order.marketType )}-${order.marketIndex}) too much` ); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } } @@ -152,7 +154,7 @@ export class JitterSniper extends BaseJitter { ).then(async ({ slot, updatedDetails }) => { if (slot === -1) { console.log('Auction expired without crossing'); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } @@ -186,44 +188,54 @@ export class JitterSniper extends BaseJitter { )} `); let i = 0; - while (i < 3) { + while (i < 10) { try { - const { txSig } = await this.jitProxyClient.jit({ - takerKey, - takerStatsKey, - taker, - takerOrderId: order.orderId, - maxPosition: params.maxPosition, - minPosition: params.minPosition, - bid: params.bid, - ask: params.ask, - postOnly: null, - priceType: params.priceType, - referrerInfo, - subAccountId: params.subAccountId, - }); + const txParams = { + computeUnits: this.computeUnits, + computeUnitsPrice: this.computeUnitsPrice, + }; + const { txSig } = await this.jitProxyClient.jit( + { + takerKey, + takerStatsKey, + taker, + takerOrderId: order.orderId, + maxPosition: params.maxPosition, + minPosition: params.minPosition, + bid: params.bid, + ask: params.ask, + postOnly: + params.postOnlyParams ?? PostOnlyParams.MUST_POST_ONLY, + priceType: params.priceType, + referrerInfo, + subAccountId: params.subAccountId, + }, + txParams + ); console.log(`Filled ${orderSignature} txSig ${txSig}`); await sleep(3000); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } catch (e) { console.error(`Failed to fill ${orderSignature}`); if (e.message.includes('0x1770') || e.message.includes('0x1771')) { console.log('Order does not cross params yet'); + } else if (e.message.includes('0x1779')) { + console.log('Order could not fill'); } else if (e.message.includes('0x1793')) { console.log('Oracle invalid'); } else { await sleep(3000); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); return; } } - await sleep(50); + await sleep(200); i++; } }); - this.onGoingAuctions.delete(orderSignature); + this.deleteOnGoingAuction(orderSignature); }; } @@ -302,6 +314,26 @@ export class JitterSniper extends BaseJitter { slotsTilCross++; } + // if it doesnt cross during auction, check if limit price crosses + if (!willCross) { + const slotAfterAuction = + order.slot.toNumber() + order.auctionDuration + 1; + const limitPrice = getLimitPrice(order, oraclePrice, slotAfterAuction); + if (!limitPrice) { + willCross = true; + slotsTilCross = order.auctionDuration + 1; + } else { + const limitPriceNum = convertToNumber(limitPrice, PRICE_PRECISION); + if (makerOrderDir === 'buy' || limitPriceNum <= bid) { + willCross = true; + slotsTilCross = order.auctionDuration + 1; + } else if (makerOrderDir === 'sell' || limitPriceNum >= ask) { + willCross = true; + slotsTilCross = order.auctionDuration + 1; + } + } + } + return { slotsTilCross, willCross, @@ -319,12 +351,12 @@ export class JitterSniper extends BaseJitter { order: Order, initialDetails: AuctionAndOrderDetails ): Promise<{ slot: number; updatedDetails: AuctionAndOrderDetails }> { - const auctionEndSlot = order.auctionDuration + order.slot.toNumber(); let currentDetails: AuctionAndOrderDetails = initialDetails; let willCross = initialDetails.willCross; - if (this.slotSubscriber.currentSlot > auctionEndSlot) { + if (this.slotSubscriber.currentSlot > targetSlot) { + const slot = willCross ? this.slotSubscriber.currentSlot : -1; return new Promise((resolve) => - resolve({ slot: -1, updatedDetails: currentDetails }) + resolve({ slot, updatedDetails: currentDetails }) ); } @@ -342,13 +374,14 @@ export class JitterSniper extends BaseJitter { // Update target slot as the bid/ask and the oracle changes const intervalId = setInterval(async () => { - if (this.slotSubscriber.currentSlot >= auctionEndSlot) { + if (this.slotSubscriber.currentSlot >= targetSlot) { this.slotSubscriber.eventEmitter.removeListener( 'newSlot', slotListener ); clearInterval(intervalId); - resolve({ slot: -1, updatedDetails: currentDetails }); + const slot = willCross ? this.slotSubscriber.currentSlot : -1; + resolve({ slot, updatedDetails: currentDetails }); } currentDetails = this.getAuctionAndOrderDetails(order); diff --git a/ts/sdk/src/types/jit_proxy.ts b/ts/sdk/src/types/jit_proxy.ts index d5e8a331..9193b5d2 100644 --- a/ts/sdk/src/types/jit_proxy.ts +++ b/ts/sdk/src/types/jit_proxy.ts @@ -189,6 +189,9 @@ export type JitProxy = { }, { name: 'TryPostOnly'; + }, + { + name: 'Slide'; } ]; }; @@ -262,6 +265,16 @@ export type JitProxy = { code: 6007; name: 'UnprofitableArb'; msg: 'UnprofitableArb'; + }, + { + code: 6008; + name: 'PositionLimitBreached'; + msg: 'PositionLimitBreached'; + }, + { + code: 6009; + name: 'NoFill'; + msg: 'NoFill'; } ]; }; @@ -458,6 +471,9 @@ export const IDL: JitProxy = { { name: 'TryPostOnly', }, + { + name: 'Slide', + }, ], }, }, @@ -531,5 +547,15 @@ export const IDL: JitProxy = { name: 'UnprofitableArb', msg: 'UnprofitableArb', }, + { + code: 6008, + name: 'PositionLimitBreached', + msg: 'PositionLimitBreached', + }, + { + code: 6009, + name: 'NoFill', + msg: 'NoFill', + }, ], }; diff --git a/ts/sdk/yarn.lock b/ts/sdk/yarn.lock index ae3b97c5..bd935a4a 100644 --- a/ts/sdk/yarn.lock +++ b/ts/sdk/yarn.lock @@ -9,15 +9,21 @@ dependencies: regenerator-runtime "^0.13.11" -"@coral-xyz/anchor@0.28.1-beta.2": - version "0.28.1-beta.2" - resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.28.1-beta.2.tgz#4ddd4b2b66af04407be47cf9524147793ec514a0" - integrity sha512-xreUcOFF8+IQKWOBUrDKJbIw2ftpRVybFlEPVrbSlOBCbreCWrQ5754Gt9cHIcuBDAzearCDiBqzsGQdNgPJiw== +"@babel/runtime@^7.23.4": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c" + integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g== dependencies: - "@coral-xyz/borsh" "^0.28.0" + regenerator-runtime "^0.14.0" + +"@coral-xyz/anchor@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.29.0.tgz#bd0be95bedfb30a381c3e676e5926124c310ff12" + integrity sha512-eny6QNG0WOwqV0zQ7cs/b1tIuzZGmP7U7EcH+ogt4Gdbl8HDmIYVMh/9aTmYZPaFWjtUaI8qSn73uYEXWfATdA== + dependencies: + "@coral-xyz/borsh" "^0.29.0" "@noble/hashes" "^1.3.1" "@solana/web3.js" "^1.68.0" - base64-js "^1.5.1" bn.js "^5.1.2" bs58 "^4.0.1" buffer-layout "^1.2.2" @@ -59,27 +65,28 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" -"@coral-xyz/borsh@^0.28.0": - version "0.28.0" - resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.28.0.tgz#fa368a2f2475bbf6f828f4657f40a52102e02b6d" - integrity sha512-/u1VTzw7XooK7rqeD7JLUSwOyRSesPUk0U37BV9zK0axJc1q0nRbKFGFLYCQ16OtdOJTTwGfGp11Lx9B45bRCQ== +"@coral-xyz/borsh@^0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.29.0.tgz#79f7045df2ef66da8006d47f5399c7190363e71f" + integrity sha512-s7VFVa3a0oqpkuRloWVPdCK7hMbAMY270geZOGfCnaqexrP5dTIpbEHL33req6IYPPJ0hYa71cdvJ1h6V55/oQ== dependencies: bn.js "^5.1.2" buffer-layout "^1.2.0" -"@drift-labs/sdk@2.56.0-beta.0": - version "2.56.0-beta.0" - resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.56.0-beta.0.tgz#2ed7b5f2cc9f1597dd6a16512b6f42716d11b624" - integrity sha512-64byprjkruQNmhIxJ/hNTfzFQCf28ls4zHDSw6Wx5Bc+9nj1g4ZwGy+22nfzdHCwres/KSXnkATIwE8BqTgAKg== +"@drift-labs/sdk@2.84.0-beta.2": + version "2.84.0-beta.2" + resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.84.0-beta.2.tgz#48f32ac6c7a4160719cfe0ca0a2517144763c9db" + integrity sha512-I47XPT6qdPsEkX1j0zmNBw+46yL2f6jo7awr/yTCpBWWWuhjmfQogmqIbfYJ/8e1k3qXqbm6/oNglBcYJFZTKA== dependencies: - "@coral-xyz/anchor" "0.28.1-beta.2" + "@coral-xyz/anchor" "0.29.0" "@ellipsis-labs/phoenix-sdk" "^1.4.2" "@project-serum/serum" "^0.13.38" "@pythnetwork/client" "2.5.3" "@solana/spl-token" "^0.3.7" - "@solana/web3.js" "1.73.2" + "@solana/web3.js" "1.91.7" strict-event-emitter-types "^2.0.0" uuid "^8.3.2" + zstddec "^0.1.0" "@ellipsis-labs/phoenix-sdk@^1.4.2": version "1.4.4" @@ -156,26 +163,28 @@ dependencies: "@noble/hashes" "1.3.1" -"@noble/ed25519@^1.7.0": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.3.tgz#57e1677bf6885354b466c38e2b620c62f45a7123" - integrity sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ== +"@noble/curves@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" + integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== + dependencies: + "@noble/hashes" "1.4.0" -"@noble/hashes@1.3.1", "@noble/hashes@^1.1.2", "@noble/hashes@^1.3.0": +"@noble/hashes@1.3.1", "@noble/hashes@^1.3.0": version "1.3.1" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@1.4.0", "@noble/hashes@^1.3.3": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + "@noble/hashes@^1.3.1": version "1.3.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== -"@noble/secp256k1@^1.6.3": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" - integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== - "@project-serum/anchor@^0.11.1": version "0.11.1" resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.11.1.tgz#155bff2c70652eafdcfd5559c81a83bb19cec9ff" @@ -234,7 +243,7 @@ bigint-buffer "^1.1.5" bignumber.js "^9.0.1" -"@solana/buffer-layout@^4.0.0": +"@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== @@ -262,26 +271,25 @@ "@solana/buffer-layout-utils" "^0.2.0" buffer "^6.0.3" -"@solana/web3.js@1.73.2": - version "1.73.2" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.73.2.tgz#4b30cd402b35733dae3a7d0b638be26a7742b395" - integrity sha512-9WACF8W4Nstj7xiDw3Oom22QmrhBh0VyZyZ7JvvG3gOxLWLlX3hvm5nPVJOGcCE/9fFavBbCUb5A6CIuvMGdoA== +"@solana/web3.js@1.91.7": + version "1.91.7" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.91.7.tgz#1d639f8f3cc772fd6d88b982e8fdb17dc192b9e1" + integrity sha512-HqljZKDwk6Z4TajKRGhGLlRsbGK4S8EY27DA7v1z6yakewiUY3J7ZKDZRxcqz2MYV/ZXRrJ6wnnpiHFkPdv0WA== dependencies: - "@babel/runtime" "^7.12.5" - "@noble/ed25519" "^1.7.0" - "@noble/hashes" "^1.1.2" - "@noble/secp256k1" "^1.6.3" - "@solana/buffer-layout" "^4.0.0" - agentkeepalive "^4.2.1" + "@babel/runtime" "^7.23.4" + "@noble/curves" "^1.4.0" + "@noble/hashes" "^1.3.3" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" bigint-buffer "^1.1.5" - bn.js "^5.0.0" + bn.js "^5.2.1" borsh "^0.7.0" bs58 "^4.0.1" - buffer "6.0.1" + buffer "6.0.3" fast-stable-stringify "^1.0.0" - jayson "^3.4.4" - node-fetch "2" - rpc-websockets "^7.5.0" + jayson "^4.1.0" + node-fetch "^2.7.0" + rpc-websockets "^7.5.1" superstruct "^0.14.2" "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.30.2", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.56.2", "@solana/web3.js@^1.68.0": @@ -351,6 +359,13 @@ agentkeepalive@^4.2.1: depd "^2.0.0" humanize-ms "^1.2.1" +agentkeepalive@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -447,14 +462,6 @@ buffer-layout@^1.2.0, buffer-layout@^1.2.2: resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== -buffer@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.1.tgz#3cbea8c1463e5a0779e30b66d4c88c6ffa182ac2" - integrity sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3, buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -747,25 +754,6 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== -jayson@^3.4.4: - version "3.7.0" - resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.7.0.tgz#b735b12d06d348639ae8230d7a1e2916cb078f25" - integrity sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ== - dependencies: - "@types/connect" "^3.4.33" - "@types/node" "^12.12.54" - "@types/ws" "^7.4.4" - JSONStream "^1.3.5" - commander "^2.20.3" - delay "^5.0.0" - es6-promisify "^5.0.0" - eyes "^0.1.8" - isomorphic-ws "^4.0.1" - json-stringify-safe "^5.0.1" - lodash "^4.17.20" - uuid "^8.3.2" - ws "^7.4.5" - jayson@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.0.tgz#60dc946a85197317f2b1439d672a8b0a99cea2f9" @@ -799,11 +787,6 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -lodash@^4.17.20: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" @@ -836,13 +819,20 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" -node-fetch@2, node-fetch@^2.6.11, node-fetch@^2.6.7: +node-fetch@^2.6.11, node-fetch@^2.6.7: version "2.6.11" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25" integrity sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w== dependencies: whatwg-url "^5.0.0" +node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-gyp-build@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" @@ -876,7 +866,12 @@ regenerator-runtime@^0.13.11: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== -rpc-websockets@^7.5.0, rpc-websockets@^7.5.1: +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +rpc-websockets@^7.5.1: version "7.5.1" resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.1.tgz#e0a05d525a97e7efc31a0617f093a13a2e10c401" integrity sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w== @@ -1036,3 +1031,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +zstddec@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/zstddec/-/zstddec-0.1.0.tgz#7050f3f0e0c3978562d0c566b3e5a427d2bad7ec" + integrity sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==