@reyaxyz/common 0.344.1-perpob.135 → 0.344.1-perpob.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/incentives-api-types.js.map +1 -1
- package/dist/trading-api-types.js.map +1 -1
- package/dist/transactions/abis/Errors.json +237 -33
- package/dist/transactions/abis/OrdersGateway.json +43 -9
- package/dist/transactions/consts.js +1 -2
- package/dist/transactions/consts.js.map +1 -1
- package/dist/transactions/sign.js +67 -135
- package/dist/transactions/sign.js.map +1 -1
- package/dist/types/incentives-api-types.d.ts +34 -15
- package/dist/types/incentives-api-types.d.ts.map +1 -1
- package/dist/types/trading-api-types.d.ts +4 -63
- package/dist/types/trading-api-types.d.ts.map +1 -1
- package/dist/types/transactions/consts.d.ts +0 -1
- package/dist/types/transactions/consts.d.ts.map +1 -1
- package/dist/types/transactions/sign.d.ts +20 -11
- package/dist/types/transactions/sign.d.ts.map +1 -1
- package/dist/types/types.d.ts +17 -56
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/compute-trade-pnl.d.ts +39 -0
- package/dist/types/utils/compute-trade-pnl.d.ts.map +1 -0
- package/dist/types/utils/consts.d.ts +1 -2
- package/dist/types/utils/consts.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types.js +7 -21
- package/dist/types.js.map +1 -1
- package/dist/utils/compute-trade-pnl.js +60 -0
- package/dist/utils/compute-trade-pnl.js.map +1 -0
- package/dist/utils/consts.js +1 -7
- package/dist/utils/consts.js.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/src/incentives-api-types.ts +55 -28
- package/src/trading-api-types.ts +20 -79
- package/src/transactions/abis/Errors.json +237 -33
- package/src/transactions/abis/OrdersGateway.json +43 -9
- package/src/transactions/consts.ts +0 -1
- package/src/transactions/sign.ts +63 -159
- package/src/types.ts +38 -73
- package/src/utils/compute-trade-pnl.ts +110 -0
- package/src/utils/consts.ts +1 -16
- package/src/utils/index.ts +1 -0
package/README.md
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
|
|
7
7
|
| Statements | Branches | Functions | Lines |
|
|
8
8
|
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
|
|
9
|
-
|  |  |  |  |
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incentives-api-types.js","sourceRoot":"/","sources":["incentives-api-types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AddressParam,\n ApiEndpoint,\n ApiInfiniteListEndpoint,\n ApiListEndpoint,\n PaginatedQueryParams,\n FailableResult,\n Stringified,\n} from './api-types';\nimport { Rank, RankTrading } from './types';\n\nexport type PointsBreakdown = {\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n rank: number;\n};\n\nexport type IncentivesUserPointsData = {\n weekly: PointsBreakdown;\n total: PointsBreakdown;\n};\n\nexport type IncentivesUserRanks = {\n walletAddress: string;\n tradingRank: RankTrading;\n stakingRank: Rank;\n};\n\nexport type IncentivesUserBoosts = {\n walletAddress: string;\n tradingBoost: number;\n stakingBoost: number;\n loyaltyBoost: number;\n};\n\nexport type IncentivesUserSummaryData = {\n walletAddress: string;\n points: IncentivesUserPointsData;\n ranks: Omit<IncentivesUserRanks, 'walletAddress'>;\n boosts: Omit<IncentivesUserBoosts, 'walletAddress'>;\n};\n\nexport type IncentivesLeaderBoardEntry = {\n rank: number;\n walletAddress: string;\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n isCurrentUser?: boolean;\n};\n\nexport type
|
|
1
|
+
{"version":3,"file":"incentives-api-types.js","sourceRoot":"/","sources":["incentives-api-types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AddressParam,\n ApiEndpoint,\n ApiInfiniteListEndpoint,\n ApiListEndpoint,\n PaginatedQueryParams,\n FailableResult,\n Stringified,\n} from './api-types';\nimport { Rank, RankTrading } from './types';\n\nexport type PointsBreakdown = {\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n rank: number;\n};\n\nexport type IncentivesUserPointsData = {\n weekly: PointsBreakdown;\n total: PointsBreakdown;\n};\n\nexport type IncentivesUserRanks = {\n walletAddress: string;\n tradingRank: RankTrading;\n stakingRank: Rank;\n};\n\nexport type IncentivesUserBoosts = {\n walletAddress: string;\n tradingBoost: number;\n stakingBoost: number;\n loyaltyBoost: number;\n};\n\nexport type IncentivesUserSummaryData = {\n walletAddress: string;\n points: IncentivesUserPointsData;\n ranks: Omit<IncentivesUserRanks, 'walletAddress'>;\n boosts: Omit<IncentivesUserBoosts, 'walletAddress'>;\n};\n\nexport type IncentivesLeaderBoardEntry = {\n rank: number;\n walletAddress: string;\n totalPoints: number;\n tradingPoints: number;\n stakingPoints: number;\n signalPoints: number;\n isCurrentUser?: boolean;\n};\n\nexport type IncentivesPointsHistoryEntry = {\n walletAddress: string;\n totalXpOG: number;\n totalXpOGRanked: number;\n liquidityReferralXpOG: number;\n liquidityXpOG: number;\n rankMultiplierOG: number;\n rankOG: Rank;\n stakingPointsOG: number;\n liquidityReferralXpSeason1: number;\n liquidityXpSeason1: number;\n liquidityXpSeason1Ranked: number;\n rankMultiplierSeason1: number;\n rankSeason1: Rank;\n stakingPointsSeason1: number;\n tradingReferralXpSeason1: number;\n tradingXpSeason1: number;\n tradingXpSeason1Ranked: number;\n tradingRankMultiplierSeason1: number;\n tradingRankSeason1: RankTrading;\n tradingPointsSeason1: number;\n liquidityReferralXpSeason2: number;\n liquidityXpSeason2: number;\n rankSeason2: Rank;\n stakingPointsSeason2: number;\n tradingReferralXpSeason2: number;\n tradingXpSeason2: number;\n tradingRankSeason2: RankTrading;\n tradingPointsSeason2: number;\n totalLiquidityXp: number;\n totalLiquidityReferralXp: number;\n totalTradingXp: number;\n totalTradingReferralXp: number;\n totalXp: number;\n totalPoints: number;\n};\n\nexport type LeaderBoardParams = { type: 'weekly' | 'total' };\n\nexport type TradingCompetitionRoundParams = { round: number };\n\nexport type TradingCompetitionUserSummaryData =\n | {\n status: 'out';\n }\n | {\n status: 'in';\n realizedPnl: number;\n position: number;\n volume: number;\n volumePosition: number;\n };\n\nexport type TradingCompetitionLeaderboardEntry = {\n walletAddress: string;\n realizedPnl: number;\n position: number;\n};\n\nexport type IncentivesStreakStatus = {\n currentStreakDay: number | 'upcoming' | 'ended';\n timeUntilNextStreakDay: number;\n};\n\nexport type IncentivesStreakMarketVolume = {\n symbol: string;\n volume: number;\n};\n\nexport type IncentivesStreakDayActivity = {\n day: number;\n markets: IncentivesStreakMarketVolume[];\n};\n\nexport type IncentivesStreakUserActivity = IncentivesStreakStatus & {\n walletAddress: string;\n days: IncentivesStreakDayActivity[];\n};\n\nexport type IncentivesApiSource = {\n 'incentives/points': ApiEndpoint<\n {\n total: number;\n weekly: number;\n },\n never\n >;\n\n 'incentives/leaderBoard/:type': ApiInfiniteListEndpoint<\n IncentivesLeaderBoardEntry,\n LeaderBoardParams,\n PaginatedQueryParams\n >;\n\n 'incentives/wallet/:address': ApiEndpoint<\n IncentivesUserSummaryData,\n AddressParam\n >;\n\n 'incentives/wallet/:address/referralsLeaderBoard/:type': ApiListEndpoint<\n IncentivesLeaderBoardEntry,\n AddressParam & LeaderBoardParams\n >;\n\n 'incentives/wallet/:address/pointsHistory': ApiEndpoint<\n IncentivesPointsHistoryEntry,\n AddressParam\n >;\n\n 'incentives/tradingCompetition/:round': ApiEndpoint<\n {\n entries: TradingCompetitionLeaderboardEntry[];\n status: 'live' | 'ended';\n refreshedAt: number;\n },\n TradingCompetitionRoundParams\n >;\n\n 'incentives/wallet/:address/tradingCompetition/:round': ApiEndpoint<\n TradingCompetitionUserSummaryData,\n AddressParam & TradingCompetitionRoundParams\n >;\n\n 'incentives/wallet/:address/tradingCompetition/:round/registration': ApiEndpoint<\n { registered: boolean },\n AddressParam & TradingCompetitionRoundParams\n >;\n\n 'incentives/wallet/:address/tradingCompetition/:round/claim': ApiEndpoint<\n FailableResult,\n AddressParam & TradingCompetitionRoundParams,\n { code: string }\n >;\n\n 'incentives/streak': ApiEndpoint<IncentivesStreakStatus, never>;\n\n 'incentives/streak/wallet/:address': ApiEndpoint<\n IncentivesStreakUserActivity,\n AddressParam\n >;\n\n 'incentives/vip/wallet/:address': ApiEndpoint<\n {\n walletAddress: string;\n isVip: boolean;\n registered: boolean;\n hasInviteLink: boolean;\n registeredAt: number | null;\n },\n AddressParam\n >;\n\n 'incentives/vip/wallet/:address/nonce': ApiEndpoint<\n FailableResult<{\n nonce: string;\n message: string;\n expiresAt: number;\n }>,\n AddressParam\n >;\n\n 'incentives/vip/wallet/:address/register': ApiEndpoint<\n FailableResult<{\n inviteLink: string;\n alreadyRegistered: boolean;\n }>,\n AddressParam\n >;\n};\n\nexport type IncentivesApi = {\n [K in keyof IncentivesApiSource]: {\n params: IncentivesApiSource[K]['params'];\n query: IncentivesApiSource[K]['query'];\n response: Stringified<IncentivesApiSource[K]['response']>;\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trading-api-types.js","sourceRoot":"/","sources":["trading-api-types.ts"],"names":[],"mappings":";;;AAYa,QAAA,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["import { ParamsDictionary, Query } from 'express-serve-static-core';\nimport { Address, AssetPair, CollateralPrice, MarketPrice } from './types';\nimport {\n AddressParam,\n ApiEndpoint,\n ApiInfiniteListEndpoint,\n ApiListEndpoint,\n Decimal,\n PaginatedQueryParams,\n Stringified,\n} from './api-types';\n\nexport const AccountStatusValues = {\n OPEN: 'OPEN',\n CLOSED: 'CLOSED',\n};\n\nexport type AccountStatus =\n (typeof AccountStatusValues)[keyof typeof AccountStatusValues];\n\ntype CandleResolution = '1' | '5' | '15' | '30' | '60' | '240' | '1D';\n\ntype Candle = {\n time: number;\n open: number;\n high: number;\n low: number;\n close: number;\n assetPairId: AssetPair;\n resolution: CandleResolution;\n};\n\n// Used only for PerpExecutionReplicationData (replication:orders messages)\ntype Order = {\n id: string;\n market_id: Decimal | null;\n account_id: Decimal | null;\n executed_base: Decimal | null;\n fee: Decimal | null;\n price: Decimal | null;\n is_match_order: boolean | null;\n liquidation_type: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n event_sequence_number: bigint | null;\n exchange_id: Decimal | null;\n created_at: Date;\n counterparty_account_id: Decimal | null;\n counterparty_adl_unwind_price: Decimal | null;\n counterparty_average_entry_funding_value: Decimal | null;\n counterparty_base: Decimal | null;\n counterparty_base_multiplier: Decimal | null;\n counterparty_funding_value: Decimal | null;\n counterparty_last_price: Decimal | null;\n counterparty_last_price_timestamp: Decimal | null;\n counterparty_previous_average_entry_funding_value: Decimal | null;\n counterparty_previous_base_multiplier: Decimal | null;\n counterparty_previous_funding_value: Decimal | null;\n counterparty_previous_last_price: Decimal | null;\n counterparty_previous_realized_pnl: Decimal | null;\n counterparty_realized_pnl: Decimal | null;\n counterparty_session: Decimal | null;\n position_adl_unwind_price: Decimal | null;\n position_average_entry_funding_value: Decimal | null;\n position_base: Decimal | null;\n position_base_multiplier: Decimal | null;\n position_funding_value: Decimal | null;\n position_last_price: Decimal | null;\n position_last_price_timestamp: Decimal | null;\n position_previous_adl_unwind_price: Decimal | null;\n position_previous_average_entry_funding_value: Decimal | null;\n position_previous_base_multiplier: Decimal | null;\n position_previous_funding_value: Decimal | null;\n position_previous_last_price: Decimal | null;\n position_previous_realized_pnl: Decimal | null;\n position_realized_pnl: Decimal | null;\n position_session: Decimal | null;\n referrer_account_id: Decimal | null;\n referrer_fee_credit: Decimal | null;\n // V3 fields\n protocol_fee_credit: Decimal | null;\n exchange_fee_credit: Decimal | null;\n maker_fee_credit: Decimal | null;\n maker_fee_debit: Decimal | null;\n account_order_id: bigint | null;\n counterparty_order_id: bigint | null;\n};\n\ntype Position = {\n market_id: Decimal;\n account_id: Decimal;\n base: Decimal | null;\n realized_pnl: Decimal | null;\n last_price: Decimal | null;\n last_price_timestamp: Decimal | null;\n funding_value: Decimal | null;\n base_multiplier: Decimal | null;\n adl_unwind_price: Decimal | null;\n average_entry_funding_value: Decimal | null;\n session: Decimal | null;\n exchange_id: Decimal | null;\n event_sequence_number: bigint | null;\n referrer_account_id: Decimal | null;\n referrer_fee_credit: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n adjusted_base: Decimal | null;\n adl_realized_pnl: Decimal | null;\n};\n\ntype ConditionalOrder = {\n id: string;\n account_id: Decimal;\n market_id: Decimal;\n order_type: string;\n is_long: boolean;\n trigger_price: number;\n order_base: Decimal;\n status: string;\n creation_timestamp_ms: bigint;\n last_update_timestamp_ms: bigint;\n transaction_hash: string | null;\n};\n\ntype ConditionalOrderSensitive = ConditionalOrder & {\n exchange_id: bigint;\n inputs: string;\n counterparty_account_id: bigint;\n reya_chain_id: bigint;\n deadline: bigint;\n signer_address: string;\n nonce: Decimal;\n signature: string;\n};\n\ntype Account = {\n account_id: Decimal;\n name: string;\n status: AccountStatus;\n updated_timestamp_ms: Decimal;\n source: string | null;\n};\n\ntype AccountBalance = {\n account_id: Decimal | null;\n collateral: string | null;\n balance?: Decimal | null;\n delta?: Decimal | null;\n};\n\ntype spot_execution = {\n account_id: Decimal;\n counterparty_account_id: Decimal;\n exchange_id: Decimal;\n executed_base: Decimal;\n price: Decimal;\n account_order_id: bigint;\n counterparty_order_id: bigint;\n spot_market_id: Decimal;\n is_auto_exchange: boolean;\n is_long: boolean;\n event_sequence_number: bigint;\n parent_event_sequence_number: bigint | null;\n block_timestamp: Decimal;\n block_number: Decimal;\n transaction_hash: string;\n created_at: string;\n};\n\ntype account_real_balance = {\n account_id: Decimal;\n collateral: string;\n balance: Decimal;\n rpnl: Decimal;\n event_sequence_number: bigint | null;\n transfer_event_sequence_number: bigint | null;\n parent_event_sequence_number: bigint | null;\n block_timestamp: Decimal;\n block_number: Decimal;\n transaction_hash: string;\n};\n\ntype AutoExchange = {\n id: string;\n liquidated_account_id: Decimal | null;\n liquidator_account_id: Decimal | null;\n requested_quote_amount: Decimal | null;\n collateral_out_address: string | null;\n collateral_in_address: string | null;\n collateral_amount_to_liquidator: Decimal | null;\n quote_amount_to_insurance_fund: Decimal | null;\n quote_amount_to_account: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n transaction_hash: string;\n unique_id: bigint | null;\n};\n\ntype Leverage = {\n accountId: Decimal;\n marketId: Decimal;\n leverage: number;\n createdAt: Date;\n updatedAt: Date;\n};\n\ntype WalletStats = {\n volume_14d: Decimal;\n};\n\ntype MarketData = {\n marketId: string;\n updatedAt: number;\n longOI: number;\n shortOI: number;\n longSkewPercentage: number;\n shortSkewPercentage: number;\n openInterest?: number;\n fundingRate?: number;\n fundingRateVelocity?: number;\n longFundingValue?: number;\n shortFundingValue?: number;\n last24hVolume: number;\n priceChange24H?: number;\n priceChange24HPercentage?: number;\n maxAmountBaseLong?: number;\n maxAmountSizeLong?: number;\n maxAmountBaseShort?: number;\n maxAmountSizeShort?: number;\n oraclePrice?: number;\n poolPrice?: number;\n pricesUpdatedAt?: number;\n longBaseMultiplier?: number;\n shortBaseMultiplier?: number;\n longAdlUnwindPrice?: number;\n shortAdlUnwindPrice?: number;\n depthFactor?: number;\n priceSpread?: number;\n logPriceMultiplier?: number;\n};\n\ntype SpotMarketData = {\n spotMarketId: string;\n symbol: string;\n updatedAt: number;\n volume24h: number;\n pxChange24h?: number;\n oraclePrice?: number;\n};\n\ntype MarketTrackers = {\n market_data_id: Decimal;\n passive_pool_id: Decimal | null;\n pool_account_id: Decimal | null;\n quote_token: string | null;\n quote_token_decimals: Decimal | null;\n last_funding_velocity: Decimal | null;\n last_funding_timestamp: Decimal | null;\n last_mtm_price: Decimal | null;\n last_mtm_timestamp: Decimal | null;\n long_trackers_funding_value: Decimal | null;\n last_funding_rate: Decimal | null;\n long_trackers_base_multiplier: Decimal | null;\n long_trackers_adl_unwind_price: Decimal | null;\n short_trackers_funding_value: Decimal | null;\n short_trackers_base_multiplier: Decimal | null;\n short_trackers_adl_unwind_price: Decimal | null;\n open_interest: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n price_spread: Decimal | null;\n depth_factor: Decimal | null;\n log_price_multiplier: Decimal | null;\n mark_price: Decimal | null;\n mark_price_timestamp: Decimal | null;\n funding_rate: Decimal | null;\n funding_rate_timestamp: Decimal | null;\n};\n\nexport type TradingApiReplication<\n ReplicationTable extends ReplicationModel = never,\n Replication = never,\n> = {\n replication: ReplicationTable extends never\n ? never\n : GenericReplicationMessage<Replication, ReplicationTable>;\n};\n\nexport type TradingApiEndpoint<\n Response,\n Params,\n ReplicationTable extends ReplicationModel = never,\n Replication = Response,\n Query = never,\n> = ApiEndpoint<Response, Params, Query> &\n TradingApiReplication<ReplicationTable, Replication>;\n\nexport type TradingApiListEndpoint<\n Response,\n Params = never,\n ReplicationTable extends ReplicationModel = never,\n Replication = Response,\n Query = never,\n> = ApiListEndpoint<Response, Params, Query> &\n TradingApiReplication<ReplicationTable, Replication>;\n\nexport type TradingApiInfiniteListEndpoint<\n Response,\n Params = never,\n ReplicationTable extends ReplicationModel = never,\n Replication = Response,\n Query = PaginatedQueryParams,\n> = ApiInfiniteListEndpoint<Response, Params, Query> &\n TradingApiReplication<ReplicationTable, Replication>;\n\nexport type TradingApiSource = {\n 'poolBalance/:poolId': TradingApiEndpoint<\n {\n id: number;\n timestamp: bigint;\n pool_id: number;\n value: Decimal;\n apy: Decimal;\n share_price: Decimal;\n share_price_index: Decimal;\n } | null,\n {\n poolId?: string;\n }\n >;\n 'wallet/:address/leverages': TradingApiListEndpoint<\n Leverage,\n { address: string },\n 'accountLeveragePerMarket'\n >;\n 'markets/data': TradingApiListEndpoint<MarketData, never, 'marketData'>;\n 'spotMarkets/data': TradingApiListEndpoint<\n SpotMarketData,\n never,\n 'spotMarketData'\n >;\n 'markets/configuration': TradingApiListEndpoint<{\n market_id: Decimal;\n risk_matrix_index: Decimal | null;\n max_open_base: Decimal | null;\n velocity_multiplier: Decimal | null;\n minimum_order_base: Decimal | null;\n base_spacing: Decimal | null;\n price_spacing: Decimal | null;\n oracle_node_id: string | null;\n mtm_window: Decimal | null;\n dutch_config_lambda: Decimal | null;\n dutch_config_min_base: Decimal | null;\n slippage_params_phi: Decimal | null;\n slippage_params_beta: Decimal | null;\n depth_factor: Decimal | null;\n max_exposure_factor: Decimal | null;\n max_p_slippage: Decimal | null;\n price_spread: Decimal | null;\n volatility_index_multiplier: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n }>;\n 'markets/storage': TradingApiListEndpoint<{\n market_id: Decimal;\n quote_collateral: string | null;\n instrument_address: string | null;\n name: string | null;\n risk_block_id: Decimal | null;\n collateral_pool_id: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n }>;\n 'markets/trackers': TradingApiListEndpoint<\n MarketTrackers,\n never,\n 'marketTrackers'\n >;\n 'market/:marketId/trackers': TradingApiEndpoint<\n MarketTrackers,\n {\n marketId: string;\n },\n 'marketTrackers'\n >;\n 'market/:marketId/data': TradingApiEndpoint<\n MarketData,\n {\n marketId: string;\n },\n 'marketData'\n >;\n 'wallet/:address/positions': TradingApiListEndpoint<\n Position,\n AddressParam,\n 'position',\n Omit<Position, 'adjusted_base' | 'adl_realized_pnl'>\n >;\n 'wallet/:address/openOrders': TradingApiListEndpoint<\n ConditionalOrder,\n AddressParam,\n 'ConditionalOrders'\n >;\n assets: TradingApiListEndpoint<{\n address: string;\n name: string;\n short: string;\n createdAt: Date;\n updatedAt: Date;\n asset_price_contract_id: string | null;\n asset_price_usdc_contract_id: string | null;\n decimals: number;\n }>;\n prices: TradingApiEndpoint<\n Partial<Record<AssetPair, MarketPrice | CollateralPrice>>,\n never\n >;\n 'prices/:assetPairId': TradingApiEndpoint<\n MarketPrice | CollateralPrice | undefined,\n {\n assetPairId: string;\n },\n 'price'\n >;\n 'wallet/:address/accounts': TradingApiListEndpoint<\n Account,\n AddressParam,\n 'AccountProfile'\n >;\n 'wallet/:address/accounts/tiers': TradingApiListEndpoint<\n {\n market_id: Decimal;\n account_id: Decimal;\n tier_id: Decimal | null;\n },\n AddressParam\n >;\n 'wallet/:address/accounts/balances': TradingApiListEndpoint<\n AccountBalance,\n AddressParam,\n 'account_balances'\n >;\n 'wallet/:address/autoExchange': TradingApiInfiniteListEndpoint<\n AutoExchange,\n AddressParam,\n 'auto_exchange'\n >;\n 'wallet/:address/balanceHistory/:timestamp': TradingApiListEndpoint<\n {\n timestamp: number;\n balance: number;\n },\n {\n address: string;\n timestamp: string;\n }\n >;\n riskMatrices: TradingApiListEndpoint<\n {\n blockId: Decimal;\n matrix: string[][];\n },\n {\n poolId: string;\n }\n >;\n tierFees: TradingApiListEndpoint<{\n market_id: Decimal;\n tier_id: Decimal;\n fee_parameter: Decimal | null;\n }>;\n collateralConfiguration: TradingApiListEndpoint<{\n assetPairId?: AssetPair;\n name?: string;\n collateral_pool_id: Decimal;\n collateral_address: string;\n price_haircut: Decimal | null;\n auto_exchange_discount: Decimal | null;\n oracle_node_id: string | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n }>;\n 'candle/:assetPairId/:resolution': TradingApiEndpoint<\n Candle | null,\n {\n resolution: CandleResolution;\n assetPairId: AssetPair;\n },\n 'storkPriceCandle',\n Candle\n >;\n 'candles/:assetPairId/:resolution': TradingApiEndpoint<\n {\n t: number[];\n o: number[];\n h: number[];\n l: number[];\n c: number[];\n },\n {\n resolution: CandleResolution;\n assetPairId: AssetPair;\n },\n never,\n never,\n {\n to: string;\n from: string;\n countBack?: string;\n }\n >;\n feeTierParameters: TradingApiListEndpoint<{\n tier_id: Decimal;\n taker_fee: Decimal;\n maker_fee: Decimal;\n volume: Decimal;\n }>;\n globalFeeParameters: TradingApiEndpoint<\n {\n og_discount: Decimal;\n vltz_discount: Decimal;\n referee_discount: Decimal;\n referrer_rebate: Decimal;\n affiliate_referrer_rebate: Decimal;\n },\n never\n >;\n dynamicDepthConfig: TradingApiEndpoint<\n {\n markets: {\n marketId: number;\n baseDepth: number;\n thresholds: number[];\n ratios: number[];\n }[];\n },\n never\n >;\n 'wallet/:address/configuration': TradingApiEndpoint<\n {\n tier_id: Decimal;\n og_status: boolean;\n vltz_status: boolean;\n affiliate_status: boolean;\n referee_status: boolean;\n spread_discount_status: boolean;\n main_account_id: Decimal;\n },\n {\n address: string;\n }\n >;\n 'wallet/:address/stats': TradingApiEndpoint<\n WalletStats,\n {\n address: string;\n }\n >;\n 'wallet/:address/apiWalletStatus': TradingApiEndpoint<\n {\n enabledApiWallets: string[];\n },\n {\n address: string;\n }\n >;\n rlp: TradingApiEndpoint<\n {\n tvlInUsdc: number;\n tvlInRlp: number;\n rlpUsdcPrice: number;\n apy: {\n '1d': number;\n '7d': number;\n '30d': number;\n '365d': number;\n };\n numberOfDepositors: number;\n ageSeconds: number;\n },\n never\n >;\n 'wallet/:address/rlp': TradingApiEndpoint<\n {\n balanceInUsdc: number;\n balanceInRlp: number;\n },\n {\n address: string;\n }\n >;\n 'collaterals/definitions': TradingApiEndpoint<\n {\n collaterals: CollateralDefinition[];\n },\n never\n >;\n};\n\nexport type Req<P = ParamsDictionary, ReqQuery = Query> = {\n params: P;\n query: ReqQuery;\n};\n\nexport type TradingApi = {\n [K in keyof TradingApiSource as K]: {\n params: TradingApiSource[K]['params'];\n query: TradingApiSource[K]['query'];\n response: Stringified<TradingApiSource[K]['response']>;\n replication: Stringified<TradingApiSource[K]['replication']>;\n };\n};\n\ntype ReplicationModel = string | never;\n\nexport type GenericReplicationMessage<T, model extends ReplicationModel> =\n | {\n model: model;\n result: T;\n operation: 'create' | 'update' | 'upsert' | 'delete';\n }\n | {\n model: model;\n result: T[];\n operation: 'updateMany';\n }\n | {\n model: model;\n result: T[];\n operation: 'createMany';\n };\n\ntype account_collateral_balance_entries = {\n id: string;\n account_id: Decimal | null;\n collateral: string | null;\n amount: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n};\n\ntype account_owner_updated_snapshot = {\n account_id: Decimal;\n transaction_hash: string;\n new_owner: string | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n event_sequence_number: bigint | null;\n};\n\ntype positions_migration = {\n market_id: Decimal;\n account_id: Decimal;\n base: Decimal | null;\n realized_pnl: Decimal | null;\n last_price: Decimal | null;\n last_price_timestamp: Decimal | null;\n funding_value: Decimal | null;\n base_multiplier: Decimal | null;\n adl_unwind_price: Decimal | null;\n average_entry_funding_value: Decimal | null;\n session: Decimal | null;\n exchange_id: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n event_sequence_number: bigint | null;\n referrer_account_id: Decimal | null;\n referrer_fee_credit: Decimal | null;\n};\n\ntype execution_bust = {\n event_sequence_number: bigint;\n market_id: Decimal;\n market_type: string;\n account_id: Decimal;\n counterparty_account_id: Decimal;\n account_order_id: bigint;\n counterparty_order_id: bigint;\n exchange_id: Decimal;\n failed_base: Decimal;\n price: Decimal;\n is_long: boolean;\n reason: string;\n block_timestamp: Decimal;\n block_number: Decimal;\n transaction_hash: string;\n created_at: string;\n};\n\ntype ReplicationMessage =\n // Extract the union of all `replication` values from TradingApiSource\n | Exclude<TradingApiSource[keyof TradingApiSource]['replication'], never>\n // add messages that do not exists in TradingApiSource\n | GenericReplicationMessage<\n account_owner_updated_snapshot,\n 'account_owner_updated_snapshot'\n >\n | GenericReplicationMessage<\n account_collateral_balance_entries,\n 'account_collateral_balance_entries'\n >\n | GenericReplicationMessage<account_real_balance, 'account_real_balances'>\n | GenericReplicationMessage<\n ConditionalOrderSensitive,\n 'ConditionalOrdersSensitive'\n >\n | GenericReplicationMessage<\n // Todo: remove after migration\n positions_migration,\n 'positions_migration'\n >\n | GenericReplicationMessage<spot_execution, 'spot_executions'>\n | GenericReplicationMessage<Order, 'orders'>\n | GenericReplicationMessage<execution_bust, 'execution_busts'>;\n\nexport type SocketDepositChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaPeriphery: Address;\n vaultAddress: Address;\n connectorAddress: Address;\n msgGasLimit: string;\n bridgeTime: number;\n};\n\nexport type SocketWithdrawChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaCore: Address;\n msgGasLimit: string;\n bridgeFee: string;\n bridgeTime: number;\n};\n\nexport type LayerzeroDepositChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaPeriphery: Address;\n dstEid: number;\n extraOptions: string;\n bridgeTime: number;\n};\n\nexport type LayerzeroWithdrawChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaCore: Address;\n dstEid: number;\n bridgeFee: string;\n bridgeTime: number;\n};\n\nexport type SocketDepositInfo =\n | { enabled: false }\n | { enabled: true; chains: SocketDepositChainDetails[]; minAmount: number };\n\nexport type SocketWithdrawInfo =\n | { enabled: false }\n | { enabled: true; chains: SocketWithdrawChainDetails[]; minAmount: number };\n\nexport type LayerzeroDepositInfo =\n | { enabled: false }\n | {\n enabled: true;\n minAmount: number;\n chains: LayerzeroDepositChainDetails[];\n };\n\nexport type LayerzeroWithdrawInfo =\n | { enabled: false }\n | {\n enabled: true;\n minAmount: number;\n chains: LayerzeroWithdrawChainDetails[];\n };\n\nexport type TransferInfo = { enabled: boolean };\n\nexport type SpotInfo =\n | { enabled: false }\n | { enabled: true; spotMarketSymbol: string };\n\nexport type DisplayInfo = {\n advertisedInSpot: boolean;\n advertisedInPerp: boolean;\n displayName: string;\n displayDecimals: number;\n};\n\nexport type CollateralDefinition = {\n id: Uppercase<string>;\n address: Address;\n assetPairId: string;\n priceHaircut: string;\n liquidationDiscount: string;\n decimals: number;\n socketDepositInfo: SocketDepositInfo;\n socketWithdrawInfo: SocketWithdrawInfo;\n layerzeroDepositInfo: LayerzeroDepositInfo;\n layerzeroWithdrawInfo: LayerzeroWithdrawInfo;\n transferInfo: TransferInfo;\n spotInfo: SpotInfo;\n displayInfo: DisplayInfo;\n};\n\nexport type Replication = {\n [K in ReplicationMessage as `replication:${K['model']}`]: Extract<\n ReplicationMessage,\n { model: K['model'] }\n >;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"trading-api-types.js","sourceRoot":"/","sources":["trading-api-types.ts"],"names":[],"mappings":";;;AAYa,QAAA,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["import { ParamsDictionary, Query } from 'express-serve-static-core';\nimport { Address, AssetPair, CollateralPrice, MarketPrice } from './types';\nimport {\n AddressParam,\n ApiEndpoint,\n ApiInfiniteListEndpoint,\n ApiListEndpoint,\n Decimal,\n PaginatedQueryParams,\n Stringified,\n} from './api-types';\n\nexport const AccountStatusValues = {\n OPEN: 'OPEN',\n CLOSED: 'CLOSED',\n};\n\nexport type AccountStatus =\n (typeof AccountStatusValues)[keyof typeof AccountStatusValues];\n\ntype CandleResolution = '1' | '5' | '15' | '30' | '60' | '240' | '1D';\n\ntype Candle = {\n time: number;\n open: number;\n high: number;\n low: number;\n close: number;\n assetPairId: AssetPair;\n resolution: CandleResolution;\n};\n\n// Used only for PerpExecutionReplicationData (replication:orders messages)\ntype Order = {\n id: string;\n market_id: Decimal | null;\n account_id: Decimal | null;\n executed_base: Decimal | null;\n fee: Decimal | null;\n price: Decimal | null;\n is_match_order: boolean | null;\n liquidation_type: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n event_sequence_number: bigint | null;\n exchange_id: Decimal | null;\n created_at: Date;\n counterparty_account_id: Decimal | null;\n counterparty_adl_unwind_price: Decimal | null;\n counterparty_average_entry_funding_value: Decimal | null;\n counterparty_base: Decimal | null;\n counterparty_base_multiplier: Decimal | null;\n counterparty_funding_value: Decimal | null;\n counterparty_last_price: Decimal | null;\n counterparty_last_price_timestamp: Decimal | null;\n counterparty_previous_average_entry_funding_value: Decimal | null;\n counterparty_previous_base_multiplier: Decimal | null;\n counterparty_previous_funding_value: Decimal | null;\n counterparty_previous_last_price: Decimal | null;\n counterparty_previous_realized_pnl: Decimal | null;\n counterparty_realized_pnl: Decimal | null;\n counterparty_session: Decimal | null;\n position_adl_unwind_price: Decimal | null;\n position_average_entry_funding_value: Decimal | null;\n position_base: Decimal | null;\n position_base_multiplier: Decimal | null;\n position_funding_value: Decimal | null;\n position_last_price: Decimal | null;\n position_last_price_timestamp: Decimal | null;\n position_previous_adl_unwind_price: Decimal | null;\n position_previous_average_entry_funding_value: Decimal | null;\n position_previous_base_multiplier: Decimal | null;\n position_previous_funding_value: Decimal | null;\n position_previous_last_price: Decimal | null;\n position_previous_realized_pnl: Decimal | null;\n position_realized_pnl: Decimal | null;\n position_session: Decimal | null;\n referrer_account_id: Decimal | null;\n referrer_fee_credit: Decimal | null;\n // V3 fields\n protocol_fee_credit: Decimal | null;\n exchange_fee_credit: Decimal | null;\n maker_fee_credit: Decimal | null;\n maker_fee_debit: Decimal | null;\n account_order_id: bigint | null;\n counterparty_order_id: bigint | null;\n me_nonce: Decimal | null;\n};\n\ntype Position = {\n market_id: Decimal;\n account_id: Decimal;\n base: Decimal | null;\n realized_pnl: Decimal | null;\n last_price: Decimal | null;\n last_price_timestamp: Decimal | null;\n funding_value: Decimal | null;\n base_multiplier: Decimal | null;\n adl_unwind_price: Decimal | null;\n average_entry_funding_value: Decimal | null;\n session: Decimal | null;\n exchange_id: Decimal | null;\n event_sequence_number: bigint | null;\n referrer_account_id: Decimal | null;\n referrer_fee_credit: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n adjusted_base: Decimal | null;\n adl_realized_pnl: Decimal | null;\n};\n\n// PRO-126 Bug 7: `ConditionalOrder` + `ConditionalOrderSensitive`\n// trading-api-types retired with the rest of the legacy\n// `ConditionalOrders` DB pipeline. They modeled the legacy row shape\n// for the dead V1 `/wallet/:address/openOrders` endpoint + the dead\n// `replication:ConditionalOrdersSensitive` broadcast channel; both\n// callers have been removed.\n\ntype Account = {\n account_id: Decimal;\n name: string;\n status: AccountStatus;\n updated_timestamp_ms: Decimal;\n source: string | null;\n};\n\ntype AccountBalance = {\n account_id: Decimal | null;\n collateral: string | null;\n balance?: Decimal | null;\n delta?: Decimal | null;\n};\n\ntype spot_execution = {\n account_id: Decimal;\n counterparty_account_id: Decimal;\n exchange_id: Decimal;\n executed_base: Decimal;\n price: Decimal;\n account_order_id: bigint;\n counterparty_order_id: bigint;\n me_nonce: Decimal | null;\n spot_market_id: Decimal;\n is_auto_exchange: boolean;\n is_long: boolean;\n event_sequence_number: bigint;\n parent_event_sequence_number: bigint | null;\n block_timestamp: Decimal;\n block_number: Decimal;\n transaction_hash: string;\n created_at: string;\n};\n\ntype account_real_balance = {\n account_id: Decimal;\n collateral: string;\n balance: Decimal;\n rpnl: Decimal;\n event_sequence_number: bigint | null;\n transfer_event_sequence_number: bigint | null;\n parent_event_sequence_number: bigint | null;\n block_timestamp: Decimal;\n block_number: Decimal;\n transaction_hash: string;\n};\n\n// `Leverage` is still referenced by the `wallet/:address/leverages`\n// endpoint below, so it is kept; `AutoExchange` (a dead legacy type with\n// no remaining references) was removed in #2713/#2710.\ntype Leverage = {\n accountId: Decimal;\n marketId: Decimal;\n leverage: number;\n createdAt: Date;\n updatedAt: Date;\n};\n\ntype WalletStats = {\n volume_14d: Decimal;\n};\n\ntype MarketData = {\n marketId: string;\n updatedAt: number;\n longOI: number;\n shortOI: number;\n longSkewPercentage: number;\n shortSkewPercentage: number;\n openInterest?: number;\n fundingRate?: number;\n fundingRateVelocity?: number;\n longFundingValue?: number;\n shortFundingValue?: number;\n last24hVolume: number;\n priceChange24H?: number;\n priceChange24HPercentage?: number;\n maxAmountBaseLong?: number;\n maxAmountSizeLong?: number;\n maxAmountBaseShort?: number;\n maxAmountSizeShort?: number;\n oraclePrice?: number;\n poolPrice?: number;\n pricesUpdatedAt?: number;\n longBaseMultiplier?: number;\n shortBaseMultiplier?: number;\n longAdlUnwindPrice?: number;\n shortAdlUnwindPrice?: number;\n depthFactor?: number;\n priceSpread?: number;\n logPriceMultiplier?: number;\n};\n\ntype SpotMarketData = {\n spotMarketId: string;\n symbol: string;\n updatedAt: number;\n volume24h: number;\n pxChange24h?: number;\n oraclePrice?: number;\n};\n\ntype MarketTrackers = {\n market_data_id: Decimal;\n passive_pool_id: Decimal | null;\n pool_account_id: Decimal | null;\n quote_token: string | null;\n quote_token_decimals: Decimal | null;\n last_funding_velocity: Decimal | null;\n last_funding_timestamp: Decimal | null;\n last_mtm_price: Decimal | null;\n last_mtm_timestamp: Decimal | null;\n long_trackers_funding_value: Decimal | null;\n last_funding_rate: Decimal | null;\n long_trackers_base_multiplier: Decimal | null;\n long_trackers_adl_unwind_price: Decimal | null;\n short_trackers_funding_value: Decimal | null;\n short_trackers_base_multiplier: Decimal | null;\n short_trackers_adl_unwind_price: Decimal | null;\n open_interest: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n price_spread: Decimal | null;\n depth_factor: Decimal | null;\n log_price_multiplier: Decimal | null;\n mark_price: Decimal | null;\n mark_price_timestamp: Decimal | null;\n funding_rate: Decimal | null;\n funding_rate_timestamp: Decimal | null;\n};\n\nexport type TradingApiReplication<\n ReplicationTable extends ReplicationModel = never,\n Replication = never,\n> = {\n replication: ReplicationTable extends never\n ? never\n : GenericReplicationMessage<Replication, ReplicationTable>;\n};\n\nexport type TradingApiEndpoint<\n Response,\n Params,\n ReplicationTable extends ReplicationModel = never,\n Replication = Response,\n Query = never,\n> = ApiEndpoint<Response, Params, Query> &\n TradingApiReplication<ReplicationTable, Replication>;\n\nexport type TradingApiListEndpoint<\n Response,\n Params = never,\n ReplicationTable extends ReplicationModel = never,\n Replication = Response,\n Query = never,\n> = ApiListEndpoint<Response, Params, Query> &\n TradingApiReplication<ReplicationTable, Replication>;\n\nexport type TradingApiInfiniteListEndpoint<\n Response,\n Params = never,\n ReplicationTable extends ReplicationModel = never,\n Replication = Response,\n Query = PaginatedQueryParams,\n> = ApiInfiniteListEndpoint<Response, Params, Query> &\n TradingApiReplication<ReplicationTable, Replication>;\n\nexport type TradingApiSource = {\n 'poolBalance/:poolId': TradingApiEndpoint<\n {\n id: number;\n timestamp: bigint;\n pool_id: number;\n value: Decimal;\n apy: Decimal;\n share_price: Decimal;\n share_price_index: Decimal;\n } | null,\n {\n poolId?: string;\n }\n >;\n 'wallet/:address/leverages': TradingApiListEndpoint<\n Leverage,\n { address: string },\n 'accountLeveragePerMarket'\n >;\n 'markets/data': TradingApiListEndpoint<MarketData, never, 'marketData'>;\n 'spotMarkets/data': TradingApiListEndpoint<\n SpotMarketData,\n never,\n 'spotMarketData'\n >;\n 'markets/configuration': TradingApiListEndpoint<{\n market_id: Decimal;\n risk_matrix_index: Decimal | null;\n max_open_base: Decimal | null;\n velocity_multiplier: Decimal | null;\n minimum_order_base: Decimal | null;\n base_spacing: Decimal | null;\n price_spacing: Decimal | null;\n oracle_node_id: string | null;\n mtm_window: Decimal | null;\n dutch_config_lambda: Decimal | null;\n dutch_config_min_base: Decimal | null;\n slippage_params_phi: Decimal | null;\n slippage_params_beta: Decimal | null;\n depth_factor: Decimal | null;\n max_exposure_factor: Decimal | null;\n max_p_slippage: Decimal | null;\n price_spread: Decimal | null;\n volatility_index_multiplier: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n }>;\n 'markets/storage': TradingApiListEndpoint<{\n market_id: Decimal;\n quote_collateral: string | null;\n instrument_address: string | null;\n name: string | null;\n risk_block_id: Decimal | null;\n collateral_pool_id: Decimal | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n }>;\n 'markets/trackers': TradingApiListEndpoint<\n MarketTrackers,\n never,\n 'marketTrackers'\n >;\n 'market/:marketId/trackers': TradingApiEndpoint<\n MarketTrackers,\n {\n marketId: string;\n },\n 'marketTrackers'\n >;\n 'market/:marketId/data': TradingApiEndpoint<\n MarketData,\n {\n marketId: string;\n },\n 'marketData'\n >;\n 'wallet/:address/positions': TradingApiListEndpoint<\n Position,\n AddressParam,\n 'position',\n Omit<Position, 'adjusted_base' | 'adl_realized_pnl'>\n >;\n // PRO-126 Bug 7: V1 `/wallet/:address/openOrders` endpoint type\n // retired. The route+controller were removed in trading.router.ts +\n // trading.controller.ts. V2 callers should use\n // `/v2/wallet/:address/openOrders` which serves both spot and perp\n // orders from the unified ME stream via OrdersProvider.\n assets: TradingApiListEndpoint<{\n address: string;\n name: string;\n short: string;\n createdAt: Date;\n updatedAt: Date;\n asset_price_contract_id: string | null;\n asset_price_usdc_contract_id: string | null;\n decimals: number;\n }>;\n prices: TradingApiEndpoint<\n Partial<Record<AssetPair, MarketPrice | CollateralPrice>>,\n never\n >;\n 'prices/:assetPairId': TradingApiEndpoint<\n MarketPrice | CollateralPrice | undefined,\n {\n assetPairId: string;\n },\n 'price'\n >;\n 'wallet/:address/accounts': TradingApiListEndpoint<\n Account,\n AddressParam,\n 'AccountProfile'\n >;\n 'wallet/:address/accounts/balances': TradingApiListEndpoint<\n AccountBalance,\n AddressParam,\n 'account_balances'\n >;\n 'wallet/:address/balanceHistory/:timestamp': TradingApiListEndpoint<\n {\n timestamp: number;\n balance: number;\n },\n {\n address: string;\n timestamp: string;\n }\n >;\n riskMatrices: TradingApiListEndpoint<\n {\n blockId: Decimal;\n matrix: string[][];\n },\n {\n poolId: string;\n }\n >;\n 'candle/:assetPairId/:resolution': TradingApiEndpoint<\n Candle | null,\n {\n resolution: CandleResolution;\n assetPairId: AssetPair;\n },\n 'storkPriceCandle',\n Candle\n >;\n 'candles/:assetPairId/:resolution': TradingApiEndpoint<\n {\n t: number[];\n o: number[];\n h: number[];\n l: number[];\n c: number[];\n },\n {\n resolution: CandleResolution;\n assetPairId: AssetPair;\n },\n never,\n never,\n {\n to: string;\n from: string;\n countBack?: string;\n }\n >;\n feeTierParameters: TradingApiListEndpoint<{\n tier_id: Decimal;\n taker_fee: Decimal;\n maker_fee: Decimal;\n volume: Decimal;\n }>;\n globalFeeParameters: TradingApiEndpoint<\n {\n og_discount: Decimal;\n vltz_discount: Decimal;\n referee_discount: Decimal;\n referrer_rebate: Decimal;\n affiliate_referrer_rebate: Decimal;\n },\n never\n >;\n dynamicDepthConfig: TradingApiEndpoint<\n {\n markets: {\n marketId: number;\n baseDepth: number;\n thresholds: number[];\n ratios: number[];\n }[];\n },\n never\n >;\n 'wallet/:address/configuration': TradingApiEndpoint<\n {\n tier_id: Decimal;\n og_status: boolean;\n vltz_status: boolean;\n affiliate_status: boolean;\n referee_status: boolean;\n spread_discount_status: boolean;\n main_account_id: Decimal;\n },\n {\n address: string;\n }\n >;\n 'wallet/:address/stats': TradingApiEndpoint<\n WalletStats,\n {\n address: string;\n }\n >;\n 'wallet/:address/apiWalletStatus': TradingApiEndpoint<\n {\n enabledApiWallets: string[];\n },\n {\n address: string;\n }\n >;\n rlp: TradingApiEndpoint<\n {\n tvlInUsdc: number;\n tvlInRlp: number;\n rlpUsdcPrice: number;\n apy: {\n '1d': number;\n '7d': number;\n '30d': number;\n '365d': number;\n };\n numberOfDepositors: number;\n ageSeconds: number;\n },\n never\n >;\n 'wallet/:address/rlp': TradingApiEndpoint<\n {\n balanceInUsdc: number;\n balanceInRlp: number;\n },\n {\n address: string;\n }\n >;\n 'collaterals/definitions': TradingApiEndpoint<\n {\n collaterals: CollateralDefinition[];\n },\n never\n >;\n};\n\nexport type Req<P = ParamsDictionary, ReqQuery = Query> = {\n params: P;\n query: ReqQuery;\n};\n\nexport type TradingApi = {\n [K in keyof TradingApiSource as K]: {\n params: TradingApiSource[K]['params'];\n query: TradingApiSource[K]['query'];\n response: Stringified<TradingApiSource[K]['response']>;\n replication: Stringified<TradingApiSource[K]['replication']>;\n };\n};\n\ntype ReplicationModel = string | never;\n\nexport type GenericReplicationMessage<T, model extends ReplicationModel> =\n | {\n model: model;\n result: T;\n operation: 'create' | 'update' | 'upsert' | 'delete';\n }\n | {\n model: model;\n result: T[];\n operation: 'updateMany';\n }\n | {\n model: model;\n result: T[];\n operation: 'createMany';\n };\n\ntype account_collateral_balance_entries = {\n id: string;\n account_id: Decimal | null;\n collateral: string | null;\n amount: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n};\n\ntype account_owner_updated_snapshot = {\n account_id: Decimal;\n transaction_hash: string;\n new_owner: string | null;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n event_sequence_number: bigint | null;\n};\n\ntype positions_migration = {\n market_id: Decimal;\n account_id: Decimal;\n base: Decimal | null;\n realized_pnl: Decimal | null;\n last_price: Decimal | null;\n last_price_timestamp: Decimal | null;\n funding_value: Decimal | null;\n base_multiplier: Decimal | null;\n adl_unwind_price: Decimal | null;\n average_entry_funding_value: Decimal | null;\n session: Decimal | null;\n exchange_id: Decimal | null;\n transaction_hash: string;\n block_timestamp: Decimal | null;\n block_number: Decimal;\n unique_id: bigint | null;\n event_sequence_number: bigint | null;\n referrer_account_id: Decimal | null;\n referrer_fee_credit: Decimal | null;\n};\n\ntype execution_bust = {\n event_sequence_number: bigint;\n market_id: Decimal;\n market_type: string;\n account_id: Decimal;\n counterparty_account_id: Decimal;\n account_order_id: bigint;\n counterparty_order_id: bigint;\n me_nonce: Decimal | null;\n exchange_id: Decimal;\n failed_base: Decimal;\n price: Decimal;\n is_long: boolean;\n reason: string;\n block_timestamp: Decimal;\n block_number: Decimal;\n transaction_hash: string;\n created_at: string;\n};\n\ntype ReplicationMessage =\n // Extract the union of all `replication` values from TradingApiSource\n | Exclude<TradingApiSource[keyof TradingApiSource]['replication'], never>\n // add messages that do not exists in TradingApiSource\n | GenericReplicationMessage<\n account_owner_updated_snapshot,\n 'account_owner_updated_snapshot'\n >\n | GenericReplicationMessage<\n account_collateral_balance_entries,\n 'account_collateral_balance_entries'\n >\n | GenericReplicationMessage<account_real_balance, 'account_real_balances'>\n // PRO-126 Bug 7: `ConditionalOrdersSensitive` replication channel\n // retired with the rest of the `ConditionalOrders` DB pipeline.\n // Order data flows through the ME's `{orders}:changes` stream.\n | GenericReplicationMessage<\n // Todo: remove after migration\n positions_migration,\n 'positions_migration'\n >\n | GenericReplicationMessage<spot_execution, 'spot_executions'>\n | GenericReplicationMessage<Order, 'orders'>\n | GenericReplicationMessage<execution_bust, 'execution_busts'>;\n\nexport type SocketDepositChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaPeriphery: Address;\n vaultAddress: Address;\n connectorAddress: Address;\n msgGasLimit: string;\n bridgeTime: number;\n};\n\nexport type SocketWithdrawChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaCore: Address;\n msgGasLimit: string;\n bridgeFee: string;\n bridgeTime: number;\n};\n\nexport type LayerzeroDepositChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaPeriphery: Address;\n dstEid: number;\n extraOptions: string;\n bridgeTime: number;\n};\n\nexport type LayerzeroWithdrawChainDetails = {\n chainId: number;\n chainName: string;\n collateralAddress: Address;\n collateralName: string;\n collateralAddressInReyaCore: Address;\n dstEid: number;\n bridgeFee: string;\n bridgeTime: number;\n};\n\nexport type SocketDepositInfo =\n | { enabled: false }\n | { enabled: true; chains: SocketDepositChainDetails[]; minAmount: number };\n\nexport type SocketWithdrawInfo =\n | { enabled: false }\n | { enabled: true; chains: SocketWithdrawChainDetails[]; minAmount: number };\n\nexport type LayerzeroDepositInfo =\n | { enabled: false }\n | {\n enabled: true;\n minAmount: number;\n chains: LayerzeroDepositChainDetails[];\n };\n\nexport type LayerzeroWithdrawInfo =\n | { enabled: false }\n | {\n enabled: true;\n minAmount: number;\n chains: LayerzeroWithdrawChainDetails[];\n };\n\nexport type TransferInfo = { enabled: boolean };\n\nexport type SpotInfo =\n | { enabled: false }\n | { enabled: true; spotMarketSymbol: string };\n\nexport type DisplayInfo = {\n advertisedInSpot: boolean;\n advertisedInPerp: boolean;\n displayName: string;\n displayDecimals: number;\n};\n\nexport type CollateralDefinition = {\n id: Uppercase<string>;\n address: Address;\n assetPairId: string;\n priceHaircut: string;\n liquidationDiscount: string;\n decimals: number;\n socketDepositInfo: SocketDepositInfo;\n socketWithdrawInfo: SocketWithdrawInfo;\n layerzeroDepositInfo: LayerzeroDepositInfo;\n layerzeroWithdrawInfo: LayerzeroWithdrawInfo;\n transferInfo: TransferInfo;\n spotInfo: SpotInfo;\n displayInfo: DisplayInfo;\n};\n\nexport type Replication = {\n [K in ReplicationMessage as `replication:${K['model']}`]: Extract<\n ReplicationMessage,\n { model: K['model'] }\n >;\n};\n"]}
|
|
@@ -1777,39 +1777,6 @@
|
|
|
1777
1777
|
}
|
|
1778
1778
|
]
|
|
1779
1779
|
},
|
|
1780
|
-
{
|
|
1781
|
-
"type": "error",
|
|
1782
|
-
"name": "InvalidMatchOrderFees",
|
|
1783
|
-
"inputs": [
|
|
1784
|
-
{
|
|
1785
|
-
"name": "matchOrderFees",
|
|
1786
|
-
"type": "tuple",
|
|
1787
|
-
"internalType": "struct MatchOrderFees",
|
|
1788
|
-
"components": [
|
|
1789
|
-
{
|
|
1790
|
-
"name": "protocolFeeCredit",
|
|
1791
|
-
"type": "uint256",
|
|
1792
|
-
"internalType": "uint256"
|
|
1793
|
-
},
|
|
1794
|
-
{
|
|
1795
|
-
"name": "exchangeFeeCredit",
|
|
1796
|
-
"type": "uint256",
|
|
1797
|
-
"internalType": "uint256"
|
|
1798
|
-
},
|
|
1799
|
-
{
|
|
1800
|
-
"name": "takerFeeDebit",
|
|
1801
|
-
"type": "uint256",
|
|
1802
|
-
"internalType": "uint256"
|
|
1803
|
-
},
|
|
1804
|
-
{
|
|
1805
|
-
"name": "makerPayments",
|
|
1806
|
-
"type": "int256[]",
|
|
1807
|
-
"internalType": "int256[]"
|
|
1808
|
-
}
|
|
1809
|
-
]
|
|
1810
|
-
}
|
|
1811
|
-
]
|
|
1812
|
-
},
|
|
1813
1780
|
{
|
|
1814
1781
|
"type": "error",
|
|
1815
1782
|
"name": "InvalidNewParentCollateral",
|
|
@@ -4206,6 +4173,243 @@
|
|
|
4206
4173
|
"type": "error",
|
|
4207
4174
|
"name": "ZeroQuantity",
|
|
4208
4175
|
"inputs": []
|
|
4176
|
+
},
|
|
4177
|
+
{
|
|
4178
|
+
"type": "error",
|
|
4179
|
+
"name": "FundingRateOutOfBounds",
|
|
4180
|
+
"inputs": [
|
|
4181
|
+
{
|
|
4182
|
+
"name": "marketId",
|
|
4183
|
+
"type": "uint128",
|
|
4184
|
+
"internalType": "uint128"
|
|
4185
|
+
},
|
|
4186
|
+
{
|
|
4187
|
+
"name": "rate",
|
|
4188
|
+
"type": "int256",
|
|
4189
|
+
"internalType": "int256"
|
|
4190
|
+
},
|
|
4191
|
+
{
|
|
4192
|
+
"name": "minRate",
|
|
4193
|
+
"type": "int256",
|
|
4194
|
+
"internalType": "int256"
|
|
4195
|
+
},
|
|
4196
|
+
{
|
|
4197
|
+
"name": "maxRate",
|
|
4198
|
+
"type": "int256",
|
|
4199
|
+
"internalType": "int256"
|
|
4200
|
+
}
|
|
4201
|
+
]
|
|
4202
|
+
},
|
|
4203
|
+
{
|
|
4204
|
+
"type": "error",
|
|
4205
|
+
"name": "FundingRatePayloadIsInTheFuture",
|
|
4206
|
+
"inputs": [
|
|
4207
|
+
{
|
|
4208
|
+
"name": "marketId",
|
|
4209
|
+
"type": "uint128",
|
|
4210
|
+
"internalType": "uint128"
|
|
4211
|
+
},
|
|
4212
|
+
{
|
|
4213
|
+
"name": "payloadTimestamp",
|
|
4214
|
+
"type": "uint256",
|
|
4215
|
+
"internalType": "uint256"
|
|
4216
|
+
},
|
|
4217
|
+
{
|
|
4218
|
+
"name": "blockTimestamp",
|
|
4219
|
+
"type": "uint256",
|
|
4220
|
+
"internalType": "uint256"
|
|
4221
|
+
}
|
|
4222
|
+
]
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
"type": "error",
|
|
4226
|
+
"name": "FundingRatePayloadOlderThanLatest",
|
|
4227
|
+
"inputs": [
|
|
4228
|
+
{
|
|
4229
|
+
"name": "marketId",
|
|
4230
|
+
"type": "uint128",
|
|
4231
|
+
"internalType": "uint128"
|
|
4232
|
+
},
|
|
4233
|
+
{
|
|
4234
|
+
"name": "payloadTimestamp",
|
|
4235
|
+
"type": "uint256",
|
|
4236
|
+
"internalType": "uint256"
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
"name": "latestTimestamp",
|
|
4240
|
+
"type": "uint256",
|
|
4241
|
+
"internalType": "uint256"
|
|
4242
|
+
}
|
|
4243
|
+
]
|
|
4244
|
+
},
|
|
4245
|
+
{
|
|
4246
|
+
"type": "error",
|
|
4247
|
+
"name": "FundingRateStale",
|
|
4248
|
+
"inputs": [
|
|
4249
|
+
{
|
|
4250
|
+
"name": "marketId",
|
|
4251
|
+
"type": "uint128",
|
|
4252
|
+
"internalType": "uint128"
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
"name": "rateTimestamp",
|
|
4256
|
+
"type": "uint256",
|
|
4257
|
+
"internalType": "uint256"
|
|
4258
|
+
},
|
|
4259
|
+
{
|
|
4260
|
+
"name": "blockTimestamp",
|
|
4261
|
+
"type": "uint256",
|
|
4262
|
+
"internalType": "uint256"
|
|
4263
|
+
},
|
|
4264
|
+
{
|
|
4265
|
+
"name": "maxStaleDuration",
|
|
4266
|
+
"type": "uint256",
|
|
4267
|
+
"internalType": "uint256"
|
|
4268
|
+
}
|
|
4269
|
+
]
|
|
4270
|
+
},
|
|
4271
|
+
{
|
|
4272
|
+
"type": "error",
|
|
4273
|
+
"name": "MarkPricePayloadIsInTheFuture",
|
|
4274
|
+
"inputs": [
|
|
4275
|
+
{
|
|
4276
|
+
"name": "marketId",
|
|
4277
|
+
"type": "uint128",
|
|
4278
|
+
"internalType": "uint128"
|
|
4279
|
+
},
|
|
4280
|
+
{
|
|
4281
|
+
"name": "payloadTimestamp",
|
|
4282
|
+
"type": "uint256",
|
|
4283
|
+
"internalType": "uint256"
|
|
4284
|
+
},
|
|
4285
|
+
{
|
|
4286
|
+
"name": "blockTimestamp",
|
|
4287
|
+
"type": "uint256",
|
|
4288
|
+
"internalType": "uint256"
|
|
4289
|
+
}
|
|
4290
|
+
]
|
|
4291
|
+
},
|
|
4292
|
+
{
|
|
4293
|
+
"type": "error",
|
|
4294
|
+
"name": "MarkPricePayloadOlderThanLatest",
|
|
4295
|
+
"inputs": [
|
|
4296
|
+
{
|
|
4297
|
+
"name": "marketId",
|
|
4298
|
+
"type": "uint128",
|
|
4299
|
+
"internalType": "uint128"
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
"name": "payloadTimestamp",
|
|
4303
|
+
"type": "uint256",
|
|
4304
|
+
"internalType": "uint256"
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
"name": "latestTimestamp",
|
|
4308
|
+
"type": "uint256",
|
|
4309
|
+
"internalType": "uint256"
|
|
4310
|
+
}
|
|
4311
|
+
]
|
|
4312
|
+
},
|
|
4313
|
+
{
|
|
4314
|
+
"type": "error",
|
|
4315
|
+
"name": "MarkPriceStale",
|
|
4316
|
+
"inputs": [
|
|
4317
|
+
{
|
|
4318
|
+
"name": "marketId",
|
|
4319
|
+
"type": "uint128",
|
|
4320
|
+
"internalType": "uint128"
|
|
4321
|
+
},
|
|
4322
|
+
{
|
|
4323
|
+
"name": "priceTimestamp",
|
|
4324
|
+
"type": "uint256",
|
|
4325
|
+
"internalType": "uint256"
|
|
4326
|
+
},
|
|
4327
|
+
{
|
|
4328
|
+
"name": "blockTimestamp",
|
|
4329
|
+
"type": "uint256",
|
|
4330
|
+
"internalType": "uint256"
|
|
4331
|
+
},
|
|
4332
|
+
{
|
|
4333
|
+
"name": "maxStaleDuration",
|
|
4334
|
+
"type": "uint256",
|
|
4335
|
+
"internalType": "uint256"
|
|
4336
|
+
}
|
|
4337
|
+
]
|
|
4338
|
+
},
|
|
4339
|
+
{
|
|
4340
|
+
"type": "error",
|
|
4341
|
+
"name": "OraclePublisherSignerMismatch",
|
|
4342
|
+
"inputs": [
|
|
4343
|
+
{
|
|
4344
|
+
"name": "expected",
|
|
4345
|
+
"type": "address",
|
|
4346
|
+
"internalType": "address"
|
|
4347
|
+
},
|
|
4348
|
+
{
|
|
4349
|
+
"name": "recovered",
|
|
4350
|
+
"type": "address",
|
|
4351
|
+
"internalType": "address"
|
|
4352
|
+
}
|
|
4353
|
+
]
|
|
4354
|
+
},
|
|
4355
|
+
{
|
|
4356
|
+
"type": "error",
|
|
4357
|
+
"name": "PriceDeviationTooLarge",
|
|
4358
|
+
"inputs": [
|
|
4359
|
+
{
|
|
4360
|
+
"name": "marketId",
|
|
4361
|
+
"type": "uint128",
|
|
4362
|
+
"internalType": "uint128"
|
|
4363
|
+
},
|
|
4364
|
+
{
|
|
4365
|
+
"name": "price",
|
|
4366
|
+
"type": "uint256",
|
|
4367
|
+
"internalType": "UD60x18"
|
|
4368
|
+
},
|
|
4369
|
+
{
|
|
4370
|
+
"name": "referencePrice",
|
|
4371
|
+
"type": "uint256",
|
|
4372
|
+
"internalType": "UD60x18"
|
|
4373
|
+
},
|
|
4374
|
+
{
|
|
4375
|
+
"name": "maxDeviation",
|
|
4376
|
+
"type": "uint256",
|
|
4377
|
+
"internalType": "UD60x18"
|
|
4378
|
+
}
|
|
4379
|
+
]
|
|
4380
|
+
},
|
|
4381
|
+
{
|
|
4382
|
+
"type": "error",
|
|
4383
|
+
"name": "UnauthorizedOraclePublisher",
|
|
4384
|
+
"inputs": [
|
|
4385
|
+
{
|
|
4386
|
+
"name": "publisher",
|
|
4387
|
+
"type": "address",
|
|
4388
|
+
"internalType": "address"
|
|
4389
|
+
}
|
|
4390
|
+
]
|
|
4391
|
+
},
|
|
4392
|
+
{
|
|
4393
|
+
"type": "error",
|
|
4394
|
+
"name": "UnauthorizedOraclePusher",
|
|
4395
|
+
"inputs": [
|
|
4396
|
+
{
|
|
4397
|
+
"name": "pusher",
|
|
4398
|
+
"type": "address",
|
|
4399
|
+
"internalType": "address"
|
|
4400
|
+
}
|
|
4401
|
+
]
|
|
4402
|
+
},
|
|
4403
|
+
{
|
|
4404
|
+
"type": "error",
|
|
4405
|
+
"name": "UnsupportedOracleDataType",
|
|
4406
|
+
"inputs": [
|
|
4407
|
+
{
|
|
4408
|
+
"name": "dataType",
|
|
4409
|
+
"type": "uint8",
|
|
4410
|
+
"internalType": "uint8"
|
|
4411
|
+
}
|
|
4412
|
+
]
|
|
4209
4413
|
}
|
|
4210
4414
|
]
|
|
4211
4415
|
}
|
|
@@ -272,6 +272,11 @@
|
|
|
272
272
|
"type": "bool",
|
|
273
273
|
"internalType": "bool"
|
|
274
274
|
},
|
|
275
|
+
{
|
|
276
|
+
"internalType": "bool",
|
|
277
|
+
"name": "postOnly",
|
|
278
|
+
"type": "bool"
|
|
279
|
+
},
|
|
275
280
|
{
|
|
276
281
|
"name": "expiresAfter",
|
|
277
282
|
"type": "uint256",
|
|
@@ -345,6 +350,11 @@
|
|
|
345
350
|
"type": "bool",
|
|
346
351
|
"internalType": "bool"
|
|
347
352
|
},
|
|
353
|
+
{
|
|
354
|
+
"internalType": "bool",
|
|
355
|
+
"name": "postOnly",
|
|
356
|
+
"type": "bool"
|
|
357
|
+
},
|
|
348
358
|
{
|
|
349
359
|
"name": "expiresAfter",
|
|
350
360
|
"type": "uint256",
|
|
@@ -772,7 +782,7 @@
|
|
|
772
782
|
{
|
|
773
783
|
"name": "timeInForce",
|
|
774
784
|
"type": "uint8",
|
|
775
|
-
"internalType": "
|
|
785
|
+
"internalType": "enum TimeInForce"
|
|
776
786
|
},
|
|
777
787
|
{
|
|
778
788
|
"name": "clientOrderId",
|
|
@@ -784,6 +794,11 @@
|
|
|
784
794
|
"type": "bool",
|
|
785
795
|
"internalType": "bool"
|
|
786
796
|
},
|
|
797
|
+
{
|
|
798
|
+
"internalType": "bool",
|
|
799
|
+
"name": "postOnly",
|
|
800
|
+
"type": "bool"
|
|
801
|
+
},
|
|
787
802
|
{
|
|
788
803
|
"name": "expiresAfter",
|
|
789
804
|
"type": "uint256",
|
|
@@ -844,7 +859,7 @@
|
|
|
844
859
|
{
|
|
845
860
|
"name": "timeInForce",
|
|
846
861
|
"type": "uint8",
|
|
847
|
-
"internalType": "
|
|
862
|
+
"internalType": "enum TimeInForce"
|
|
848
863
|
},
|
|
849
864
|
{
|
|
850
865
|
"name": "clientOrderId",
|
|
@@ -856,6 +871,11 @@
|
|
|
856
871
|
"type": "bool",
|
|
857
872
|
"internalType": "bool"
|
|
858
873
|
},
|
|
874
|
+
{
|
|
875
|
+
"internalType": "bool",
|
|
876
|
+
"name": "postOnly",
|
|
877
|
+
"type": "bool"
|
|
878
|
+
},
|
|
859
879
|
{
|
|
860
880
|
"name": "expiresAfter",
|
|
861
881
|
"type": "uint256",
|
|
@@ -996,13 +1016,7 @@
|
|
|
996
1016
|
]
|
|
997
1017
|
}
|
|
998
1018
|
],
|
|
999
|
-
"outputs": [
|
|
1000
|
-
{
|
|
1001
|
-
"name": "outputs",
|
|
1002
|
-
"type": "bytes[]",
|
|
1003
|
-
"internalType": "bytes[]"
|
|
1004
|
-
}
|
|
1005
|
-
],
|
|
1019
|
+
"outputs": [],
|
|
1006
1020
|
"stateMutability": "nonpayable"
|
|
1007
1021
|
},
|
|
1008
1022
|
{
|
|
@@ -1077,6 +1091,11 @@
|
|
|
1077
1091
|
"type": "bool",
|
|
1078
1092
|
"internalType": "bool"
|
|
1079
1093
|
},
|
|
1094
|
+
{
|
|
1095
|
+
"internalType": "bool",
|
|
1096
|
+
"name": "postOnly",
|
|
1097
|
+
"type": "bool"
|
|
1098
|
+
},
|
|
1080
1099
|
{
|
|
1081
1100
|
"name": "expiresAfter",
|
|
1082
1101
|
"type": "uint256",
|
|
@@ -1150,6 +1169,11 @@
|
|
|
1150
1169
|
"type": "bool",
|
|
1151
1170
|
"internalType": "bool"
|
|
1152
1171
|
},
|
|
1172
|
+
{
|
|
1173
|
+
"internalType": "bool",
|
|
1174
|
+
"name": "postOnly",
|
|
1175
|
+
"type": "bool"
|
|
1176
|
+
},
|
|
1153
1177
|
{
|
|
1154
1178
|
"name": "expiresAfter",
|
|
1155
1179
|
"type": "uint256",
|
|
@@ -1291,6 +1315,11 @@
|
|
|
1291
1315
|
"type": "bool",
|
|
1292
1316
|
"internalType": "bool"
|
|
1293
1317
|
},
|
|
1318
|
+
{
|
|
1319
|
+
"internalType": "bool",
|
|
1320
|
+
"name": "postOnly",
|
|
1321
|
+
"type": "bool"
|
|
1322
|
+
},
|
|
1294
1323
|
{
|
|
1295
1324
|
"name": "expiresAfter",
|
|
1296
1325
|
"type": "uint256",
|
|
@@ -1363,6 +1392,11 @@
|
|
|
1363
1392
|
"type": "bool",
|
|
1364
1393
|
"internalType": "bool"
|
|
1365
1394
|
},
|
|
1395
|
+
{
|
|
1396
|
+
"internalType": "bool",
|
|
1397
|
+
"name": "postOnly",
|
|
1398
|
+
"type": "bool"
|
|
1399
|
+
},
|
|
1366
1400
|
{
|
|
1367
1401
|
"name": "expiresAfter",
|
|
1368
1402
|
"type": "uint256",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PUBLISHER_ACCOUNT = exports.RELAYER_ACCOUNT = exports.ORDERS_GATEWAY_DEADLINE_IN_SECONDS = exports.CORE_DEADLINE_IN_SECONDS = exports.BRIDGE_DEADLINE_IN_SECONDS = void 0;
|
|
4
4
|
exports.BRIDGE_DEADLINE_IN_SECONDS = 15 * 60; // 15 minutes
|
|
5
5
|
exports.CORE_DEADLINE_IN_SECONDS = 60; // 1 minute
|
|
6
6
|
exports.ORDERS_GATEWAY_DEADLINE_IN_SECONDS = 60; // 1 minute
|
|
7
7
|
exports.RELAYER_ACCOUNT = '0xb43c317c9c9215d268881d7d6b59c2d3d0247da1'; // @todo update value
|
|
8
8
|
exports.PUBLISHER_ACCOUNT = '0xE32519ca0e751C754c8E1378846B5cd95A1CB66a'; // @todo update value
|
|
9
|
-
exports.CONDITIONAL_ORDER_SIG_DEADLINE = Math.pow(10, 18); // very big number for timestamp
|
|
10
9
|
//# sourceMappingURL=consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"/","sources":["transactions/consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AACnD,QAAA,wBAAwB,GAAG,EAAE,CAAC,CAAC,WAAW;AAC1C,QAAA,kCAAkC,GAAG,EAAE,CAAC,CAAC,WAAW;AACpD,QAAA,eAAe,GAAG,4CAA4C,CAAC,CAAC,qBAAqB;AACrF,QAAA,iBAAiB,GAAG,4CAA4C,CAAC,CAAC,qBAAqB
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"/","sources":["transactions/consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AACnD,QAAA,wBAAwB,GAAG,EAAE,CAAC,CAAC,WAAW;AAC1C,QAAA,kCAAkC,GAAG,EAAE,CAAC,CAAC,WAAW;AACpD,QAAA,eAAe,GAAG,4CAA4C,CAAC,CAAC,qBAAqB;AACrF,QAAA,iBAAiB,GAAG,4CAA4C,CAAC,CAAC,qBAAqB","sourcesContent":["export const BRIDGE_DEADLINE_IN_SECONDS = 15 * 60; // 15 minutes\nexport const CORE_DEADLINE_IN_SECONDS = 60; // 1 minute\nexport const ORDERS_GATEWAY_DEADLINE_IN_SECONDS = 60; // 1 minute\nexport const RELAYER_ACCOUNT = '0xb43c317c9c9215d268881d7d6b59c2d3d0247da1'; // @todo update value\nexport const PUBLISHER_ACCOUNT = '0xE32519ca0e751C754c8E1378846B5cd95A1CB66a'; // @todo update value\n"]}
|