Documentation
    Preparing search index...

    The one object an app constructs. Wraps the config, a client for reads, and a derived-account model so callers pass owner addresses, decimal amounts, and human market coordinates — the facade converts to raw units, resolves markets (cached), and delegates to the internal tx primitives / reads. Each tx.* builder returns a finished Transaction; callers composing their own PTBs use the generated move-call bindings this subpath exports (plpMoveCalls, expiryMarketMoveCalls, …).

    Index
    decode: {
        builderCode: (r: DecodableTransactionResult) => BuilderCodeReceipt;
        claim: (r: DecodableTransactionResult) => ClaimReceipt;
        claims: (r: DecodableTransactionResult) => ClaimReceipt[];
        createManager: (r: DecodableTransactionResult) => CreateManagerReceipt;
        deposit: (r: DecodableTransactionResult) => BalanceChangeReceipt;
        mint: (r: DecodableTransactionResult) => MintReceipt;
        mints: (r: DecodableTransactionResult) => MintReceipt[];
        plpCancel: (r: DecodableTransactionResult) => PlpCancelReceipt;
        plpRequest: (r: DecodableTransactionResult) => PlpRequestReceipt;
        redeem: (r: DecodableTransactionResult) => RedeemReceipt;
        redeems: (r: DecodableTransactionResult) => RedeemReceipt[];
        withdraw: (r: DecodableTransactionResult) => BalanceChangeReceipt;
    } = ...
    read: {
        balance: (owner: string) => Promise<number>;
        hasPosition: (
            owner: string,
            marketId: string,
            orderId: bigint,
        ) => Promise<boolean>;
        market: (
            m: Pick<MarketDescriptor, "underlying" | "expiryMs">,
        ) => Promise<MarketSummary | null>;
        markets: () => Promise<ActiveMarket[]>;
        plpBalance: (owner: string) => Promise<bigint>;
        pool: () => Promise<PoolSummary>;
        positions: (owner: string) => Promise<OpenPosition[]>;
        price: (
            m: BinaryMarketCoordinates,
        ) => Promise<{ down: number; up: number }>;
        pricer: (
            m: Pick<MarketDescriptor, "underlying" | "expiryMs">,
        ) => Promise<
            BoardPricer & {
                asOf: {
                    blockScholesForwardMs: number;
                    blockScholesSpotMs: number;
                    blockScholesSviMs: number;
                    pythSpotMs: number;
                };
            },
        >;
        quoteMint: (
            owner: string,
            m: MarketDescriptor,
            opts: Pick<MintOptions, "quantity">,
        ) => Promise<MintQuote>;
        quoteMintCost: (
            owner: string,
            m: MarketDescriptor,
            opts: MintCostOptions,
        ) => Promise<MintQuote>;
        quoteRedeem: (
            owner: string,
            m: MarketDescriptor,
            opts: CloseOptions,
        ) => Promise<RedeemQuote>;
    } = ...

    Type Declaration

    • balance: (owner: string) => Promise<number>
    • hasPosition: (owner: string, marketId: string, orderId: bigint) => Promise<boolean>
    • market: (
          m: Pick<MarketDescriptor, "underlying" | "expiryMs">,
      ) => Promise<MarketSummary | null>
    • markets: () => Promise<ActiveMarket[]>
    • plpBalance: (owner: string) => Promise<bigint>
    • pool: () => Promise<PoolSummary>
    • positions: (owner: string) => Promise<OpenPosition[]>
    • price: (m: BinaryMarketCoordinates) => Promise<{ down: number; up: number }>
    • pricer: (
          m: Pick<MarketDescriptor, "underlying" | "expiryMs">,
      ) => Promise<
          BoardPricer & {
              asOf: {
                  blockScholesForwardMs: number;
                  blockScholesSpotMs: number;
                  blockScholesSviMs: number;
                  pythSpotMs: number;
              };
          },
      >
    • quoteMint: (
          owner: string,
          m: MarketDescriptor,
          opts: Pick<MintOptions, "quantity">,
      ) => Promise<MintQuote>
    • quoteMintCost: (
          owner: string,
          m: MarketDescriptor,
          opts: MintCostOptions,
      ) => Promise<MintQuote>

      Simulate the v2 all-in budget mint against current account and market state.

    • quoteRedeem: (owner: string, m: MarketDescriptor, opts: CloseOptions) => Promise<RedeemQuote>
    tx: {
        cancelSupplyPlp: (owner: string, index: bigint) => Transaction;
        cancelWithdrawPlp: (owner: string, index: bigint) => Transaction;
        claimSettled: (
            owner: string,
            m: Pick<MarketDescriptor, "underlying" | "expiryMs" | "marketId">,
            opts: Pick<CloseOptions, "orderId">,
        ) => Promise<Transaction>;
        createManager: () => Transaction;
        deposit: (
            owner: string,
            amountUsdc: string | number,
            opts?: { create?: boolean },
        ) => Transaction;
        mint: (
            owner: string,
            m: MarketDescriptor,
            opts: MintOptions,
        ) => Promise<Transaction>;
        mintAmount: (
            owner: string,
            m: MarketDescriptor,
            opts: MintAmountOptions,
        ) => Promise<Transaction>;
        mintCost: (
            owner: string,
            m: MarketDescriptor,
            opts: MintCostOptions,
        ) => Promise<Transaction>;
        redeem: (
            owner: string,
            m: MarketDescriptor,
            opts: CloseOptions,
        ) => Promise<Transaction>;
        setBuilderCode: (owner: string, builderCodeId: string) => Transaction;
        supplyPlp: (
            owner: string,
            amountUsdc: string | number,
            options?: PlpSupplyOptions,
        ) => Transaction;
        unsetBuilderCode: (owner: string) => Transaction;
        withdraw: (
            owner: string,
            amountUsdc: string | number,
            opts?: { toCoinObject?: boolean },
        ) => Transaction;
        withdrawPlp: (
            owner: string,
            shares: bigint,
            options?: PlpWithdrawOptions,
        ) => Transaction;
    } = ...

    Type Declaration

    • The deterministic id of an owner's canonical account wrapper — no chain read.

      Parameters

      • owner: string

      Returns string