PredictionLabs

Types

TypeScript type definitions exported from the PredictionLabs SDK.

Side

enum Side {
  BUY = 0,
  SELL = 1,
}

Market

interface Market {
  questionId: Hex;
  conditionId: Hex;
  deadline: bigint;
  outcomeSlotCount: number;
  resolved: boolean;
  creator: Address;
  resolver: Address;
}

Order

interface Order {
  orderId: bigint;
  maker: Address;
  side: Side;
  cancelled: boolean;
  conditionId: Hex;
  outcomeIndex: bigint;
  price: bigint;
  amount: bigint;
  filled: bigint;
}

Position

interface Position {
  conditionId: Hex;
  outcomeIndex: number;
  positionId: bigint;
  balance: bigint;
}

FillEstimate

interface FillEstimate {
  fillAmount: bigint;
  cost: bigint;
  fee: bigint;
  surplus: bigint;
}

ProtocolAddresses

interface ProtocolAddresses {
  factory: Address;
  orderBook: Address;
  treasury: Address;
  negRiskAdapter: Address;
  umaResolver?: Address;
  kalshiResolver?: Address;
  polymarketResolver?: Address;
}

Resolver addresses are optional - only needed if your app interacts with that specific resolver type.

On this page