> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orica.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Types

> Complete type definitions for both SDKs.

This page documents all types exported by the TypeScript and Python SDKs.

***

## Enums

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> enum MarketStatus {
>   Open = "open",
>   Resolved = "resolved",
>   Disputed = "disputed",
> }
>
> enum DisputeStatus {
>   Voting = "voting",
>   Active = "active",
>   Resolved = "resolved",
>   Expired = "expired",
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> class MarketStatus(Enum):
>     OPEN = "open"
>     RESOLVED = "resolved"
>     DISPUTED = "disputed"
>
> class DisputeStatus(Enum):
>     VOTING = "voting"
>     ACTIVE = "active"
>     RESOLVED = "resolved"
>     EXPIRED = "expired"
>
> class OutcomeType(Enum):
>     INDEX = "index"
>     UNRESOLVABLE = "unresolvable"
> ```

***

## Account Types

### GlobalState

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface GlobalState {
>   authority: PublicKey;
>   admins: PublicKey[];
>   creationFee: BN;
>   authorityTradingFeeBps: number;
>   creatorTradingFeeBps: number;
>   redemptionFeeBps: number;
>   usdcMint: PublicKey;
>   feeVault: PublicKey;
>   marketCount: BN;
>   bump: number;
>   feeVaultBump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class GlobalState:
>     authority: Pubkey
>     admins: list[Pubkey]
>     creation_fee: int
>     authority_trading_fee_bps: int
>     creator_trading_fee_bps: int
>     redemption_fee_bps: int
>     usdc_mint: Pubkey
>     fee_vault: Pubkey
>     market_count: int
>     bump: int
>     fee_vault_bump: int
> ```

### Market

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface Market {
>   id: BN;
>   creator: PublicKey;
>   question: string;
>   metadataUri: string;
>   closeTime: BN;
>   createdAt: BN;
>   status: MarketStatus;
>   outcomeCount: number;
>   pools: BN[];
>   supplies: BN[];
>   optionNames: string[];
>   resolution: Resolution | null;
>   resolutionMetadataUri: string | null;
>   disputeThresholdMet: boolean;
>   bump: number;
>   vaultBump: number;
>   creatorFeeVault: PublicKey;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class Market:
>     id: int
>     creator: Pubkey
>     question: str
>     metadata_uri: str
>     close_time: int
>     created_at: int
>     status: MarketStatus
>     outcome_count: int
>     pools: list[int]
>     supplies: list[int]
>     option_names: list[str]
>     resolution: Resolution | None
>     resolution_metadata_uri: str | None
>     dispute_threshold_met: bool
>     bump: int
>     vault_bump: int
>     creator_fee_vault: Pubkey
> ```

### Position

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface Position {
>   market: PublicKey;
>   user: PublicKey;
>   outcomeAmounts: BN[];
>   bump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class Position:
>     market: Pubkey
>     user: Pubkey
>     outcome_amounts: list[int]
>     bump: int
> ```

### Dispute

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface Dispute {
>   market: PublicKey;
>   marketId: BN;
>   openedAt: BN;
>   status: DisputeStatus;
>   totalPoolWeight: BN;
>   totalNoWeight: BN;
>   votesForDispute: BN;
>   messageCount: number;
>   resolvedBy: PublicKey | null;
>   finalOutcome: Outcome | null;
>   bump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class Dispute:
>     market: Pubkey
>     market_id: int
>     opened_at: int
>     status: DisputeStatus
>     total_pool_weight: int
>     total_no_weight: int
>     votes_for_dispute: int
>     message_count: int
>     resolved_by: Pubkey | None
>     final_outcome: Outcome | None
>     bump: int
> ```

### DisputeVote

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface DisputeVote {
>   dispute: PublicKey;
>   user: PublicKey;
>   weight: BN;
>   bump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class DisputeVote:
>     dispute: Pubkey
>     user: Pubkey
>     weight: int
>     bump: int
> ```

### DisputeMessage

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface DisputeMessage {
>   dispute: PublicKey;
>   author: PublicKey;
>   parentMessage: PublicKey | null;
>   messageHash: number[];
>   content: string;
>   timestamp: BN;
>   authorWeight: BN;
>   boostAmount: BN;
>   isAdmin: boolean;
>   bump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class DisputeMessage:
>     dispute: Pubkey
>     author: Pubkey
>     parent_message: Pubkey | None
>     message_hash: bytes
>     ipfs_uri: str
>     timestamp: int
>     author_weight: int
>     boost_amount: int
>     is_admin: bool
>     bump: int
> ```

### BoostRecord

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface BoostRecord {
>   message: PublicKey;
>   booster: PublicKey;
>   amount: BN;
>   bump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class BoostRecord:
>     message: Pubkey
>     booster: Pubkey
>     amount: int
>     bump: int
> ```

### DisputeConfig

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface DisputeConfig {
>   marketProgramId: PublicKey;
>   minPoolForDispute: BN;
>   bump: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class DisputeConfig:
>     market_program_id: Pubkey
>     min_pool_for_dispute: int
>     bump: int
> ```

***

## Outcome Types

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> type Outcome = 
>   | { index: { index: number } }
>   | { unresolvable: {} };
>
> interface Resolution {
>   outcome: Outcome;
>   resolvedAt: BN;
>   resolver: PublicKey;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> @dataclass
> class Outcome:
>     outcome_type: OutcomeType
>     index: int | None = None
>
> @dataclass
> class Resolution:
>     outcome: Outcome
>     resolved_at: int
>     resolver: Pubkey
> ```

***

## Metadata Types (TypeScript)

```typescript theme={"dark"}
interface MarketMetadata {
  question: string;
  options: string[];
  resolution_method: string;
  close_date: number;
  reasoning: string;
  image_url: string | null;
  image_ipfs_hash: string | null;
  creator: string;
  created_at: number;
}

interface MarketWithMetadata {
  publicKey: PublicKey;
  account: Market;
  metadata: MarketMetadata | null;
}
```

***

## Configuration Types

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> interface OricaSDKConfig {
>   connection: Connection;
>   oricaProgramId?: PublicKey;
>   disputesProgramId?: PublicKey;
>   oricaIdl: any;
>   disputesIdl: any;
> }
>
> interface FetchOptions {
>   includeMetadata?: boolean;
>   metadataTimeout?: number;
> }
>
> interface BuildOptions {
>   computeUnits?: number;
> }
> ```

> [tab] Python
>
> ```python theme={"dark"}
> # SDK initialization parameters
> connection: AsyncClient
> orica_program_id: Pubkey | None
> disputes_program_id: Pubkey | None
> wallet: Wallet | None
> ```

***

## Importing Types

> [tab] TypeScript
>
> ```typescript theme={"dark"}
> import type {
>   Market,
>   Position,
>   Dispute,
>   DisputeVote,
>   DisputeMessage,
>   MarketMetadata,
>   MarketWithMetadata,
>   FetchOptions,
>   BuildOptions,
>   MarketStatus,
>   DisputeStatus,
> } from "@neko/orica-sdk";
> ```

> [tab] Python
>
> ```python theme={"dark"}
> from orica_sdk import (
>     # Types
>     GlobalState,
>     Market,
>     Position,
>     DisputeConfig,
>     Dispute,
>     DisputeVote,
>     DisputeMessage,
>     BoostRecord,
>     # Enums
>     MarketStatus,
>     DisputeStatus,
>     OutcomeType,
>     # Outcome
>     Outcome,
>     Resolution,
> )
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.