export { SomniaMarketsError, InvalidInputError, NotConfiguredError, SignerRequiredError, IndexerError, RpcError, ContractRevertError, } from "./errors.js"; export { type SomniaMarketsClient, type SomniaMarketsClientGetOpenPositionsWithPnLError, type SomniaMarketsClientGetClaimableError, type SomniaMarketsClientGetUserFillsPageError, } from "./somniaMarketsClient.js"; export { type WatchHandle, type WatchStatus } from "./liveTail.js"; export { SomniaMarkets, type SomniaMarketsConfig, type CreateOrderParams, type RedeemOptions, type SomniaMarketsRedeemError, } from "./unified/exchange.js"; export { TIMEFRAMES, type UnifiedBalance, type UnifiedBalances, type UnifiedFundingRate, type UnifiedMarket, type UnifiedMarketType, type UnifiedOHLCV, type UnifiedOrder, type UnifiedOrderBook, type UnifiedOrderStatus, type UnifiedPosition, type UnifiedPrice, type UnifiedStopOrder, type UnifiedStopOrderStatus, type UnifiedTicker, type UnifiedTrade, } from "./unified/structs.js"; export { type Tradable } from "./unified/symbols.js"; export { DEFAULT_FEES, SOMNIA_MAINNET_PRICE_FEED, SOMNIA_TESTNET_PRICE_FEED, type ClientConfig, type FixedFees, type SomniaMarketsAddresses, type PriceFeedConfig, } from "./config.js"; export { SOMNIA_MAINNET_ADDRESSES, SOMNIA_TESTNET_ADDRESSES } from "./addresses.js"; export { consoleDebugSink, debugCollector, type DebugCollector, type DebugEvent, type Span } from "./debug.js"; export { type PriceWatchHandle } from "./priceFeed/priceFeed.js"; export { PRICE_FEED_DECIMALS, PRICE_RESOLUTION_SECONDS, type LivePrice, type PricePoint, type PriceCandle, type PriceCandleResolution, type PriceFeedInfo, type PriceFeedStatus, } from "./priceFeed/types.js"; export { byNewestFirst, type MarketActivity, type MarketActivityBase, type MarketActivityKind, type MarketActivityOptions, type MarketTradeActivity, type MarketSupplyActivity, type MarketResolutionActivity, type MarketStatusActivity, type TransactionActivity, type TransactionActivityOptions, type BlockActivity, type BlockTimestampResolver, type BlockActivityOptions, type BlockMarketActivity, type BlockOrder, type BlockOrderTouch, type TransactionOrder, } from "./activity.js"; export { type FillDetail, type FillOrder, type FillRow, type FillsOptions, type FillsScope, type GetUserFillsPageOptions, type UserFillsPage, type MarketRef, type OrderFillRow, type TradeContext, } from "./fills.js"; export { CANDLE_INTERVALS, type Candle } from "./candles.js"; export { type PoolBindingRecord, type IndexedPool } from "./pools.js"; export { type RouterActionRecord, type RouterActionKind, type RouterActionsOptions } from "./router.js"; export { type IndexerSyncStatus } from "./syncStatus.js"; export { type CountResult } from "./indexerRead.js"; export { QUERY_KEY_SCOPE, marketsKey, portfolioKey, candlesKey, marketActivityKey, tradeContextKey, transactionActivityKey, blockActivityKey, marketFeesKey, operatorsKey, marketCreatorsKey, oracleAdaptersKey, syncStatusKey, maxVenueFeeBpsKey, marketOnchainKey, type ClientQueryKey, type QueryKeyElement, } from "./queryKeys.js"; export { isBinaryMarket, isSpotMarket, isPerpMarket, type Market, type BaseMarket, type SpotMarket, type PerpMarket, type BinaryMarket, type MarketType, type MarketFees, type LiveBinaryMarketsFilter, type BinaryMarketFilter, type BinaryMarketOrderBy, type PastBinaryMarketsOptions, type SpotMarketFilter, type PerpMarketFilter, type MarketStatusUpdate, } from "./markets.js"; export { type OpenOrder, type OrderMarket, type OrdersOptions, type OrderDetail, type OrderRow, type BookTop, type BinaryOrderBook, type BinaryBookParams, type ClosingPriceState, type SpotOrderBook, type SweepableOrder, type OnchainOrder, } from "./orders.js"; export { type BookLevel } from "./store.js"; export { erc6909Abi, binarySettlementAbi } from "./readsAbi.js"; export { spotPoolOperatorRegistryReadAbi } from "./readsAbi.js"; export { binaryModuleReadAbi, binaryModuleWriteAbi } from "./moduleAbi.js"; export { oracleHubAbi, oracleHubEventsAbi } from "./machineryAbi.js"; export { binaryPoolWriteAbi, spotPoolWriteAbi, perpPoolWriteAbi, erc20WriteAbi, erc20VaultWriteAbi, orderBookBatchWriteAbi, marginBankWriteAbi, spotStopRegistryWriteAbi, spotStopRegistryEventsAbi, operatorRegistryWriteAbi, } from "./tradeAbi.js"; export { ORDER_KIND, type UnsignedOrder } from "./writer.js"; export { orderBookEventsAbi } from "./eventsAbi.js"; export { perpPoolEventsAbi, marginBankEventsAbi, liquidationEngineEventsAbi } from "./eventsAbi.js"; export { contractErrorsAbi } from "./contractErrorsAbi.js"; export { decodeRevert, type RevertContext } from "./revert.js"; export { type MarketOnchainSources } from "./markets.js"; export { FUNDING_PRECISION, EIGHT_HOURS_SEC, ONE_HOUR_SEC, ONE_YEAR_SEC, normalizeFundingRate, fundingRate8h, fundingRate1h, fundingRatePerInterval, annualizedFundingRate, intervalsPerWindow, realizedFundingPerBase, isFundingStale, densifyFundingBuckets, buildFundingRateSeries, type FundingBucketLike, type FundingRateSeries, type FundingSeriesBucket, } from "./funding.js"; export { NetworkTape, type NetworkTapeOptions, type NetworkTapeStatus, type TapeFill, type TapeOrder, } from "./networkTape.js"; export { type SystemInfo, type MarketCreatorInfo, type TransactionSummary } from "./system.js"; export { quoteBinaryOrderOverBook, quoteBinaryStakeOverBook, quoteBinarySellOverBook, slippageForCrossing, DEFAULT_SLIPPAGE_BPS, DEFAULT_SLIPPAGE_MIN_TICKS, marketStats24hFromCandles, pnlEventsFor, computePositionPnL, claimableFrom, estPayoutFor, type BinaryOrderQuote, type BinaryStakeQuote, type BinarySellQuote, type BinaryBuySide, type BinarySellSide, type BinaryCrossingParams, type MarketStats24h, type BinaryPositionPnL, type BinaryOutcomePositionPnL, type PnLEvent, type ClaimablePosition, type ClaimableInput, type ComputePositionPnLError, type EstPayoutForError, type ClaimableFromError, midYesPrice, averageEntryPrice, outcomeMarkPrice, markOutcomePosition, positionMarkState, type EntryTrade, type OutcomePositionMark, type PositionMarkState, } from "./derivedReads.js"; export { type Trader, type TraderConfig, type TxResult, type OrderFill, type PlaceOrderResult, type PlaceStopOrderResult, type PlacePerpStopOrderResult, type PlaceOrderParams, type CancelOrderParams, type ReduceOrderParams, type CancelExpiredOrdersParams, type SweepExpiredAtLevelParams, type CaptureCloseParams, type ApproveBuilderParams, type WithdrawVaultParams, ORDER_TYPE, type PlaceSpotOrderParams, type TraderBuildPlaceSpotOrderError, type SpotOrderRequest, type PlaceSpotOrdersParams, type PlaceSpotOrdersResult, type BatchPlaceOutcome, type CancelOrdersParams, type CancelOrdersResult, type BatchCancelOutcome, type ReduceOrderRequest, type ReduceOrdersParams, type PlacePerpOrderParams, SELF_MATCHING_OPTION, type BatchOrderRequest, type AmendOrderParams, type AmendOrderResult, type AmendOrdersParams, type AmendOrdersResult, type DepositMarginParams, type WithdrawMarginParams, type SetPerpLeverageParams, type PlaceSpotStopOrderParams, type CancelStopOrderParams, type PerpStopIntent, type PerpStopOrderLeg, type PlacePerpStopOrderParams, type LinkPerpStopOrdersParams, type CancelPerpStopOrdersParams, type ClaimPerpStopSomiParams, type MintSetParams, type BurnSetParams, type RedeemParams, type RedeemAuthorization, type SignRedeemAuthParams, type RedeemForParams, type RedeemDirectParams, type RedeemManyParams, type SyncSettlementParams, type ClaimOwedParams, type FinalizeMarketParams, type ReleasePoolParams, type PokeOracleParams, type VoidExpiredParams, type DepositVaultParams, type DepositVaultNativeParams, type SetManualVaultModeParams, type SetOperatorApprovalForPoolParams, type SetOperatorApprovalGlobalParams, type SettlementRecord, type MintSetNativeParams, type MintSetPermit2Params, type RedeemNativeParams, type Permit2TransferFrom, type RouterMintBase, type FaucetParams, type ResolveParams, type VoidMarketParams, } from "./trade.js"; export { MARKET_TYPE_BINARY_V1, decodeBinaryVenueFeeParams, type BinaryVenueParams, type VenueVoidPolicy, } from "./operatorReads.js"; export { type OperatorAdmin, type OperatorAdminConfig, type VenueConfigInput, type RegisterOperatorParams, type RegisterOperatorResult, type UpdateOperatorParams, type SetOperatorEnabledParams, type TransferOperatorOwnershipParams, type AcceptOperatorOwnershipParams, type CreateVenueParams, type CreateVenueResult, type UpdateVenueParams, type SetVenueEnabledParams, } from "./operatorAdmin.js"; export { QUESTION_SOURCE_TYPE, ANSWER_TYPE, type OracleHubAdmin, type OracleHubAdminConfig, type QuestionDefinitionInput, type QuestionSourceInput, type QuestionIntervalInput, type ValidAnswersInput, type HubStatus, type HubQuestionState, type ScheduleQuestionParams, type ScheduleQuestionResult, type WithdrawParams, type WithdrawMyCreditParams, type FundHubParams, type SetHubGasParams, type SetHubDrainParams, type EnableHubReactivityParams, } from "./oracleHub.js"; export { type GovernanceAdmin, type SetAdapterApprovedParams } from "./governanceAdmin.js"; /** * Signer configuration for the BinaryMarketsModule governance capability. * * @category administration */ export { type GovernanceAdminConfig } from "./governanceAdmin.js"; export { type MarketCreatorAdmin, type OrderBookParams, type CreateMarketCreatorParams, type CreateMarketCreatorResult, type FundMarketCreatorParams, type RegisterSeriesParams, type TriggerRollParams, type RecoverSeriesParams, type ArmFirstRollParams, type ReclaimOracleCreditParams, type AdoptFromParams, type HandoffToParams, type SwapCreatorParams, type SetReactivityGasParamsParams, type MarketCreatorOnchain, type SeriesOnchain, } from "./marketCreatorAdmin.js"; /** * Signer configuration for the market-creator administration capability. * * @category administration */ export { type MarketCreatorAdminConfig } from "./marketCreatorAdmin.js"; export { MARKET_TYPE_PLUGINS, getMarketTypePlugin, listMarketTypePlugins, binaryMarketTypePlugin, type MarketTypePlugin, type MachineryStep, } from "./marketTypes/index.js"; export { preflightOperator, preflightVenue, preflightHub, preflightCreateQuote, preflightMarketCreator, preflightSeries, preflightRoll, preflightChain, isLocalPrecompileUnavailable, HUB_MIN_FREE_BALANCE_WEI, MIN_SERIES_INTERVAL_SEC, ZERO_ADDRESS, type PreflightResult, type OperatorPreflightInput, type VenuePreflightInput, type HubPreflightInput, type CreateQuotePreflightInput, type MarketCreatorPreflightInput, type SeriesPreflightInput, type RollPreflightInput, } from "./preflight.js"; export { DECIMALS, fillKind, ORDER_KIND_SIDE, sideOfKind, type BinaryFillKind, type BinaryMarketStatus, type OrderStatus, type BinarySide, type LiveFill, type LiveFundingUpdate, type LiveMarket, type LiveOrder, type TailMode, type TailStatus, } from "./store.js"; export { outcomeId, decodeOutcomeId, marketKey, type DecodedOutcomeId, type OutcomeIdx } from "./ids.js"; export { toHuman, toHumanString, fromHuman, priceToProbability, probabilityToPrice, computeBinaryPnl, binaryFillsFor, binaryFillsFromPortfolio, markYesPrice, balanceFloor, floorRawBalance, ceilRawAmount, upProbability, upPercent, type BinaryPnl, type BinaryOutcomePnl, type BinaryPnlFill, type YesBookTop, type ComputeBinaryPnlError, } from "./units.js"; export { estimateMarketOrder, fillsWithinSlippage, bookMidPrice, type MarketOrderEstimate, type QuoteDenomination, type UnifiedBookLevels, } from "./unified/quotes.js"; export { computePortfolioAnalytics, type ComputePortfolioAnalyticsError, DEFAULT_CEX_RATE_BPS, type PortfolioAnalytics, type PortfolioAnalyticsOptions, type PortfolioFlowEvent, type PortfolioFundingEvent, type PortfolioTimeframe, type PortfolioTradeEvent, type MarkSeries, type MarkSources, type EquityPoint, type HoldingsPoint, type PnlBucket, } from "./unified/portfolioAnalytics.js"; export { resolveIntervalSec, snapIntervalSec, snapToCadence, cadenceBandSec, formatIntervalLabel, marketIntervalLabel, CADENCE_LADDER_SEC, CADENCE_TOLERANCE_SEC, type IntervalSource, } from "./interval.js"; export { type LendAddresses, type LendReserve, type LendPosition, type LendAccount } from "./lend/types.js"; export { type Lender, type LenderConfig, type LendWriteOptions, type LendSupplyOptions, type LendWithdrawOptions, type LendRepayOptions, } from "./lend/lender.js"; export { lendRayRateToApy, rayMul, accrueLinear, accrueCompounded, RAY } from "./lend/math.js"; export { lendPoolAbi, lendUiPoolDataProviderAbi, lendGatewayAbi, lendDebtTokenAbi } from "./lend/lendAbi.js"; export { type SomniaLendClient, SOMNIA_MAINNET_LEND, SOMNIA_TESTNET_LEND } from "./lend/client.js"; export { type ProtocolFeeRecord, type BuilderFeeRecord, type SettlementFeeRecord, type BuilderApproval, type BuilderApprovalRef, } from "./fees.js"; export { type BalanceQuery, type Erc20Metadata } from "./balances.js"; export { type OutcomeBalances, type Portfolio, type PortfolioMarket, type PortfolioPosition, type PortfolioOrder, type PortfolioTrade, type PortfolioOptions, type OpenPositionPnL, type VaultPayoutFallback, type GetVaultBalanceParams, type GetOutcomeBalanceParams, } from "./binary/portfolio.js"; export { type SpotPortfolio, type SpotPortfolioMarket, type SpotPortfolioOrder, type SpotPortfolioTrade, } from "./spot/portfolio.js"; export { type SpotStopOrder, type StopOrderStatus } from "./spot/stops.js"; export { type GetManualVaultModeParams } from "./spot/vaultMode.js"; export { CANCEL_ORDER_FOR_SELECTOR, PLACE_ORDER_FOR_SELECTOR, type IsApprovedForPoolParams, type IsGloballyApprovedParams, } from "./spot/operatorGrants.js"; export { type AutoPullRequirement, type GetAutoPullRequirementParams, type IsOperatorAuthorizedParams, type LockedBalance, type LockedTokenBreakdown, type TokenLockBreakdown, } from "./spot/poolReads.js"; export { NATIVE_TOKEN_SENTINEL } from "./vault/funding.js"; export { type MarginAccount, type AccountHealth, type MarginStatus, type PerpRiskParams, type PerpHealthSnapshot, type PerpOrderMarginPreview, type PerpLeverage, type PerpLiquidationPreview, type PerpLiquidationPriceInputs, type PerpPositionAnalytics, type PerpPositionAnalyticsInputs, type PerpPositionMetrics, type PerpClosePreview, type PerpMaxOrderSize, type PerpMaxOrderSizeLimit, type PerpOrderMarginQuote, type PerpOrderMarginQuoteInputs, type PerpSideHolders, type PerpSideHoldersRef, type GetPerpSideHoldersOptions, type GetBankruptcyPriceOptions, type GetPerpMaxLeverageOptions, MARGIN_STATUS, perpLiquidationPrice, perpOrderMarginQuote, perpPositionAnalytics, } from "./perp/margin.js"; export { type PerpSystemConfig, type InsuranceFundState, type InsuranceFundTier, type LiquidationEngineConfig, type PerpInsuranceFundEvent, } from "./perp/system.js"; export { type PerpFundingPayer, type PerpMainFunding, type PerpWalletLinkage, type PerpWalletLinkEvent, type PerpMarginPull, type PerpMainFundingEvent, } from "./perp/linkedWallet.js"; export { type PerpStopOrder, type PerpStopOrderMarket, type PerpStopDropReason, type PerpStopOrderOnChain, PERP_STOP_DROP_REASON, type UnsignedPerpStopOrder, decodePerpStopOrderIds, } from "./perp/stops.js"; export { type UnsignedMarginDeposit } from "./perp/margin.js"; export { type UnsignedCall } from "./writer.js"; export { type PerpStateOnchain, type PerpFundingPremium, type PerpPosition, type PerpPositionRef, type IndexedPerpPosition, perpMarkForPnl, } from "./perp/state.js"; export { type PerpPoolStatus, PERP_POOL_FACTORY_MARKET_STATUS_INTERFACE_ID } from "./perp/registry.js"; export { type FundingPayment, type MarginEvent, type LiquidationEvent, type FundingRateUpdate, type FundingRateCandle, type OpenInterestSnapshot, type PerpFeeRecord, type PerpOrderRejection, type PerpOrderRejectionReason, PERP_ORDER_REJECTION_REASON, } from "./perp/history.js"; export { type PerpPortfolio, type PerpPortfolioMarket, type PerpPortfolioOrder, type PerpPortfolioTrade, type PerpOrderHistoryRow, type TerminalOrderStatus, } from "./perp/portfolio.js"; export { type OracleQuestionRecord, type OperatorHubAccountRecord, type OracleBindRecord, type OracleCallbackRecord, } from "./oracleHub.js"; export { type IndexedOperator, type IndexedVenue, type OperatorFilter } from "./operatorAdmin.js"; export { type IndexedSeries, type IndexedMarketCreator, type IndexedOracleAdapter, type IndexedMarketCreatorPolicy, type MarketCreatorFilter, } from "./marketCreatorAdmin.js"; export { binaryResolutionMode, boundaryPrice, type BinaryResolutionMode, type MarketOnchain, type OnchainResolutionPrice, type ContractMeta, } from "./markets.js"; export { type MarketResolutionEvent, type MarketReferenceLink, type OracleAnswer } from "./binary/settlement.js";