Skip to content

SDK: What's New

A summary of the latest SDK capabilities and improvements.


Modules Overview

  • trade: market lifecycle, positions, payouts
  • position: paged storage (ensure, find, prune, close)
  • config: protocol config lifecycle and updates
  • marketCreator: creator lifecycle (create, verify, update)
  • lookup tables: new helpers in trade for creator-level and per-market LUT management

Example Snippets

// Find or create a page with free slots
const page = await client.position.findAvailablePageForMarket(marketId, payer);
 
// Resolve market via oracle or manual value
await client.trade.resolveMarket({ marketId, payer });
// or
await client.trade.resolveMarket({ marketId, payer, resolutionValue: 10 });
 
// Payout using assetId (compressed NFT) with explicit DAS RPC and message return
await client.trade.payoutPosition({
  marketId,
  payer,
  assetId,
  rpcEndpoint: 'https://your-das.example',
  returnMode: 'message',
});
 
// Build reusable LUTs for a creator and market
const creatorLut = await client.trade.ensureMarketCreatorLookupTable({ authority, payer: authority });
const marketLut = await client.trade.ensureMarketLookupTable({
  marketId,
  authority,
  creatorLookupTableAddress: creatorLut.lookupTableAddress,
  pageIndexes: [0, 1],
});

See the SDK API for full details.

Depredict is an END Corp. project. | Copyright © 2025 END Corp.