Core symbol reference#
Generated from TypeScript exports with node scripts/docs_examples.mjs --symbols --write.
These 2312 entries contain actual signatures, type fields, and extracted source documentation.
Source links are pinned to revision 9a59fd40f5722536d6f25565e94e87f2d9d7d5ef. The generator reads the checkout; regenerate after committing source changes to pin matching links.
Missing comments are marked “Not documented.” This means the source makes no documented guarantee for that category.
Parameter defaults come from explicit signature initializers. Type links lead to exported declarations and their available field comments.
Source descriptions and tagged remarks contain any documented caller requirements. Missing source comments remain visible; this inventory does not fill those semantic gaps.
A missing throws comment does not mean an operation cannot throw. A return type does not validate network data.
Read recovery for transaction duties and reading data for validation duties.
Price fields use basis points in the named outcome. Share quantities and quote amounts are distinct integer units. Instruction builders return unsigned instructions. Callers must validate deployment, account owners, PDA relationships, balances, freshness, and authorization before signing. Decoders check byte layouts; they do not establish account ownership or authenticity. This reference does not assert cross-language API parity.
<details> <summary>AccountSnapshot</summary>AccountSnapshot#
Not documented.
Declaration source: packages/core/src/referral/types.ts:60.
export interface AccountSnapshot {
/** Raw account data; null when the account does not exist on-chain. */
data: Uint8Array | null;
/** Program that owns the account; undefined for system-owned or non-existent accounts. */
owner?: Address;
}
Field documentation
data— Raw account data; null when the account does not exist on-chain.owner— Program that owns the account; undefined for system-owned or non-existent accounts.
Achievement#
Not documented.
Declaration source: packages/core/src/api/types.ts:235.
export interface Achievement {
id: string;
name: string;
description: string;
category: AchievementCategory;
icon: string;
requirement: number;
progress: number;
unlocked: boolean;
unlockedAt: string | undefined;
rarity: AchievementRarity;
}
AchievementCatalogEntry#
One achievement of the public catalog (GET /api/v1/achievements/all).
Declaration source: packages/core/src/api/users.ts:94.
export type AchievementCatalogEntry = z.infer<typeof AchievementCatalogEntrySchema>;
AchievementCategory#
Not documented.
Declaration source: packages/core/src/api/types.ts:232.
export type AchievementCategory = 'trading' | 'accuracy' | 'streaks' | 'exploration' | 'special';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
AchievementRarity#
Not documented.
Declaration source: packages/core/src/api/types.ts:233.
export type AchievementRarity = 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
AchievementSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:214.
export declare const AchievementSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodString; category: z.ZodEnum<{ trading: "trading"; accuracy: "accuracy"; streaks: "streaks"; exploration: "exploration"; special: "special"; }>; icon: z.ZodString; requirement: z.ZodNumber; progress: z.ZodNumber; unlocked: z.ZodBoolean; unlockedAt: z.ZodOptional<z.ZodString>; rarity: z.ZodEnum<{ common: "common"; uncommon: "uncommon"; rare: "rare"; epic: "epic"; legendary: "legendary"; }>; }, z.core.$loose>;
acquireShares#
Acquire qty shares of the named side via the cheapest available path.
The on-chain protocol has two ways to get more YES (or NO) tokens:
- Buy them on the orderbook (IoC) — pays the ask.
- Mint a YES+NO pair for $1 of stablecoin and sell the unwanted side
back to the book — pays
1 - oppositeBid.
Path 1 is almost always cheaper in a liquid book; path 2 wins when the book is one-sided or has huge spreads. This helper just bundles the instructions; the caller signs and submits.
Declaration source: packages/core/src/sdk.ts:3270.
export function acquireShares(input: AcquireSharesInput, programAddress?: Address): Promise<AcquireSharesResult>;
Parameters
input: AcquireSharesInput— Not documented. See AcquireSharesInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<AcquireSharesResult>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
AcquireSharesInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3211.
export interface AcquireSharesInput {
marketAddress: Address;
user: Address;
/** Which side the caller wants more of. */
side: 'yes' | 'no';
/** Share atoms to acquire. */
qty: bigint;
// ── Account refs the helper needs no matter which path ─────────────────
userTokenAccount: Address;
userStablecoinAta: Address;
userYesAta: Address;
userNoAta: Address;
settlementMint: Address;
// ── Orderbook path requirements ────────────────────────────────────────
/** Required source of `PlaceOrder` account 7; see `PlaceOrderInput.protocolTreasury`. */
protocolTreasury: ProtocolTreasurySource;
protocolTreasuryIndex: number;
marketState?: ProtocolTreasuryInput['marketState'];
/** Canonical referral-binding PDA for `user`, after resolver eligibility checks. */
takerReferralAccount?: Address;
/** Optional approved taker builder; see {@link TakerBuilderInput}. */
builder?: TakerBuilderInput;
/** Optional live fee curve for cost-aware path selection. */
fee?: { capBps: number; decayBps: number; split?: FeeSplit };
// ── Routing ───────────────────────────────────────────────────────────
/**
* 'orderbook' (default) — single IoC against the orderbook at
* `bestAskPriceBps`. Required so callers do not sign an extreme fallback.
* 'mint' — `mintShares(qty)` then IoC-sell the opposite side at
* `bestOppositeBidPriceBps`. Required so callers do not sign an extreme fallback.
* 'best' — picks whichever path costs less in stablecoin atoms given
* both price hints. Rejects when either hint is missing.
*/
mode?: 'orderbook' | 'mint' | 'best';
/** Best ask of the side being acquired (in bps). */
bestAskPriceBps?: number;
/** Best bid of the opposite side (in bps). */
bestOppositeBidPriceBps?: number;
}
Field documentation
side— Which side the caller wants more of.qty— Share atoms to acquire.protocolTreasury— Required source ofPlaceOrderaccount 7; seePlaceOrderInput.protocolTreasury.takerReferralAccount— Canonical referral-binding PDA foruser, after resolver eligibility checks.builder— Optional approved taker builder; see {@link TakerBuilderInput}.fee— Optional live fee curve for cost-aware path selection.mode— 'orderbook' (default) — single IoC against the orderbook atbestAskPriceBps. Required so callers do not sign an extreme fallback. 'mint' —mintShares(qty)then IoC-sell the opposite side atbestOppositeBidPriceBps. Required so callers do not sign an extreme fallback. 'best' — picks whichever path costs less in stablecoin atoms given both price hints. Rejects when either hint is missing.bestAskPriceBps— Best ask of the side being acquired (in bps).bestOppositeBidPriceBps— Best bid of the opposite side (in bps).
AcquireSharesResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:3251.
export interface AcquireSharesResult {
instructions: Instruction[];
path: 'orderbook' | 'mint';
/** Best-effort stablecoin-atom cost estimate if price hints were provided. */
estimatedCostAtoms?: bigint;
}
Field documentation
estimatedCostAtoms— Best-effort stablecoin-atom cost estimate if price hints were provided.
addressBytes#
The 32 bytes of an address.
Declaration source: packages/core/src/router/seatQuote.ts:307.
export function addressBytes(value: Address): Uint8Array;
Parameters
value: Address— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>addressToSeed</summary>addressToSeed#
Convert a Kit Address to a 32-byte Uint8Array for use as a PDA seed.
Declaration source: packages/core/src/pda.ts:86.
export function addressToSeed(addr: Address): Uint8Array;
Parameters
addr: Address— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>addToWatchlist</summary>addToWatchlist#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:77.
export function addToWatchlist(client: ApiClient, signer: WalletMessageSigner, marketAddress: string, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<WalletWatchlistItem>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.marketAddress: string— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; userAddress: string; marketAddress: string; addedAt: string | number; market?: Record<string, unknown> | null | undefined; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>ADMITTED_MINT_EXTENSION_TYPES</summary>ADMITTED_MINT_EXTENSION_TYPES#
Admitted Token-2022 mint extension types and their names.
Declaration source: packages/core/src/currency/admission.ts:33.
export declare const ADMITTED_MINT_EXTENSION_TYPES: Readonly<Record<number, string>>;
ADMITTED_SETTLEMENT_DECIMALS_MAX#
Not documented.
Declaration source: packages/core/src/currency/admission.ts:30.
export declare const ADMITTED_SETTLEMENT_DECIMALS_MAX: 9;
ADMITTED_SETTLEMENT_DECIMALS_MIN#
Smallest and largest admitted settlement decimal counts (owner decision R4a).
Declaration source: packages/core/src/currency/admission.ts:29.
export declare const ADMITTED_SETTLEMENT_DECIMALS_MIN: 6;
AdvancedCancelAllIntent#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:47.
export interface AdvancedCancelAllIntent {
kind: 'cancel_all_orders';
scope: KillSwitchScope;
reason: KillSwitchReason;
marketAddress?: string;
trustModel: 'client-side-wallet-signed';
}
advancedIntentToPlaceOrderParams#
Converts a place-order intent into instruction-ready PlaceOrderParams.
Intent-only metadata such as kind and timeInForce is omitted. Callers
must supply the protocol treasury shard and may supply first-touch referral
routing through options.
Declaration source: packages/core/src/advancedOrders.ts:344.
export function advancedIntentToPlaceOrderParams(intent: AdvancedPlaceOrderIntent, options: AdvancedPlaceOrderParamsOptions): PlaceOrderParams;
Parameters
intent: AdvancedPlaceOrderIntent— Not documented. See AdvancedPlaceOrderIntent for its declaration and available field documentation.options: AdvancedPlaceOrderParamsOptions— Not documented. See AdvancedPlaceOrderParamsOptions for its declaration and available field documentation.
Returns
PlaceOrderParams
Not documented.
Throws
Not documented.
</details> <details> <summary>AdvancedOrderIntent</summary>AdvancedOrderIntent#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:55.
export type AdvancedOrderIntent = AdvancedPlaceOrderIntent | AdvancedCancelAllIntent;
AdvancedOrderRequest#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:109.
export type AdvancedOrderRequest =
| ({ kind: 'post_only' } & PostOnlyOrderInput)
| ({ kind: 'ioc' } & IocOrderInput)
| ({ kind: 'fok' } & FillOrKillOrderInput)
| ({ kind: 'market_ioc' } & MarketSlippageOrderInput)
| ({ kind: 'kill_switch_cancel_all' } & KillSwitchCancelInput);
AdvancedOrderTimeInForce#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:14.
export type AdvancedOrderTimeInForce = 'post_only' | 'ioc' | 'fok' | 'market_ioc';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
AdvancedPlaceOrderIntent#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:27.
export interface AdvancedPlaceOrderIntent {
kind: 'place_order';
timeInForce: AdvancedOrderTimeInForce;
outcome: OutcomeAsset;
intent: TradeIntent;
priceBps: number;
quantity: bigint;
orderType: OrderType;
/**
* IOC slippage bound in the named outcome's denomination. Sentinels: 0
* disables the BUY bound and 10000 disables the SELL bound.
*/
worstAcceptablePriceBps?: number;
minFillQuantity?: bigint;
matchLimit?: number;
selfTradeBehavior?: number;
maxAgeSeconds?: number;
rejectPostOnlyWouldCross?: number;
}
Field documentation
worstAcceptablePriceBps— IOC slippage bound in the named outcome's denomination. Sentinels: 0 disables the BUY bound and 10000 disables the SELL bound.
AdvancedPlaceOrderParamsOptions#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:104.
export interface AdvancedPlaceOrderParamsOptions {
/** Required protocol treasury shard used by the on-chain place-order instruction. */
protocolTreasuryIndex: number;
}
Field documentation
protocolTreasuryIndex— Required protocol treasury shard used by the on-chain place-order instruction.
AdvisoryAcknowledgements#
Not documented.
Declaration source: packages/core/src/tokensXyz/advisory.ts:34.
export type AdvisoryAcknowledgements = ReturnType<typeof createAdvisoryAcknowledgements>;
aggregateCurrencyEarnings#
Combine lifetime creator and legacy referral earnings by exact mint only. A missing source, malformed amount, or positive amount without mint identity makes the entire result unknown; it must not be advertised as a complete total.
Declaration source: packages/core/src/currency/earnings.ts:26.
export function aggregateCurrencyEarnings(creatorInput: unknown, referralInput: unknown): CurrencyEarningsTotal[] | null;
Parameters
creatorInput: unknown— Not documented.referralInput: unknown— Not documented.
Returns
CurrencyEarningsTotal[] | null
Not documented.
Throws
Not documented.
</details> <details> <summary>aggregateHealth</summary>aggregateHealth#
Fold the health signals into one level plus every reason that applies.
offline when the device is offline or the RPC probe failed
(rpcOk === false); otherwise delayed when indexer lag exceeds 30 s or the
price is older than 10 s; otherwise live. Unknown (null) signals never
degrade the level on their own.
Declaration source: packages/core/src/ux/health.ts:35.
export function aggregateHealth(input: HealthInput): { level: HealthLevel; reasons: HealthReason[]; };
Parameters
input: HealthInput— Not documented. See HealthInput for its declaration and available field documentation.
Returns
{ level: HealthLevel; reasons: HealthReason[]; }
Not documented.
Throws
Not documented.
</details> <details> <summary>aggregateOrderbook</summary>aggregateOrderbook#
Aggregate orderbook orders into price levels.
Only includes live, matchable orders. Bids are sorted price descending, asks are sorted price ascending.
Declaration source: packages/core/src/orderbook.ts:43.
export function aggregateOrderbook(orderbook: OrderbookAccount): { bids: OrderbookLevel[]; asks: OrderbookLevel[]; };
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
{ bids: OrderbookLevel[]; asks: OrderbookLevel[]; }
Not documented.
Throws
Not documented.
</details> <details> <summary>aggregateOrderbookLanes</summary>aggregateOrderbookLanes#
Split a decoded canonical book into its two outcome lanes.
The canonical arrays interleave two economically independent books. A
canonical bid at 4800 is a YES buyer at 48c YES (BuyYes) OR a NO buyer at
48c NO (BuyNo); only SellYes fills the first and only SellNo fills the
second. So an
aggregated canonical level is a quote for nobody in particular, and
10000 − bestCanonicalAsk is not a NO price.
Order.originalSide is the byte that separates them. Orders whose stored
side is the zero-filled sentinel (or any value outside StoredOrderSide)
belong to no lane and are dropped: a silently wrong lane is worse than a
visibly short one, because an empty lane's contract is "no quote", which a
UI renders as an em dash.
Declaration source: packages/core/src/orderbook.ts:127.
export function aggregateOrderbookLanes(orderbook: OrderbookAccount): OutcomeLaneBooks;
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
OutcomeLaneBooks
Not documented.
Throws
Not documented.
</details> <details> <summary>allocateMarketId</summary>allocateMarketId#
Validate an explicit positive u64 Unix-microsecond intent. The caller ensures creator-local uniqueness and persists this ID before funding/preallocation. All retries reuse it; retry a collision with a new ID only before funding. The ID is an identity namespace, never an authenticated lifecycle timestamp.
Declaration source: packages/core/src/market.ts:73.
export function allocateMarketId(timestampMicroseconds: bigint): bigint;
Parameters
timestampMicroseconds: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>allocateSeatsProRata</summary>allocateSeatsProRata#
Design §5 rules 2 and 3: q = min(requested, Σ a); seat i gets
floor(q · a_i / Σ a); the r leftover lots go one each to the largest
fractional parts (q · a_i) mod Σ a, ties by ascending tieKey. Every input
is a seat property, so the result does not depend on the input order (F-3).
Declaration source: packages/core/src/router/seatQuote.ts:269.
export function allocateSeatsProRata(requestedLots: bigint, entries: readonly ProRataEntry[]): ProRataAllocation;
Parameters
requestedLots: bigint— Not documented.entries: readonly ProRataEntry[]— Not documented.
Returns
ProRataAllocation
Not documented.
Throws
Not documented.
</details> <details> <summary>AnalyticsBook</summary>AnalyticsBook#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:31.
export interface AnalyticsBook {
readonly bids: readonly OrderbookLevel[];
readonly asks: readonly OrderbookLevel[];
}
ApiClient#
Not documented.
Declaration source: packages/core/src/api/client.ts:653.
export declare class ApiClient {
constructor(config: ApiClientConfig | undefined);
/**
* Set the authentication token.
* Pass an empty string or undefined to clear the token.
* Empty strings are normalized to undefined so that auth headers are not sent
* with an empty bearer token.
*/
setAuthToken: (token: string | undefined) => void;
/**
* Get current authentication token
*/
getAuthToken: () => string | undefined;
/**
* Get current circuit breaker state
*/
getCircuitBreakerState: () => CircuitBreakerState;
/**
* Reset the circuit breaker
*/
resetCircuitBreaker: () => void;
/**
* Clear the request deduplication cache
*/
clearDeduplicationCache: () => void;
/**
* Read a page of orders owned by the wallet that signs the request.
*/
listOwnerOrders: (signer: WalletMessageSigner, query?: OwnerOrdersQuery, options?: { signal?: AbortSignal; authDomain?: string; }) => Promise<OwnerOrdersPage>;
/**
* Read registered strategy accounts for the wallet that signs the request.
*/
listOwnerStrategies: (signer: WalletMessageSigner, query?: OwnerStrategiesQuery, options?: { signal?: AbortSignal; authDomain?: string; }) => Promise<OwnerStrategiesPage>;
/**
* Read a page of recorded strategy events for the wallet that signs the request.
*/
listStrategyActivity: (signer: WalletMessageSigner, query?: StrategyActivityQuery, options?: { signal?: AbortSignal; authDomain?: string; }) => Promise<StrategyActivityResponse>;
/**
* A request signed by a wallet (the indexer's wallet authentication headers).
* Non-GET requests are not retried, so a write is never repeated.
*/
walletRequest: <T>(method: "GET" | "POST" | "PUT" | "DELETE", path: string, signer: WalletMessageSigner, options?: { body?: unknown; params?: Record<string, string | number | boolean | undefined>; signal?: AbortSignal; authDomain?: string; }) => Promise<T>;
get: <T>(path: string, params?: Record<string, string | number | boolean | undefined>, options?: { signal?: AbortSignal; skipDeduplication?: boolean; }) => Promise<T>;
post: <T>(path: string, body?: unknown, options?: { signal?: AbortSignal; skipRetry?: boolean; }) => Promise<T>;
put: <T>(path: string, body?: unknown, options?: { signal?: AbortSignal; skipRetry?: boolean; }) => Promise<T>;
delete: <T>(path: string, options?: { signal?: AbortSignal; skipRetry?: boolean; }) => Promise<T>;
getBaseUrl: () => string;
}
Parameters
config: ApiClientConfig | undefined— Not documented. See ApiClientConfig for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>ApiClientConfig</summary>ApiClientConfig#
Not documented.
Declaration source: packages/core/src/api/client.ts:98.
export interface ApiClientConfig {
baseUrl?: string;
timeout?: number;
retryOptions?: RetryOptions;
headers?: Record<string, string>;
circuitBreaker?: CircuitBreakerConfig;
auth?: AuthConfig;
deduplication?: RequestDeduplicationConfig;
logging?: LoggingConfig;
}
ApiError#
API Types
TypeScript types for all API endpoints and responses.
Declaration source: packages/core/src/api/types.ts:12.
export interface ApiError {
code: string;
message: string;
details?: Record<string, unknown>;
}
ApiErrorSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:41.
export declare const ApiErrorSchema: z.ZodObject<{ code: z.ZodString; message: z.ZodString; details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, z.core.$loose>;
ApiMarket#
Not documented.
Declaration source: packages/core/src/api/types.ts:40.
export interface ApiMarket {
id: string;
address: string;
canonicalMarketKey?: string;
marketId: string;
settlementMint?: string | null;
marketName?: string | null;
marketSlug?: string | null;
pythFeedId: string;
state: number;
outcome: number | null;
tStart: string;
tEnd: string;
totalVolume: string;
bestBid?: number;
bestAsk?: number;
}
ApiMarketDetail#
Not documented.
Declaration source: packages/core/src/api/types.ts:58.
export interface ApiMarketDetail extends ApiMarket {
totalTrades: number;
startPrice: string | null;
startPriceExpo?: number | null;
endPrice: string | null;
endPriceExpo?: number | null;
orderbook: {
bids: Array<{ priceBps: number; quantity: string }>;
asks: Array<{ priceBps: number; quantity: string }>;
};
}
ApiMarketDetailSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:90.
export declare const ApiMarketDetailSchema: z.ZodObject<{ id: z.ZodString; address: z.ZodString; marketId: z.ZodString; pythFeedId: z.ZodString; state: z.ZodNumber; outcome: z.ZodNullable<z.ZodNumber>; tStart: z.ZodString; tEnd: z.ZodString; totalVolume: z.ZodString; bestBid: z.ZodOptional<z.ZodNumber>; bestAsk: z.ZodOptional<z.ZodNumber>; totalTrades: z.ZodNumber; startPrice: z.ZodNullable<z.ZodString>; endPrice: z.ZodNullable<z.ZodString>; orderbook: z.ZodObject<{ bids: z.ZodArray<z.ZodObject<{ priceBps: z.ZodNumber; quantity: z.ZodString; }, z.core.$loose>>; asks: z.ZodArray<z.ZodObject<{ priceBps: z.ZodNumber; quantity: z.ZodString; }, z.core.$loose>>; }, z.core.$loose>; }, z.core.$loose>;
ApiMarketSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:81.
export declare const ApiMarketSchema: z.ZodObject<{ id: z.ZodString; address: z.ZodString; marketId: z.ZodString; pythFeedId: z.ZodString; state: z.ZodNumber; outcome: z.ZodNullable<z.ZodNumber>; tStart: z.ZodString; tEnd: z.ZodString; totalVolume: z.ZodString; bestBid: z.ZodOptional<z.ZodNumber>; bestAsk: z.ZodOptional<z.ZodNumber>; }, z.core.$loose>;
ApiModuleLogger#
Configurable Logger for API modules
Provides a pluggable logger interface so consumers (web, mobile, indexer) can inject their own structured logger. Defaults to console-backed warn/error sinks so soft validation drift remains observable unless explicitly replaced.
Declaration source: packages/core/src/api/logger.ts:10.
export interface ApiModuleLogger {
warn(message: string, ...args: unknown[]): void;
error(message: string, ...args: unknown[]): void;
}
ApiOrderSide#
API-layer order side type (string union). Renamed from OrderSide to avoid collision with the numeric OrderSide enum in types.ts.
Declaration source: packages/core/src/api/types.ts:173.
export type ApiOrderSide = 'buy_yes' | 'buy_no' | 'sell_yes' | 'sell_no';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ApiOrderSideSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:136.
export declare const ApiOrderSideSchema: z.ZodEnum<{ buy_yes: "buy_yes"; sell_yes: "sell_yes"; buy_no: "buy_no"; sell_no: "sell_no"; }>;
ApiPosition#
Not documented.
Declaration source: packages/core/src/api/types.ts:117.
export interface ApiPosition {
id: string;
address: string;
marketAddress: string;
market: {
pythFeedId: string;
state: number;
};
yesShares: string;
noShares: string;
collateralDeposited: string;
totalBought: string;
totalSold: string;
settled: boolean;
payout: string;
currentYesPrice?: number;
}
ApiPositionSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:108.
export declare const ApiPositionSchema: z.ZodObject<{ id: z.ZodString; address: z.ZodString; marketAddress: z.ZodString; market: z.ZodObject<{ pythFeedId: z.ZodString; state: z.ZodNumber; }, z.core.$loose>; yesShares: z.ZodString; noShares: z.ZodString; collateralDeposited: z.ZodString; totalBought: z.ZodString; totalSold: z.ZodString; settled: z.ZodBoolean; payout: z.ZodString; currentYesPrice: z.ZodOptional<z.ZodNumber>; }, z.core.$loose>;
ApiPositionsValue#
Not documented.
Declaration source: packages/core/src/resilientData.ts:165.
export interface ApiPositionsValue {
readonly positions: readonly IndexedApiPosition[];
readonly balance?: string;
readonly availableBalance?: string;
readonly settledPayouts?: string;
readonly total?: number;
readonly limit?: number;
readonly offset?: number;
readonly nextCursor?: string | null;
}
ApiReadResult#
Not documented.
Declaration source: packages/core/src/resilientData.ts:176.
export type ApiReadResult<T> = {
readonly value: T;
readonly source: 'api';
};
ApiRequestError#
Not documented.
Declaration source: packages/core/src/api/client.ts:160.
export declare class ApiRequestError extends SeesawSdkError {
constructor(message: string, options: { status?: number; code?: string; details?: Record<string, unknown>; isAborted?: boolean; } | undefined);
readonly status?: number | undefined;
readonly apiCode?: string | undefined;
readonly details?: Record<string, unknown> | undefined;
readonly isAborted?: boolean | undefined;
}
Parameters
message: string— Not documented.options: { status?: number; code?: string; details?: Record<string, unknown>; isAborted?: boolean; } | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>applyReferrerEligibility</summary>applyReferrerEligibility#
Not documented.
Declaration source: packages/core/src/fee.ts:453.
export function applyReferrerEligibility(amounts: FeeAmounts, resolution: Pick<ReferrerResolution, "address" | "source" | "eligibleForTriple" | "expiresAt"> | null, nowMs?: number): FeeAmounts;
Parameters
amounts: FeeAmounts— Not documented. See FeeAmounts for its declaration and available field documentation.resolution: Pick<ReferrerResolution, "source" | "address" | "eligibleForTriple" | "expiresAt"> | null— Not documented.nowMs: number— Not documented. Default:Date.now().
Returns
FeeAmounts
Not documented.
Throws
Not documented.
Defaults
nowMs:Date.now().
applySplit#
Split an aggregate fee exactly like Rust apply_split5_with_slack.
makerTotalis the already-computed sum of eligible per-fill rebates. It may be below the nominal maker budget; unused budget and dust route to protocol. It may never exceedfloor(total·maker/10_000) + makerSlack.makerSlackis the number of spline fills that credited a cumulative- rounded rebate (one atom each); 0 for a book-only order.builderBpsEffectiveismin(config.builder_share_bps, approval.max_builder_bps)for an authenticated approval, else 0. It must not exceedsplit.builderBps. The builder leg isfloor(total·builderBpsEffective/10_000); whatever the governed builder share does not pay stays with protocol through the exact remainder.
Protocol is total − (creator + referral + builder + maker), so the split is
exhaustive and protocol receives all rounding dust. Every input the program
would refuse (None in Rust) throws {@link SeesawValidationError}.
Declaration source: packages/core/src/fee.ts:381.
export function applySplit(totalFee: bigint, split: FeeSplit, makerTotal: bigint, makerSlack?: bigint, builderBpsEffective?: number): FeeAmounts;
Parameters
totalFee: bigint— Not documented.split: FeeSplit— Not documented. See FeeSplit for its declaration and available field documentation.makerTotal: bigint— Not documented.makerSlack: bigint— Not documented. Default:0n.builderBpsEffective: number— Not documented. Default:0.
Returns
FeeAmounts
Not documented.
Throws
Not documented.
Defaults
makerSlack:0n.builderBpsEffective:0.
APPROVE_BUILDER_PAYLOAD_LEN#
ApproveBuilder payload: max_builder_bps u16 + expires_at i64.
Declaration source: packages/core/src/builder.ts:46.
export declare const APPROVE_BUILDER_PAYLOAD_LEN: 10;
ApproveBuilderAccounts#
Accounts for ApproveBuilder (0x4A).
Declaration source: packages/core/src/builder.ts:109.
export interface ApproveBuilderAccounts extends BinaryRecorderTailAccounts {
/** `deriveBuilderApprovalPda(trader, builder)`. */
builderApproval: Address;
/** The trader granting consent; must sign. */
trader: Address;
/** Rent payer; may be a sponsoring front end. Refunds always go to the trader. */
payer: Address;
/** The approved builder (address only, read-only). */
builder: Address;
systemProgram?: Address;
}
Field documentation
builderApproval—deriveBuilderApprovalPda(trader, builder).trader— The trader granting consent; must sign.payer— Rent payer; may be a sponsoring front end. Refunds always go to the trader.builder— The approved builder (address only, read-only).selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ApproveBuilderParams#
Not documented.
Declaration source: packages/core/src/builder.ts:121.
export interface ApproveBuilderParams {
/** D4{bps_of_fee} Trader cap on the builder slice, 1..=10_000. */
maxBuilderBps: number;
/** D0{s} Unix expiry; 0 = no expiry. */
expiresAt: bigint;
/** Optional local clock for a fail-fast past-expiry check. */
nowSeconds?: bigint;
}
Field documentation
maxBuilderBps— D4{bps_of_fee} Trader cap on the builder slice, 1..=10_000.expiresAt— D0{s} Unix expiry; 0 = no expiry.nowSeconds— Optional local clock for a fail-fast past-expiry check.
ASSERT_BALANCES_DISCRIMINATOR#
AssertBalances route tag from the generated route table.
Declaration source: packages/core/src/router/assertBalances.ts:37.
export declare const ASSERT_BALANCES_DISCRIMINATOR: 99;
ASSERT_BALANCES_LEDGER_PRESENT#
Mask bit: the ledger account is supplied and its bounds apply.
Declaration source: packages/core/src/router/assertBalances.ts:39.
export declare const ASSERT_BALANCES_LEDGER_PRESENT: 1;
ASSERT_BALANCES_PAYLOAD_LEN#
Payload length after the tag.
Declaration source: packages/core/src/router/assertBalances.ts:35.
export declare const ASSERT_BALANCES_PAYLOAD_LEN: 53;
AssertBalancesAccounts#
Not documented.
Declaration source: packages/core/src/router/assertBalances.ts:57.
export interface AssertBalancesAccounts {
readonly owner: Address;
readonly market: Address;
readonly walletYes: Address;
readonly walletNo: Address;
readonly walletQuote: Address;
readonly traderLedger?: { readonly address: Address; readonly seatIndex: number };
}
AssertBalancesBounds#
The bounds one AssertBalances checks.
Declaration source: packages/core/src/router/assertBalances.ts:44.
export interface AssertBalancesBounds {
readonly minWalletYes: bigint;
readonly minWalletNo: bigint;
readonly minWalletQuote: bigint;
readonly minLedgerYes: bigint;
readonly minLedgerNo: bigint;
readonly minLedgerFreeQuote: bigint;
/** `ASSERT_BALANCES_LEDGER_PRESENT` or `0`. */
readonly ledgerMask: number;
/** Trader-ledger seat hint (verified on chain through phase 5's owner index). */
readonly ledgerSeatIndex: number;
}
Field documentation
ledgerMask—ASSERT_BALANCES_LEDGER_PRESENTor0.ledgerSeatIndex— Trader-ledger seat hint (verified on chain through phase 5's owner index).
AssertBalancesFrame#
Not documented.
Declaration source: packages/core/src/router/assertBalances.ts:66.
export interface AssertBalancesFrame {
readonly accounts: readonly AccountMeta[];
readonly payload: Uint8Array;
}
assertContiguousEventSequence#
Reject a history whose batches do not carry, per subject, exactly start + 1, + 2, ... in
chain order. starts maps each base58 subject (the market and each attached spline) to its
event_sequence at the checkpoint; the market and every spline have independent sequences
(docs/internal/EVENT_RECONSTRUCTION_AUDIT.md).
event_sequence counts batches, so events are grouped by batch identity first. Inside one
transaction chain order is not sequence order (INV-EVENT-SEQ-2: the PlaceOrder referral batch
is recorded first but numbered higher), so each transaction's batch sequences are sorted per
subject before they are compared; across transactions the order must be strictly increasing.
Declaration source: packages/core/src/replay/transactions.ts:390.
export function assertContiguousEventSequence(starts: ReadonlyMap<string, bigint>, history: readonly Pick<RecordingTransaction, "signature" | "events">[], seatBoundaries?: ReadonlyMap<string, readonly SeatSequenceBoundary[]>): void;
Parameters
starts: ReadonlyMap<string, bigint>— Not documented.history: readonly Pick<RecordingTransaction, "events" | "signature">[]— Not documented.seatBoundaries: ReadonlyMap<string, readonly SeatSequenceBoundary[]>— Not documented. Default:new Map().
Returns
void
Not documented.
Throws
Not documented.
Defaults
seatBoundaries:new Map().
assertMakerSelectorIntent#
Rejects inputs no order could carry.
Declaration source: packages/core/src/makerSelectorEstimator.ts:248.
export function assertMakerSelectorIntent(intent: MakerSelectorIntent): void;
Parameters
intent: MakerSelectorIntent— Not documented. See MakerSelectorIntent for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertMirrorTransactionResources</summary>assertMirrorTransactionResources#
Throws unless resources is a configuration the runtime accepts as stated.
Declaration source: packages/core/src/v1Transaction.ts:124.
export function assertMirrorTransactionResources(resources: MirrorTransactionResources): void;
Parameters
resources: MirrorTransactionResources— Not documented. See MirrorTransactionResources for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertNonNegativeAmount</summary>assertNonNegativeAmount#
Validate that a quantity/amount is non-negative.
Declaration source: packages/core/src/utils/validation.ts:131.
export function assertNonNegativeAmount(amount: bigint, paramName?: string): void;
Parameters
amount: bigint— Not documented.paramName: string— Not documented. Default:'amount'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'amount'.
assertPackedLayout#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:154.
export function assertPackedLayout(data: Uint8Array, fields: readonly { offset: number; size: number; }[]): void;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.fields: readonly { offset: number; size: number; }[]— Not documented.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertPositiveAmount</summary>assertPositiveAmount#
Validate that a quantity/amount is positive.
Declaration source: packages/core/src/utils/validation.ts:122.
export function assertPositiveAmount(amount: bigint, paramName?: string): void;
Parameters
amount: bigint— Not documented.paramName: string— Not documented. Default:'amount'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'amount'.
assertSupportedConfigAccountVersion#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:194.
export function assertSupportedConfigAccountVersion(version: number): void;
Parameters
version: number— Not documented.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertValidBuilderApprovalArgs</summary>assertValidBuilderApprovalArgs#
Client-side mirror of the ApproveBuilder argument checks (spec §4.4):
builder != trader, builder != 0, 1 <= maxBuilderBps <= 10_000,
expiresAt == 0 || expiresAt >= nowSeconds (expiry is inclusive, A3; the program
refuses only expires_at < now). nowSeconds is optional because the chain
clock decides; pass it to fail fast on an already-past expiry.
Declaration source: packages/core/src/builder.ts:70.
export function assertValidBuilderApprovalArgs(params: { trader: Address; builder: Address; maxBuilderBps: number; expiresAt: bigint; nowSeconds?: bigint; }): void;
Parameters
params: { trader: Address; builder: Address; maxBuilderBps: number; expiresAt: bigint; nowSeconds?: bigint; }— Not documented.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertValidDuration</summary>assertValidDuration#
Validate market duration is within allowed range [60, 604800] seconds.
Declaration source: packages/core/src/utils/validation.ts:142.
export function assertValidDuration(durationSeconds: bigint, paramName?: string): void;
Parameters
durationSeconds: bigint— Not documented.paramName: string— Not documented. Default:'durationSeconds'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'durationSeconds'.
assertValidFeeConfigUpdate#
Validate UpdateFeeConfig inputs against the same bounds and joint cap/decay/split coherence enforced by ConfigAccount.
Declaration source: packages/core/src/utils/validation.ts:227.
export function assertValidFeeConfigUpdate(params: FeeConfigUpdateParams): void;
Parameters
params: FeeConfigUpdateParams— Not documented. See FeeConfigUpdateParams for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertValidFeedId</summary>assertValidFeedId#
Validate Pyth feed ID is exactly 32 bytes.
Declaration source: packages/core/src/utils/validation.ts:153.
export function assertValidFeedId(feedId: Uint8Array, paramName?: string): void;
Parameters
feedId: Uint8Array<ArrayBufferLike>— Not documented.paramName: string— Not documented. Default:'pythFeedId'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'pythFeedId'.
assertValidPrice#
Validate that a price is within the valid trading range: (0, 10000) exclusive.
Matches on-chain is_valid_price() in program/src/utils/math.rs.
Declaration source: packages/core/src/utils/validation.ts:111.
export function assertValidPrice(priceBps: number, paramName?: string): void;
Parameters
priceBps: number— Not documented.paramName: string— Not documented. Default:'priceBps'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'priceBps'.
assertValidSolanaAddress#
Validates a Solana address and throws a descriptive error if invalid.
Declaration source: packages/core/src/utils/validation.ts:63.
export function assertValidSolanaAddress(address: string, paramName?: string): void;
Parameters
address: string— - The address to validate.paramName: string— - Name of the parameter for the error message. Default:'address'.
Returns
void
Not documented.
Throws
{Error} If the address is not a valid Solana address format.
Defaults
paramName:'address'.
assertValidSplineMidJumpResetBps#
Validate the spline midpoint-reset threshold accepted by the program.
Declaration source: packages/core/src/utils/validation.ts:82.
export function assertValidSplineMidJumpResetBps(value: number): void;
Parameters
value: number— Not documented.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>assertValidTakerFee</summary>assertValidTakerFee#
Validate taker fee is within allowed range [0, 500] bps.
Declaration source: packages/core/src/utils/validation.ts:175.
export function assertValidTakerFee(feeBps: number, paramName?: string): void;
Parameters
feeBps: number— Not documented.paramName: string— Not documented. Default:'takerFeeBps'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'takerFeeBps'.
assertValidTickSize#
Validate tick size is within allowed range [1, 1000] bps and divides 10000 evenly.
Declaration source: packages/core/src/utils/validation.ts:399.
export function assertValidTickSize(tickSizeBps: number, paramName?: string): void;
Parameters
tickSizeBps: number— Not documented.paramName: string— Not documented. Default:'tickSizeBps'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'tickSizeBps'.
assertValidTokenType#
Validate token type is 0 (YES) or 1 (NO).
Declaration source: packages/core/src/utils/validation.ts:164.
export function assertValidTokenType(tokenType: number, paramName?: string): void;
Parameters
tokenType: number— Not documented.paramName: string— Not documented. Default:'tokenType'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'tokenType'.
assertValidTreasuryIndex#
Validate a protocol/referrer treasury shard index against the fixed recipient set.
Declaration source: packages/core/src/utils/validation.ts:415.
export function assertValidTreasuryIndex(index: number, paramName?: string): void;
Parameters
index: number— Not documented.paramName: string— Not documented. Default:'treasuryIndex'.
Returns
void
Not documented.
Throws
Not documented.
Defaults
paramName:'treasuryIndex'.
ASSET_STATE_ACCOUNT_DISCRIMINATOR#
AssetState discriminator: sha256("account:AssetState")[..8].
Declaration source: packages/core/src/constants.ts:217.
export declare const ASSET_STATE_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
ASSET_STATE_ACCOUNT_SIZE#
D0{byte} AssetState account size.
Declaration source: packages/core/src/constants.ts:309.
export declare const ASSET_STATE_ACCOUNT_SIZE: 128;
AssetState#
AssetState - Per-feed market creation counter. Size: 128 bytes. PDA: ["seesaw", "asset", pyth_feed_id].
Declaration source: packages/core/src/types.ts:575.
export interface AssetState {
readonly discriminator: Uint8Array;
readonly pythFeedId: Uint8Array;
readonly totalMarketsCreated: bigint;
readonly bump: number;
}
ASSOCIATED_TOKEN_PROGRAM_ADDRESS#
Not documented.
Declaration source: packages/core/src/constants.ts:42.
export declare const ASSOCIATED_TOKEN_PROGRAM_ADDRESS: Address;
AttachedSplineResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:3578.
export interface AttachedSplineResult {
spline: Address;
series: Address;
splineVault: Address;
marketVault: Address;
config: Address;
}
attachReferralBinding#
Insert the single read-only referral binding into a PlaceOrder tail.
Returns a new instruction; does not mutate the input.
Declaration source: packages/core/src/widget/referral.ts:61.
export function attachReferralBinding<I extends Instruction>(ix: I, binding: ReferralBindingAccounts): Promise<I>;
Parameters
ix: I— Not documented.binding: ReferralBindingAccounts— Not documented. See ReferralBindingAccounts for its declaration and available field documentation.
Returns
Promise<I>
Not documented.
Throws
Not documented.
</details> <details> <summary>attachSpline</summary>attachSpline#
Not documented.
Declaration source: packages/core/src/sdk.ts:3609.
export function attachSpline(input: AttachSplineInput, programAddress?: Address): Promise<SdkResult<AttachedSplineResult>>;
Parameters
input: AttachSplineInput— Not documented. See AttachSplineInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<AttachedSplineResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
AttachSplineAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4741.
export interface AttachSplineAccounts extends BinaryRecorderTailAccounts {
creator: Address;
series: Address;
spline: Address;
splineVault: Address;
market: Address;
marketVault: Address;
config: Address;
tokenProgram: Address;
systemProgram: Address;
/** The spline vault's (and market's) settlement mint, for `TransferChecked`. */
settlementMint: Address;
}
Field documentation
settlementMint— The spline vault's (and market's) settlement mint, forTransferChecked.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
AttachSplineInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3566.
export interface AttachSplineInput {
creator: Address;
market: Address;
marketState: Pick<
MarketAccount,
'pythFeedId' | 'durationSeconds' | 'creator' | 'settlementMint' | 'settlementTokenStandard'
>;
commitAmount: bigint;
tokenProgram?: Address;
systemProgram?: Address;
}
AttachSplineParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:4737.
export interface AttachSplineParams {
commitAmount: bigint; // D6{stablecoin}
}
AuthConfig#
Not documented.
Declaration source: packages/core/src/api/client.ts:69.
export interface AuthConfig {
/** Initial auth token */
token?: string;
/** Header name for the token (default: 'Authorization') */
headerName?: string;
/** Token prefix (default: 'Bearer') */
tokenPrefix?: string;
/** Callback to refresh the token when it expires */
onTokenRefresh?: () => Promise<string | null>;
/** HTTP status codes that trigger token refresh */
refreshOnStatus?: number[];
}
Field documentation
token— Initial auth tokenheaderName— Header name for the token (default: 'Authorization')tokenPrefix— Token prefix (default: 'Bearer')onTokenRefresh— Callback to refresh the token when it expiresrefreshOnStatus— HTTP status codes that trigger token refresh
authenticateSplineSeat#
Verify program ownership, market binding and the canonical maker seat address.
Declaration source: packages/core/src/rpcDataSource.ts:494.
export function authenticateSplineSeat(entry: RpcProgramAccount, market: Address, programAddress: Address): Promise<RpcAddressedValue<SplineSeatAccount>>;
Parameters
entry: RpcProgramAccount— Not documented. See RpcProgramAccount for its declaration and available field documentation.market: Address— Not documented.programAddress: Address— Not documented.
Returns
Promise<RpcAddressedValue<{ roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: import("packages/core/src/instructions").CurveLevel[]; askLevels: import("packages/core/src/instructions").CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; }>>
Not documented.
Throws
Not documented.
</details> <details> <summary>AuthMessageInput</summary>AuthMessageInput#
Not documented.
Declaration source: packages/core/src/auth.ts:7.
export interface AuthMessageInput {
domain?: string;
chain?: 'solana';
action: string;
timestamp?: number;
nonce?: string;
}
Availability#
A provider with no live deployment (Harmonic before an engagement) is unavailable.
Declaration source: packages/core/src/execution/capability.ts:43.
export type Availability = (typeof AVAILABILITY_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
AVAILABILITY_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:41.
export declare const AVAILABILITY_VALUES: readonly ["available", "unavailable"];
AWS_NITRO_REGISTRATION_ROOT_SHA256#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:3.
export declare const AWS_NITRO_REGISTRATION_ROOT_SHA256: "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b";
bandDepth#
Band depth of a liquidity snapshot: per-lane reference mids (the YES lane
anchored by the curve's mid when one is executable), inclusive doubled bands
|2p − 2·mid| ≤ 2·band, economic sides, curve capacity once per side and
rank = min(bid, ask). A lane without a mid contributes nothing. Quantities
are share atoms of the market's own mint and must not be compared across mints.
protectedDepth also counts slot-bound curves.
Declaration source: packages/core/src/marketDiscovery.ts:450.
export function bandDepth(liquidity: MarketLiquidity, bandBps: number): { readonly depth: MarketDepth; readonly protectedDepth: MarketDepth; };
Parameters
liquidity: MarketLiquidity— Not documented. See MarketLiquidity for its declaration and available field documentation.bandBps: number— Not documented.
Returns
{ readonly depth: MarketDepth; readonly protectedDepth: MarketDepth; }
Not documented.
Throws
Not documented.
</details> <details> <summary>base58Encode</summary>base58Encode#
Not documented.
Declaration source: packages/core/src/auth.ts:52.
export function base58Encode(bytes: Uint8Array): string;
Parameters
bytes: Uint8Array<ArrayBufferLike>— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>BatchedMetadata</summary>BatchedMetadata#
Not documented.
Declaration source: packages/core/src/tokensXyz/batcher.ts:17.
export interface BatchedMetadata {
readonly row: CurrencyMetadata | undefined;
readonly source: CurrencyMetadataResponse['source'];
readonly generatedAtMs: number;
}
BatchOrderParams#
Not documented.
Declaration source: packages/core/src/types.ts:626.
export interface BatchOrderParams {
readonly priceBps: number;
readonly quantity: bigint;
/** Optional 16-byte identifier, unique among the batch's nonzero IDs. */
readonly clientOrderId?: Uint8Array;
}
Field documentation
clientOrderId— Optional 16-byte identifier, unique among the batch's nonzero IDs.
batchPostOnlyHeapFrameBytes#
D0{byte} Heap frame a batch post-only transaction must request.
orderCount is the TOTAL number of entries (bids + asks). Mirrors
batch_post_only_heap_frame_bytes in program/src/constants.rs.
Declaration source: packages/core/src/computeBudget.ts:74.
export function batchPostOnlyHeapFrameBytes(orderCount: number): number;
Parameters
orderCount: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>BatchPostOnlyParams</summary>BatchPostOnlyParams#
Not documented.
Declaration source: packages/core/src/types.ts:632.
export interface BatchPostOnlyParams {
readonly outcome: OutcomeAsset;
readonly bids: readonly BatchOrderParams[];
readonly asks: readonly BatchOrderParams[];
readonly executionValidUntil?: bigint;
readonly restingExpiresAt?: bigint;
readonly maxRestingAgeSeconds?: number;
readonly maxQuoteInput?: bigint;
readonly selfTradeBehavior?: number;
readonly treasuryIndex: number;
}
BigIntOverflowError#
Error thrown when a BigInt value would overflow when converted to Number.
Declaration source: packages/core/src/utils/bigint.ts:21.
export declare class BigIntOverflowError extends Error {
constructor(value: bigint, message: string | undefined);
readonly value: bigint;
}
Parameters
value: bigint— Not documented.message: string | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>BINARY_EVENT_TAGS</summary>BINARY_EVENT_TAGS#
Body tags of every program event, keyed by name. Built from the generated
IDL catalog (program/src/events/schema.rs); the catalog is dense, so it has
no reserved entries and no removed names.
Declaration source: packages/core/src/events.ts:118.
export declare const BINARY_EVENT_TAGS: BinaryEventTagMap;
BINARY_RECORDER_AUTHORITY_KIND#
Not documented.
Declaration source: packages/core/src/events.ts:26.
export declare const BINARY_RECORDER_AUTHORITY_KIND: 2;
BINARY_RECORDER_HEADER_LEN#
Not documented.
Declaration source: packages/core/src/events.ts:27.
export declare const BINARY_RECORDER_HEADER_LEN: 95;
BINARY_RECORDER_TOTAL_HEADER_LEN#
Not documented.
Declaration source: packages/core/src/events.ts:28.
export declare const BINARY_RECORDER_TOTAL_HEADER_LEN: number;
BINARY_RECORDER_VERSION#
Not documented.
Declaration source: packages/core/src/events.ts:25.
export declare const BINARY_RECORDER_VERSION: 4;
BinaryEventTagMap#
Event name to body tag, one entry per name in the generated catalog.
Declaration source: packages/core/src/events.ts:109.
export type BinaryEventTagMap = {
readonly [E in (typeof IDL_EVENT_TAGS)[number] as E['name']]: E['tag'];
};
BinaryFairValueResult#
Not documented.
Declaration source: packages/core/src/fairValue.ts:32.
export interface BinaryFairValueResult {
model: FairValueModel;
upProbabilityBps: number;
downProbabilityBps: number;
/**
* Standardized log-return distance used by the model. Deterministic branches
* return +/-Infinity, which JSON.stringify serializes as null.
*/
zScore: number;
/**
* Arithmetic premium over the strike in bps, rounded from
* `((currentPrice - startPrice) / startPrice) * 10_000`. This is not
* log-space and must not be mixed with log-space volatility or drift inputs.
*/
toBeatBps: number;
yearsToExpiry: number;
annualizedVolatilityBps: number;
driftBps: number;
assumptions: readonly string[];
}
Field documentation
zScore— Standardized log-return distance used by the model. Deterministic branches return +/-Infinity, which JSON.stringify serializes as null.toBeatBps— Arithmetic premium over the strike in bps, rounded from((currentPrice - startPrice) / startPrice) * 10_000. This is not log-space and must not be mixed with log-space volatility or drift inputs.
BinaryFieldKind#
Not documented.
Declaration source: packages/core/src/events.ts:78.
export type BinaryFieldKind =
| 'i32'
| 'bool'
| 'u8'
| 'u16'
| 'u32'
| 'u64'
| 'u128'
| 'i64'
| 'i128'
| 'pubkey'
| 'pubkeyArray8'
| 'bytes16'
| 'bytes32'
| 'bytes128'
| 'bytes256'
| 'bytes257'
| 'numerators'
| 'resolverEntries';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
BinaryKellyInput#
Not documented.
Declaration source: packages/core/src/fairValue.ts:77.
export interface BinaryKellyInput {
/** Fair probability for the binary share being bought, in bps. */
fairProbabilityBps: number;
/** Entry price for that share, in bps. */
entryPriceBps: number;
}
Field documentation
fairProbabilityBps— Fair probability for the binary share being bought, in bps.entryPriceBps— Entry price for that share, in bps.
BinaryRecorderBatch#
Not documented.
Declaration source: packages/core/src/events.ts:55.
export interface BinaryRecorderBatch {
header: BinaryRecorderHeader;
events: SeesawBinaryEvent[];
}
BinaryRecorderHeader#
Not documented.
Declaration source: packages/core/src/events.ts:36.
export interface BinaryRecorderHeader {
version: number;
instructionKind: number;
authorityKind: number;
batchIndex: number;
eventSequence: bigint;
slot: bigint;
unixTimestamp: bigint;
subject: string;
signer: string;
eventCount: number;
}
binaryRecorderTail#
Resolve the canonical two-account binary-event recorder tail
(self_program, log_authority) for programAddress.
Spread the result into any builder-accounts object that extends {@link BinaryRecorderTailAccounts}:
const accounts = { ...base, ...(await binaryRecorderTail(programAddress)) };
The tail is optional on the wire (spec/IX.md § 6.2) but is NOT optional for
any client whose orders must appear in an indexed order book. The program
only emits its binary OrderPlaced / OrderFilled / MakerFillApplied
events when the tail is present; without it an indexer sees a bare
instruction and cannot learn the on-chain order id (orderbook.next_order_id
never reaches the transaction otherwise), the fill quantity, or the terminal
status. First-party clients therefore attach it unconditionally.
CU note: the tail costs one self-CPI per emitted batch. The program's own CU
goldens already budget for it — program/tests/cu_benchmark.rs asserts
PlaceOrder carries "18 processor accounts plus the recorder tail" (20).
Declaration source: packages/core/src/instructions.ts:513.
export function binaryRecorderTail(programAddress?: Address): Promise<Required<BinaryRecorderTailAccounts>>;
Parameters
programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Required<BinaryRecorderTailAccounts>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
BinaryRecorderTailAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:365.
export interface BinaryRecorderTailAccounts {
/** Must match a custom instruction program address; ignored for the default program. */
selfProgram?: Address;
/** Custom program `"log"` PDA; ignored in favor of the canonical default-program constant. */
logAuthority?: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
BookFairValueView#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:24.
export interface BookFairValueView {
mid: FairValueReference | null;
microprice: FairValueReference | null;
lastTrade: FairValueReference | null;
splineImplied: FairValueReference | null;
}
bookHasActiveStrategyOrders#
Not documented.
Declaration source: packages/core/src/marketDiscovery.ts:227.
export function bookHasActiveStrategyOrders(book: OrderbookAccount): boolean;
Parameters
book: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>BookLaneSnapshot</summary>BookLaneSnapshot#
One outcome's own lane: bids acquire the outcome, asks dispose of it.
Declaration source: packages/core/src/preflight/types.ts:630.
export interface BookLaneSnapshot {
bids: Array<{ price: number; quantity: bigint }>;
asks: Array<{ price: number; quantity: bigint }>;
/** Open bid ORDERS in this lane (not levels). Omitted falls back to the arena count. */
bidOrderCount?: number;
/** Open ask ORDERS in this lane (not levels). Omitted falls back to the arena count. */
askOrderCount?: number;
}
Field documentation
bidOrderCount— Open bid ORDERS in this lane (not levels). Omitted falls back to the arena count.askOrderCount— Open ask ORDERS in this lane (not levels). Omitted falls back to the arena count.
BookLevelSnapshot#
One aggregated book level, price in basis points.
Declaration source: packages/core/src/preflight/types.ts:598.
export interface BookLevelSnapshot {
price: number;
quantity: bigint;
}
BookSnapshot#
The order book an order is checked against, best-first on each side, prices in bps.
Every price is in its resting order's own outcome denomination
(spec/ORDERBOOK.md § 2.3a): a bids level acquires its outcome and an
asks level disposes of it.
bids/asks are the canonical arena arrays, which interleave the YES and NO
lanes. The program prices, crosses and bands every order against its OWN
outcome lane only (a NO bid never crosses a YES ask, and the maker band is
anchored on the order's own lane bests — maker_band_anchors,
place_order_trait/mod.rs). Supply {@link BookSnapshot.lanes} whenever the
served book carries them (aggregateOrderbookLanes, the indexer's
orderbook.lanes): the verdict then reads the intent's own lane for the maker
band, the PostOnly crossing test and the fill estimate. Without lanes it
falls back to the interleaved arrays, which can both over-report crossing
liquidity and anchor the band on the other outcome's quotes.
Declaration source: packages/core/src/preflight/types.ts:622.
export interface BookSnapshot {
bids: Array<{ price: number; quantity: bigint }>;
asks: Array<{ price: number; quantity: bigint }>;
/** Per-outcome lanes of the same open orders. Preferred over `bids`/`asks`. */
lanes?: { yes: BookLaneSnapshot; no: BookLaneSnapshot };
}
Field documentation
lanes— Per-outcome lanes of the same open orders. Preferred overbids/asks.
BPS_DENOMINATOR#
D4{bps} Basis points denominator (10,000 = 100%).
Declaration source: packages/core/src/constants.ts:74.
export declare const BPS_DENOMINATOR: 10000n;
BPS_DIVISOR#
10_000 bps = 100%.
Declaration source: packages/core/src/fee.ts:54.
export declare const BPS_DIVISOR: 10000n;
bpsToDecimal#
Convert basis points to a decimal fraction (e.g., 5000 -> 0.5).
Declaration source: packages/core/src/price.ts:36.
export function bpsToDecimal(bps: number): number;
Parameters
bps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>bpsToPercent</summary>bpsToPercent#
Convert basis points to percent (e.g., 5000 -> 50).
Declaration source: packages/core/src/price.ts:22.
export function bpsToPercent(bps: number): number;
Parameters
bps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>bridgeDeposit</summary>bridgeDeposit#
Not documented.
Declaration source: packages/core/src/bridgeDeposit/index.ts:7.
export declare const bridgeDeposit: typeof import("packages/core/src/bridgeDeposit/index");
buildAdvancedOrderIntent#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:387.
export function buildAdvancedOrderIntent(input: AdvancedOrderRequest): AdvancedOrderIntent;
Parameters
input: AdvancedOrderRequest— Not documented. See AdvancedOrderRequest for its declaration and available field documentation.
Returns
AdvancedOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>buildApproveBuilderIx</summary>buildApproveBuilderIx#
Build ApproveBuilder (0x4A): create or update the trader-signed approval.
Accounts: [approval (w), trader (s), payer (s,w), builder (r), system_program]
plus the recorder tail. The approval is not usable in the slot that created
or last updated it (FR-12), so send it in its own transaction before trading.
Declaration source: packages/core/src/builder.ts:137.
export function buildApproveBuilderIx(accounts: ApproveBuilderAccounts, params: ApproveBuilderParams, programAddress?: Address): Instruction;
Parameters
accounts: ApproveBuilderAccounts— Not documented. See ApproveBuilderAccounts for its declaration and available field documentation.params: ApproveBuilderParams— Not documented. See ApproveBuilderParams for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildAssertBalancesFrame#
Build the exact instruction body and read-only metas in processor order.
Declaration source: packages/core/src/router/assertBalances.ts:85.
export function buildAssertBalancesFrame(bounds: AssertBalancesBounds, accounts: AssertBalancesAccounts): AssertBalancesFrame;
Parameters
bounds: AssertBalancesBounds— Not documented. See AssertBalancesBounds for its declaration and available field documentation.accounts: AssertBalancesAccounts— Not documented. See AssertBalancesAccounts for its declaration and available field documentation.
Returns
AssertBalancesFrame
Not documented.
Throws
Not documented.
</details> <details> <summary>buildAssertBalancesIx</summary>buildAssertBalancesIx#
Encode the final, read-only assertion for the same program as the trade legs.
Declaration source: packages/core/src/router/assertBalances.ts:72.
export function buildAssertBalancesIx(bounds: AssertBalancesBounds, accounts: AssertBalancesAccounts, programAddress: Address): Instruction;
Parameters
bounds: AssertBalancesBounds— Not documented. See AssertBalancesBounds for its declaration and available field documentation.accounts: AssertBalancesAccounts— Not documented. See AssertBalancesAccounts for its declaration and available field documentation.programAddress: Address— Not documented.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildAtomicMarketRoute</summary>buildAtomicMarketRoute#
Compile a route as one transaction and choose the best route that fits the packet.
Declaration source: packages/core/src/router/buildAtomicMarketRoute.ts:46.
export function buildAtomicMarketRoute(quote: RpcMarketRouteQuote, resources: MirrorTransactionResources, executionValidUntil: bigint): Promise<{ plan: import("packages/core/src/index").RoutePlan; instructions: Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]; measurement: import("packages/core/src/v1Transaction").MirrorPacketMeasurement; }>;
Parameters
quote: RpcMarketRouteQuote— Not documented. See RpcMarketRouteQuote for its declaration and available field documentation.resources: MirrorTransactionResources— Not documented. See MirrorTransactionResources for its declaration and available field documentation.executionValidUntil: bigint— Not documented.
Returns
Promise<{ plan: import("packages/core/src/index").RoutePlan; instructions: Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]; measurement: import("packages/core/src/v1Transaction").MirrorPacketMeasurement; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildAtomicMarketRouteForStandardWallet</summary>buildAtomicMarketRouteForStandardWallet#
Compile an atomic route for a standard wallet, which signs Solana version 0 messages rather than raw v1 wire transactions.
Declaration source: packages/core/src/router/buildAtomicMarketRoute.ts:68.
export function buildAtomicMarketRouteForStandardWallet(quote: RpcMarketRouteQuote, executionValidUntil: bigint): Promise<{ instructions: Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]; plan: import("packages/core/src/index").RoutePlan; measurement: { bytes: number; fits: boolean; }; }>;
Parameters
quote: RpcMarketRouteQuote— Not documented. See RpcMarketRouteQuote for its declaration and available field documentation.executionValidUntil: bigint— Not documented.
Returns
Promise<{ instructions: Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]; plan: import("packages/core/src/index").RoutePlan; measurement: { bytes: number; fits: boolean; }; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildAttachSplineIx</summary>buildAttachSplineIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4755.
export function buildAttachSplineIx(params: AttachSplineParams, accounts: AttachSplineAccounts, programAddress?: Address): Instruction;
Parameters
params: AttachSplineParams— Not documented. See AttachSplineParams for its declaration and available field documentation.accounts: AttachSplineAccounts— Not documented. See AttachSplineAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildAuthMessage#
Not documented.
Declaration source: packages/core/src/auth.ts:80.
export function buildAuthMessage(input: AuthMessageInput): string;
Parameters
input: AuthMessageInput— Not documented. See AuthMessageInput for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>buildBatchPostOnlyWithFreeFundsIx</summary>buildBatchPostOnlyWithFreeFundsIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:1814.
export function buildBatchPostOnlyWithFreeFundsIx(params: BatchPostOnlyParams, accounts: FreeFundsPlaceOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: BatchPostOnlyParams— Not documented. See BatchPostOnlyParams for its declaration and available field documentation.accounts: FreeFundsPlaceOrderAccounts— Not documented. See FreeFundsPlaceOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCancelMultipleOrdersByIdIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3577.
export function buildCancelMultipleOrdersByIdIx(params: CancelMultipleOrdersByIdParams, accounts: CancelOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: CancelMultipleOrdersByIdParams— Not documented. See CancelMultipleOrdersByIdParams for its declaration and available field documentation.accounts: CancelOrderAccounts— Not documented. See CancelOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCancelMultipleOrdersByIdWithFreeFundsIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3604.
export function buildCancelMultipleOrdersByIdWithFreeFundsIx(params: CancelMultipleOrdersByIdParams, accounts: CancelOrderWithFreeFundsAccounts & { readonly strategy?: PrefundedStrategyAccounts; }, programAddress?: Address): Instruction;
Parameters
params: CancelMultipleOrdersByIdParams— Not documented. See CancelMultipleOrdersByIdParams for its declaration and available field documentation.accounts: CancelOrderWithFreeFundsAccounts & { readonly strategy?: PrefundedStrategyAccounts; }— Not documented. See CancelOrderWithFreeFundsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCancelOrderByClientIdIx#
Cancel a single order by client ID and refund to the wallet or ledger.
Declaration source: packages/core/src/strategyAccounts.ts:719.
export function buildCancelOrderByClientIdIx(input: { readonly clientOrderId: Uint8Array; } & ({ readonly refund: "wallet"; readonly accounts: CancelOrderAccounts; } | ({ readonly refund: "ledger"; } & LedgerCancellationInput)), programAddress?: Address): Promise<Instruction>;
Parameters
input: { readonly clientOrderId: Uint8Array; } & ({ readonly refund: "wallet"; readonly accounts: CancelOrderAccounts; } | ({ readonly refund: "ledger"; } & LedgerCancellationInput))— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCancelOrderIx#
Build CancelOrder instruction.
Discriminator: 0x11 Args: order_id(u64) = 8 bytes
Account layout (15 accounts): 0: market (writable) 1: orderbook (writable) 2: user_position (writable) 3: user_token_account (writable) 4: vault (writable) 5: user (signer, readonly) 6: token_program (readonly) 7: settlement_mint (readonly) 8: yes_escrow (writable) 9: no_escrow (writable) 10: user_yes_ata (writable) 11: user_no_ata (writable) 12: yes_mint (writable) — required for partial-fill Burn CPI 13: no_mint (writable) — required for partial-fill Burn CPI 14: trader_ledger (writable)
Declaration source: packages/core/src/instructions.ts:2065.
export function buildCancelOrderIx(params: CancelOrderParams, accounts: CancelOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: CancelOrderParams— Not documented. See CancelOrderParams for its declaration and available field documentation.accounts: CancelOrderAccounts— Not documented. See CancelOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCanonicalInstrumentId#
Not documented.
Declaration source: packages/core/src/instruments.ts:193.
export function buildCanonicalInstrumentId(input: CanonicalInstrumentIdInput): string;
Parameters
input: CanonicalInstrumentIdInput— Not documented. See CanonicalInstrumentIdInput for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>buildCanonicalSymbol</summary>buildCanonicalSymbol#
Not documented.
Declaration source: packages/core/src/instruments.ts:148.
export function buildCanonicalSymbol(input: CanonicalInstrumentInput): string;
Parameters
input: CanonicalInstrumentInput— Not documented. See CanonicalInstrumentInput for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>buildClaimAuthorityIx</summary>buildClaimAuthorityIx#
Build ClaimAuthority instruction.
Discriminator: 0x02 Args: none
Step 2 of authority rotation. Signer must match config.pending_authority
and the on-chain timelock must have elapsed.
Declaration source: packages/core/src/instructions.ts:3719.
export function buildClaimAuthorityIx(accounts: ClaimAuthorityAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ClaimAuthorityAccounts— Not documented. See ClaimAuthorityAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildClaimCreatorFeesIx#
Build ClaimCreatorFees instruction.
Discriminator: 0x20 Args: none
Sweeps accumulated_creator_fees from the market vault to the creator's
token account. Permissionless caller; recipient is pinned to market.creator
via the program's token-account authority check.
Declaration source: packages/core/src/instructions.ts:3340.
export function buildClaimCreatorFeesIx(accounts: ClaimCreatorFeesAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ClaimCreatorFeesAccounts— Not documented. See ClaimCreatorFeesAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildClaimCurrencyReferrerEarningsIx#
Claim a referrer's full earnings in the currency of its record.
Declaration source: packages/core/src/instructions.ts:2530.
export function buildClaimCurrencyReferrerEarningsIx(accounts: ClaimCurrencyReferrerEarningsAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ClaimCurrencyReferrerEarningsAccounts— Not documented. See ClaimCurrencyReferrerEarningsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCloseMakerQuoteStateIx#
Supply the outcomes with nonzero reserves when closing after resolution or expiry.
Declaration source: packages/core/src/makerQuoteInstructions.ts:173.
export function buildCloseMakerQuoteStateIx(accounts: { readonly market: Address; readonly owner: Address; readonly caller: Address; readonly reserveOutcomes?: readonly (0 | 1)[]; readonly terminalOrderCleanup?: { readonly externalMarket: boolean; }; }, programAddress?: Address): Promise<Instruction>;
Parameters
accounts: { readonly market: Address; readonly owner: Address; readonly caller: Address; readonly reserveOutcomes?: readonly (0 | 1)[]; readonly terminalOrderCleanup?: { readonly externalMarket: boolean; }; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCloseMarketIx#
Build CloseMarket instruction.
A duplicate call after production rent recovery may reject as a terminal closed-account shape once the runtime has removed the market account. Clients should treat that rejection as already-closed after confirming the market account is absent.
Discriminator: 0x1B Args: none
Fixed prefix is slots 0..13. Authenticated heads are native ordinary (15), native escrow recovery (17, policy then mints), external ordinary (16, metadata then policy), and external recovery (18). Risk accounts precede the recorder pair.
Fixed prefix (order-sensitive): 0. market (writable) — zeroed and rent returned
- creator (writable) — receives rent SOL
- caller (signer, readonly) — permissionless
- config (readonly)
- system_program (readonly)
- vault (writable) — SPL token account, closed on success
- token_program (readonly) — the market's quote program
- share_token_program (readonly) — classic SPL Token
- orderbook (writable) — zeroed, rent to creator
- yes_escrow (writable) — closed via SPL CPI
- no_escrow (writable) — closed via SPL CPI
- trader_ledger (writable) — zeroed, rent to creator
- residual_recipient (writable) — dust sweep target
- settlement_mint (readonly) — residual
TransferCheckedmint Tail. native policy or external metadata + policy, then optional YES/NO mints. A market's ownmax_total_sharescap is the only share limit; closing releases the market's escrows, mints, and vault without any global aggregate to unwind.
Declaration source: packages/core/src/instructions.ts:3131.
export function buildCloseMarketIx(accounts: CloseMarketAccounts, programAddress?: Address): Instruction;
Parameters
accounts: CloseMarketAccounts— Not documented. See CloseMarketAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildClosePositionIx#
Build ClosePosition instruction (permissionless, rent → owner).
Discriminator: 0x1A Args: none
Declaration source: packages/core/src/instructions.ts:3951.
export function buildClosePositionIx(accounts: ClosePositionAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ClosePositionAccounts— Not documented. See ClosePositionAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildClosePreallocatedChildIx#
Close an abandoned, all-zero native preallocated child (orderbook or trader
ledger, selected by childKind: 0 or 1) and refund every lamport to the
creator bound by its marker. Every market has the canonical size, so the
payload carries no capacity; it matches ClosePreallocatedChildArgs.
Declaration source: packages/core/src/instructions.ts:3199.
export function buildClosePreallocatedChildIx(childKind: 0 | 1, accounts: ClosePreallocatedChildAccounts, programAddress?: Address): Instruction;
Parameters
childKind: 0 | 1— Not documented.accounts: ClosePreallocatedChildAccounts— Not documented. See ClosePreallocatedChildAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCloseSeatIx#
Close a settled seat and return its account rent to the maker series.
Declaration source: packages/core/src/seatInstructions.ts:150.
export function buildCloseSeatIx(caller: Address, seat: Address, series: Address, programAddress: Address): Promise<Instruction>;
Parameters
caller: Address— Not documented.seat: Address— Not documented.series: Address— Not documented.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildCloseSplineIx</summary>buildCloseSplineIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4961.
export function buildCloseSplineIx(accounts: CloseSplineAccounts, programAddress?: Address): Instruction;
Parameters
accounts: CloseSplineAccounts— Not documented. See CloseSplineAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCloseStopLossNonceInstruction#
WithdrawNonceAccount of the whole balance back to the owner. This closes
the nonce account, so every transaction signed against it can never land:
the on-chain way to cancel a stop (and get the rent back).
Declaration source: packages/core/src/stopLoss/nonce.ts:154.
export function buildCloseStopLossNonceInstruction(input: { nonceAccount: Address; owner: Address; lamports: bigint; }): Instruction;
Parameters
input: { nonceAccount: Address; owner: Address; lamports: bigint; }— Not documented.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildCloseStrategyIx</summary>buildCloseStrategyIx#
Close a strategy and return its rent to its owner.
Declaration source: packages/core/src/strategyAccounts.ts:259.
export function buildCloseStrategyIx(input: OwnerStrategyInput, programAddress?: Address): Promise<Instruction>;
Parameters
input: OwnerStrategyInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildConfigureStrategyIx#
Configure or replace an owner strategy using the canonical account and wire layouts.
Declaration source: packages/core/src/strategyAccounts.ts:112.
export function buildConfigureStrategyIx(input: ConfigureStrategyInput, programAddress?: Address): Promise<Instruction>;
Parameters
input: ConfigureStrategyInput— Not documented. See ConfigureStrategyInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCreateMarketBundle#
Build the ordered transaction groups for CreateMarket: EnsureTraderLedgerSpace preallocation, EnsureDeepOrderbookSpace preallocation, then a CreateMarket-only group.
This is the right entry point for almost every caller. Each returned
inner array is one transaction; allocation groups must be confirmed before
the final CreateMarket transaction. Every group is compiled and sized for
transport (default: v0 with a compute-budget limit+price prefix, 1,232
bytes) before this returns; a prelude larger than one transaction is split
across consecutive groups. See {@link planCreateMarketTransactionGroups}
for measured sizes and authenticated resume.
Declaration source: packages/core/src/instructions.ts:1438.
export function buildCreateMarketBundle(params: CreateMarketParams, accounts: CreateMarketAccounts, programAddress?: Address, nativeIntent?: EnsureDeepOrderbookSpaceIntent, transport?: NativeTransactionTransport): Instruction[][];
Parameters
params: CreateMarketParams— Not documented. See CreateMarketParams for its declaration and available field documentation.accounts: CreateMarketAccounts— Not documented. See CreateMarketAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.nativeIntent: EnsureDeepOrderbookSpaceIntent | undefined— Not documented. See EnsureDeepOrderbookSpaceIntent for its declaration and available field documentation.transport: NativeTransactionTransport | undefined— Not documented. See NativeTransactionTransport for its declaration and available field documentation.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>[][]
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCreateMarketIx#
Build CreateMarket instruction.
Discriminator: 0x03
Args: max_confidence_ratio_bps(u16) + duration_seconds(u64) + max_oracle_jump_bps(u32) + max_total_shares(u64) + preparation_timestamp_us(u64), exactly 30 bytes. Market capacity is not a
parameter: every market has the one canonical ledger and book size. The
account at priceUpdate is a verified Pyth Receiver
PriceUpdateV2 account; there is no oracle mode selector. The immutable
native resolution policy follows the trader ledger; nothing else must exist
beforehand.
Declaration source: packages/core/src/instructions.ts:878.
export function buildCreateMarketIx(params: CreateMarketParams, accounts: CreateMarketAccounts, programAddress?: Address): Instruction;
Parameters
params: CreateMarketParams— Not documented. See CreateMarketParams for its declaration and available field documentation.accounts: CreateMarketAccounts— Not documented. See CreateMarketAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildCreateStopLossNonceInstructions#
CreateAccountWithSeed (base = funder = owner) + InitializeNonceAccount
(authority = owner). lamports must be the rent-exempt minimum for
{@link STOP_LOSS_NONCE_ACCOUNT_LENGTH} bytes.
Declaration source: packages/core/src/stopLoss/nonce.ts:97.
export function buildCreateStopLossNonceInstructions(input: { owner: Address; slot: number; lamports: bigint; }): { nonceAccount: Address; instructions: Instruction[]; };
Parameters
input: { owner: Address; slot: number; lamports: bigint; }— Not documented.
Returns
{ nonceAccount: Address; instructions: Instruction[]; }
Not documented.
Throws
Not documented.
</details> <details> <summary>buildCurrencyMetadata</summary>buildCurrencyMetadata#
Merge whatever sources answered into one display row. Precedence for
identity and price: v2 variant, then v1 snapshot, then registry. Nothing is
invented: a missing source leaves its fields null.
Declaration source: packages/core/src/tokensXyz/normalize.ts:32.
export function buildCurrencyMetadata(input: CurrencyMetadataInputs): CurrencyMetadata;
Parameters
input: CurrencyMetadataInputs— Not documented. See CurrencyMetadataInputs for its declaration and available field documentation.
Returns
CurrencyMetadata
Not documented.
Throws
Not documented.
</details> <details> <summary>buildDepositFundsIx</summary>buildDepositFundsIx#
Build a DepositFunds instruction (Wave 4a).
Transfers amount stablecoin from userStablecoinAta to vault and
credits the trader-ledger quote_free bucket by the same amount. The
trader-ledger slot is the authoritative source of free quote balance;
UserPositionAccount.collateral_deposited is mirrored when the position
PDA is initialized.
Discriminator: 0x08. Args: amount(u64) = 8 bytes.
Declaration source: packages/core/src/instructions.ts:3455.
export function buildDepositFundsIx(params: DepositOrWithdrawFundsParams, accounts: DepositOrWithdrawFundsAccounts, programAddress?: Address): Instruction;
Parameters
params: DepositOrWithdrawFundsParams— Not documented. See DepositOrWithdrawFundsParams for its declaration and available field documentation.accounts: DepositOrWithdrawFundsAccounts— Not documented. See DepositOrWithdrawFundsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildDepositSplineVaultIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4928.
export function buildDepositSplineVaultIx(params: SplineVaultAmountParams, accounts: SplineVaultAccounts, programAddress?: Address): Instruction;
Parameters
params: SplineVaultAmountParams— Not documented. See SplineVaultAmountParams for its declaration and available field documentation.accounts: SplineVaultAccounts— Not documented. See SplineVaultAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildDepthAreaPath#
Build a stepped ("step-after") area path for one side of the book,
filled down to the baseline (y = height). points must be ordered
near-to-far from the mid (the natural order of DepthPoint[] for both
bid and ask sides). Returns '' for an empty side.
Declaration source: packages/core/src/depthChart.ts:64.
export function buildDepthAreaPath(points: DepthPoint[], axis: DepthProfileAxis, midBps: number, maxSize: bigint, height: number): string;
Parameters
points: DepthPoint[]— Not documented.axis: DepthProfileAxis— Not documented. See DepthProfileAxis for its declaration and available field documentation.midBps: number— Not documented.maxSize: bigint— Not documented.height: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>buildDepthAwareSizePresets</summary>buildDepthAwareSizePresets#
Not documented.
Declaration source: packages/core/src/depth.ts:171.
export function buildDepthAwareSizePresets(input: BuildDepthAwareSizePresetsInput): DepthAwareSizePresets;
Parameters
input: BuildDepthAwareSizePresetsInput— Not documented. See BuildDepthAwareSizePresetsInput for its declaration and available field documentation.
Returns
DepthAwareSizePresets
Not documented.
Throws
Not documented.
</details> <details> <summary>BuildDepthAwareSizePresetsInput</summary>BuildDepthAwareSizePresetsInput#
Not documented.
Declaration source: packages/core/src/depth.ts:137.
export interface BuildDepthAwareSizePresetsInput {
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly limitPriceBps: number;
readonly book: {
readonly bids: readonly OrderbookLevel[];
readonly asks: readonly OrderbookLevel[];
};
readonly balanceCap: bigint;
readonly maxImpactBps?: number;
}
buildDepthEdgePath#
Same stepped geometry as {@link buildDepthAreaPath} but the open top-edge line only (no baseline, no fill close).
Declaration source: packages/core/src/depthChart.ts:88.
export function buildDepthEdgePath(points: DepthPoint[], axis: DepthProfileAxis, midBps: number, maxSize: bigint, height: number): string;
Parameters
points: DepthPoint[]— Not documented.axis: DepthProfileAxis— Not documented. See DepthProfileAxis for its declaration and available field documentation.midBps: number— Not documented.maxSize: bigint— Not documented.height: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>buildDisablePostOnlyModeIx</summary>buildDisablePostOnlyModeIx#
Build DisablePostOnlyMode instruction (idempotent).
Discriminator: 0x27 Args: none
Declaration source: packages/core/src/instructions.ts:4082.
export function buildDisablePostOnlyModeIx(accounts: DisablePostOnlyModeAccounts, programAddress?: Address): Instruction;
Parameters
accounts: DisablePostOnlyModeAccounts— Not documented. See DisablePostOnlyModeAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildDiscoverySnapshot#
Identify a complete input set: digest, policy, slot, Clock time and consistency.
Declaration source: packages/core/src/discoverySnapshot.ts:101.
export function buildDiscoverySnapshot(inputs: readonly DiscoveryInputAccount[], policyVersion: number): DiscoverySnapshot;
Parameters
inputs: readonly DiscoveryInputAccount[]— Not documented.policyVersion: number— Not documented.
Returns
DiscoverySnapshot
Not documented.
Throws
Not documented.
</details> <details> <summary>buildEmbedSnippet</summary>buildEmbedSnippet#
A sandboxed, lazy <iframe> for the embed URL; every attribute value is escaped.
Declaration source: packages/core/src/widget/embed.ts:138.
export function buildEmbedSnippet(origin: string, marketId: string, options?: EmbedSnippetOptions): string;
Parameters
origin: string— Not documented.marketId: string— Not documented.options: EmbedSnippetOptions— Not documented. Default:{}. See EmbedSnippetOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
Defaults
options:{}.
buildEmbedUrl#
<origin>/embed/<marketId>?ref=..&theme=..&locale=.. (only the options given, in that order).
Declaration source: packages/core/src/widget/embed.ts:114.
export function buildEmbedUrl(origin: string, marketId: string, options?: EmbedUrlOptions): string;
Parameters
origin: string— Not documented.marketId: string— Not documented.options: EmbedUrlOptions— Not documented. Default:{}. See EmbedUrlOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
Defaults
options:{}.
buildEnablePostOnlyModeIx#
Build EnablePostOnlyMode instruction (idempotent).
Discriminator: 0x26 Args: none
Declaration source: packages/core/src/instructions.ts:4056.
export function buildEnablePostOnlyModeIx(accounts: EnablePostOnlyModeAccounts, programAddress?: Address): Instruction;
Parameters
accounts: EnablePostOnlyModeAccounts— Not documented. See EnablePostOnlyModeAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureDeepOrderbookSpaceIx#
Build a single EnsureDeepOrderbookSpace instruction.
Each invocation grows the deep orderbook PDA by up to
MAX_PERMITTED_DATA_INCREASE (10,240) bytes toward the one canonical
book size (DEEP_ORDERBOOK_ACCOUNT_SIZE). Idempotent — over-invoking is safe.
Discriminator: 0x30
Args: empty when receipt-authenticated, or the 48-byte native binding
pyth_feed_id + duration_seconds + market_id.
The receipt-free form has the same donation-only semantics as the ledger allocator; receipt-bound external preparation is attributable to the creator and must be confirmed before the next dependent transaction.
Declaration source: packages/core/src/instructions.ts:1137.
export function buildEnsureDeepOrderbookSpaceIx(accounts: EnsureDeepOrderbookSpaceAccounts, programAddress?: Address, nativeIntent?: EnsureDeepOrderbookSpaceIntent): Instruction;
Parameters
accounts: EnsureDeepOrderbookSpaceAccounts— Not documented. See EnsureDeepOrderbookSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.nativeIntent: EnsureDeepOrderbookSpaceIntent | undefined— Not documented. See EnsureDeepOrderbookSpaceIntent for its declaration and available field documentation.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureDeepOrderbookSpacePlan#
Build a low-level receipt-authenticated allocation plan with creator fee payer.
Declaration source: packages/core/src/instructions.ts:1199.
export function buildEnsureDeepOrderbookSpacePlan(accounts: EnsureDeepOrderbookSpaceAccounts & { preallocationReceipt: Address; }, programAddress?: Address): CreatorFundedExternalMarketPlan;
Parameters
accounts: EnsureDeepOrderbookSpaceAccounts & { preallocationReceipt: Address; }— Not documented. See EnsureDeepOrderbookSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
CreatorFundedExternalMarketPlan
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureDeepOrderbookSpacePrelude#
Build the full EnsureDeepOrderbookSpace prelude needed before CreateMarket. Submit it in transactions separate from CreateMarket.
Returns ceil(DEEP_ORDERBOOK_ACCOUNT_SIZE / MAX_PERMITTED_DATA_INCREASE)
(129) invocations.
Declaration source: packages/core/src/instructions.ts:1186.
export function buildEnsureDeepOrderbookSpacePrelude(accounts: EnsureDeepOrderbookSpaceAccounts, programAddress?: Address, nativeIntent?: EnsureDeepOrderbookSpaceIntent): Instruction[];
Parameters
accounts: EnsureDeepOrderbookSpaceAccounts— Not documented. See EnsureDeepOrderbookSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.nativeIntent: EnsureDeepOrderbookSpaceIntent | undefined— Not documented. See EnsureDeepOrderbookSpaceIntent for its declaration and available field documentation.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureDeepOrderbookSpacePreludePlan#
Build the complete receipt-authenticated deep-orderbook allocation plan.
Declaration source: packages/core/src/instructions.ts:1210.
export function buildEnsureDeepOrderbookSpacePreludePlan(accounts: EnsureDeepOrderbookSpaceAccounts & { preallocationReceipt: Address; }, programAddress?: Address): CreatorFundedExternalMarketPlan;
Parameters
accounts: EnsureDeepOrderbookSpaceAccounts & { preallocationReceipt: Address; }— Not documented. See EnsureDeepOrderbookSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
CreatorFundedExternalMarketPlan
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureTraderLedgerSpaceIx#
Build a single EnsureTraderLedgerSpace instruction.
Each invocation grows the trader_ledger PDA by up to
MAX_PERMITTED_DATA_INCREASE (10,240) bytes toward the one canonical
ledger size (TRADER_LEDGER_ACCOUNT_SIZE); the instruction carries no size.
Idempotent — over-invoking is safe.
Most callers want buildCreateMarketBundle instead, which returns
preallocation transaction groups followed by a CreateMarket-only group.
Discriminator: 0x2F
Args: empty when receipt-authenticated, or the receipt-free native binding
pyth_feed_id([u8;32]) + duration_seconds(u64) + market_id(u64) (48 bytes).
Receipt-free native preparation must commit the exact market identity via
nativeIntent. External preparation uses the receipt-bound legacy payload
and must be confirmed before the dependent open.
Declaration source: packages/core/src/instructions.ts:995.
export function buildEnsureTraderLedgerSpaceIx(accounts: EnsureTraderLedgerSpaceAccounts, programAddress?: Address, nativeIntent?: EnsureTraderLedgerSpaceIntent): Instruction;
Parameters
accounts: EnsureTraderLedgerSpaceAccounts— Not documented. See EnsureTraderLedgerSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.nativeIntent: EnsureTraderLedgerSpaceIntent | undefined— Not documented. See EnsureTraderLedgerSpaceIntent for its declaration and available field documentation.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureTraderLedgerSpacePlan#
Build a low-level receipt-authenticated allocation plan with creator fee payer.
Declaration source: packages/core/src/instructions.ts:1065.
export function buildEnsureTraderLedgerSpacePlan(accounts: EnsureTraderLedgerSpaceAccounts & { preallocationReceipt: Address; }, programAddress?: Address): CreatorFundedExternalMarketPlan;
Parameters
accounts: EnsureTraderLedgerSpaceAccounts & { preallocationReceipt: Address; }— Not documented. See EnsureTraderLedgerSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
CreatorFundedExternalMarketPlan
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureTraderLedgerSpacePrelude#
Build the full EnsureTraderLedgerSpace prelude needed before CreateMarket.
Returns ceil(TRADER_LEDGER_ACCOUNT_SIZE / MAX_PERMITTED_DATA_INCREASE)
(68) invocations. Split them across transactions to stay within Solana's
per-transaction size and CU budgets, and confirm them before CreateMarket.
Declaration source: packages/core/src/instructions.ts:1046.
export function buildEnsureTraderLedgerSpacePrelude(accounts: EnsureTraderLedgerSpaceAccounts, programAddress?: Address, nativeIntent?: EnsureTraderLedgerSpaceIntent): Instruction[];
Parameters
accounts: EnsureTraderLedgerSpaceAccounts— Not documented. See EnsureTraderLedgerSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.nativeIntent: EnsureTraderLedgerSpaceIntent | undefined— Not documented. See EnsureTraderLedgerSpaceIntent for its declaration and available field documentation.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildEnsureTraderLedgerSpacePreludePlan#
Build the complete receipt-authenticated trader-ledger allocation plan.
Declaration source: packages/core/src/instructions.ts:1076.
export function buildEnsureTraderLedgerSpacePreludePlan(accounts: EnsureTraderLedgerSpaceAccounts & { preallocationReceipt: Address; }, programAddress?: Address): CreatorFundedExternalMarketPlan;
Parameters
accounts: EnsureTraderLedgerSpaceAccounts & { preallocationReceipt: Address; }— Not documented. See EnsureTraderLedgerSpaceAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
CreatorFundedExternalMarketPlan
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
BUILDER_APPROVAL_ACCOUNT_DISCRIMINATOR#
BuilderApprovalAccount discriminator (program/src/state/fee_accounts.rs).
Declaration source: packages/core/src/builder.ts:196.
export declare const BUILDER_APPROVAL_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
BUILDER_APPROVAL_ACCOUNT_SIZE#
D0{byte} BuilderApprovalAccount size (spec §4.3).
Declaration source: packages/core/src/builder.ts:34.
export declare const BUILDER_APPROVAL_ACCOUNT_SIZE: 96;
BUILDER_APPROVAL_BUILDER_OFFSET#
D0{byte} Offset of builder inside the approval account, for the
getProgramAccounts memcmp filter that lists a builder's approvals.
Declaration source: packages/core/src/builder.ts:41.
export declare const BUILDER_APPROVAL_BUILDER_OFFSET: 40;
BUILDER_APPROVAL_TRADER_OFFSET#
D0{byte} Offset of trader inside the approval account.
Declaration source: packages/core/src/builder.ts:43.
export declare const BUILDER_APPROVAL_TRADER_OFFSET: 8;
BUILDER_APPROVAL_VERSION#
Layout version stored at offset 75.
Declaration source: packages/core/src/builder.ts:36.
export declare const BUILDER_APPROVAL_VERSION: 1;
BuilderApprovalFields#
Decoded BuilderApproval fields a client needs to predict usability.
Declaration source: packages/core/src/builder.ts:245.
export interface BuilderApprovalFields {
trader: Address;
builder: Address;
maxBuilderBps: number;
createdSlot: bigint;
/** 0 = no expiry. */
expiresAt: bigint;
}
Field documentation
expiresAt— 0 = no expiry.
builderApprovalRejection#
Pure mirror of the fill-time approval checks (FR-5, FR-8, FR-12): returns
null when the program would pay the builder, else the reason it rejects.
The program rejects (it does not silently forfeit) a supplied approval that
fails any check (FR-16), so a client should drop the builder pair instead
of sending a doomed order.
Declaration source: packages/core/src/builder.ts:269.
export function builderApprovalRejection(approval: BuilderApprovalFields, user: Address, nowSeconds: bigint, currentSlot: bigint): BuilderApprovalRejection | null;
Parameters
approval: BuilderApprovalFields— Not documented. See BuilderApprovalFields for its declaration and available field documentation.user: Address— Not documented.nowSeconds: bigint— Not documented.currentSlot: bigint— Not documented.
Returns
BuilderApprovalRejection | null
Not documented.
Throws
Not documented.
</details> <details> <summary>BuilderApprovalRejection</summary>BuilderApprovalRejection#
Not documented.
Declaration source: packages/core/src/builder.ts:254.
export type BuilderApprovalRejection =
| 'self_builder'
| 'zero_builder'
| 'wrong_trader'
| 'invalid_max_bps'
| 'expired'
| 'not_yet_active';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
BuilderApprovalRevokedBinaryEvent#
Not documented.
Declaration source: packages/core/src/events.ts:72.
export interface BuilderApprovalRevokedBinaryEvent extends SeesawBinaryEvent {
tag: typeof BINARY_EVENT_TAGS.BuilderApprovalRevoked;
name: 'BuilderApprovalRevoked';
fields: { trader: string; builder: string };
}
BuilderApprovedBinaryEvent#
Not documented.
Declaration source: packages/core/src/events.ts:60.
export interface BuilderApprovedBinaryEvent extends SeesawBinaryEvent {
tag: typeof BINARY_EVENT_TAGS.BuilderApproved;
name: 'BuilderApproved';
fields: {
trader: string;
builder: string;
maxBuilderBps: number;
expiresAt: bigint;
createdSlot: bigint;
updated: number;
};
}
buildEvacuateIdleSeatIx#
Evacuate an idle seat into fresh, owner-controlled token accounts.
Declaration source: packages/core/src/instructions.ts:3998.
export function buildEvacuateIdleSeatIx(accounts: EvacuateIdleSeatAccounts, nonce: bigint, slotIndex: number, programAddress?: Address): Instruction;
Parameters
accounts: EvacuateIdleSeatAccounts— Not documented. See EvacuateIdleSeatAccounts for its declaration and available field documentation.nonce: bigint— Not documented.slotIndex: number— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildExpireMarketIx#
Build ExpireMarket instruction.
Discriminator: 0x06 Args: none
Declaration source: packages/core/src/instructions.ts:1563.
export function buildExpireMarketIx(accounts: ExpireMarketAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ExpireMarketAccounts— Not documented. See ExpireMarketAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildFillOrKillOrderIntent#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:267.
export function buildFillOrKillOrderIntent(input: FillOrKillOrderInput): AdvancedPlaceOrderIntent;
Parameters
input: FillOrKillOrderInput— Not documented. See FillOrKillOrderInput for its declaration and available field documentation.
Returns
AdvancedPlaceOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>buildFlagSeatBelowFloorIx</summary>buildFlagSeatBelowFloorIx#
Sample the seat against the governed liquidity floor.
Declaration source: packages/core/src/seatInstructions.ts:254.
export function buildFlagSeatBelowFloorIx(caller: Address, seat: Address, market: Address, programAddress: Address): Promise<Instruction>;
Parameters
caller: Address— Not documented.seat: Address— Not documented.market: Address— Not documented.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildForceCancelMarketOrdersIx</summary>buildForceCancelMarketOrdersIx#
Build ForceCancelMarketOrders instruction.
Discriminator: 0x2C Args: order_id(u64) = 8 bytes
Signed by config.authority or a configured nonzero config.pauser.
Market must currently be in ForceCancelOnly emergency status and must not
be resolved. Cancels one order at a time; bypasses the ReclaimExpiredOrder
TTL gate. YES/NO mints are writable because a ledger-routed ask burns its
escrowed shares.
Declaration source: packages/core/src/instructions.ts:4213.
export function buildForceCancelMarketOrdersIx(params: ForceCancelMarketOrdersParams, accounts: ForceCancelMarketOrdersAccounts, programAddress?: Address): Instruction;
Parameters
params: ForceCancelMarketOrdersParams— Not documented. See ForceCancelMarketOrdersParams for its declaration and available field documentation.accounts: ForceCancelMarketOrdersAccounts— Not documented. See ForceCancelMarketOrdersAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildForceCloseComputeBudgetIxs#
The SetComputeUnitLimit instruction every ForceClose transaction prepends.
Declaration source: packages/core/src/computeBudget.ts:191.
export function buildForceCloseComputeBudgetIxs(): Instruction[];
Parameters
No callable parameters.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]
Not documented.
Throws
Not documented.
</details> <details> <summary>buildForceCloseIx</summary>buildForceCloseIx#
Build ForceClose instruction.
Discriminator: 0x18 Args: none
Account layout (14 accounts, order-sensitive): 0. market (writable)
- position (writable)
- vault (writable)
- user_stablecoin_ata (writable)
- caller (writable signer, receives closer reward)
- config (readonly)
- token_program (readonly)
- settlement_mint (readonly)
- orderbook (writable)
- trader_ledger (writable)
- yes_escrow (writable) — canonical YES escrow validation account
- no_escrow (writable) — canonical NO escrow validation account
- yes_mint (writable) — canonical YES mint validation account
- no_mint (writable) — canonical NO mint validation account
Declaration source: packages/core/src/instructions.ts:3019.
export function buildForceCloseIx(accounts: ForceCloseAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ForceCloseAccounts— Not documented. See ForceCloseAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildFundMakerQuoteInventoryIx#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:338.
export function buildFundMakerQuoteInventoryIx(params: MakerQuoteInventoryParams & { readonly bountyLamports: bigint; }, accounts: MakerQuoteInventoryAccounts, programAddress?: Address): Promise<Instruction>;
Parameters
params: MakerQuoteInventoryParams & { readonly bountyLamports: bigint; }— Not documented. See MakerQuoteInventoryParams for its declaration and available field documentation.accounts: MakerQuoteInventoryAccounts— Not documented. See MakerQuoteInventoryAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildGhostPivotPath#
Build a hollow (stroke-only) upward-pointing triangle, apex touching the baseline at cx.
Declaration source: packages/core/src/depthChart.ts:110.
export function buildGhostPivotPath(cx: number, height: number, size?: number): string;
Parameters
cx: number— Not documented.height: number— Not documented.size: number— Not documented. Default:GHOST_PIVOT_SIZE.
Returns
string
Not documented.
Throws
Not documented.
Defaults
size:GHOST_PIVOT_SIZE.
buildInitializeConfigIx#
Build InitializeConfig instruction.
Discriminator: 0x00 Args: tick_size_bps(u16) = 2 bytes.
Account layout (Phase C): [0] config (W), [1] authority (S+W), [2..9] treasuryRecipients[0..7] (R), [10] defaultSettlementMint (R), [11] systemProgram (R), [12] programData (R).
Declaration source: packages/core/src/instructions.ts:780.
export function buildInitializeConfigIx(params: InitializeConfigParams, accounts: InitializeConfigAccounts, programAddress?: Address): Instruction;
Parameters
params: InitializeConfigParams— Not documented. See InitializeConfigParams for its declaration and available field documentation.accounts: InitializeConfigAccounts— Not documented. See InitializeConfigAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildInitializeCurrencyProtocolTreasuryIx#
Provision the protocol treasury shard of a registered currency (spec/IX.md §59.3, §60.4).
A market in a non-default currency sends its protocol leg to this shard. A Token-2022
currency's shard is created at 170 bytes with ImmutableOwner; pass the record's token program.
Declaration source: packages/core/src/instructions.ts:2651.
export function buildInitializeCurrencyProtocolTreasuryIx(treasuryIndex: number, accounts: InitializeCurrencyProtocolTreasuryAccounts, programAddress?: Address): Instruction;
Parameters
treasuryIndex: number— Not documented.accounts: InitializeCurrencyProtocolTreasuryAccounts— Not documented. See InitializeCurrencyProtocolTreasuryAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildInitializeCurrencyReferralTreasuryIx#
Provision a currency referral treasury (0x5D). A Token-2022 currency's shard is created at
170 bytes with ImmutableOwner (spec/IX.md §60.4); pass the record's token program.
Declaration source: packages/core/src/instructions.ts:2606.
export function buildInitializeCurrencyReferralTreasuryIx(treasuryIndex: number, accounts: InitializeCurrencyReferralTreasuryAccounts, programAddress?: Address): Instruction;
Parameters
treasuryIndex: number— Not documented.accounts: InitializeCurrencyReferralTreasuryAccounts— Not documented. See InitializeCurrencyReferralTreasuryAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildInitializeCurrencyReferrerEarningsIx#
Initialize earnings against a validated currency treasury shard.
Declaration source: packages/core/src/instructions.ts:2563.
export function buildInitializeCurrencyReferrerEarningsIx(treasuryIndex: number, accounts: InitializeCurrencyReferrerEarningsAccounts, programAddress?: Address): Instruction;
Parameters
treasuryIndex: number— Not documented.accounts: InitializeCurrencyReferrerEarningsAccounts— Not documented. See InitializeCurrencyReferrerEarningsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildInitializeMakerQuoteStateIx#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:140.
export function buildInitializeMakerQuoteStateIx(params: InitializeMakerQuoteStateParams, accounts: { readonly market: Address; readonly owner: Address; }, programAddress?: Address): Promise<Instruction>;
Parameters
params: InitializeMakerQuoteStateParams— Not documented. See InitializeMakerQuoteStateParams for its declaration and available field documentation.accounts: { readonly market: Address; readonly owner: Address; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildInitSplineIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4461.
export function buildInitSplineIx(params: InitSplineParams, accounts: InitSplineAccounts, programAddress?: Address): Instruction;
Parameters
params: InitSplineParams— Not documented. See InitSplineParams for its declaration and available field documentation.accounts: InitSplineAccounts— Not documented. See InitSplineAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildInstrumentLookupKeys#
Not documented.
Declaration source: packages/core/src/instruments.ts:214.
export function buildInstrumentLookupKeys(input: InstrumentLookupKeysInput): InstrumentLookupKeys;
Parameters
input: InstrumentLookupKeysInput— Not documented. See InstrumentLookupKeysInput for its declaration and available field documentation.
Returns
InstrumentLookupKeys
Not documented.
Throws
Not documented.
</details> <details> <summary>buildIocOrderIntent</summary>buildIocOrderIntent#
Builds a pure immediate-or-cancel place-order intent.
priceBps and worstAcceptablePriceBps are both in the named outcome's
denomination. The disable sentinels are accepted: 0 for an unbounded BUY
and 10000 for an unbounded SELL.
Declaration source: packages/core/src/advancedOrders.ts:250.
export function buildIocOrderIntent(input: IocOrderInput): AdvancedPlaceOrderIntent;
Parameters
input: IocOrderInput— Not documented. See IocOrderInput for its declaration and available field documentation.
Returns
AdvancedPlaceOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>buildKillSwitchCancelIntent</summary>buildKillSwitchCancelIntent#
Builds a client-enforced kill-switch cancellation intent.
A market-scoped intent maps to one market's cancel-all instruction. Wallet scope requires the live client to discover markets and submit a separate cancel-all transaction for each; that fan-out is not atomic. Disconnect and other automatic reason semantics also require a live client because no hosted trigger service exists.
Declaration source: packages/core/src/advancedOrders.ts:318.
export function buildKillSwitchCancelIntent(input: KillSwitchCancelInput): AdvancedCancelAllIntent;
Parameters
input: KillSwitchCancelInput— Not documented. See KillSwitchCancelInput for its declaration and available field documentation.
Returns
AdvancedCancelAllIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>buildLockReferrerBundle</summary>buildLockReferrerBundle#
Not documented.
Declaration source: packages/core/src/referral/setReferrerWizard.ts:31.
export function buildLockReferrerBundle(opts: BuildLockReferrerBundleOptions): Promise<LockReferrerBundle>;
Parameters
opts: BuildLockReferrerBundleOptions— Not documented. See BuildLockReferrerBundleOptions for its declaration and available field documentation.
Returns
Promise<LockReferrerBundle>
Not documented.
Throws
Not documented.
</details> <details> <summary>BuildLockReferrerBundleOptions</summary>BuildLockReferrerBundleOptions#
Not documented.
Declaration source: packages/core/src/referral/types.ts:155.
export interface BuildLockReferrerBundleOptions {
wallet: Address;
referrer: Address;
/** Currency record for the referrer's initialized earnings account. */
currencyRecord: Address;
/** From `resolveReferrer().eligibleForTriple`. */
eligibleForTriple: boolean;
/**
* Optional first-trade ix to bundle into the wizard tx so the user signs
* once for both `SetReferrer` and the order. Spec §"Lock wizard composition".
*/
firstOrderIx?: Instruction;
/** Idempotent ATA-create ix to prepend (for ATAs that don't yet exist). */
ensureAtaIxs?: Instruction[];
programAddress?: Address;
}
Field documentation
currencyRecord— Currency record for the referrer's initialized earnings account.eligibleForTriple— FromresolveReferrer().eligibleForTriple.firstOrderIx— Optional first-trade ix to bundle into the wizard tx so the user signs once for bothSetReferrerand the order. Spec §"Lock wizard composition".ensureAtaIxs— Idempotent ATA-create ix to prepend (for ATAs that don't yet exist).
buildMakeSeatDormantIx#
Mark a seat dormant once its governed miss count permits it.
Declaration source: packages/core/src/seatInstructions.ts:264.
export function buildMakeSeatDormantIx(caller: Address, seat: Address, market: Address, programAddress: Address): Promise<Instruction>;
Parameters
caller: Address— Not documented.seat: Address— Not documented.market: Address— Not documented.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildManagedOrderReclaimInstruction</summary>buildManagedOrderReclaimInstruction#
Select a managed reclaim instruction from an already authenticated order book.
Declaration source: packages/core/src/managedReclaimRecovery.ts:105.
export function buildManagedOrderReclaimInstruction(book: OrderbookAccount, target: { market: Address; owner: Address; caller: Address; orderId: bigint; }, programAddress?: Address): Promise<Instruction | null>;
Parameters
book: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.target: { market: Address; owner: Address; caller: Address; orderId: bigint; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]> | null>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildManagedTakerReclaimInstructions#
Select only managed orders from the crossing, non-live prefix of the taker's maker lane.
Declaration source: packages/core/src/managedReclaimRecovery.ts:159.
export function buildManagedTakerReclaimInstructions(taker: ManagedRecoveryTaker, observed: ManagedRecoveryBook, programAddress?: Address): Promise<readonly Instruction[]>;
Parameters
taker: ManagedRecoveryTaker— Not documented. See ManagedRecoveryTaker for its declaration and available field documentation.observed: ManagedRecoveryBook— Not documented. See ManagedRecoveryBook for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildMarketSlippageOrderIntent#
Builds a user-denominated market-with-slippage IOC intent.
The slippage-adjusted priceBps is already the effective IOC match bound,
so this wrapper omits the redundant worstAcceptablePriceBps.
Declaration source: packages/core/src/advancedOrders.ts:283.
export function buildMarketSlippageOrderIntent(input: MarketSlippageOrderInput): AdvancedPlaceOrderIntent;
Parameters
input: MarketSlippageOrderInput— Not documented. See MarketSlippageOrderInput for its declaration and available field documentation.
Returns
AdvancedPlaceOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>buildMarkPositionSettledIx</summary>buildMarkPositionSettledIx#
Build MarkPositionSettled instruction (permissionless, post-grace).
Discriminator: 0x19 Args: none
Audit remediation: this instruction now settles-and-pays the owner on
behalf of an abandoned position. The 8-account base layout is mandatory;
the optional 2-account recorder tail (selfProgram + logAuthority)
must be supplied together or not at all.
Declaration source: packages/core/src/instructions.ts:3905.
export function buildMarkPositionSettledIx(accounts: MarkPositionSettledAccounts, programAddress?: Address): Instruction;
Parameters
accounts: MarkPositionSettledAccounts— Not documented. See MarkPositionSettledAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildMergeCompleteSetIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:1941.
export function buildMergeCompleteSetIx(params: MergeCompleteSetParams, accounts: MergeCompleteSetAccounts, programAddress?: Address): Instruction;
Parameters
params: MergeCompleteSetParams— Not documented. See MergeCompleteSetParams for its declaration and available field documentation.accounts: MergeCompleteSetAccounts— Not documented. See MergeCompleteSetAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildMintSharesIx#
Build MintShares instruction.
Discriminator: 0x07 Args: amount(u64) = 8 bytes
Declaration source: packages/core/src/instructions.ts:2115.
export function buildMintSharesIx(params: MintSharesParams, accounts: MintSharesAccounts, programAddress?: Address): Instruction;
Parameters
params: MintSharesParams— Not documented. See MintSharesParams for its declaration and available field documentation.accounts: MintSharesAccounts— Not documented. See MintSharesAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildOracleConfidenceRange#
Not documented.
Declaration source: packages/core/src/display.ts:24.
export function buildOracleConfidenceRange(startPrice: number | null | undefined, confidence: number | null | undefined, maxConfidenceRatioBps: number | null | undefined): ConfidenceRange | null;
Parameters
startPrice: number | null | undefined— Not documented.confidence: number | null | undefined— Not documented.maxConfidenceRatioBps: number | null | undefined— Not documented.
Returns
ConfidenceRange | null
Not documented.
Throws
Not documented.
</details> <details> <summary>buildOwnerCancellationIx</summary>buildOwnerCancellationIx#
Build one bounded cancellation step using the ledger refund path.
Declaration source: packages/core/src/strategyAccounts.ts:699.
export function buildOwnerCancellationIx(input: LedgerCancellationInput & { readonly operation: StrategyCancelOperation; }, programAddress?: Address): Promise<Instruction>;
Parameters
input: LedgerCancellationInput & { readonly operation: StrategyCancelOperation; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildPauseIx#
Build Pause instruction.
Discriminator: 0x24 Args: none
Declaration source: packages/core/src/instructions.ts:2371.
export function buildPauseIx(accounts: PauseAccounts, programAddress?: Address): Instruction;
Parameters
accounts: PauseAccounts— Not documented. See PauseAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildPlaceLimitWithFreeFundsIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:1876.
export function buildPlaceLimitWithFreeFundsIx(params: PlaceOrderParams, accounts: FreeFundsPlaceOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: PlaceOrderParams— Not documented. See PlaceOrderParams for its declaration and available field documentation.accounts: FreeFundsPlaceOrderAccounts— Not documented. See FreeFundsPlaceOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildPlaceMultiplePostOnlyIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:1798.
export function buildPlaceMultiplePostOnlyIx(params: BatchPostOnlyParams, accounts: PlaceOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: BatchPostOnlyParams— Not documented. See BatchPostOnlyParams for its declaration and available field documentation.accounts: PlaceOrderAccounts— Not documented. See PlaceOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildPlaceOrderIx#
Build the canonical compact placement instruction.
Carries outcome and intent independently and keeps priceBps in the named
outcome's public price space. NO prices are never complemented here.
Argument body: 83 placement bytes followed by the spline seat count.
Declaration source: packages/core/src/instructions.ts:1639.
export function buildPlaceOrderIx(canonical: PlaceOrderParams, accounts: PlaceOrderAccounts, programAddress?: Address): Instruction;
Parameters
canonical: PlaceOrderParams— Not documented. See PlaceOrderParams for its declaration and available field documentation.accounts: PlaceOrderAccounts— Not documented. See PlaceOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildPostOnlyOrderIntent#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:226.
export function buildPostOnlyOrderIntent(input: PostOnlyOrderInput): AdvancedPlaceOrderIntent;
Parameters
input: PostOnlyOrderInput— Not documented. See PostOnlyOrderInput for its declaration and available field documentation.
Returns
AdvancedPlaceOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>buildReclaimExpiredOrderIx</summary>buildReclaimExpiredOrderIx#
Build ReclaimExpiredOrder instruction (permissionless).
Pass caller === maker to unwind your own resolved-market ask before the
close grace: transaction compilation merges the duplicate key into one
signer, and the program opens the owner-signed terminal branch for
SellYes / SellNo orders (escrow burned, resolved value credited to the
trader-ledger quote_free bucket).
Discriminator: 0x16 Args: order_id(u64) = 8 bytes
Declaration source: packages/core/src/instructions.ts:3799.
export function buildReclaimExpiredOrderIx(params: ReclaimExpiredOrderParams, accounts: ReclaimExpiredOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: ReclaimExpiredOrderParams— Not documented. See ReclaimExpiredOrderParams for its declaration and available field documentation.accounts: ReclaimExpiredOrderAccounts— Not documented. See ReclaimExpiredOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildReclaimExpiredOrdersIx#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:265.
export function buildReclaimExpiredOrdersIx(orderIds: readonly bigint[], accounts: { readonly market: Address; readonly owner: Address; readonly caller: Address; readonly includesManaged?: boolean; }, programAddress?: Address): Promise<Instruction>;
Parameters
orderIds: readonly bigint[]— Not documented.accounts: { readonly market: Address; readonly owner: Address; readonly caller: Address; readonly includesManaged?: boolean; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRecoverSplineIx#
Build the canonical zero-payload RecoverSeat instruction.
Declaration source: packages/core/src/instructions.ts:4853.
export function buildRecoverSplineIx(accounts: RecoverSplineAccounts, programAddress?: Address): Instruction;
Parameters
accounts: RecoverSplineAccounts— Not documented. See RecoverSplineAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRedeemIx#
Build Redeem instruction.
Discriminator: 0x17 Args: amount(u64) + token_type(u8) = 9 bytes
Account order (program/src/processor/redeem.rs):
0..9 market, yes_mint, no_mint, user_yes_ata, user_no_ata, user_stablecoin_ata,
vault, user, token_program, settlement_mint
10 market_meta (external markets only)
10/11 user_position, orderbook, trader_ledger (optional mirror trio)
then optional 2-account self-CPI recorder tail
Declaration source: packages/core/src/instructions.ts:2201.
export function buildRedeemIx(params: RedeemParams, accounts: RedeemAccounts, programAddress?: Address): Instruction;
Parameters
params: RedeemParams— Not documented. See RedeemParams for its declaration and available field documentation.accounts: RedeemAccounts— Not documented. See RedeemAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildReduceOrderIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3592.
export function buildReduceOrderIx(params: ReduceOrderParams, accounts: CancelOrderAccounts & { readonly config: Address; }, programAddress?: Address): Instruction;
Parameters
params: ReduceOrderParams— Not documented. See ReduceOrderParams for its declaration and available field documentation.accounts: CancelOrderAccounts & { readonly config: Address; }— Not documented. See CancelOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildReduceOrderWithFreeFundsIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3628.
export function buildReduceOrderWithFreeFundsIx(params: ReduceOrderParams, accounts: CancelOrderWithFreeFundsAccounts & { readonly config: Address; readonly strategy?: PrefundedStrategyAccounts; }, programAddress?: Address): Instruction;
Parameters
params: ReduceOrderParams— Not documented. See ReduceOrderParams for its declaration and available field documentation.accounts: CancelOrderWithFreeFundsAccounts & { readonly config: Address; readonly strategy?: PrefundedStrategyAccounts; }— Not documented. See CancelOrderWithFreeFundsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildReferralLink#
<origin>/referral/<ref>, or <origin>/markets/<marketId>?ref=<ref> with a market. Both are
first-party pages, where the proxy captures the ref (first touch wins).
Declaration source: packages/core/src/widget/embed.ts:167.
export function buildReferralLink(origin: string, ref: string, options?: ReferralLinkOptions): string;
Parameters
origin: string— Not documented.ref: string— Not documented.options: ReferralLinkOptions— Not documented. Default:{}. See ReferralLinkOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
Defaults
options:{}.
buildRegisterCurrencyIx#
Register an admissible mint without enabling it for markets.
Declaration source: packages/core/src/instructions.ts:2498.
export function buildRegisterCurrencyIx(accounts: RegisterCurrencyAccounts, programAddress?: Address): Instruction;
Parameters
accounts: RegisterCurrencyAccounts— Not documented. See RegisterCurrencyAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildReplaceMakerQuotesIx#
Replacement must be the final instruction, with its signer as payer on certified delivery.
Declaration source: packages/core/src/makerQuoteInstructions.ts:433.
export function buildReplaceMakerQuotesIx(params: ReplaceMakerQuotesParams, accounts: { readonly market: Address; readonly owner: Address; readonly signer: Address; }, programAddress?: Address): Promise<Instruction>;
Parameters
params: ReplaceMakerQuotesParams— Not documented. See ReplaceMakerQuotesParams for its declaration and available field documentation.accounts: { readonly market: Address; readonly owner: Address; readonly signer: Address; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRequestHeapFrameIx#
Build a ComputeBudget::RequestHeapFrame instruction.
Declaration source: packages/core/src/computeBudget.ts:124.
export function buildRequestHeapFrameIx(bytes: number): Instruction;
Parameters
bytes: number— Not documented.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildResetStrategyCapitalIx</summary>buildResetStrategyCapitalIx#
Set the used-capital counter and advance the strategy's capital epoch.
Declaration source: packages/core/src/strategyAccounts.ts:267.
export function buildResetStrategyCapitalIx(input: OwnerStrategyInput & { readonly capitalUsedAtoms: bigint; }, programAddress?: Address): Promise<Instruction>;
Parameters
input: OwnerStrategyInput & { readonly capitalUsedAtoms: bigint; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildResolveMarketIx#
Build ResolveMarket instruction.
Discriminator: 0x05 Args: none
Declaration source: packages/core/src/instructions.ts:1515.
export function buildResolveMarketIx(accounts: ResolveMarketAccounts, programAddress?: Address): Instruction;
Parameters
accounts: ResolveMarketAccounts— Not documented. See ResolveMarketAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildResumeStrategyIx#
Resume a strategy with the owner's signature.
Declaration source: packages/core/src/strategyAccounts.ts:251.
export function buildResumeStrategyIx(input: OwnerStrategyInput, programAddress?: Address): Promise<Instruction>;
Parameters
input: OwnerStrategyInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRevokeBuilderIx#
Build RevokeBuilder (0x4B): close the approval and refund rent to the
trader. Any later order that supplies the closed approval is rejected.
Declaration source: packages/core/src/builder.ts:179.
export function buildRevokeBuilderIx(accounts: RevokeBuilderAccounts, programAddress?: Address): Instruction;
Parameters
accounts: RevokeBuilderAccounts— Not documented. See RevokeBuilderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRollupCurrencyReferralFeesIx#
Roll up fees from one market into its currency-bound referral shard.
Declaration source: packages/core/src/instructions.ts:2837.
export function buildRollupCurrencyReferralFeesIx(params: RollupReferralFeesParams, accounts: RollupCurrencyReferralFeesAccounts, programAddress?: Address): Instruction;
Parameters
params: RollupReferralFeesParams— Not documented. See RollupReferralFeesParams for its declaration and available field documentation.accounts: RollupCurrencyReferralFeesAccounts— Not documented. See RollupCurrencyReferralFeesAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRotateSplineQuoteAuthorityIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4719.
export function buildRotateSplineQuoteAuthorityIx(params: RotateSplineQuoteAuthorityParams, accounts: { creator: Address; spline: Address; }, programAddress?: Address): Instruction;
Parameters
params: RotateSplineQuoteAuthorityParams— Not documented. See RotateSplineQuoteAuthorityParams for its declaration and available field documentation.accounts: { creator: Address; spline: Address; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildRoundGrid#
Group the OPEN rounds (endMs > nowMs) into an asset × round-length grid.
assets: every asset with an open bucketed round, ordered by name.lengths: always all five buckets inROUND_LENGTHSorder, so the grid has fixed columns and an empty cell can offer "Open a round".cell(asset, length):nullwhen empty; members by end time, then id.
Rounds whose length fits no bucket are left out.
Declaration source: packages/core/src/ux/rounds.ts:109.
export function buildRoundGrid<T extends RoundGridInput>(markets: T[], nowMs: number): { assets: string[]; lengths: RoundLengthKey[]; cell(asset: string, length: RoundLengthKey): RoundGridCell<T> | null; };
Parameters
markets: T[]— Not documented.nowMs: number— Not documented.
Returns
{ assets: string[]; lengths: RoundLengthKey[]; cell(asset: string, length: RoundLengthKey): RoundGridCell<T> | null; }
Not documented.
Throws
Not documented.
</details> <details> <summary>buildSeatAttachmentIx</summary>buildSeatAttachmentIx#
Not documented.
Declaration source: packages/core/src/seatInstructions.ts:315.
export function buildSeatAttachmentIx(input: SeatAttachment, programAddress: Address): Promise<Instruction>;
Parameters
input: SeatAttachment— Not documented. See SeatAttachment for its declaration and available field documentation.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildSetComputeUnitLimitIx</summary>buildSetComputeUnitLimitIx#
Build a ComputeBudget::SetComputeUnitLimit instruction.
Declaration source: packages/core/src/computeBudget.ts:144.
export function buildSetComputeUnitLimitIx(units: number): Instruction;
Parameters
units: number— Not documented.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildSetComputeUnitPriceIx</summary>buildSetComputeUnitPriceIx#
Build a ComputeBudget::SetComputeUnitPrice instruction.
Declaration source: packages/core/src/computeBudget.ts:158.
export function buildSetComputeUnitPriceIx(microLamports: bigint): Instruction;
Parameters
microLamports: bigint— Not documented.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildSetCurrencyFreezeExceptionIx</summary>buildSetCurrencyFreezeExceptionIx#
Initialize a disabled exception, approve it, or revoke it.
Declaration source: packages/core/src/instructions.ts:2462.
export function buildSetCurrencyFreezeExceptionIx(op: CurrencyFreezeExceptionOp, accounts: SetCurrencyFreezeExceptionAccounts, programAddress?: Address): Instruction;
Parameters
op: CurrencyFreezeExceptionOp— Not documented. See CurrencyFreezeExceptionOp for its declaration and available field documentation.accounts: SetCurrencyFreezeExceptionAccounts— Not documented. See SetCurrencyFreezeExceptionAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSetMakerQuoteAuthorityIx#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:583.
export function buildSetMakerQuoteAuthorityIx(params: SetMakerQuoteAuthorityParams, accounts: { readonly market: Address; readonly owner: Address; }, programAddress?: Address): Promise<Instruction>;
Parameters
params: SetMakerQuoteAuthorityParams— Not documented. See SetMakerQuoteAuthorityParams for its declaration and available field documentation.accounts: { readonly market: Address; readonly owner: Address; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSetMarketEmergencyStatusIx#
Build SetMarketEmergencyStatus instruction.
Discriminator: 0x2B Args: status(u8) + reason([u8;32]) = 33 bytes
ForceCancelOnly requires the market to currently be in Paused (two-step opt-in enforced on-chain).
Declaration source: packages/core/src/instructions.ts:4143.
export function buildSetMarketEmergencyStatusIx(params: SetMarketEmergencyStatusParams, accounts: SetMarketEmergencyStatusAccounts, programAddress?: Address): Instruction;
Parameters
params: SetMarketEmergencyStatusParams— Not documented. See SetMarketEmergencyStatusParams for its declaration and available field documentation.accounts: SetMarketEmergencyStatusAccounts— Not documented. See SetMarketEmergencyStatusAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSetPauserIx#
Build SetPauser instruction.
Declaration source: packages/core/src/instructions.ts:2430.
export function buildSetPauserIx(params: SetPauserParams, accounts: SetPauserAccounts, programAddress?: Address): Instruction;
Parameters
params: SetPauserParams— Not documented.accounts: SetPauserAccounts— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSetReferrerIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3284.
export function buildSetReferrerIx(accounts: SetReferrerAccounts, programAddress?: Address): Instruction;
Parameters
accounts: SetReferrerAccounts— Not documented. See SetReferrerAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSettleSplineIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4803.
export function buildSettleSplineIx(accounts: SettleSplineAccounts, programAddress?: Address): Instruction;
Parameters
accounts: SettleSplineAccounts— Not documented. See SettleSplineAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSnapshotEndIx#
Build SnapshotEnd instruction.
Discriminator: 0x04 Args: none
Declaration source: packages/core/src/instructions.ts:1471.
export function buildSnapshotEndIx(accounts: SnapshotEndAccounts, programAddress?: Address): Instruction;
Parameters
accounts: SnapshotEndAccounts— Not documented. See SnapshotEndAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildStopLossAdvanceNonceInstruction#
AdvanceNonceAccount — must be the FIRST instruction of a durable-nonce transaction.
Declaration source: packages/core/src/stopLoss/nonce.ts:134.
export function buildStopLossAdvanceNonceInstruction(nonceAccount: Address, authority: Address): Instruction;
Parameters
nonceAccount: Address— Not documented.authority: Address— Not documented.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildStopLossSessionMessage</summary>buildStopLossSessionMessage#
The exact JSON the wallet signs to open a session (same shape as the indexer auth message, bound to the keeper's own domain so neither can be replayed against the other).
Declaration source: packages/core/src/stopLoss/api.ts:57.
export function buildStopLossSessionMessage(input: { domain: string; timestamp: number; nonce: string; }): string;
Parameters
input: { domain: string; timestamp: number; nonce: string; }— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>buildStopStrategyIx</summary>buildStopStrategyIx#
Stop a strategy and invalidate its covered orders on the supplied markets.
Declaration source: packages/core/src/strategyAccounts.ts:181.
export function buildStopStrategyIx(input: { readonly owner: Address; readonly authority: Address; readonly strategyId: number; readonly markets: readonly Address[]; }, programAddress?: Address): Promise<Instruction>;
Parameters
input: { readonly owner: Address; readonly authority: Address; readonly strategyId: number; readonly markets: readonly Address[]; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildStrategyBatchPostOnlyIx#
Atomically place a book-only post-only batch under an owner strategy.
Declaration source: packages/core/src/instructions.ts:1834.
export function buildStrategyBatchPostOnlyIx(params: BatchPostOnlyParams, groupId: number, accounts: StrategyPlacementAccounts, programAddress?: Address): Instruction;
Parameters
params: BatchPostOnlyParams— Not documented. See BatchPostOnlyParams for its declaration and available field documentation.groupId: number— Not documented.accounts: StrategyPlacementAccounts— Not documented. See StrategyPlacementAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildStrategyCancellationIx#
Build one bounded step of a strategy cancellation, including resume and abort.
Declaration source: packages/core/src/strategyAccounts.ts:708.
export function buildStrategyCancellationIx(input: LedgerCancellationInput & { readonly operation: StrategyCancelOperation; readonly strategyId: number; }, programAddress?: Address): Promise<Instruction>;
Parameters
input: LedgerCancellationInput & { readonly operation: StrategyCancelOperation; readonly strategyId: number; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildStrategyPlacementIx#
Place or swap prefunded balances under an on-chain owner strategy.
Declaration source: packages/core/src/instructions.ts:1900.
export function buildStrategyPlacementIx(params: PlaceOrderParams, groupId: number, accounts: StrategyPlacementAccounts, programAddress?: Address): Instruction;
Parameters
params: PlaceOrderParams— Not documented. See PlaceOrderParams for its declaration and available field documentation.groupId: number— Not documented.accounts: StrategyPlacementAccounts— Not documented. See StrategyPlacementAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildSwapWithFreeFundsIx#
Swap always executes immediate-or-cancel; the encoded order type is forced.
Declaration source: packages/core/src/instructions.ts:1858.
export function buildSwapWithFreeFundsIx(params: PlaceOrderParams, accounts: FreeFundsPlaceOrderAccounts, programAddress?: Address): Instruction;
Parameters
params: PlaceOrderParams— Not documented. See PlaceOrderParams for its declaration and available field documentation.accounts: FreeFundsPlaceOrderAccounts— Not documented. See FreeFundsPlaceOrderAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildTakerReclaimInstructions#
Select ordinary and managed orders blocking the taker's maker lane.
Declaration source: packages/core/src/managedReclaimRecovery.ts:168.
export function buildTakerReclaimInstructions(taker: ManagedRecoveryTaker, observed: ManagedRecoveryBook, programAddress?: Address): Promise<readonly Instruction[]>;
Parameters
taker: ManagedRecoveryTaker— Not documented. See ManagedRecoveryTaker for its declaration and available field documentation.observed: ManagedRecoveryBook— Not documented. See ManagedRecoveryBook for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildTopUpCloserRewardsIx#
Restore an existing market's rent-safe reward budget to five rewards at the current config rate. Transfers only the shortfall; accepts no amount payload. Native CreateMarket already funds this target, including for BYO callers.
Declaration source: packages/core/src/instructions.ts:2745.
export function buildTopUpCloserRewardsIx(accounts: TopUpCloserRewardsAccounts, programAddress?: Address): Instruction;
Parameters
accounts: TopUpCloserRewardsAccounts— Not documented. See TopUpCloserRewardsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildTopUpExternalProgressReserveIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:2786.
export function buildTopUpExternalProgressReserveIx(accounts: TopUpExternalProgressReserveAccounts, programAddress?: Address): Instruction;
Parameters
accounts: TopUpExternalProgressReserveAccounts— Not documented. See TopUpExternalProgressReserveAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildTopUpSeatCommitmentIx#
Add backing to a maker's existing seat using its series vault.
Declaration source: packages/core/src/seatInstructions.ts:184.
export function buildTopUpSeatCommitmentIx(input: TopUpSeatCommitment, programAddress: Address): Promise<Instruction>;
Parameters
input: TopUpSeatCommitment— Not documented. See TopUpSeatCommitment for its declaration and available field documentation.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildTopUpSeriesLamportsIx</summary>buildTopUpSeriesLamportsIx#
Fund the series crank budget from any signing account.
Declaration source: packages/core/src/seatInstructions.ts:121.
export function buildTopUpSeriesLamportsIx(funder: Address, series: Address, lamports: bigint, programAddress: Address): Promise<Instruction>;
Parameters
funder: Address— Not documented.series: Address— Not documented.lamports: bigint— Not documented.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildTrustlessProjectionEventId</summary>buildTrustlessProjectionEventId#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:109.
export function buildTrustlessProjectionEventId(input: BuildTrustlessProjectionEventIdInput): string;
Parameters
input: BuildTrustlessProjectionEventIdInput— Not documented. See BuildTrustlessProjectionEventIdInput for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>BuildTrustlessProjectionEventIdInput</summary>BuildTrustlessProjectionEventIdInput#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:54.
export interface BuildTrustlessProjectionEventIdInput {
slot: bigint | number | string;
signature: string;
instructionIndex: number;
batchIndex: number;
eventIndex: number;
}
buildUnpauseIx#
Build Unpause instruction.
Discriminator: 0x25 Args: none
Declaration source: packages/core/src/instructions.ts:2400.
export function buildUnpauseIx(accounts: UnpauseAccounts, programAddress?: Address): Instruction;
Parameters
accounts: UnpauseAccounts— Not documented. See UnpauseAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateAuthorityIx#
Build UpdateAuthority instruction.
Discriminator: 0x01 Args: new_authority(pubkey) = 32 bytes
Step 1 of two-step authority rotation.
Declaration source: packages/core/src/instructions.ts:3686.
export function buildUpdateAuthorityIx(params: UpdateAuthorityParams, accounts: UpdateAuthorityAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateAuthorityParams— Not documented. See UpdateAuthorityParams for its declaration and available field documentation.accounts: UpdateAuthorityAccounts— Not documented. See UpdateAuthorityAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateFeeConfigIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3248.
export function buildUpdateFeeConfigIx(accounts: UpdateFeeConfigAccounts, params: UpdateFeeConfigParams, programAddress?: Address): Instruction;
Parameters
accounts: UpdateFeeConfigAccounts— Not documented. See UpdateFeeConfigAccounts for its declaration and available field documentation.params: UpdateFeeConfigParams— Not documented. See UpdateFeeConfigParams for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateMarketCapIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:1985.
export function buildUpdateMarketCapIx(params: UpdateMarketCapParams, accounts: UpdateMarketCapAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateMarketCapParams— Not documented. See UpdateMarketCapParams for its declaration and available field documentation.accounts: UpdateMarketCapAccounts— Not documented. See UpdateMarketCapAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateMinRestingNotionalIx#
Build UpdateMinRestingNotional instruction.
Discriminator: 0x29 Args: min_resting_notional(u64) = 8 bytes
Declaration source: packages/core/src/instructions.ts:2947.
export function buildUpdateMinRestingNotionalIx(params: UpdateMinRestingNotionalParams, accounts: UpdateMinRestingNotionalAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateMinRestingNotionalParams— Not documented. See UpdateMinRestingNotionalParams for its declaration and available field documentation.accounts: UpdateMinRestingNotionalAccounts— Not documented. See UpdateMinRestingNotionalAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateOperationalParamsIx#
Build UpdateOperationalParams instruction (admin-only).
Replaces the operational and seat settings in a single instruction.
Declaration source: packages/core/src/instructions.ts:4307.
export function buildUpdateOperationalParamsIx(params: UpdateOperationalParamsParams, accounts: UpdateOperationalParamsAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateOperationalParamsParams— Not documented. See UpdateOperationalParamsParams for its declaration and available field documentation.accounts: UpdateOperationalParamsAccounts— Not documented. See UpdateOperationalParamsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateSeriesSubscriptionIx#
Set the maker's permissionless attachment policy.
Declaration source: packages/core/src/seatInstructions.ts:62.
export function buildUpdateSeriesSubscriptionIx(maker: Address, series: Address, policy: SeriesSubscriptionPolicy, programAddress: Address): Promise<Instruction>;
Parameters
maker: Address— Not documented.series: Address— Not documented.policy: SeriesSubscriptionPolicy— Not documented. See SeriesSubscriptionPolicy for its declaration and available field documentation.programAddress: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>buildUpdateSplineMidIx</summary>buildUpdateSplineMidIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4624.
export function buildUpdateSplineMidIx(params: UpdateSplineMidParams, accounts: UpdateSplineMidAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateSplineMidParams— Not documented. See UpdateSplineMidParams for its declaration and available field documentation.accounts: UpdateSplineMidAccounts— Not documented. See UpdateSplineMidAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateSplineShapeIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4535.
export function buildUpdateSplineShapeIx(params: UpdateSplineShapeParams, accounts: UpdateSplineShapeAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateSplineShapeParams— Not documented. See UpdateSplineShapeParams for its declaration and available field documentation.accounts: UpdateSplineShapeAccounts— Not documented. See UpdateSplineShapeAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateTickSizeIx#
Build UpdateTickSize instruction.
Discriminator: 0x28 Args: tick_size_bps(u16) = 2 bytes
Declaration source: packages/core/src/instructions.ts:2905.
export function buildUpdateTickSizeIx(params: UpdateTickSizeParams, accounts: UpdateTickSizeAccounts, programAddress?: Address): Instruction;
Parameters
params: UpdateTickSizeParams— Not documented. See UpdateTickSizeParams for its declaration and available field documentation.accounts: UpdateTickSizeAccounts— Not documented. See UpdateTickSizeAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildUpdateTreasuryRecipientsIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:3383.
export function buildUpdateTreasuryRecipientsIx(accounts: UpdateTreasuryRecipientsAccounts, programAddress?: Address): Instruction;
Parameters
accounts: UpdateTreasuryRecipientsAccounts— Not documented. See UpdateTreasuryRecipientsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildWithdrawCurrencyProtocolTreasuryIx#
Move amount atoms out of a currency protocol treasury shard (spec/IX.md §59.4).
Declaration source: packages/core/src/instructions.ts:2692.
export function buildWithdrawCurrencyProtocolTreasuryIx(treasuryIndex: number, amount: bigint, accounts: WithdrawCurrencyProtocolTreasuryAccounts, programAddress?: Address): Instruction;
Parameters
treasuryIndex: number— Not documented.amount: bigint— Not documented.accounts: WithdrawCurrencyProtocolTreasuryAccounts— Not documented. See WithdrawCurrencyProtocolTreasuryAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildWithdrawFundsIx#
Build a WithdrawFunds instruction (Wave 4a).
Transfers amount stablecoin from vault to userStablecoinAta (the
market PDA signs) and debits the trader-ledger quote_free bucket. Only
the free portion is withdrawable; the locked bucket
(quote_debit today / quote_locked post-Wave-4b) is reserved for
open orders and is not reachable.
Allowed when the market is Trading or in the Expired 50/50
fallback state. Markets resolved to a definite outcome (Up or Down)
reject — call Redeem instead.
Discriminator: 0x09. Args: amount(u64), owner strategy selector(u8) = 9 bytes.
Declaration source: packages/core/src/instructions.ts:3483.
export function buildWithdrawFundsIx(params: DepositOrWithdrawFundsParams, accounts: WithdrawFundsAccounts, programAddress?: Address): Instruction;
Parameters
params: DepositOrWithdrawFundsParams— Not documented. See DepositOrWithdrawFundsParams for its declaration and available field documentation.accounts: WithdrawFundsAccounts— Not documented. See WithdrawFundsAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildWithdrawMakerQuoteInventoryIx#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:352.
export function buildWithdrawMakerQuoteInventoryIx(params: MakerQuoteInventoryParams, accounts: MakerQuoteInventoryAccounts, programAddress?: Address): Promise<Instruction>;
Parameters
params: MakerQuoteInventoryParams— Not documented. See MakerQuoteInventoryParams for its declaration and available field documentation.accounts: MakerQuoteInventoryAccounts— Not documented. See MakerQuoteInventoryAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildWithdrawSharesIx#
Build WithdrawShares instruction.
Discriminator: 0x0A Args: amount(u64) + token_type(u8) = 9 bytes
Audit remediation (L-02): the read-only vault account is now
mandatory. The optional recorder tail (selfProgram + logAuthority)
must be supplied together or not at all.
Declaration source: packages/core/src/instructions.ts:2323.
export function buildWithdrawSharesIx(params: WithdrawSharesParams, accounts: WithdrawSharesAccounts, programAddress?: Address): Instruction;
Parameters
params: WithdrawSharesParams— Not documented. See WithdrawSharesParams for its declaration and available field documentation.accounts: WithdrawSharesAccounts— Not documented. See WithdrawSharesAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
buildWithdrawSplineVaultIx#
Not documented.
Declaration source: packages/core/src/instructions.ts:4941.
export function buildWithdrawSplineVaultIx(params: SplineVaultAmountParams, accounts: SplineVaultAccounts, programAddress?: Address): Instruction;
Parameters
params: SplineVaultAmountParams— Not documented. See SplineVaultAmountParams for its declaration and available field documentation.accounts: SplineVaultAccounts— Not documented. See SplineVaultAccounts for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | AccountMeta<string>)[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
calculateCollateral#
Calculate quote collateral for an executed price/quantity pair.
Mirrors Rust logic::collateral::calculate_collateral: floor the
bps-denominated notional, then clamp nonzero (price, quantity) pairs to at
least one atom so tiny valid orders cannot preview as free.
Declaration source: packages/core/src/price.ts:248.
export function calculateCollateral(priceBps: number, quantity: bigint): bigint;
Parameters
priceBps: number— Not documented.quantity: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>calculateCollateralRequired</summary>calculateCollateralRequired#
Calculate quote collateral required for an order.
BUY orders lock quote at their own price; SELL orders escrow shares of the named outcome and lock no quote.
Declaration source: packages/core/src/price.ts:233.
export function calculateCollateralRequired(intent: TradeIntent, priceBps: number, quantity: bigint): bigint;
Parameters
intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.priceBps: number— Not documented.quantity: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>calculateExponentialBackoff</summary>calculateExponentialBackoff#
Not documented.
Declaration source: packages/core/src/api/client.ts:518.
export function calculateExponentialBackoff(attempt: number, baseDelayMs: number, maxDelayMs: number, useJitter: boolean): number;
Parameters
attempt: number— Not documented.baseDelayMs: number— Not documented.maxDelayMs: number— Not documented.useJitter: boolean— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>calculatePayout</summary>calculatePayout#
Calculate payout for a settled position.
Winning YES shares pay 1:1. Winning NO shares pay 1:1. Losing shares pay nothing.
Declaration source: packages/core/src/price.ts:284.
export function calculatePayout(outcome: Outcome, position: UserPositionAccount): bigint;
Parameters
outcome: Outcome— Not documented. See Outcome for its declaration and available field documentation.position: UserPositionAccount— Not documented. See UserPositionAccount for its declaration and available field documentation.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>calculatePortfolioSummary</summary>calculatePortfolioSummary#
Not documented.
Declaration source: packages/core/src/api/positions.ts:253.
export function calculatePortfolioSummary(positions: Position[], availableBalance: number): PortfolioSummary;
Parameters
positions: Position[]— Not documented.availableBalance: number— Not documented.
Returns
PortfolioSummary
Not documented.
Throws
Not documented.
</details> <details> <summary>calculateTakerFee</summary>calculateTakerFee#
Calculate taker fee (rounds UP, favoring the protocol).
Declaration source: packages/core/src/price.ts:272.
export function calculateTakerFee(notional: bigint, feeBps: bigint | number): bigint;
Parameters
notional: bigint— - The trade notional value.feeBps: number | bigint— - Fee rate in basis points.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>calculateTradeStats</summary>calculateTradeStats#
Not documented.
Declaration source: packages/core/src/api/orders.ts:214.
export function calculateTradeStats(trades: Trade[]): TradeStats;
Parameters
trades: Trade[]— Not documented.
Returns
TradeStats
Not documented.
Throws
Not documented.
</details> <details> <summary>calibrateRentRate</summary>calibrateRentRate#
Measures the cluster's rent rate with one getMinimumBalanceForRentExemption
call. Callers should cache the result for the session.
Declaration source: packages/core/src/constants.ts:547.
export function calibrateRentRate(fetchMinimumBalance: RentExemptMinimumFetcher): Promise<RentRate | null>;
Parameters
fetchMinimumBalance: RentExemptMinimumFetcher— Live rent-exemption lookup. See RentExemptMinimumFetcher for its declaration and available field documentation.
Returns
Promise<RentRate | null>
The calibrated rate, or null when the cluster is unreachable or
reports a nonsensical minimum.
Throws
Not documented.
</details> <details> <summary>CANCEL_ORDER_BY_CLIENT_ID_ROUTE</summary>CANCEL_ORDER_BY_CLIENT_ID_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:51.
export declare const CANCEL_ORDER_BY_CLIENT_ID_ROUTE: 84;
CANCEL_OWNER_ORDERS_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:52.
export declare const CANCEL_OWNER_ORDERS_ROUTE: 85;
CancelDispatchInput#
Not documented.
Declaration source: packages/core/src/orderFunding.ts:175.
export interface CancelDispatchInput {
/** The market's quote token program (`marketSettlementTokenProgram`); classic when omitted. */
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userTokenAccount: Address;
settlementMint: Address;
userYesAta: Address;
userNoAta: Address;
orderId: bigint;
/** The order's stored `original_side` - determines route eligibility. */
storedSide: StoredOrderSide;
fundingSource: FundingSource;
}
Field documentation
settlementTokenProgram— The market's quote token program (marketSettlementTokenProgram); classic when omitted.storedSide— The order's storedoriginal_side- determines route eligibility.
CancelFamilyAccountsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2695.
export interface CancelFamilyAccountsInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userTokenAccount: Address;
settlementMint: Address;
userYesAta: Address;
userNoAta: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.
CancelFamilyResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2710.
export interface CancelFamilyResult {
market: Address;
orderbook: Address;
position: Address;
vault: Address;
traderLedger: Address;
}
CancelFamilyWithFreeFundsAccountsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2804.
export interface CancelFamilyWithFreeFundsAccountsInput {
marketAddress: Address;
user: Address;
}
CancelFamilyWithFreeFundsResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2809.
export interface CancelFamilyWithFreeFundsResult {
market: Address;
orderbook: Address;
position: Address;
traderLedger: Address;
vault: Address;
}
CancellationReturnData#
Not documented.
Declaration source: packages/core/src/resumableCancellation.ts:15.
export interface CancellationReturnData {
readonly programAddress: Address;
readonly data: Uint8Array;
}
cancelMultipleOrdersById#
Not documented.
Declaration source: packages/core/src/sdk.ts:2773.
export function cancelMultipleOrdersById(input: CancelMultipleOrdersByIdInput, programAddress?: Address): Promise<SdkResult<CancelFamilyResult>>;
Parameters
input: CancelMultipleOrdersByIdInput— Not documented. See CancelMultipleOrdersByIdInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelFamilyResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CancelMultipleOrdersByIdInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2769.
export interface CancelMultipleOrdersByIdInput extends CancelFamilyAccountsInput {
orderIds: bigint[];
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.
CancelMultipleOrdersByIdParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:3531.
export interface CancelMultipleOrdersByIdParams {
/** D0{id} Order identities; array length is D0{count}. */
orderIds: readonly bigint[];
}
Field documentation
orderIds— D0{id} Order identities; array length is D0{count}.
cancelMultipleOrdersByIdWithFreeFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:2853.
export function cancelMultipleOrdersByIdWithFreeFunds(input: CancelMultipleOrdersByIdWithFreeFundsInput, programAddress?: Address): Promise<SdkResult<CancelFamilyWithFreeFundsResult>>;
Parameters
input: CancelMultipleOrdersByIdWithFreeFundsInput— Not documented. See CancelMultipleOrdersByIdWithFreeFundsInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelFamilyWithFreeFundsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CancelMultipleOrdersByIdWithFreeFundsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2849.
export interface CancelMultipleOrdersByIdWithFreeFundsInput extends CancelFamilyWithFreeFundsAccountsInput {
orderIds: bigint[];
}
cancelOrder#
Build CancelOrder instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:993.
export function cancelOrder(input: CancelOrderInput, programAddress?: Address): Promise<SdkResult<CancelOrderResult>>;
Parameters
input: CancelOrderInput— Not documented. See CancelOrderInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelOrderResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CancelOrderAccounts#
Accounts for CancelOrder instruction.
Declaration source: packages/core/src/instructions.ts:2012.
export interface CancelOrderAccounts extends BinaryRecorderTailAccounts {
market: Address;
orderbook: Address;
userPosition: Address;
userTokenAccount: Address;
vault: Address;
user: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
settlementMint: Address;
yesEscrow: Address;
noEscrow: Address;
userYesAta: Address;
userNoAta: Address;
yesMint: Address;
noMint: Address;
traderLedger: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
CancelOrderAndWithdrawInput#
Not documented.
Declaration source: packages/core/src/cancelAndWithdraw.ts:32.
export interface CancelOrderAndWithdrawInput {
readonly market: Address;
readonly owner: Address;
/** Exact, immutable on-chain ID of the order. */
readonly orderId: bigint;
/** Explicit number of atoms to withdraw from the post-cancellation free balance. */
readonly amount: bigint;
readonly transport?: NativeTransactionTransport;
}
Field documentation
orderId— Exact, immutable on-chain ID of the order.amount— Explicit number of atoms to withdraw from the post-cancellation free balance.
CancelOrderAndWithdrawPlan#
Not documented.
Declaration source: packages/core/src/cancelAndWithdraw.ts:42.
export interface CancelOrderAndWithdrawPlan extends MeasuredInstructionGroup {
readonly asset: 'quote' | 'YES' | 'NO';
readonly destination: Address;
readonly amount: bigint;
}
Field documentation
wireBytes— D0{byte/transaction} Serialized wire including the prefix.
cancelOrderByClientId#
Cancel by client ID, refunding to the supplied wallet token accounts.
Declaration source: packages/core/src/sdk.ts:2757.
export function cancelOrderByClientId(input: CancelFamilyAccountsInput & { clientOrderId: Uint8Array; }, programAddress?: Address): Promise<SdkResult<CancelFamilyResult>>;
Parameters
input: CancelFamilyAccountsInput & { clientOrderId: Uint8Array; }— Not documented. See CancelFamilyAccountsInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelFamilyResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CancelOrderInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:967.
export interface CancelOrderInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userTokenAccount: Address;
settlementMint: Address;
userYesAta: Address;
userNoAta: Address;
orderId: bigint;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.
CancelOrderIntent#
Everything CancelOrder needs.
Declaration source: packages/core/src/preflight/types.ts:290.
export interface CancelOrderIntent {
/** Signer owns the order. Only an explicit `false` denies in preview; strict requires it. */
isOwner?: boolean;
/** Order still occupies a book slot. `false` denies in preview; strict requires it. */
orderFound?: boolean;
}
Field documentation
isOwner— Signer owns the order. Only an explicitfalsedenies in preview; strict requires it.orderFound— Order still occupies a book slot.falsedenies in preview; strict requires it.
CancelOrderParams#
Parameters for CancelOrder instruction.
Declaration source: packages/core/src/types.ts:649.
export interface CancelOrderParams {
readonly orderId: bigint;
}
CancelOrderResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:983.
export interface CancelOrderResult {
market: Address;
orderbook: Address;
position: Address;
vault: Address;
}
cancelOrderVerdict#
Decide whether the program would accept this CancelOrder.
Deliberately takes NO ConfigSnapshot: cancellation is not gated by
config.paused on chain, and the per-market emergency status only blocks in
its ForceCancelOnly variant.
Declaration source: packages/core/src/preflight/orders.ts:190.
export function cancelOrderVerdict(market: MarketSnapshot, intent: CancelOrderIntent, options?: PreflightOptions): Verdict;
Parameters
market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.intent: CancelOrderIntent— Not documented. See CancelOrderIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>CancelOrderWithFreeFundsAccounts</summary>CancelOrderWithFreeFundsAccounts#
Accounts for cancel-family *WithFreeFunds instructions.
Declaration source: packages/core/src/instructions.ts:2033.
export interface CancelOrderWithFreeFundsAccounts extends BinaryRecorderTailAccounts {
market: Address;
orderbook: Address;
userPosition: Address;
user: Address;
traderLedger: Address;
vault: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
cancelPendingOrder#
Cancel a pending order via the API. Note: This is different from the SDK's cancelOrder which builds an on-chain transaction.
Declaration source: packages/core/src/api/orders.ts:114.
export function cancelPendingOrder(orderId: string): Promise<{ success: boolean; error?: string; }>;
Parameters
orderId: string— Not documented.
Returns
Promise<{ success: boolean; error?: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>CancelRoute</summary>CancelRoute#
Not documented.
Declaration source: packages/core/src/orderFunding.ts:147.
export type CancelRoute = 'wallet' | 'freeFunds';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CanonicalInstrumentIdInput#
Not documented.
Declaration source: packages/core/src/instruments.ts:28.
export interface CanonicalInstrumentIdInput {
chain: InstrumentChain | string;
programId: string;
marketAddress: string;
outcome: InstrumentOutcome | Lowercase<InstrumentOutcome> | string;
}
CanonicalInstrumentInput#
Not documented.
Declaration source: packages/core/src/instruments.ts:11.
export interface CanonicalInstrumentInput {
base: string;
quote: string;
tStart: Date | string | number;
durationSeconds: number | bigint;
outcome: InstrumentOutcome | Lowercase<InstrumentOutcome> | string;
}
canonicalMarketName#
Derive a human-readable name from immutable account fields and reviewed symbols.
Declaration source: packages/core/src/marketIdentity.ts:103.
export function canonicalMarketName(market: Pick<MarketIdentityMarket, "pythFeedId" | "durationSeconds" | "tStart" | "tEnd" | "settlementMint" | "marketKind">, options?: MarketIdentityOptions): string;
Parameters
market: Pick<MarketIdentityMarket, "settlementMint" | "durationSeconds" | "pythFeedId" | "tStart" | "tEnd" | "marketKind">— Not documented.options: MarketIdentityOptions— Not documented. Default:{}. See MarketIdentityOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
Defaults
options:{}.
canonicalNativeResolutionOutcome#
The only outcome the program pairs with reason
(logic/resolve_processor.rs::classify_native_resolution): directional
reasons settle UP or DOWN, every other reason settles neutral.
Declaration source: packages/core/src/resolutionDisclosure.ts:75.
export function canonicalNativeResolutionOutcome(reason: number): NativeResolutionOutcome;
Parameters
reason: number— Not documented.
Returns
NativeResolutionOutcome
Not documented.
Throws
Not documented.
</details> <details> <summary>canonicalNativeResolutionWeights</summary>canonicalNativeResolutionWeights#
Canonical (yesWeight, noWeight) for an outcome
(logic/resolve_processor.rs::canonical_payout_weights). A neutral split
requires an even denominator.
Declaration source: packages/core/src/resolutionDisclosure.ts:87.
export function canonicalNativeResolutionWeights(outcome: number, payoutDenominator: bigint): { yesWeight: bigint; noWeight: bigint; };
Parameters
outcome: number— Not documented.payoutDenominator: bigint— Not documented.
Returns
{ yesWeight: bigint; noWeight: bigint; }
Not documented.
Throws
Not documented.
</details> <details> <summary>canonicalPdaSeedBytes</summary>canonicalPdaSeedBytes#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:31.
export function canonicalPdaSeedBytes(name: keyof typeof PDA_SEEDS): Uint8Array;
Parameters
name: "market" | "yesMint" | "noMint" | "orderbook" | "vault" | "config" | "traderLedger" | "logAuthority" | "marketMeta" | "position" | "seriesVault" | "seesaw" | "asset" | "referral" | "spline" | "escrowYes" | "escrowNo" | "referrerTreasury" | "referrerEarnings" | "externalPreallocation" | "splineVault" | "makerSeries" | "splineSeat" | "marketExt"— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>canonicalReviewedIntentJson</summary>canonicalReviewedIntentJson#
Deterministic canonical JSON of a reviewed intent (sorted keys, bigint-safe).
Declaration source: packages/core/src/reviewedIntent.ts:547.
export function canonicalReviewedIntentJson(intent: ReviewedOrderIntent): string;
Parameters
intent: ReviewedOrderIntent— Not documented. See ReviewedOrderIntent for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>canonicalRiverRequest</summary>canonicalRiverRequest#
The River gateway signs the method, path, sorted query, timestamp and exact JSON bytes.
Declaration source: packages/core/src/riverClient.ts:166.
export function canonicalRiverRequest(method: string, url: URL, timestamp: string, body: string): string;
Parameters
method: string— Not documented.url: URL— Not documented.timestamp: string— Not documented.body: string— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>CanonicalSide</summary>CanonicalSide#
Canonical order side after normalization. Mirrors CanonicalSide in orderbook.rs.
Declaration source: packages/core/src/types.ts:162.
export enum CanonicalSide {
Bid = 0,
Ask = 1,
}
canRebroadcastIdenticalAttempt#
True when identical signed bytes may still be (re)broadcast safely.
Declaration source: packages/core/src/transactionAttempt.ts:1131.
export function canRebroadcastIdenticalAttempt(record: TransactionAttemptRecord, currentBlockHeight: number | null): boolean;
Parameters
record: TransactionAttemptRecord— Not documented. See TransactionAttemptRecord for its declaration and available field documentation.currentBlockHeight: number | null— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>CASE_OUTCOME_VALUES</summary>CASE_OUTCOME_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:113.
export declare const CASE_OUTCOME_VALUES: readonly ["pass", "fail", "provider_failing_reported_correctly"];
CaseOutcome#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:118.
export type CaseOutcome = (typeof CASE_OUTCOME_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CaseResult#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:120.
export interface CaseResult {
/** Corpus id, e.g. `BAM-WIRE-1` or `HAR-CONF-9`. */
readonly case: string;
readonly switches: Switches;
readonly expected: string;
readonly observed: string;
readonly outcome: CaseOutcome;
}
Field documentation
case— Corpus id, e.g.BAM-WIRE-1orHAR-CONF-9.
ChainEventsPageRequest#
Not documented.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:83.
export interface ChainEventsPageRequest {
readonly after?: string;
readonly limit?: number;
readonly fromSlot?: number;
readonly fetch?: ReplayFetch;
}
chainEventsUrl#
apiBase is the indexer API root, e.g. https://host/api/v1.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:104.
export function chainEventsUrl(apiBase: string, market: Address, page?: Omit<ChainEventsPageRequest, "fetch">): string;
Parameters
apiBase: string— Not documented.market: Address— Not documented.page: Omit<ChainEventsPageRequest, "fetch">— Not documented. Default:{}.
Returns
string
Not documented.
Throws
Not documented.
Defaults
page:{}.
ChallengeFill#
A single executed trade ("fill"), already normalized to display units by
the caller (e.g. mobile's mapStatsTrade, or the web equivalent) - this
module does not know about base-unit/lamport scaling.
Declaration source: packages/core/src/challenges.ts:19.
export interface ChallengeFill {
/** ISO-8601 execution timestamp for the fill. */
timestamp: string;
/** Notional value of the fill, in display units (e.g. USDC), not base units. */
notional: number;
/** Market identifier/address the fill executed against. */
marketId: string;
/** Trade outcome once resolved; omitted or 'pending' for open positions. */
outcome?: ChallengeFillOutcome;
}
Field documentation
timestamp— ISO-8601 execution timestamp for the fill.notional— Notional value of the fill, in display units (e.g. USDC), not base units.marketId— Market identifier/address the fill executed against.outcome— Trade outcome once resolved; omitted or 'pending' for open positions.
ChallengeFillOutcome#
Trade outcome as surfaced by the /api/v1/stats/trades history endpoint.
Declaration source: packages/core/src/challenges.ts:12.
export type ChallengeFillOutcome = 'win' | 'loss' | 'pending';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ChallengeType#
Challenge types in CHALLENGE_POOL (web + mobile).
Declaration source: packages/core/src/challenges.ts:31.
export type ChallengeType = 'trades' | 'wins' | 'volume' | 'markets' | 'streak';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
checkedAddU64#
Add two u64 values, rejecting overflow.
Declaration source: packages/core/src/confidential/amounts.ts:13.
export function checkedAddU64(a: bigint, b: bigint): bigint;
Parameters
a: bigint— Not documented.b: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>checkedMulU64ToU128</summary>checkedMulU64ToU128#
Multiply two u64 values into a checked u128 intermediate.
Declaration source: packages/core/src/confidential/amounts.ts:27.
export function checkedMulU64ToU128(a: bigint, b: bigint): bigint;
Parameters
a: bigint— Not documented.b: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>checkedSubU64</summary>checkedSubU64#
Subtract two u64 values, rejecting underflow.
Declaration source: packages/core/src/confidential/amounts.ts:20.
export function checkedSubU64(a: bigint, b: bigint): bigint;
Parameters
a: bigint— Not documented.b: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>checkpointSubjects</summary>checkpointSubjects#
The market and each attached spline of a checkpoint, with the sequence each one's history
starts after: the market's from checkpoint.eventSequence, each spline's from its own
seat or legacy spline account's event sequence in the checkpoint bytes.
Declaration source: packages/core/src/replay/checkpoint.ts:432.
export function checkpointSubjects(market: Address, checkpoint: RecordingCheckpoint): CheckpointSubjects;
Parameters
market: Address— Not documented.checkpoint: RecordingCheckpoint— Not documented. See RecordingCheckpoint for its declaration and available field documentation.
Returns
CheckpointSubjects
Not documented.
Throws
Not documented.
</details> <details> <summary>CheckpointSubjects</summary>CheckpointSubjects#
Not documented.
Declaration source: packages/core/src/replay/checkpoint.ts:418.
export interface CheckpointSubjects {
/** Batch subjects to keep: 32-byte hex to base58. */
readonly subjects: ReadonlyMap<string, string>;
/** `event_sequence` at the checkpoint of each base58 subject. */
readonly starts: ReadonlyMap<string, bigint>;
/** The attached splines of the checkpoint. */
readonly splines: readonly Address[];
}
Field documentation
subjects— Batch subjects to keep: 32-byte hex to base58.starts—event_sequenceat the checkpoint of each base58 subject.splines— The attached splines of the checkpoint.
checkReviewedCompleteSetMergeAtSigning#
The final gate, on state read immediately before signing.
Voluntary cool-off is not consulted: VOLUNTARY_CONTROL_ACTIONS.mergeCompleteSet
is permitted (a merge only retires exposure).
Declaration source: packages/core/src/completeSetMerge.ts:221.
export function checkReviewedCompleteSetMergeAtSigning(review: ReviewedCompleteSetMerge, observed: { readonly scope: ReviewedCompleteSetMergeScope | null; readonly market: CompleteSetMergeMarketView | null; readonly holdings: CompleteSetHoldings | null; }): ReviewedCompleteSetMergeVerdict;
Parameters
review: ReviewedCompleteSetMerge— Not documented. See ReviewedCompleteSetMerge for its declaration and available field documentation.observed: { readonly scope: ReviewedCompleteSetMergeScope | null; readonly market: CompleteSetMergeMarketView | null; readonly holdings: CompleteSetHoldings | null; }— Not documented.
Returns
ReviewedCompleteSetMergeVerdict
Not documented.
Throws
Not documented.
</details> <details> <summary>checkReviewedIntentAtSigning</summary>checkReviewedIntentAtSigning#
Decide, immediately before signing, whether a reviewed intent may still be authorized. Every first-party route — ordinary trade, quick trade, market-list trade, maker ladder, reduce/flatten and both referral-dialog continuations — calls this with freshly read state. Market/book/balance verdicts remain the separate strict preflight; this gate owns scope, freshness, fee policy and voluntary controls.
Declaration source: packages/core/src/reviewedIntent.ts:787.
export function checkReviewedIntentAtSigning(intent: ReviewedOrderIntent, observed: ReviewedIntentObservation): ReviewedIntentVerdict;
Parameters
intent: ReviewedOrderIntent— Not documented. See ReviewedOrderIntent for its declaration and available field documentation.observed: ReviewedIntentObservation— Not documented. See ReviewedIntentObservation for its declaration and available field documentation.
Returns
ReviewedIntentVerdict
Not documented.
Throws
Not documented.
</details> <details> <summary>CircuitBreakerConfig</summary>CircuitBreakerConfig#
Not documented.
Declaration source: packages/core/src/api/client.ts:58.
export interface CircuitBreakerConfig {
/** Number of consecutive failures before opening the circuit */
failureThreshold?: number;
/** Time in ms to wait before trying again (half-open state) */
resetTimeoutMs?: number;
/** Callback when circuit state changes */
onStateChange?: (state: CircuitBreakerState) => void;
}
Field documentation
failureThreshold— Number of consecutive failures before opening the circuitresetTimeoutMs— Time in ms to wait before trying again (half-open state)onStateChange— Callback when circuit state changes
CircuitBreakerOpenError#
Not documented.
Declaration source: packages/core/src/api/client.ts:184.
export declare class CircuitBreakerOpenError extends SeesawSdkError {
constructor(resetTimeMs: number);
readonly resetTimeMs: number;
}
Parameters
resetTimeMs: number— Not documented.
Throws
Not documented.
</details> <details> <summary>CircuitBreakerState</summary>CircuitBreakerState#
Not documented.
Declaration source: packages/core/src/api/client.ts:67.
export type CircuitBreakerState = 'closed' | 'open' | 'half-open';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
claimAllChunked#
Not documented.
Declaration source: packages/core/src/referral/creator.ts:130.
export function claimAllChunked(entries: readonly CreatorMarketEntry[], opts: ClaimAllOptions): Promise<ClaimAllPlan>;
Parameters
entries: readonly CreatorMarketEntry[]— Not documented.opts: ClaimAllOptions— Not documented. See ClaimAllOptions for its declaration and available field documentation.
Returns
Promise<ClaimAllPlan>
Not documented.
Throws
Not documented.
</details> <details> <summary>ClaimAllOptions</summary>ClaimAllOptions#
Not documented.
Declaration source: packages/core/src/referral/creator.ts:123.
export interface ClaimAllOptions {
/** Max ix per planned transaction. Default 5 (matches the spec's CU budget). */
maxPerTx?: number;
/** Per-entry ClaimCreatorFees ix builder; the caller injects the real builder. */
buildClaimIx: (entry: CreatorMarketEntry) => Promise<Instruction>;
}
Field documentation
maxPerTx— Max ix per planned transaction. Default 5 (matches the spec's CU budget).buildClaimIx— Per-entry ClaimCreatorFees ix builder; the caller injects the real builder.
ClaimAllPlan#
Not documented.
Declaration source: packages/core/src/referral/types.ts:148.
export interface ClaimAllPlan {
/** One entry per planned transaction. Caller submits sequentially or in parallel. */
transactions: ClaimAllPlanEntry[];
/** Markets that were excluded from claim-all (e.g. claimableNow === false). */
skipped: { marketId: string; reason: string }[];
}
Field documentation
transactions— One entry per planned transaction. Caller submits sequentially or in parallel.skipped— Markets that were excluded from claim-all (e.g. claimableNow === false).
ClaimAllPlanEntry#
Not documented.
Declaration source: packages/core/src/referral/types.ts:136.
export interface ClaimAllPlanEntry {
marketAddress: Address;
/** Subset of instructions for ONE transaction. Caller signs+submits. */
instructions: Instruction[];
/**
* Markets whose fees this transaction covers. Redundant with the per-ix
* accounts; included so callers don't need to maintain a reverse map
* when displaying per-row progress in the UI.
*/
marketIds: string[];
}
Field documentation
instructions— Subset of instructions for ONE transaction. Caller signs+submits.marketIds— Markets whose fees this transaction covers. Redundant with the per-ix accounts; included so callers don't need to maintain a reverse map when displaying per-row progress in the UI.
claimAuthority#
Step 2 of authority rotation. Signer must match config.pending_authority
and the on-chain timelock must have elapsed.
Declaration source: packages/core/src/sdk.ts:1988.
export function claimAuthority(input: ClaimAuthorityInput, programAddress?: Address): Promise<SdkResult<ClaimAuthorityResult>>;
Parameters
input: ClaimAuthorityInput— Not documented. See ClaimAuthorityInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ClaimAuthorityResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ClaimAuthorityAccounts#
Accounts for ClaimAuthority instruction.
Declaration source: packages/core/src/instructions.ts:3705.
export interface ClaimAuthorityAccounts extends BinaryRecorderTailAccounts {
config: Address;
pendingAuthority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ClaimAuthorityInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1976.
export interface ClaimAuthorityInput {
pendingAuthority: Address;
}
ClaimAuthorityResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1980.
export interface ClaimAuthorityResult {
config: Address;
}
claimCreatorFees#
Build ClaimCreatorFees instruction with automatic vault PDA derivation.
Callers must resolve creatorTokenAccount and settlementMint by reading
the on-chain market account first (same pattern as resolveMarket).
Declaration source: packages/core/src/sdk.ts:1875.
export function claimCreatorFees(input: ClaimCreatorFeesInput, programAddress?: Address): Promise<SdkResult<ClaimCreatorFeesResult>>;
Parameters
input: ClaimCreatorFeesInput— Not documented. See ClaimCreatorFeesInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ClaimCreatorFeesResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ClaimCreatorFeesAccounts#
Accounts for ClaimCreatorFees instruction.
Native markets use 6 head accounts; external markets require market_meta
at index 6, before the two-account recorder tail.
Declaration source: packages/core/src/instructions.ts:3312.
export interface ClaimCreatorFeesAccounts extends BinaryRecorderTailAccounts {
market: Address;
vault: Address;
creatorTokenAccount: Address;
settlementMint: Address;
caller: Address;
tokenProgram: Address;
/**
* Required for external markets; omit for native Pyth markets. The
* authenticated payout vector determines the resolved economic reserve.
*
* `load_resolved_external_numerators`
* (`program/src/processor/shared/settlement.rs`) owns the shape contract:
* a native market must NOT send it.
*/
marketMeta?: Address;
}
Field documentation
marketMeta— Required for external markets; omit for native Pyth markets. The authenticated payout vector determines the resolved economic reserve.
load_resolved_external_numerators
(program/src/processor/shared/settlement.rs) owns the shape contract:
a native market must NOT send it.
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ClaimCreatorFeesInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1840.
export interface ClaimCreatorFeesInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
/** Market creator's token account for the settlement mint. */
creatorTokenAccount: Address;
/** Market's settlement mint (must match market.settlementMint). */
settlementMint: Address;
/** Permissionless caller; must be a signer. */
caller: Address;
/**
* Required for external markets; a native Pyth market must omit it.
* The resolved external reserve uses its authenticated payout vector.
*
* Callers decide from the decoded market: supply
* `deriveMarketMetaPda(market)` when the market is NOT native Pyth.
*/
marketMeta?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.creatorTokenAccount— Market creator's token account for the settlement mint.settlementMint— Market's settlement mint (must match market.settlementMint).caller— Permissionless caller; must be a signer.marketMeta— Required for external markets; a native Pyth market must omit it. The resolved external reserve uses its authenticated payout vector.
Callers decide from the decoded market: supply
deriveMarketMetaPda(market) when the market is NOT native Pyth.
ClaimCreatorFeesResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1864.
export interface ClaimCreatorFeesResult {
market: Address;
vault: Address;
}
ClaimCurrencyReferrerEarningsAccounts#
Accounts for a currency-bound referral earnings claim.
Declaration source: packages/core/src/instructions.ts:2519.
export interface ClaimCurrencyReferrerEarningsAccounts extends BinaryRecorderTailAccounts {
record: Address;
earnings: Address;
treasury: Address;
recipient: Address;
mint: Address;
referrer: Address;
tokenProgram: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
claimReferralHandle#
Claim (or rename) the signing wallet's referral handle.
Declaration source: packages/core/src/api/social.ts:133.
export function claimReferralHandle(client: ApiClient, signer: WalletMessageSigner, handle: string, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<{ handle: string; handle_display: string; wallet: string; }>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.handle: string— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ handle: string; handle_display: string; wallet: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>clampBigIntToNumber</summary>clampBigIntToNumber#
Converts a BigInt to Number, clamping to MAX_SAFE_INTEGER or MIN_SAFE_INTEGER if the value would overflow.
Declaration source: packages/core/src/utils/bigint.ts:91.
export function clampBigIntToNumber(value: bigint): number;
Parameters
value: bigint— - The BigInt value to convert
Returns
number
The converted Number value, clamped to safe range
Throws
Not documented.
</details> <details> <summary>CLASSIC_SPL_TOKEN_PROGRAM</summary>CLASSIC_SPL_TOKEN_PROGRAM#
Not documented.
Declaration source: packages/core/src/currency/admission.ts:25.
export declare const CLASSIC_SPL_TOKEN_PROGRAM: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
classifySignatureStatus#
Map one status lookup to an observation kind. status must come from a
lookup with searchTransactionHistory: true. currentBlockHeight is a
confirmed-commitment block height read AFTER the status lookup.
A null status is status_absent while the blockhash is still valid and
blockhash_expired_no_status after it passed; neither releases the
replacement barrier on its own.
Declaration source: packages/core/src/transactionAttempt.ts:1103.
export function classifySignatureStatus(input: { readonly status: SignatureStatusObservation | null | undefined; readonly currentBlockHeight: number | null; readonly lastValidBlockHeight: number | null; }): TransactionAttemptObservationKind;
Parameters
input: { readonly status: SignatureStatusObservation | null | undefined; readonly currentBlockHeight: number | null; readonly lastValidBlockHeight: number | null; }— Not documented.
Returns
TransactionAttemptObservationKind
Not documented.
Throws
Not documented.
</details> <details> <summary>classUpperBound</summary>classUpperBound#
Return B02's smallest charge class containing the principal.
Declaration source: packages/core/src/confidential/amounts.ts:34.
export function classUpperBound(principal: bigint): bigint;
Parameters
principal: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>CLOCK_SYSVAR_ADDRESS</summary>CLOCK_SYSVAR_ADDRESS#
Not documented.
Declaration source: packages/core/src/market.ts:57.
export declare const CLOCK_SYSVAR_ADDRESS: Address;
CLOSE_MAKER_QUOTE_STATE_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:44.
export declare const CLOSE_MAKER_QUOTE_STATE_DISCRIMINATOR: 103;
CLOSE_STRATEGY_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:56.
export declare const CLOSE_STRATEGY_ROUTE: 89;
CLOSE_TIMEOUT_SECONDS#
CLOSE_TIMEOUT_SECONDS — program/src/processor/close_market.rs:67.
Seven days of grace after resolution before a market may be torn down, so every holder has a realistic window to redeem.
Declaration source: packages/core/src/preflight/lifecycle.ts:59.
export declare const CLOSE_TIMEOUT_SECONDS: number;
closeMarket#
Build CloseMarket instruction with automatic PDA derivation.
Post-close retries can reject once the runtime removes the market account; confirm the account is absent before surfacing the retry as a user-visible failure.
The on-chain CloseMarket processor (program/src/processor/close_market.rs) closes
the vault, both escrow token accounts, and the trader_ledger PDA, then sweeps
any residual vault dust to the creator's settlement-token ATA. The SDK also
supplies the YES/NO mint pair so the processor can burn directly transferred
share surplus from the self-owned escrows before closing them.
Declaration source: packages/core/src/sdk.ts:1767.
export function closeMarket(input: CloseMarketInput, programAddress?: Address): Promise<SdkResult<CloseMarketResult>>;
Parameters
input: CloseMarketInput— Not documented. See CloseMarketInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CloseMarketResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CloseMarketAccounts#
Accounts for CloseMarket instruction.
On-chain CloseMarketAccounts::parse requires the 12-account fixed prefix.
After authenticating the market, it accepts native tails of [nativePolicy] or
[nativePolicy, yesMint, noMint]; external tails require [marketMeta, externalPolicy]
with an optional following YES/NO mint pair. Supplying only one mint, or
mixing native spline metadata with external metadata, is invalid.
Declaration source: packages/core/src/instructions.ts:3061.
export interface CloseMarketAccounts extends BinaryRecorderTailAccounts {
market: Address;
creator: Address;
caller: Address;
config: Address;
systemProgram: Address;
vault: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
orderbook: Address;
yesEscrow: Address;
noEscrow: Address;
traderLedger: Address;
/**
* Role 12 residual recipient. Receives the whole vault residual (truncation
* dust and any unclaimed remainder) before the vault CloseAccount CPI. It is
* always the creator's settlement-token account. Checked only when the
* residual is nonzero.
*/
residualRecipient: Address;
/** The market's settlement (quote) mint, for the residual `TransferChecked`. */
settlementMint: Address;
/** Required sidecar for external markets; never accepted for native markets. */
marketMeta?: Address;
/** Required immutable policy sidecar for native markets; closed to creator. */
nativePolicy?: Address;
/** Required with marketMeta: the market's external (Reclaim) policy PDA. */
externalPolicy?: Address;
/** Optional YES mint PDA for share-escrow surplus recovery. */
yesMint?: Address;
/** Optional NO mint PDA for share-escrow surplus recovery. */
noMint?: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.residualRecipient— Role 12 residual recipient. Receives the whole vault residual (truncation dust and any unclaimed remainder) before the vault CloseAccount CPI. It is always the creator's settlement-token account. Checked only when the residual is nonzero.settlementMint— The market's settlement (quote) mint, for the residualTransferChecked.marketMeta— Required sidecar for external markets; never accepted for native markets.nativePolicy— Required immutable policy sidecar for native markets; closed to creator.externalPolicy— Required with marketMeta: the market's external (Reclaim) policy PDA.yesMint— Optional YES mint PDA for share-escrow surplus recovery.noMint— Optional NO mint PDA for share-escrow surplus recovery.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
CloseMarketInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1702.
export interface CloseMarketInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
creator: Address;
caller: Address;
/**
* Role 12 residual recipient. Receives the whole vault residual (truncation
* dust and any unclaimed remainder) before the vault CloseAccount CPI. It is
* always the creator's settlement-token account. Checked only when the
* residual is nonzero.
*/
residualRecipient: Address;
/** The market's settlement (quote) mint, for the residual `TransferChecked`. */
settlementMint: Address;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth
* markets** — `close_market.rs` authenticates the tail by market kind:
* native ordinary (15 accounts, derived policy), native escrow recovery (17), external
* ordinary (16, `market_meta` and policy) and external recovery (18). Without it no
* client can close an external market.
*
* Callers decide from the decoded market: supply
* `deriveMarketMetaPda(market)` when the market is NOT native Pyth, and omit
* it otherwise.
*/
marketMeta?: Address;
/** Optional orderbook PDA override. Auto-derived when omitted. */
orderbook?: Address;
/** Optional YES escrow token account override. Auto-derived when omitted. */
yesEscrow?: Address;
/** Optional NO escrow token account override. Auto-derived when omitted. */
noEscrow?: Address;
/** Optional trader-ledger PDA override. Auto-derived when omitted. */
traderLedger?: Address;
/** Optional YES mint PDA override. Auto-derived when omitted. */
yesMint?: Address;
/** Optional NO mint PDA override. Auto-derived when omitted. */
noMint?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.residualRecipient— Role 12 residual recipient. Receives the whole vault residual (truncation dust and any unclaimed remainder) before the vault CloseAccount CPI. It is always the creator's settlement-token account. Checked only when the residual is nonzero.settlementMint— The market's settlement (quote) mint, for the residualTransferChecked.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets —close_market.rsauthenticates the tail by market kind: native ordinary (15 accounts, derived policy), native escrow recovery (17), external ordinary (16,market_metaand policy) and external recovery (18). Without it no client can close an external market.
Callers decide from the decoded market: supply
deriveMarketMetaPda(market) when the market is NOT native Pyth, and omit
it otherwise.
orderbook— Optional orderbook PDA override. Auto-derived when omitted.yesEscrow— Optional YES escrow token account override. Auto-derived when omitted.noEscrow— Optional NO escrow token account override. Auto-derived when omitted.traderLedger— Optional trader-ledger PDA override. Auto-derived when omitted.yesMint— Optional YES mint PDA override. Auto-derived when omitted.noMint— Optional NO mint PDA override. Auto-derived when omitted.
CloseMarketResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1747.
export interface CloseMarketResult {
market: Address;
vault: Address;
yesMint: Address;
noMint: Address;
}
CloseMarketSnapshot#
Everything CloseMarket needs.
Source of truth: close_market_gate_ok
(program/src/processor/close_market.rs:132-194) plus the account-bound
guards in prepare_close_market_inner and the trader-ledger sweep.
Declaration source: packages/core/src/preflight/types.ts:439.
export interface CloseMarketSnapshot {
/**
* Derived lifecycle state. `compute_state()` reports `Resolved`/`Closed`
* exactly when `market.outcome != 0`, which is what `is_resolved()` tests
* (`close_market.rs:125-127`), so those two states mean "resolved" here.
*/
state: MarketState;
/** `market.resolved_at` — unix seconds. */
resolvedAt: number;
nowUnix: number;
/**
* Grace window after resolution. Defaults to `CLOSE_TIMEOUT_SECONDS`
* (`close_market.rs:67`), which is what the program uses.
*/
closeTimeoutSeconds?: number;
/**
* Occupied deep-orderbook slots, Active AND ExpiredClaimable. Any non-zero
* count denies (`close_market.rs:1163-1166`).
*/
openOrders: number;
/**
* `market.total_positions - market.settled_positions`
* (`close_market.rs:166-170`).
*/
positionsRemaining: number;
/**
* Sum of every non-zero trader-ledger bucket across all seats. Any non-zero
* total denies (`close_market.rs:637-639`).
*/
ledgerBalances: bigint;
/** `market.accumulated_referral_fees()` (`close_market.rs:151-152`). */
pendingReferralFees: bigint;
/** `market.accumulated_creator_fees()` (`close_market.rs:189-190`). */
creatorFees: bigint;
/** `market.spline_feature_enabled()` (`close_market.rs:601-606`). */
splineFeatureEnabled: boolean;
/** `market.spline_committed_collateral()` (`close_market.rs:601-606`). */
unsettledSplines: bigint;
// --- Bearer-supply gate (optional) ---------------------------------------
//
// `close_market.rs:180-186` refuses to close while any leg's aggregate
// integer payout still floors above zero. All four fields must be supplied
// for the gate to run; otherwise PREVIEW skips it rather than guessing (the
// program still enforces it) and `strict` mode denies with UNKNOWN_STATE.
/** `market.total_yes_shares`. */
totalYesShares?: bigint;
/** `market.total_no_shares`. */
totalNoShares?: bigint;
/** YES redemption numerator, out of 10 000. */
yesPayoutNumerator?: number;
/** NO redemption numerator, out of 10 000. */
noPayoutNumerator?: number;
/** External terminal pair: null means unread. Undefined retains native D4 compatibility. */
externalPayout?: ExternalPayout | null;
// --- Escrow surplus (optional) -------------------------------------------
/**
* YES escrow token balance; `> 0` denies (`close_market.rs:1155-1157`).
* Omitted skips the gate in preview and denies in `strict` mode.
*/
yesEscrowBalance?: bigint;
/**
* NO escrow token balance; `> 0` denies (`close_market.rs:1176-1178`).
* Omitted skips the gate in preview and denies in `strict` mode.
*/
noEscrowBalance?: bigint;
/**
* `vault.amount`. INFORMATIONAL ONLY — the verdict NEVER denies on it.
*
* `CloseMarket` deliberately has no pre-sweep vault-balance gate: the
* in-process SweepDust drains any residual (honest truncation dust OR an
* attacker's donation) to the creator's ATA, and only then does the strict
* `vault.amount == 0` check run (`close_market.rs:770-820`). Denying on a
* non-zero pre-close balance would be MORE strict than the program and would
* let anyone brick the close button for ~$0.000006 of donated dust.
*/
vaultBalance?: bigint;
}
Field documentation
state— Derived lifecycle state.compute_state()reportsResolved/Closedexactly whenmarket.outcome != 0, which is whatis_resolved()tests (close_market.rs:125-127), so those two states mean "resolved" here.resolvedAt—market.resolved_at— unix seconds.closeTimeoutSeconds— Grace window after resolution. Defaults toCLOSE_TIMEOUT_SECONDS(close_market.rs:67), which is what the program uses.openOrders— Occupied deep-orderbook slots, Active AND ExpiredClaimable. Any non-zero count denies (close_market.rs:1163-1166).positionsRemaining—market.total_positions - market.settled_positions(close_market.rs:166-170).ledgerBalances— Sum of every non-zero trader-ledger bucket across all seats. Any non-zero total denies (close_market.rs:637-639).pendingReferralFees—market.accumulated_referral_fees()(close_market.rs:151-152).creatorFees—market.accumulated_creator_fees()(close_market.rs:189-190).splineFeatureEnabled—market.spline_feature_enabled()(close_market.rs:601-606).unsettledSplines—market.spline_committed_collateral()(close_market.rs:601-606).totalYesShares—market.total_yes_shares.totalNoShares—market.total_no_shares.yesPayoutNumerator— YES redemption numerator, out of 10 000.noPayoutNumerator— NO redemption numerator, out of 10 000.externalPayout— External terminal pair: null means unread. Undefined retains native D4 compatibility.yesEscrowBalance— YES escrow token balance;> 0denies (close_market.rs:1155-1157). Omitted skips the gate in preview and denies instrictmode.noEscrowBalance— NO escrow token balance;> 0denies (close_market.rs:1176-1178). Omitted skips the gate in preview and denies instrictmode.vaultBalance—vault.amount. INFORMATIONAL ONLY — the verdict NEVER denies on it.
CloseMarket deliberately has no pre-sweep vault-balance gate: the
in-process SweepDust drains any residual (honest truncation dust OR an
attacker's donation) to the creator's ATA, and only then does the strict
vault.amount == 0 check run (close_market.rs:770-820). Denying on a
non-zero pre-close balance would be MORE strict than the program and would
let anyone brick the close button for ~$0.000006 of donated dust.
closeMarketVerdict#
Decide whether the program would accept this CloseMarket.
CloseMarket is permissionless and tears the market PDA down for rent, so
every gate below exists to guarantee nothing of value is still owed to
anyone. The gates are checked in the program's own order, which is NOT the
order a reader would guess: the spline gate runs first (Step 1, before the
market is even read for value fields), and pending referral fees are checked
before the grace window rather than at the end.
Declaration source: packages/core/src/preflight/lifecycle.ts:137.
export function closeMarketVerdict(snapshot: CloseMarketSnapshot, options?: PreflightOptions): Verdict;
Parameters
snapshot: CloseMarketSnapshot— Not documented. See CloseMarketSnapshot for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>closePosition</summary>closePosition#
Permissionless close of a settled position. Rent is returned to the recorded position owner (not the caller).
Declaration source: packages/core/src/sdk.ts:2360.
export function closePosition(input: ClosePositionInput, programAddress?: Address): Promise<SdkResult<ClosePositionResult>>;
Parameters
input: ClosePositionInput— Not documented. See ClosePositionInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ClosePositionResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ClosePositionAccounts#
Accounts for ClosePosition instruction.
Declaration source: packages/core/src/instructions.ts:3934.
export interface ClosePositionAccounts extends BinaryRecorderTailAccounts {
position: Address;
market: Address;
owner: Address;
caller: Address;
systemProgram: Address;
vault: Address;
/** Required only for a live external market; absent for native or erased parents. */
marketMeta?: Address;
}
Field documentation
marketMeta— Required only for a live external market; absent for native or erased parents.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ClosePositionInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2341.
export interface ClosePositionInput {
marketAddress: Address;
positionOwner: Address;
caller: Address;
/** Supply the authenticated MarketMeta PDA for a live external market. */
marketMeta?: Address;
}
Field documentation
marketMeta— Supply the authenticated MarketMeta PDA for a live external market.
ClosePositionResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2349.
export interface ClosePositionResult {
position: Address;
market: Address;
owner: Address;
vault: Address;
}
ClosePreallocatedChildAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:3187.
export interface ClosePreallocatedChildAccounts {
child: Address;
market: Address;
/** Funding creator bound by the in-child native marker; receives the rent. */
creator: Address;
}
Field documentation
creator— Funding creator bound by the in-child native marker; receives the rent.
CLOSER_REWARD_LAMPORTS#
D0{lamport} Default closer reward paid per lifecycle transition.
Declaration source: packages/core/src/constants.ts:77.
export declare const CLOSER_REWARD_LAMPORTS: 200000n;
CLOSER_REWARDS_PER_MARKET#
D0{count} Number of closer rewards funded per market lifecycle.
Declaration source: packages/core/src/constants.ts:80.
export declare const CLOSER_REWARDS_PER_MARKET: 5n;
closeSpline#
Not documented.
Declaration source: packages/core/src/sdk.ts:3814.
export function closeSpline(input: CloseSplineInput, programAddress?: Address): Promise<SdkResult<{ splineVault: Address; }>>;
Parameters
input: CloseSplineInput— Not documented. See CloseSplineInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ splineVault: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CloseSplineAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4954.
export interface CloseSplineAccounts extends BinaryRecorderTailAccounts {
creator: Address;
spline: Address;
splineVault: Address;
tokenProgram: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
CloseSplineInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3810.
export interface CloseSplineInput extends SplineAddressInput {
tokenProgram?: Address;
}
COALESCING_MODE_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:30.
export declare const COALESCING_MODE_VALUES: readonly ["single_market", "multi_market"];
CoalescingMode#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:31.
export type CoalescingMode = (typeof COALESCING_MODE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
collectPositionSnapshot#
Traverse every page of an owner's positions under a consistency contract. Rejects with {@link PositionSnapshotError} on scope mismatch/change, a non-progressing cursor, abort, or any page failure (never a silent prefix).
Declaration source: packages/core/src/api/positionSnapshot.ts:127.
export function collectPositionSnapshot<T>(options: CollectPositionSnapshotOptions<T>): Promise<PositionSnapshot<T>>;
Parameters
options: CollectPositionSnapshotOptions<T>— Not documented. See CollectPositionSnapshotOptions for its declaration and available field documentation.
Returns
Promise<PositionSnapshot<T>>
Not documented.
Throws
Not documented.
</details> <details> <summary>CollectPositionSnapshotOptions</summary>CollectPositionSnapshotOptions#
Not documented.
Declaration source: packages/core/src/api/positionSnapshot.ts:69.
export interface CollectPositionSnapshotOptions<T> {
readonly scope: PositionSnapshotScope;
/** Fetch one page; `cursor` is `null` for the first page. */
readonly fetchPage: (
cursor: string | null,
signal: AbortSignal | undefined
) => Promise<PositionSnapshotPage<T>>;
/** Stable row identity (position address). */
readonly identify: (row: T) => string;
readonly signal?: AbortSignal;
/** Maximum pages per traversal attempt (default 50, i.e. 5,000 rows at limit=100). */
readonly maxPages?: number;
/** Maximum restarts after a detected inconsistency (default 2). */
readonly maxRestarts?: number;
/**
* Returns false once the caller's scope (wallet/program/network) changed.
* Checked before every page and before returning, so an old-scope traversal
* can never publish into a new scope's state.
*/
readonly isScopeCurrent?: () => boolean;
}
Field documentation
fetchPage— Fetch one page;cursorisnullfor the first page.identify— Stable row identity (position address).maxPages— Maximum pages per traversal attempt (default 50, i.e. 5,000 rows at limit=100).maxRestarts— Maximum restarts after a detected inconsistency (default 2).isScopeCurrent— Returns false once the caller's scope (wallet/program/network) changed. Checked before every page and before returning, so an old-scope traversal can never publish into a new scope's state.
compareBytes#
Not documented.
Declaration source: packages/core/src/router/seatQuote.ts:254.
export function compareBytes(a: Uint8Array, b: Uint8Array): number;
Parameters
a: Uint8Array<ArrayBufferLike>— Not documented.b: Uint8Array<ArrayBufferLike>— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>compareMakerSelectorToBaseline</summary>compareMakerSelectorToBaseline#
Runs the selector and the midpoint baseline on one scenario and compares the results.
Declaration source: packages/core/src/makerSelector.ts:384.
export function compareMakerSelectorToBaseline(input: MakerSelectorInput, estimator?: MakerSelectorFillEstimator): MakerSelectorComparison;
Parameters
input: MakerSelectorInput— Not documented. See MakerSelectorInput for its declaration and available field documentation.estimator: MakerSelectorFillEstimator— Not documented. Default:makerSelectorReferenceEstimator. See MakerSelectorFillEstimator for its declaration and available field documentation.
Returns
MakerSelectorComparison
Not documented.
Throws
Not documented.
Defaults
estimator:makerSelectorReferenceEstimator.
compareRoutePlans#
Integer-only plan order: best first (see the module comment).
Declaration source: packages/core/src/router/routePlan.ts:394.
export function compareRoutePlans(intent: TradeIntent, left: RoutePlan, right: RoutePlan): number;
Parameters
intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.left: RoutePlan— Not documented. See RoutePlan for its declaration and available field documentation.right: RoutePlan— Not documented. See RoutePlan for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>compareTrustlessProjectionCursors</summary>compareTrustlessProjectionCursors#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:133.
export function compareTrustlessProjectionCursors(left: TrustlessProjectionCursor, right: TrustlessProjectionCursor): -1 | 0 | 1;
Parameters
left: TrustlessProjectionCursor— Not documented. See TrustlessProjectionCursor for its declaration and available field documentation.right: TrustlessProjectionCursor— Not documented. See TrustlessProjectionCursor for its declaration and available field documentation.
Returns
0 | 1 | -1
Not documented.
Throws
Not documented.
</details> <details> <summary>compileMirrorTransaction</summary>compileMirrorTransaction#
Compile the version 1 transaction of instructions: the one builder every
sender and the measurement share. Signature slots are present and unfilled.
A ComputeBudget instruction is refused: the limits belong to resources.
Declaration source: packages/core/src/v1Transaction.ts:165.
export function compileMirrorTransaction(instructions: readonly Instruction[], feePayer: Address, lifetime: MirrorTransactionLifetime, resources: MirrorTransactionResources): Transaction;
Parameters
instructions: readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]— Not documented.feePayer: Address— Not documented.lifetime: MirrorTransactionLifetime— Not documented. See MirrorTransactionLifetime for its declaration and available field documentation.resources: MirrorTransactionResources— Not documented. See MirrorTransactionResources for its declaration and available field documentation.
Returns
Readonly<{ messageBytes: import("node_modules/@solana/transactions/dist/types/transaction").TransactionMessageBytes; signatures: import("node_modules/@solana/transactions/dist/types/transaction").SignaturesMap; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>compileStopLossTransaction</summary>compileStopLossTransaction#
Not documented.
Declaration source: packages/core/src/stopLoss/compile.ts:45.
export function compileStopLossTransaction(input: { owner: Address; nonceAccount: Address; nonceValue: string; placement: Instruction; computeUnitPrice?: bigint; heapFrameBytes?: number; }): Uint8Array;
Parameters
input: { owner: Address; nonceAccount: Address; nonceValue: string; placement: Instruction; computeUnitPrice?: bigint; heapFrameBytes?: number; }— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>CompletedRedeemInstruction</summary>CompletedRedeemInstruction#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:30.
export interface CompletedRedeemInstruction<
TSignature = string,
> extends ResumableRedeemResult<TSignature> {
readonly instructionIndex: number;
readonly instructionIdentity: string;
}
CompleteSetHoldings#
A trader's merge-usable holdings in one market.
Declaration source: packages/core/src/completeSetMerge.ts:37.
export interface CompleteSetHoldings {
/** YES SPL token balance in the caller's associated token account. */
readonly walletYes: bigint;
/** NO SPL token balance in the caller's associated token account. */
readonly walletNo: bigint;
/** Trader-ledger `yes_free` (locked shares excluded). */
readonly ledgerYesFree: bigint;
/** Trader-ledger `no_free` (locked shares excluded). */
readonly ledgerNoFree: bigint;
}
Field documentation
walletYes— YES SPL token balance in the caller's associated token account.walletNo— NO SPL token balance in the caller's associated token account.ledgerYesFree— Trader-ledgeryes_free(locked shares excluded).ledgerNoFree— Trader-ledgerno_free(locked shares excluded).
completeSetMergeEligibility#
Whether a merge is offerable at all, and its maximum quantity.
Unknown market or holdings are reported as such — never as eligible and never as zero.
Declaration source: packages/core/src/completeSetMerge.ts:117.
export function completeSetMergeEligibility(market: CompleteSetMergeMarketView | null | undefined, holdings: CompleteSetHoldings | null | undefined): CompleteSetMergeEligibility;
Parameters
market: CompleteSetMergeMarketView | null | undefined— Not documented. See CompleteSetMergeMarketView for its declaration and available field documentation.holdings: CompleteSetHoldings | null | undefined— Not documented. See CompleteSetHoldings for its declaration and available field documentation.
Returns
CompleteSetMergeEligibility
Not documented.
Throws
Not documented.
</details> <details> <summary>CompleteSetMergeEligibility</summary>CompleteSetMergeEligibility#
Not documented.
Declaration source: packages/core/src/completeSetMerge.ts:66.
export type CompleteSetMergeEligibility =
| { readonly eligible: true; readonly maxQuantity: bigint }
| { readonly eligible: false; readonly reason: CompleteSetMergeIneligibleReason };
CompleteSetMergeError#
Not documented.
Declaration source: packages/core/src/completeSetMerge.ts:79.
export declare class CompleteSetMergeError extends Error {
constructor(message: string);
readonly code: "COMPLETE_SET_MERGE_INVALID";
}
Parameters
message: string— Not documented.
Throws
Not documented.
</details> <details> <summary>CompleteSetMergeIneligibleReason</summary>CompleteSetMergeIneligibleReason#
Not documented.
Declaration source: packages/core/src/completeSetMerge.ts:58.
export type CompleteSetMergeIneligibleReason =
| 'market-unknown'
| 'market-resolved'
| 'market-unsupported'
| 'holdings-unknown'
| 'no-yes'
| 'no-no';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CompleteSetMergeMarketView#
The market fields the merge gates read.
Declaration source: packages/core/src/completeSetMerge.ts:49.
export interface CompleteSetMergeMarketView {
/** `MarketAccount.outcome`; `null`/`undefined` is unknown, never "unresolved". */
readonly outcome: number | null | undefined;
/** `MarketAccount.market_kind` (0 binary, 1 scalar). Omitted: not checked. */
readonly marketKind?: number;
/** `MarketAccount.leg_count`. Omitted: not checked. */
readonly legCount?: number;
}
Field documentation
outcome—MarketAccount.outcome;null/undefinedis unknown, never "unresolved".marketKind—MarketAccount.market_kind(0 binary, 1 scalar). Omitted: not checked.legCount—MarketAccount.leg_count. Omitted: not checked.
CompleteSetMergePlan#
The exact source split one MergeCompleteSet instruction encodes.
Declaration source: packages/core/src/completeSetMerge.ts:71.
export interface CompleteSetMergePlan {
readonly quantity: bigint;
readonly walletYes: bigint;
readonly walletNo: bigint;
readonly ledgerYes: bigint;
readonly ledgerNo: bigint;
}
completeSetPathFor#
The complete-set path available for an intent under a funding mode, or null.
Declaration source: packages/core/src/router/routePlan.ts:282.
export function completeSetPathFor(intent: TradeIntent, fundingMode: RouteFundingMode): CompleteSetPathKind | null;
Parameters
intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.fundingMode: RouteFundingMode— Not documented. See RouteFundingMode for its declaration and available field documentation.
Returns
CompleteSetPathKind | null
Not documented.
Throws
Not documented.
</details> <details> <summary>CompleteSetPathKind</summary>CompleteSetPathKind#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:106.
export type CompleteSetPathKind = 'mintAndSell' | 'buyAndMerge';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
COMPUTE_BUDGET_PROGRAM_ADDRESS#
ComputeBudget program address.
Declaration source: packages/core/src/computeBudget.ts:38.
export declare const COMPUTE_BUDGET_PROGRAM_ADDRESS: Address;
computeAndSplit#
One-shot convenience wrapper. builderBpsEffective defaults to 0 (no
builder): Seesaw's own web and mobile apps never act as builders (ruling
2026-10-27), so their previews keep the builder slice with protocol.
Declaration source: packages/core/src/fee.ts:477.
export function computeAndSplit(notional: bigint, priceBps: number, capBps: number, decayBps: number, split: FeeSplit | undefined, makerTotal: bigint, makerSlack?: bigint, builderBpsEffective?: number): FeeAmounts;
Parameters
notional: bigint— Not documented.priceBps: number— Not documented.capBps: number— Not documented.decayBps: number— Not documented.split: FeeSplit— Not documented. Default:DEFAULT_FEE_SPLIT. See FeeSplit for its declaration and available field documentation.makerTotal: bigint— Not documented.makerSlack: bigint— Not documented. Default:0n.builderBpsEffective: number— Not documented. Default:0.
Returns
FeeAmounts
Not documented.
Throws
Not documented.
Defaults
split:DEFAULT_FEE_SPLIT.makerSlack:0n.builderBpsEffective:0.
computeBand#
Returns the inclusive [low, high] price band (basis points) for a maker order given the current orderbook tops and side counts. Saturating arithmetic; never throws.
Declaration source: packages/core/src/computeBand.ts:20.
export function computeBand(bestBid: number, bidCount: number, bestAsk: number, askCount: number): { low: number; high: number; };
Parameters
bestBid: number— Not documented.bidCount: number— Not documented.bestAsk: number— Not documented.askCount: number— Not documented.
Returns
{ low: number; high: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>computeBinaryKellyFractionBps</summary>computeBinaryKellyFractionBps#
Fractional Kelly sizing for a binary share that pays 1 if it wins and costs
entryPriceBps now. Returned in signed bps and clamped to +/-100%.
Declaration source: packages/core/src/fairValue.ts:233.
export function computeBinaryKellyFractionBps(input: BinaryKellyInput): number;
Parameters
input: BinaryKellyInput— Not documented. See BinaryKellyInput for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>computeBudgetPrefixFor</summary>computeBudgetPrefixFor#
ComputeBudget instructions to prepend before discriminator's instruction.
Returns an empty array when the instruction needs no prelude and no explicit limit/price was requested. An instruction with a required compute-unit limit (see {@link computeUnitLimitFor}) gets it unless the caller overrides it.
Declaration source: packages/core/src/computeBudget.ts:208.
export function computeBudgetPrefixFor(discriminator: number, options?: ComputeBudgetPrefixOptions): Instruction[];
Parameters
discriminator: number— Not documented.options: ComputeBudgetPrefixOptions— Not documented. Default:{}. See ComputeBudgetPrefixOptions for its declaration and available field documentation.
Returns
Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]
Not documented.
Throws
Not documented.
Defaults
options:{}.
ComputeBudgetPrefixOptions#
Options for {@link computeBudgetPrefixFor}.
Declaration source: packages/core/src/computeBudget.ts:196.
export interface ComputeBudgetPrefixOptions extends HeapFrameParams {
readonly computeUnitLimit?: number;
readonly computeUnitPriceMicroLamports?: bigint;
}
Field documentation
orderCount— Total batch entries (bids + asks) for0x0D/0x10.
computeFeeAmount#
Compute the total fee amount. Rounds UP to favor the protocol.
Declaration source: packages/core/src/fee.ts:186.
export function computeFeeAmount(notional: bigint, feeBps: number): bigint;
Parameters
notional: bigint— Not documented.feeBps: number— Not documented.
Returns
bigint
Not documented.
Throws
If the intermediate notional × fee_bps overflows JavaScript BigInt
safety limits (it doesn't, since BigInt is arbitrary precision).
computeFeeAmountAtPrice#
Exact one-fill fee in quote atoms, rounded UP once, like Rust
compute_fee_amount_at_price (the book-fill path in fill.rs).
Throws {@link SeesawValidationError} where the program would refuse the inputs, so a caller can never silently quote a zero fee for a bad domain.
Declaration source: packages/core/src/fee.ts:309.
export function computeFeeAmountAtPrice(notional: bigint, priceBps: number, capBps: number, decayBps: number): bigint;
Parameters
notional: bigint— Not documented.priceBps: number— Not documented.capBps: number— Not documented.decayBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>computeFeeBps</summary>computeFeeBps#
Compute the fee rate in bps of notional for an order's outcome price.
DISPLAY ONLY: the result is truncated to whole bps. Never multiply a notional by it to estimate a charge, a balance requirement or an economic bound — use {@link computeFeeAmountAtPrice}, which keeps the program's exact fractional numerator until the per-fill ceiling.
Declaration source: packages/core/src/fee.ts:173.
export function computeFeeBps(priceBps: number, capBps: number, decayBps: number): number;
Parameters
priceBps: number— - The named outcome's own price in bps [0, 10_000] — the YES price for a YES order, the NO price for a NO order (never complemented).capBps: number— - Calculator cap; pass the taker fee coefficient.decayBps: number— - Calculator slope; pass the taker fee coefficient.
Returns
number
The effective fee rate in bps (u16).
Throws
Not documented.
</details> <details> <summary>computeLogReturnBinaryFairValue</summary>computeLogReturnBinaryFairValue#
Compute a transparent binary UP/DOWN fair value from a zero-drift log-return normal model by default.
UP means current_or_settlement_price >= start_price, matching Seesaw's
tie-break rule. For non-positive secondsToExpiry, the output is
deterministic under that rule.
Declaration source: packages/core/src/fairValue.ts:158.
export function computeLogReturnBinaryFairValue(input: LogReturnBinaryFairValueInput): BinaryFairValueResult;
Parameters
input: LogReturnBinaryFairValueInput— Not documented. See LogReturnBinaryFairValueInput for its declaration and available field documentation.
Returns
BinaryFairValueResult
Not documented.
Throws
Not documented.
</details> <details> <summary>computeQuoteTotalWithFee</summary>computeQuoteTotalWithFee#
Returns the quote amount plus its protocol-favoring, rounded-up fee.
Declaration source: packages/core/src/fee.ts:193.
export function computeQuoteTotalWithFee(quoteAmount: bigint, feeBps: number): bigint;
Parameters
quoteAmount: bigint— Not documented.feeBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>computeQuoteTotalWithFeeAtPrice</summary>computeQuoteTotalWithFeeAtPrice#
Quote amount plus its exact, rounded-up fee at priceBps.
Declaration source: packages/core/src/fee.ts:328.
export function computeQuoteTotalWithFeeAtPrice(quoteAmount: bigint, priceBps: number, capBps: number, decayBps: number): bigint;
Parameters
quoteAmount: bigint— Not documented.priceBps: number— Not documented.capBps: number— Not documented.decayBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>computeReviewedOrderEconomics</summary>computeReviewedOrderEconomics#
Exact economics and program bounds for a reviewed order.
Pure and deterministic; the same inputs always produce the same bounds, so the review, the balance check and the encoder agree to the atom.
Declaration source: packages/core/src/reviewedIntent.ts:252.
export function computeReviewedOrderEconomics(input: { intent: TradeIntent; orderType: OrderType; priceBps: number; quantity: bigint; fee: Pick<ReviewedFeePolicy, "capBps" | "decayRateBps">; }): ReviewedOrderEconomics;
Parameters
input: { intent: TradeIntent; orderType: OrderType; priceBps: number; quantity: bigint; fee: Pick<ReviewedFeePolicy, "capBps" | "decayRateBps">; }— Not documented.
Returns
ReviewedOrderEconomics
Not documented.
Throws
Not documented.
</details> <details> <summary>computeTakerFee</summary>computeTakerFee#
One fill's taker fee in quote atoms, rounded up once (design §6.5).
Throws {@link SeesawValidationError} outside the program domain, so a caller can never silently quote a zero fee for a bad input.
Declaration source: packages/core/src/router/takerFee.ts:80.
export function computeTakerFee(notional: bigint, priceBps: number, coefficientBps: number): bigint;
Parameters
notional: bigint— Not documented.priceBps: number— Not documented.coefficientBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>computeToBeat</summary>computeToBeat#
"TO BEAT" stat: how far the current/latest known oracle print has moved from a market's captured window-open price, as a signed percentage.
toBeat = (oracleNow - windowOpenPrice) / windowOpenPrice
Both inputs must already be real-valued (i.e. already scaled by their own
Pyth exponent via parseOraclePrice) and in the same unit - this function
only computes the ratio, it does not know about mantissas/exponents.
Returns the em-dash sentinel (ratio: null, color: null) instead of
NaN/Infinity when windowOpenPrice is missing, non-finite, or exactly
zero (division guard - covers "pre-window, no start snapshot yet"), or
when oracleNow is missing or non-finite (covers "no live/closing print
known yet").
Declaration source: packages/core/src/display.ts:288.
export function computeToBeat(windowOpenPrice: number | null | undefined, oracleNow: number | null | undefined): ToBeatStat;
Parameters
windowOpenPrice: number | null | undefined— Not documented.oracleNow: number | null | undefined— Not documented.
Returns
ToBeatStat
Not documented.
Throws
Not documented.
</details> <details> <summary>computeUnitLimitFor</summary>computeUnitLimitFor#
D0{CU} Compute-unit limit the given instruction discriminator requires, or
null when its worst case fits the runtime's 200,000 CU default.
0x18ForceClose - the worst terminal page scans 512 book nodes and removes a full 6-order batch (~829K CU), so it takes {@link FORCE_CLOSE_COMPUTE_UNIT_LIMIT}.
Declaration source: packages/core/src/computeBudget.ts:179.
export function computeUnitLimitFor(discriminator: number): number | null;
Parameters
discriminator: number— Not documented.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>computeUnitLimitForInstructions</summary>computeUnitLimitForInstructions#
D0{CU} Compute-unit limit a transaction carrying instructions needs, or
null when every Seesaw instruction in it fits the runtime default.
Reads the Seesaw discriminator straight off each instruction's data (Kit or web3.js shape), so a sender cannot forget the ForceClose limit.
Declaration source: packages/core/src/computeBudget.ts:294.
export function computeUnitLimitForInstructions(instructions: readonly HeapFrameScannableInstruction[], programAddress?: string): number | null;
Parameters
instructions: readonly HeapFrameScannableInstruction[]— Not documented.programAddress: string— Not documented. Default:PROGRAM_ADDRESS.
Returns
number | null
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ConcentrationBreakdown#
Not documented.
Declaration source: packages/core/src/analytics/concentration.ts:37.
export interface ConcentrationBreakdown {
/** Largest first, then by key. */
rows: ConcentrationShare[];
/** The largest row, or `null` when nothing is at risk. */
largest: ConcentrationShare | null;
}
Field documentation
rows— Largest first, then by key.largest— The largest row, ornullwhen nothing is at risk.
ConcentrationMarketInput#
Not documented.
Declaration source: packages/core/src/analytics/concentration.ts:20.
export interface ConcentrationMarketInput {
marketAddress: string;
/** Settlement currency key (the mint address). */
currency: string;
/** That currency's mint decimals. Required: never assumed. */
decimals: number;
/** Resolution source key, e.g. `pyth`, `external` or `unknown`. */
resolutionSource: string;
}
Field documentation
currency— Settlement currency key (the mint address).decimals— That currency's mint decimals. Required: never assumed.resolutionSource— Resolution source key, e.g.pyth,externalorunknown.
ConcentrationShare#
Not documented.
Declaration source: packages/core/src/analytics/concentration.ts:30.
export interface ConcentrationShare {
key: string;
atRiskAtoms: bigint;
/** Share of the group's capital at risk in bps; `null` when it has no common unit. */
shareBps: number | null;
}
Field documentation
shareBps— Share of the group's capital at risk in bps;nullwhen it has no common unit.
ConcentrationView#
Not documented.
Declaration source: packages/core/src/analytics/concentration.ts:52.
export interface ConcentrationView {
/** One entry per settlement currency held, ordered by currency key. */
currencies: CurrencyConcentration[];
/** Amount at risk per currency; shares only when a single currency is held. */
byCurrency: ConcentrationBreakdown;
/** Positions whose market has no entry in `markets` (left out, never guessed). */
unpricedMarketAddresses: string[];
}
Field documentation
currencies— One entry per settlement currency held, ordered by currency key.byCurrency— Amount at risk per currency; shares only when a single currency is held.unpricedMarketAddresses— Positions whose market has no entry inmarkets(left out, never guessed).
Confidence#
verified_active comes only from live provider evidence, which phase 7 never has.
Declaration source: packages/core/src/execution/capability.ts:47.
export type Confidence = (typeof CONFIDENCE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CONFIDENCE_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:45.
export declare const CONFIDENCE_VALUES: readonly ["verified_active", "configured", "unknown"];
ConfidenceRange#
Not documented.
Declaration source: packages/core/src/display.ts:3.
export interface ConfidenceRange {
actualLow: number;
actualHigh: number;
maxLow: number;
maxHigh: number;
actualPercent: number;
maxPercent: number;
guardDisabled: boolean;
withinRange: boolean;
}
CONFIDENTIAL_MARKET_ACCOUNT_SIZE#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:25.
export declare const CONFIDENTIAL_MARKET_ACCOUNT_SIZE: 616;
ConfidentialCodecError#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:15.
export declare class ConfidentialCodecError extends Error {
constructor(code: ConfidentialCodecErrorCode, field: string);
readonly code: ConfidentialCodecErrorCode;
}
Parameters
code: ConfidentialCodecErrorCode— Not documented. See ConfidentialCodecErrorCode for its declaration and available field documentation.field: string— Not documented.
Throws
Not documented.
</details> <details> <summary>ConfidentialCodecErrorCode</summary>ConfidentialCodecErrorCode#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:7.
export type ConfidentialCodecErrorCode =
| 'Discriminator'
| 'Length'
| 'Padding'
| 'Enum'
| 'Range'
| 'NonceZero';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
confidentialDefinitionCommitment#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:444.
export function confidentialDefinitionCommitment(definition: ConfidentialNativeDefinition): Uint8Array;
Parameters
definition: ConfidentialNativeDefinition— Not documented. See ConfidentialNativeDefinition for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>ConfidentialMarketAccount</summary>ConfidentialMarketAccount#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:82.
export interface ConfidentialMarketAccount {
discriminator: Uint8Array;
confidentialProfileId: number;
bump: number;
custodyBump: number;
accountingMode: number;
creatorMode: number;
instanceNonce: Uint8Array;
policyCommitment: Uint8Array;
definitionCommitment: Uint8Array;
currencyCommitment: Uint8Array;
creator: Uint8Array;
noteSchemaId: number;
operationSetId: number;
feeDisclosurePolicy: Uint8Array;
clusterCommitment: Uint8Array;
terminalAdapter: number;
terminalAdapterVersion: number;
closureRule: number;
terminalState: number;
padding0: Uint8Array;
disputeWindowSecs: number;
capUnitDecimals: number;
padding1: Uint8Array;
expiryTs: bigint;
timeoutTs: bigint;
cap: bigint;
chargedTotal: bigint;
accountingCommitment: Uint8Array;
accountingSequence: bigint;
requestCursor: bigint;
jobGeneration: bigint;
activeJobDeadlineSlot: bigint;
activeJobId: Uint8Array;
receiptRoot: Uint8Array;
receiptCount: bigint;
terminalConfigId: Uint8Array;
terminalPayoffSpec: Uint8Array;
terminalResolutionId: Uint8Array;
capMax: bigint;
sponsor: Uint8Array;
liveObligationCount: bigint;
createdAt: bigint;
openingPrice: bigint;
openingConfidence: bigint;
openingPublishTime: bigint;
openingExponent: number;
padding2: Uint8Array;
}
ConfidentialMarketCreated#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:335.
export interface ConfidentialMarketCreated {
market: Uint8Array;
confidentialProfileId: number;
policyCommitment: Uint8Array;
accountingMode: number;
creatorMode: number;
cap: bigint;
}
ConfidentialMarketPolicy#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:192.
export interface ConfidentialMarketPolicy {
confidentialProfileId: number;
accountingMode: number;
creatorMode: number;
instanceNonce: Uint8Array;
definitionCommitment: Uint8Array;
currencyCommitment: Uint8Array;
creator: Uint8Array;
noteSchemaId: number;
operationSetId: number;
feeDisclosurePolicy: Uint8Array;
clusterCommitment: Uint8Array;
terminalAdapter: number;
terminalAdapterVersion: number;
closureRule: number;
disputeWindowSecs: number;
capUnitDecimals: number;
expiryTs: bigint;
timeoutTs: bigint;
cap: bigint;
capMax: bigint;
}
ConfidentialNativeDefinition#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:291.
export interface ConfidentialNativeDefinition {
feedId: Uint8Array;
endTs: bigint;
rule: number;
maxConfidenceRatioBps: number;
maxOracleJumpBps: number;
}
confidentialPolicyCommitment#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:438.
export function confidentialPolicyCommitment(policy: ConfidentialMarketPolicy): Uint8Array;
Parameters
policy: ConfidentialMarketPolicy— Not documented. See ConfidentialMarketPolicy for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>ConfidentialTerminalRecorded</summary>ConfidentialTerminalRecorded#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:357.
export interface ConfidentialTerminalRecorded {
market: Uint8Array;
branch: number;
terminalConfigId: Uint8Array;
terminalPayoffSpec: Uint8Array;
terminalResolutionId: Uint8Array;
adapter: number;
adapterVersion: number;
}
ConfidentialVault#
An unlocked confidential vault for exactly one account.
Declaration source: packages/core/src/confidential/vault/vault.ts:64.
export declare class ConfidentialVault {
constructor(account: Address, key: Uint8Array<ArrayBufferLike>, store: VaultStore);
account: Address;
/**
* Lock this handle and erase its copy of the master key.
*/
lock: () => void;
read: (kind: VaultRecordKind, id: string) => Promise<Uint8Array | null>;
/**
* Commit a read-modify-write only if the observed record is still current.
* An optional dependency makes the commit conditional on the account revision
* observed before reading both records.
* The vault erases the decrypted and replacement buffers before returning.
*/
updateAtomically: <T>(kind: VaultRecordKind, id: string, update: (current: Uint8Array | null, dependency?: Uint8Array | null) => Promise<{ data: Uint8Array; result: T; }>, dependsOn?: Pick<VaultRecordLocator, "kind" | "id">) => Promise<T>;
write: (kind: VaultRecordKind, id: string, plaintext: Uint8Array) => Promise<void>;
/**
* Install recovered records together, leaving other records in the account intact.
*/
installRecoveredRecords: (recover: () => Promise<readonly RecoveredVaultRecord[]>) => Promise<void>;
}
Parameters
account: Address— Not documented.key: Uint8Array<ArrayBufferLike>— Not documented.store: VaultStore— Not documented. See VaultStore for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>ConfidentialVaultSession</summary>ConfidentialVaultSession#
Owns one local vault handle for a screen and cancels pending opens on lock.
Declaration source: packages/core/src/confidential/vault/session.ts:8.
export declare class ConfidentialVaultSession {
constructor(account: Address, openVault: (account: Address) => Promise<ConfidentialVault>);
/**
* Returns false if the screen locked while opening.
*/
open: () => Promise<boolean>;
lock: () => void;
}
Parameters
account: Address— Not documented.openVault: (account: Address) => Promise<ConfidentialVault>— Not documented.
Throws
Not documented.
</details> <details> <summary>CONFIG_ACCOUNT_DISCRIMINATOR</summary>CONFIG_ACCOUNT_DISCRIMINATOR#
ConfigAccount discriminator: sha256("account:ConfigAccount")[..8].
Declaration source: packages/core/src/constants.ts:197.
export declare const CONFIG_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
CONFIG_ACCOUNT_SIZE#
D0{byte} ConfigAccount size.
Phase A grew this from 304 → 536 when treasury: Address (32 B at
offset 40) was replaced by treasuryRecipients: Address[8] (256 B at
offset 40) plus a Phase B lastTreasuryUpdateAt rate-limit field.
L-03 grew it 536 → 544 by appending lastOperationalParamsUpdateAt
(8 B i64 at offset 536).
Config governance grew it 544 → 584 by appending pending_pyth_program_id
(32 B) + pending_pyth_eligible_at (8 B). Those oracle-program-ID
governance slots are now frozen/inert.
Pull-oracle support grew it 584 → 624 by appending pyth_receiver_program_id
(32 B) + pending_pyth_target (1 B) + 7 bytes of Pod-alignment padding
(bytemuck requires the struct size to be a multiple of 8;
584 + 32 + 1 + 7 = 624). T2-1 appended inline pauser: Pubkey
at offset 624, growing the predeployment layout to 656.
Declaration source: packages/core/src/constants.ts:265.
export declare const CONFIG_ACCOUNT_SIZE: 576;
ConfigAccount#
Not documented.
Declaration source: packages/core/src/types.ts:202.
export interface ConfigAccount {
readonly discriminator: Uint8Array;
readonly authority: Address;
/**
* Phase A: 8 parallel SPL token accounts that receive the protocol's
* slice of taker fees. The client picks an index ∈ [0, 8) per
* `PlaceOrder` (for example via `pickTreasuryIndex`) and the program
* rejects with `TreasuryRecipientMismatch` if the passed token
* account does not match `treasuryRecipients[protocolTreasuryIndex]`.
*/
readonly treasuryRecipients: readonly Address[];
readonly defaultSettlementMint: Address;
readonly closerRewardLamports: bigint;
readonly maxOrderSize: bigint;
readonly marketsCreated: bigint;
readonly totalVolumeLow: bigint;
readonly totalVolumeHigh: bigint;
readonly totalFeesCollectedLow: bigint;
readonly totalFeesCollectedHigh: bigint;
readonly tickSizeBps: number;
/** Maker rebate budget in basis points of the taker fee. */
readonly makerRebateShareBps: number;
readonly version: number;
readonly bump: number;
readonly paused: number;
readonly postOnlyMode: number;
readonly referralShareBpsOfFee: number;
/**
* Builder share of the taker fee (offset 394, formerly `_fee_pad`), in
* `0..=1_000` bps. Paid only when the taker names an approved builder; the
* trader's approval caps it. Otherwise this slice goes to the protocol.
*/
readonly builderShareBps: number;
/** Minimum resting age required for maker rebate eligibility. */
readonly makerRebateMinRestSeconds: number;
/**
* Minimum quote notional, in settlement-token base units, required for a
* resting maker remainder.
*/
readonly minRestingNotional: bigint;
readonly protocolFeeBps: number;
readonly defaultCreatorFeeBps: number;
readonly feeCapBps: number;
readonly decayRateBps: number;
/** Wire policy for the config's exact account size. */
readonly feePolicy?: VersionedFeePolicy;
readonly maxPriceStalenessSeconds: bigint;
readonly marketExpirationWindowSeconds: bigint;
readonly minMarketDurationSeconds: bigint;
readonly maxMarketDurationSeconds: bigint;
readonly pendingAuthority: Address;
readonly lastFeeConfigUpdateAt: bigint;
readonly pendingAuthorityEligibleAt: bigint;
/**
* Phase B (multi-fee-recipients): unix timestamp of the last
* successful `UpdateTreasuryRecipients` call. Drives the on-chain
* rate-limit (TREASURY_UPDATE_RATE_LIMIT_SECONDS).
*/
readonly lastTreasuryUpdateAt: bigint;
/**
* L-03 (operational-params cooldown): unix timestamp of the last
* successful `UpdateOperationalParams` call. Drives the on-chain
* rate-limit on operational-parameter retuning.
*/
readonly lastOperationalParamsUpdateAt: bigint;
/** Escalation-only pauser guardian. Zero pubkey means disabled. */
readonly pauser: Address;
/** Spline configuration flags; bit 0 enables attachment. */
readonly splineFlags: number;
/** Minimum collateral commitment required by `AttachSpline`. */
readonly splineMinCommitment: bigint;
/** Midpoint movement that resets spline rebate eligibility. */
readonly splineMidJumpResetBps: number;
/** Protocol-global cooldown timestamp for tick-size and resting-notional updates. */
readonly lastMicrostructureUpdateAt: bigint;
/** Monotonic fee-configuration epoch stored in the former reserved tail. */
readonly feeEpoch: number;
/** Present on the 616-byte seat configuration. */
readonly seatParams?: SeatOperationalParams;
}
Field documentation
treasuryRecipients— Phase A: 8 parallel SPL token accounts that receive the protocol's slice of taker fees. The client picks an index ∈ [0, 8) perPlaceOrder(for example viapickTreasuryIndex) and the program rejects withTreasuryRecipientMismatchif the passed token account does not matchtreasuryRecipients[protocolTreasuryIndex].makerRebateShareBps— Maker rebate budget in basis points of the taker fee.builderShareBps— Builder share of the taker fee (offset 394, formerly_fee_pad), in0..=1_000bps. Paid only when the taker names an approved builder; the trader's approval caps it. Otherwise this slice goes to the protocol.makerRebateMinRestSeconds— Minimum resting age required for maker rebate eligibility.minRestingNotional— Minimum quote notional, in settlement-token base units, required for a resting maker remainder.feePolicy— Wire policy for the config's exact account size.lastTreasuryUpdateAt— Phase B (multi-fee-recipients): unix timestamp of the last successfulUpdateTreasuryRecipientscall. Drives the on-chain rate-limit (TREASURY_UPDATE_RATE_LIMIT_SECONDS).lastOperationalParamsUpdateAt— L-03 (operational-params cooldown): unix timestamp of the last successfulUpdateOperationalParamscall. Drives the on-chain rate-limit on operational-parameter retuning.pauser— Escalation-only pauser guardian. Zero pubkey means disabled.splineFlags— Spline configuration flags; bit 0 enables attachment.splineMinCommitment— Minimum collateral commitment required byAttachSpline.splineMidJumpResetBps— Midpoint movement that resets spline rebate eligibility.lastMicrostructureUpdateAt— Protocol-global cooldown timestamp for tick-size and resting-notional updates.feeEpoch— Monotonic fee-configuration epoch stored in the former reserved tail.seatParams— Present on the 616-byte seat configuration.
ConfigAccountNotFoundError#
Thrown by {@link getTreasuryRecipients} when the on-chain ConfigAccount
PDA does not exist — i.e. the program has not been deployed, or the config
has not been initialized yet on the target cluster. Distinct from decode
or RPC-transport errors so callers can treat "not deployed yet" as a clean
no-op rather than a hard failure.
Declaration source: packages/core/src/treasury.ts:111.
export declare class ConfigAccountNotFoundError extends Error {
constructor(configAddress: Address);
readonly configAddress: Address;
}
Parameters
configAddress: Address— Not documented.
Throws
Not documented.
</details> <details> <summary>ConfigSnapshot</summary>ConfigSnapshot#
Global protocol configuration relevant to placing an order.
Source of truth: ConfigAccount (program/src/state/config.rs), decoded by
decodeConfigAccount in packages/core/src/generated/program/accounts.ts.
Declaration source: packages/core/src/preflight/types.ts:23.
export interface ConfigSnapshot {
/** `config.paused` — blocks every PlaceOrder (`check_config_not_paused`). */
paused: boolean;
/** `config.post_only_mode` — rejects IOC, coerces Limit to PostOnly. */
postOnlyMode: boolean;
/** `config.max_order_size` — inclusive upper bound on order quantity. */
maxOrderSize: bigint;
/** `config.min_resting_notional` — quote-unit floor for a resting remainder. */
minRestingNotional: bigint;
/**
* `config.tick_size_bps` — the ONLY tick size the program consults
* (`program/src/processor/place_order_trait/mod.rs:447`).
*/
tickSizeBps: number;
/**
* `config.market_expiration_window_seconds`. Decode source:
* `decodeConfigAccount(data).marketExpirationWindowSeconds` (a `bigint`, u64
* at offset 424 — narrow it with `Number(...)`; the window is a duration in
* seconds, never near 2^53).
*
* `0` selects the protocol default `MARKET_EXPIRY_WINDOW`
* (`logic/expire_market/mod.rs:22-29`), so `0` is meaningful, not missing.
*
* OPTIONAL so existing adapters keep compiling: no PlaceOrder verdict reads
* it. It is carried here because it is a config-account fact, and it is the
* value callers must forward as `ExpireMarketSnapshot.marketExpirationWindowSeconds`
* — `expireMarketVerdict` takes it on that snapshot, not from this one.
*/
marketExpirationWindowSeconds?: number;
}
Field documentation
paused—config.paused— blocks every PlaceOrder (check_config_not_paused).postOnlyMode—config.post_only_mode— rejects IOC, coerces Limit to PostOnly.maxOrderSize—config.max_order_size— inclusive upper bound on order quantity.minRestingNotional—config.min_resting_notional— quote-unit floor for a resting remainder.tickSizeBps—config.tick_size_bps— the ONLY tick size the program consults (program/src/processor/place_order_trait/mod.rs:447).marketExpirationWindowSeconds—config.market_expiration_window_seconds. Decode source:decodeConfigAccount(data).marketExpirationWindowSeconds(abigint, u64 at offset 424 — narrow it withNumber(...); the window is a duration in seconds, never near 2^53).
0 selects the protocol default MARKET_EXPIRY_WINDOW
(logic/expire_market/mod.rs:22-29), so 0 is meaningful, not missing.
OPTIONAL so existing adapters keep compiling: no PlaceOrder verdict reads
it. It is carried here because it is a config-account fact, and it is the
value callers must forward as ExpireMarketSnapshot.marketExpirationWindowSeconds
— expireMarketVerdict takes it on that snapshot, not from this one.
CONFIGURE_STRATEGY_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:53.
export declare const CONFIGURE_STRATEGY_ROUTE: 86;
configurePythFeedPairs#
Configure the Pyth feed ID-to-pair mappings at runtime. Merges the provided pairs with the existing mappings (new entries override).
Declaration source: packages/core/src/api/markets.ts:195.
export function configurePythFeedPairs(pairs: Record<string, string>, replace?: boolean): void;
Parameters
pairs: Record<string, string>— - A record mapping canonical Pyth feed IDs to pair strings (e.g., 'SOL/USD').replace: boolean— - If true, replaces all existing mappings instead of merging. Default: false. Default:false.
Returns
void
Not documented.
Throws
Not documented.
Defaults
replace:false.
ConfigureStrategyInput#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:93.
export interface ConfigureStrategyInput {
readonly owner: Address;
readonly strategyId: number;
readonly delegate?: Address;
/** Unix seconds. A delegated strategy requires a nonzero expiry. */
readonly expiresAt: bigint;
readonly allowedActions: number;
readonly allowedMarkets: readonly Address[];
readonly allowedMints: readonly Address[];
readonly maxOrderQuoteAtoms: bigint;
readonly capitalBudgetAtoms: bigint;
readonly maxPositionShares: bigint;
readonly maxFeeBps: number;
readonly maxSlippageBps: number;
readonly maxCoveredOrderTtlSeconds: number;
readonly withdrawDestinations?: readonly Address[];
}
Field documentation
expiresAt— Unix seconds. A delegated strategy requires a nonzero expiry.
confirmJurisdiction#
Record the wallet's jurisdiction attestation. accepted: true is required:
call this only after the user has read and accepted the attestation text.
Declaration source: packages/core/src/api/compliance.ts:66.
export function confirmJurisdiction(client: ApiClient, signer: WalletMessageSigner, input: { accepted: true; }, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<JurisdictionAttestation>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.input: { accepted: true; }— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; version: string | number; timestamp: string; attested: true; attestationText: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>conflictKeysOverlap</summary>conflictKeysOverlap#
Whether two conflict keys name the same logical operation. Wire-derived keys conflict when they share a scope and any action entry; any other (caller-supplied) key conflicts only with an identical key.
Declaration source: packages/core/src/transactionAttempt.ts:378.
export function conflictKeysOverlap(a: string, b: string): boolean;
Parameters
a: string— Not documented.b: string— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>consumedDepth</summary>consumedDepth#
Walk cumulative depth points for a prospective order of size base units
and return the per-level consumption (for shading), where the walk ended,
and how much (if any) remains unfilled.
This is a pure size-only walk — no price bound, no order-type semantics,
no fees — over the same best-first level order {@link estimateFillForIntent}
walks. Passing a size equal to a taker order's quantity and comparing
walkEndPriceBps / total consumed against estimateFillForIntent(...)'s
worstPriceBps / filled (called with a permissive limit price and no IOC
bound) must always agree — that invariant is what the parity property test
enforces.
Declaration source: packages/core/src/depth.ts:97.
export function consumedDepth(points: DepthPoint[], size: bigint): ConsumedDepth;
Parameters
points: DepthPoint[]— Not documented.size: bigint— Not documented.
Returns
ConsumedDepth
Not documented.
Throws
Not documented.
</details> <details> <summary>ConsumedDepth</summary>ConsumedDepth#
Result of walking cumulative depth points for a prospective order size.
Declaration source: packages/core/src/depth.ts:69.
export interface ConsumedDepth {
/** Per-level consumption, best-first, for chart shading. */
readonly consumed: DepthPoint[];
/**
* Price of the deepest level touched by the walk, in the same
* denomination as `points[i].priceBps`. `null` when nothing was consumed
* (size is `0`, or `points` is empty) — the visualization equivalent of
* {@link FillEstimate.worstPriceBps}, which uses the sentinel `0` for
* "untouched" instead of `null`.
*/
readonly walkEndPriceBps: number | null;
/** Portion of `size` that could not be filled by the available depth. */
readonly unfilled: bigint;
}
Field documentation
consumed— Per-level consumption, best-first, for chart shading.walkEndPriceBps— Price of the deepest level touched by the walk, in the same denomination aspoints[i].priceBps.nullwhen nothing was consumed (size is0, orpointsis empty) — the visualization equivalent of {@link FillEstimate.worstPriceBps}, which uses the sentinel0for "untouched" instead ofnull.unfilled— Portion ofsizethat could not be filled by the available depth.
CorpusReport#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:129.
export interface CorpusReport {
readonly disclaimer: string;
readonly provider: string;
/** `stand_in` for every phase 7 run; a live run would write `live`. */
readonly target: string;
readonly program_id: string;
readonly results: readonly CaseResult[];
}
Field documentation
target—stand_infor every phase 7 run; a live run would writelive.
CREATE_CONFIDENTIAL_MARKET_TAG#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:26.
export declare const CREATE_CONFIDENTIAL_MARKET_TAG: 107;
CREATE_MARKET_HELPER_TRANSPORT_CAPABILITY#
Helper transport capability: the high-level helper supports legacy/v0 transports, each group sized before sending. Market capacity is not a parameter; every market has the one canonical size.
Declaration source: packages/core/src/instructions.ts:1297.
export declare const CREATE_MARKET_HELPER_TRANSPORT_CAPABILITY: Readonly<{ messageVersions: readonly ["legacy", 0]; maxTransactionBytes: 1232; }>;
CREATE_MARKET_MAX_PRICE_AGE_SECONDS#
Not documented.
Declaration source: packages/core/src/market.ts:58.
export declare const CREATE_MARKET_MAX_PRICE_AGE_SECONDS: 60n;
createAdvisoryAcknowledgements#
Remembers which flagged currencies the user already acknowledged this
session, so the dialog does not repeat for the same mint and advisory. A new
or escalated advisory (different status or since) asks again.
Declaration source: packages/core/src/tokensXyz/advisory.ts:26.
export function createAdvisoryAcknowledgements(): { has: (row: CurrencyMetadata) => boolean; add: (row: CurrencyMetadata) => void; };
Parameters
No callable parameters.
Returns
{ has: (row: CurrencyMetadata) => boolean; add: (row: CurrencyMetadata) => void; }
Not documented.
Throws
Not documented.
</details> <details> <summary>createApiClient</summary>createApiClient#
Not documented.
Declaration source: packages/core/src/api/client.ts:1181.
export function createApiClient(config?: ApiClientConfig): ApiClient;
Parameters
config: ApiClientConfig | undefined— Not documented. See ApiClientConfig for its declaration and available field documentation.
Returns
ApiClient
Not documented.
Throws
Not documented.
</details> <details> <summary>createAuthHeaders</summary>createAuthHeaders#
Not documented.
Declaration source: packages/core/src/auth.ts:95.
export function createAuthHeaders(signer: WalletMessageSigner, message: string, chain?: "solana"): Promise<WalletAuthHeaders>;
Parameters
signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.message: string— Not documented.chain: "solana" | undefined— Not documented.
Returns
Promise<WalletAuthHeaders>
Not documented.
Throws
Not documented.
</details> <details> <summary>CreateConfidentialMarketData</summary>CreateConfidentialMarketData#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:381.
export interface CreateConfidentialMarketData {
policy: ConfidentialMarketPolicy;
definition: ConfidentialNativeDefinition;
}
createCurrencyMetadataBatcher#
Coalesces per-mint reads from many components into one proxy request per
window (up to the proxy's mint cap), and shares an in-flight promise across
callers asking for the same mint. Callers decide freshness; every load
triggers a new fetch (the caller's cache, e.g. react-query, owns reuse).
Declaration source: packages/core/src/tokensXyz/batcher.ts:29.
export function createCurrencyMetadataBatcher(options: MetadataBatcherOptions): { load(mint: string): Promise<BatchedMetadata>; };
Parameters
options: MetadataBatcherOptions— Not documented. See MetadataBatcherOptions for its declaration and available field documentation.
Returns
{ load(mint: string): Promise<BatchedMetadata>; }
Not documented.
Throws
Not documented.
</details> <details> <summary>createMarket</summary>createMarket#
Build the CreateMarket transaction-ready bundle with automatic PDA derivation.
Returns { transactions, accounts } where each transaction group is
submitted separately and in order. The first groups contain the
EnsureTraderLedgerSpace and EnsureDeepOrderbookSpace preludes; the final
group contains only CreateMarket. Callers MUST not combine an Ensure
group with CreateMarket. Each prelude is split across as many groups as
needed; every group (including CreateMarket) is compiled and measured for
input.transport before this returns, so a later oversize group can never
be discovered after an earlier allocation was sent. plan carries each
group's kind and measured wire size. Pass input.allocationProgress to
resume from authenticated on-chain progress. Market capacity is not a
parameter: every market uses the one canonical ledger and book size.
The transaction groups are required because on-chain CreateMarket validates that the trader_ledger and orderbook PDAs are pre-allocated to their requested sizes; the preludes provide the allocations.
Declaration source: packages/core/src/sdk.ts:447.
export function createMarket(input: CreateMarketInput, programAddress?: Address): Promise<SdkBundleResult<CreateMarketResult> & { plan: CreateMarketTransactionPlan; }>;
Parameters
input: CreateMarketInput— Not documented. See CreateMarketInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkBundleResult<CreateMarketResult> & { plan: CreateMarketTransactionPlan; }>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
CreateMarketAccounts#
Accounts for CreateMarket instruction.
Declaration source: packages/core/src/instructions.ts:818.
export interface CreateMarketAccounts extends BinaryRecorderTailAccounts {
market: Address;
orderbook: Address;
vault: Address;
yesMint: Address;
noMint: Address;
assetState: Address;
config: Address;
priceUpdate: Address;
settlementMint: Address;
/** Canonical registered currency record PDA for the settlement mint. */
currencyRecord: Address;
/**
* Active exact-mint freeze exception. Required only when the settlement mint
* has a freeze authority; omit otherwise (the account is then not sent).
*/
freezeException?: Address;
payer: Address;
systemProgram: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
yesEscrow: Address;
noEscrow: Address;
traderLedger: Address;
nativePolicy: Address;
}
Field documentation
currencyRecord— Canonical registered currency record PDA for the settlement mint.freezeException— Active exact-mint freeze exception. Required only when the settlement mint has a freeze authority; omit otherwise (the account is then not sent).shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
CreateMarketAllocationProgress#
Authenticated creation progress used to resume after an interruption or a
lost confirmation. null means the account does not exist. Callers read
these accounts from the cluster; every present account must be owned by the
Seesaw program or planning fails (unauthenticated progress is never
trusted).
Declaration source: packages/core/src/instructions.ts:1255.
export interface CreateMarketAllocationProgress {
readonly market: ObservedProgramAccount | null;
readonly traderLedger: ObservedProgramAccount | null;
readonly orderbook: ObservedProgramAccount | null;
}
CreateMarketCurrencyAccounts#
Accounts a native CreateMarket needs for one settlement currency.
Declaration source: packages/core/src/currencyAccounts.ts:42.
export interface CreateMarketCurrencyAccounts {
/** Registered currency record PDA of the settlement mint. */
readonly currencyRecord: Address;
/** Active exact-mint freeze exception PDA; present only for freeze-enabled mints. */
readonly freezeException?: Address;
}
Field documentation
currencyRecord— Registered currency record PDA of the settlement mint.freezeException— Active exact-mint freeze exception PDA; present only for freeze-enabled mints.
CreateMarketGroupKind#
Group kinds in submission order.
Declaration source: packages/core/src/instructions.ts:1262.
export type CreateMarketGroupKind = 'trader-ledger' | 'deep-orderbook' | 'create-market';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CreateMarketInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:370.
export interface CreateMarketInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketId: bigint;
pythFeedId: Uint8Array;
durationSeconds: bigint;
priceUpdate: Address;
settlementMint: Address;
payer: Address;
/**
* Max confidence ratio in bps (0 disables the on-chain confidence gate).
* Required: this helper substitutes no defaults into instruction
* arguments — the caller must state the value explicitly.
*/
maxConfidenceRatioBps: number;
/** Max oracle jump in bps (0 uses the protocol default jump guard). Required. */
maxOracleJumpBps: number;
/** This market's own YES/NO claim cap; nonzero. */
maxTotalShares: bigint;
/** Optional native resolution policy PDA override. Auto-derived when omitted. */
nativePolicy?: Address;
/**
* Active exact-mint freeze exception PDA. Required only when the settlement
* mint has a freeze authority; omit otherwise.
*/
freezeException?: Address;
/**
* How the caller will send each group (message version, fee payer, prefix
* instructions such as compute budget, lookup tables). Every group is
* compiled and sized for it before this helper returns. Default: v0 with a
* compute-budget limit+price prefix, 1,232 bytes.
*/
transport?: NativeTransactionTransport;
/**
* Authenticated on-chain progress (program-owned market / trader ledger /
* orderbook accounts and their current data lengths) when resuming an
* interrupted creation. Only the unfinished remainder is planned.
*/
allocationProgress?: CreateMarketAllocationProgress;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.maxConfidenceRatioBps— Max confidence ratio in bps (0 disables the on-chain confidence gate). Required: this helper substitutes no defaults into instruction arguments — the caller must state the value explicitly.maxOracleJumpBps— Max oracle jump in bps (0 uses the protocol default jump guard). Required.maxTotalShares— This market's own YES/NO claim cap; nonzero.nativePolicy— Optional native resolution policy PDA override. Auto-derived when omitted.freezeException— Active exact-mint freeze exception PDA. Required only when the settlement mint has a freeze authority; omit otherwise.transport— How the caller will send each group (message version, fee payer, prefix instructions such as compute budget, lookup tables). Every group is compiled and sized for it before this helper returns. Default: v0 with a compute-budget limit+price prefix, 1,232 bytes.allocationProgress— Authenticated on-chain progress (program-owned market / trader ledger / orderbook accounts and their current data lengths) when resuming an interrupted creation. Only the unfinished remainder is planned.
CreateMarketParams#
Parameters for CreateMarket instruction.
Declaration source: packages/core/src/types.ts:592.
export interface CreateMarketParams {
/** Positive u64 microsecond creation intent, persisted before preparation. Not a lifecycle time. */
readonly marketId: bigint;
readonly maxConfidenceRatioBps: number;
readonly durationSeconds: bigint;
readonly maxOracleJumpBps: number;
/** D6{share} This market's own YES/NO claim cap; nonzero. */
readonly maxTotalShares: bigint;
}
Field documentation
marketId— Positive u64 microsecond creation intent, persisted before preparation. Not a lifecycle time.maxTotalShares— D6{share} This market's own YES/NO claim cap; nonzero.
CreateMarketPlanOptions#
Options for {@link planCreateMarketTransactionGroups}.
Declaration source: packages/core/src/instructions.ts:1284.
export interface CreateMarketPlanOptions {
readonly programAddress?: Address;
readonly nativeIntent?: EnsureDeepOrderbookSpaceIntent;
readonly transport?: NativeTransactionTransport;
/** Authenticated progress; omit for a fresh creation. */
readonly progress?: CreateMarketAllocationProgress;
}
Field documentation
progress— Authenticated progress; omit for a fresh creation.
CreateMarketResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:415.
export interface CreateMarketResult {
market: Address;
orderbook: Address;
vault: Address;
yesMint: Address;
noMint: Address;
assetState: Address;
yesEscrow: Address;
noEscrow: Address;
traderLedger: Address;
}
CreateMarketTiming#
Preview only. Landed account timestamps are authoritative.
Declaration source: packages/core/src/market.ts:60.
export interface CreateMarketTiming {
readonly marketId: bigint;
readonly tStart: bigint;
readonly tEnd: bigint;
readonly currentTimestamp: bigint;
}
CreateMarketTransactionGroup#
One measured transaction group of a create-market plan.
Declaration source: packages/core/src/instructions.ts:1265.
export interface CreateMarketTransactionGroup {
readonly kind: CreateMarketGroupKind;
/** Seesaw instructions only; the transport prefix is added by the sender. */
readonly instructions: Instruction[];
/** D0{byte/transaction} Serialized wire including the transport prefix. */
readonly wireBytes: number;
}
Field documentation
instructions— Seesaw instructions only; the transport prefix is added by the sender.wireBytes— D0{byte/transaction} Serialized wire including the transport prefix.
CreateMarketTransactionPlan#
A fully compiled and measured create-market plan.
Declaration source: packages/core/src/instructions.ts:1274.
export interface CreateMarketTransactionPlan {
/** Ordered groups; allocation groups must confirm before CreateMarket. */
readonly groups: readonly CreateMarketTransactionGroup[];
/** True when the observed market already exists: nothing remains to send. */
readonly marketAlreadyCreated: boolean;
/** D0{byte/transaction} The transport limit every group was checked against. */
readonly maxTransactionBytes: number;
}
Field documentation
groups— Ordered groups; allocation groups must confirm before CreateMarket.marketAlreadyCreated— True when the observed market already exists: nothing remains to send.maxTransactionBytes— D0{byte/transaction} The transport limit every group was checked against.
createPositionsReadSession#
Not documented.
Declaration source: packages/core/src/api/readSession.ts:125.
export function createPositionsReadSession(options: PositionsReadSessionOptions): PositionsReadSession;
Parameters
options: PositionsReadSessionOptions— Not documented. See PositionsReadSessionOptions for its declaration and available field documentation.
Returns
PositionsReadSession
Not documented.
Throws
Not documented.
</details> <details> <summary>createPriceAlert</summary>createPriceAlert#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:176.
export function createPriceAlert(client: ApiClient, signer: WalletMessageSigner, input: CreatePriceAlertInput, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<WalletPriceAlert>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.input: CreatePriceAlertInput— Not documented. See CreatePriceAlertInput for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; marketId: string; targetPrice: number; direction: "above" | "below"; isTriggered: boolean; createdAt: string | number; userId?: string | number | null | undefined; triggeredAt?: string | number | null | undefined; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>CreatePriceAlertInput</summary>CreatePriceAlertInput#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:157.
export interface CreatePriceAlertInput {
marketId: string;
/** Basis points, 0 to 10,000. */
targetPrice: number;
direction: 'above' | 'below';
}
Field documentation
targetPrice— Basis points, 0 to 10,000.
createResilientDataSource#
Not documented.
Declaration source: packages/core/src/resilientData.ts:416.
export function createResilientDataSource({ api, rpc, policy, }: CreateResilientDataSourceConfig): ResilientDataSource;
Parameters
__0: CreateResilientDataSourceConfig— Not documented. See CreateResilientDataSourceConfig for its declaration and available field documentation.
Returns
ResilientDataSource
Not documented.
Throws
Not documented.
</details> <details> <summary>CreateResilientDataSourceConfig</summary>CreateResilientDataSourceConfig#
Not documented.
Declaration source: packages/core/src/resilientData.ts:217.
export interface CreateResilientDataSourceConfig {
readonly api: Pick<ApiClient, 'get'>;
readonly rpc: RpcDataSource;
readonly policy: ResilientReadPolicy;
}
createReviewedCompleteSetMerge#
Not documented.
Declaration source: packages/core/src/completeSetMerge.ts:185.
export function createReviewedCompleteSetMerge(params: { readonly scope: ReviewedCompleteSetMergeScope; readonly market: CompleteSetMergeMarketView; readonly holdings: CompleteSetHoldings; readonly quantity: bigint; readonly nowMs: number; }): ReviewedCompleteSetMerge;
Parameters
params: { readonly scope: ReviewedCompleteSetMergeScope; readonly market: CompleteSetMergeMarketView; readonly holdings: CompleteSetHoldings; readonly quantity: bigint; readonly nowMs: number; }— Not documented.
Returns
ReviewedCompleteSetMerge
Not documented.
Throws
Not documented.
</details> <details> <summary>createReviewedOrderIntent</summary>createReviewedOrderIntent#
Freeze an editable draft into an immutable reviewed intent.
Call exactly once, when the review is shown. Nothing downstream may re-read the draft for terms already consented to.
Declaration source: packages/core/src/reviewedIntent.ts:409.
export function createReviewedOrderIntent(draft: ReviewedOrderDraft): ReviewedOrderIntent;
Parameters
draft: ReviewedOrderDraft— Not documented. See ReviewedOrderDraft for its declaration and available field documentation.
Returns
ReviewedOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>createRiverComplexOrderClient</summary>createRiverComplexOrderClient#
Connect to a configured gateway with a registered River request signer.
Declaration source: packages/core/src/riverClient.ts:272.
export function createRiverComplexOrderClient(options: RiverConnectionOptions): { createOrder(order: RiverComplexOrderRequest, signal?: AbortSignal): Promise<string>; getOrder(id: string, signal?: AbortSignal): Promise<RiverComplexOrder>; listOrders(filter?: RiverComplexOrderFilter, signal?: AbortSignal): Promise<{ complex_orders: Partial<Record<RiverOrderKind, RiverComplexOrder[]>>; count: number; }>; cancelOrder(id: string, signal?: AbortSignal): Promise<{ cancelled_complex_order_ids: string[]; failed_cancelled_complex_order_ids: Record<string, unknown>; }>; };
Parameters
options: RiverConnectionOptions— Not documented. See RiverConnectionOptions for its declaration and available field documentation.
Returns
{ createOrder(order: RiverComplexOrderRequest, signal?: AbortSignal): Promise<string>; getOrder(id: string, signal?: AbortSignal): Promise<RiverComplexOrder>; listOrders(filter?: RiverComplexOrderFilter, signal?: AbortSignal): Promise<{ complex_orders: Partial<Record<RiverOrderKind, RiverComplexOrder[]>>; count: number; }>; cancelOrder(id: string, signal?: AbortSignal): Promise<{ cancelled_complex_order_ids: string[]; failed_cancelled_complex_order_ids: Record<string, unknown>; }>; }
Not documented.
Throws
Not documented.
</details> <details> <summary>createRiverGatewayClient</summary>createRiverGatewayClient#
Connect to a River gateway for simple orders, market data, accounts and fees. Every request is signed by the registered River request key and scoped to its subaccount; the gateway never signs transactions itself (its customer signer module does).
Declaration source: packages/core/src/riverClient.ts:528.
export function createRiverGatewayClient(options: RiverConnectionOptions): { streamOrderbooks(riverIds: readonly number[], { signal }?: { signal?: AbortSignal; }): RiverStream<RiverOrderbookStreamMessage>; streamOrders({ cursor, signal, }?: { cursor?: string | bigint | number; signal?: AbortSignal; }): RiverStream<RiverOrderStreamMessage>; createOrder(order: RiverOrderRequest, settings?: { clientRequestId?: string; signal?: AbortSignal; }): Promise<string>; getOrder(id: string, signal?: AbortSignal): Promise<RiverOrder>; listOrders(filter?: RiverOrderFilter, signal?: AbortSignal): Promise<{ orders: RiverOrder[]; has_more: boolean; }>; cancelOrder(id: string, signal?: AbortSignal): Promise<RiverCancelResult>; orderAttempts(id: string, signal?: AbortSignal): Promise<{ river_order_id: string; seesaw_execution: RiverJsonObject; attempts: unknown[]; }>; retryCancel(id: string, signal?: AbortSignal): Promise<RiverOrderRecoveryResult>; resubmitOrder(id: string, signal?: AbortSignal): Promise<RiverOrderRecoveryResult>; health(signal?: AbortSignal): Promise<RiverJsonObject>; searchMarkets(search?: RiverMarketSearch, signal?: AbortSignal): Promise<{ query: string; results: RiverJsonObject[]; total: number; total_events: null; }>; lookupMarkets(riverIds: readonly number[], signal?: AbortSignal): Promise<{ results: RiverJsonObject[]; }>; orderbook(riverId: number, settings?: { levels?: number; signal?: AbortSignal; }): Promise<RiverOrderbookResponse>; prices(riverId: number, query?: RiverPriceQuery, signal?: AbortSignal): Promise<RiverJsonObject>; tradeprints(riverIds: readonly number[], settings?: { limit?: number; signal?: AbortSignal; }): Promise<{ results: RiverJsonObject[]; }>; fills(query?: RiverFillQuery, signal?: AbortSignal): Promise<RiverJsonObject>; positions(query?: { river_id?: number; include_closed?: boolean; }, signal?: AbortSignal): Promise<RiverJsonObject>; subaccounts(signal?: AbortSignal): Promise<RiverJsonObject[]>; exchangeBalance(signal?: AbortSignal): Promise<RiverJsonObject>; portfolio(signal?: AbortSignal): Promise<RiverJsonObject>; feeSchedules(riverIds: readonly number[], signal?: AbortSignal): Promise<RiverFeeScheduleLookup>; nativeFeeSchedules(riverIds: readonly number[], signal?: AbortSignal): Promise<RiverFeeScheduleLookup>; quoteNativeFee(quote: RiverNativeFeeQuote, signal?: AbortSignal): Promise<RiverJsonObject>; };
Parameters
options: RiverConnectionOptions— Not documented. See RiverConnectionOptions for its declaration and available field documentation.
Returns
{ streamOrderbooks(riverIds: readonly number[], { signal }?: { signal?: AbortSignal; }): RiverStream<RiverOrderbookStreamMessage>; streamOrders({ cursor, signal, }?: { cursor?: string | bigint | number; signal?: AbortSignal; }): RiverStream<RiverOrderStreamMessage>; createOrder(order: RiverOrderRequest, settings?: { clientRequestId?: string; signal?: AbortSignal; }): Promise<string>; getOrder(id: string, signal?: AbortSignal): Promise<RiverOrder>; listOrders(filter?: RiverOrderFilter, signal?: AbortSignal): Promise<{ orders: RiverOrder[]; has_more: boolean; }>; cancelOrder(id: string, signal?: AbortSignal): Promise<RiverCancelResult>; orderAttempts(id: string, signal?: AbortSignal): Promise<{ river_order_id: string; seesaw_execution: RiverJsonObject; attempts: unknown[]; }>; retryCancel(id: string, signal?: AbortSignal): Promise<RiverOrderRecoveryResult>; resubmitOrder(id: string, signal?: AbortSignal): Promise<RiverOrderRecoveryResult>; health(signal?: AbortSignal): Promise<RiverJsonObject>; searchMarkets(search?: RiverMarketSearch, signal?: AbortSignal): Promise<{ query: string; results: RiverJsonObject[]; total: number; total_events: null; }>; lookupMarkets(riverIds: readonly number[], signal?: AbortSignal): Promise<{ results: RiverJsonObject[]; }>; orderbook(riverId: number, settings?: { levels?: number; signal?: AbortSignal; }): Promise<RiverOrderbookResponse>; prices(riverId: number, query?: RiverPriceQuery, signal?: AbortSignal): Promise<RiverJsonObject>; tradeprints(riverIds: readonly number[], settings?: { limit?: number; signal?: AbortSignal; }): Promise<{ results: RiverJsonObject[]; }>; fills(query?: RiverFillQuery, signal?: AbortSignal): Promise<RiverJsonObject>; positions(query?: { river_id?: number; include_closed?: boolean; }, signal?: AbortSignal): Promise<RiverJsonObject>; subaccounts(signal?: AbortSignal): Promise<RiverJsonObject[]>; exchangeBalance(signal?: AbortSignal): Promise<RiverJsonObject>; portfolio(signal?: AbortSignal): Promise<RiverJsonObject>; feeSchedules(riverIds: readonly number[], signal?: AbortSignal): Promise<RiverFeeScheduleLookup>; nativeFeeSchedules(riverIds: readonly number[], signal?: AbortSignal): Promise<RiverFeeScheduleLookup>; quoteNativeFee(quote: RiverNativeFeeQuote, signal?: AbortSignal): Promise<RiverJsonObject>; }
Not documented.
Throws
Not documented.
</details> <details> <summary>createRpcEndpointHealth</summary>createRpcEndpointHealth#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:74.
export function createRpcEndpointHealth(url: string): RpcEndpointHealth;
Parameters
url: string— Not documented.
Returns
RpcEndpointHealth
Not documented.
Throws
Not documented.
</details> <details> <summary>createSeesawClient</summary>createSeesawClient#
Not documented.
Declaration source: packages/core/src/client.ts:195.
export function createSeesawClient(config?: SeesawClientConfig): SeesawClient;
Parameters
config: SeesawClientConfig— Not documented. Default:{}. See SeesawClientConfig for its declaration and available field documentation.
Returns
SeesawClient
Not documented.
Throws
Not documented.
Defaults
config:{}.
createSeesawStreams#
Not documented.
Declaration source: packages/core/src/streams.ts:215.
export function createSeesawStreams(config?: SeesawStreamsConfig): SeesawStreams;
Parameters
config: SeesawStreamsConfig— Not documented. Default:{}. See SeesawStreamsConfig for its declaration and available field documentation.
Returns
SeesawStreams
Not documented.
Throws
Not documented.
Defaults
config:{}.
createSerializedTransactionAttemptStorage#
Bound an opaque, shared mutable state as a mutex-protected storage adapter over a simple async key/value store (React Native AsyncStorage, tests).
Declaration source: packages/core/src/transactionAttempt.ts:1038.
export function createSerializedTransactionAttemptStorage(store: { getItem(key: string): Promise<string | null>; setItem(key: string, value: string): Promise<void>; }): TransactionAttemptStorage;
Parameters
store: { getItem(key: string): Promise<string | null>; setItem(key: string, value: string): Promise<void>; }— Not documented.
Returns
TransactionAttemptStorage
Not documented.
Throws
Not documented.
</details> <details> <summary>createShareSnapshot</summary>createShareSnapshot#
Create a PnL share snapshot for the signing wallet. open and settled
need a market; includeUsd adds USD values only for the wallet's own share.
Declaration source: packages/core/src/api/social.ts:162.
export function createShareSnapshot(client: ApiClient, signer: WalletMessageSigner, input: { kind: ShareSnapshotKind; marketAddress?: string; includeUsd?: boolean; }, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<{ id: string; }>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.input: { kind: ShareSnapshotKind; marketAddress?: string; includeUsd?: boolean; }— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ id: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>createStopLossKeeperClient</summary>createStopLossKeeperClient#
Connect to a stop-loss keeper.
Declaration source: packages/core/src/stopLoss/client.ts:55.
export function createStopLossKeeperClient(options: { origin: string; authDomain?: string; fetch?: StopLossKeeperFetch; }): { openSession(input: { wallet: string; signMessage: (message: Uint8Array) => Promise<Uint8Array> | Uint8Array; nonce: string; nowMs?: number; signal?: AbortSignal; }): Promise<StopLossSessionResponse>; listStops(token: string, settings?: { market?: string; signal?: AbortSignal; }): Promise<StopLossKeeperRecord[]>; createStop(token: string, request: CreateStopLossRequest, signal?: AbortSignal): Promise<StopLossKeeperRecord>; cancelStop(token: string, id: string, signal?: AbortSignal): Promise<StopLossKeeperRecord>; };
Parameters
options: { origin: string; authDomain?: string; fetch?: StopLossKeeperFetch; }— Not documented.
Returns
{ openSession(input: { wallet: string; signMessage: (message: Uint8Array) => Promise<Uint8Array> | Uint8Array; nonce: string; nowMs?: number; signal?: AbortSignal; }): Promise<StopLossSessionResponse>; listStops(token: string, settings?: { market?: string; signal?: AbortSignal; }): Promise<StopLossKeeperRecord[]>; createStop(token: string, request: CreateStopLossRequest, signal?: AbortSignal): Promise<StopLossKeeperRecord>; cancelStop(token: string, id: string, signal?: AbortSignal): Promise<StopLossKeeperRecord>; }
Not documented.
Throws
Not documented.
</details> <details> <summary>CreateStopLossRequest</summary>CreateStopLossRequest#
Not documented.
Declaration source: packages/core/src/stopLoss/api.ts:35.
export interface CreateStopLossRequest {
/** base64 of the owner-signed durable-nonce wire. */
readonly transaction: string;
readonly triggerBps: number;
readonly floorBps: number;
}
Field documentation
transaction— base64 of the owner-signed durable-nonce wire.
createTakerFillWorkingState#
A working state for seats. Throws on a duplicate seat address (DuplicateSeat).
Declaration source: packages/core/src/router/takerFill.ts:196.
export function createTakerFillWorkingState(seats: readonly SeatQuoteState[]): TakerFillWorkingState;
Parameters
seats: readonly SeatQuoteState[]— Not documented.
Returns
TakerFillWorkingState
Not documented.
Throws
Not documented.
</details> <details> <summary>createTokensXyzUpstreamClient</summary>createTokensXyzUpstreamClient#
The only tokens.xyz calls this codebase makes. There is deliberately no generic "request a path" method: the route surface is this allowlist, so a caller cannot turn the proxy into an open relay for the API key.
Declaration source: packages/core/src/tokensXyz/client.ts:80.
export function createTokensXyzUpstreamClient(options: TokensXyzUpstreamOptions): TokensXyzUpstreamClient;
Parameters
options: TokensXyzUpstreamOptions— Not documented. See TokensXyzUpstreamOptions for its declaration and available field documentation.
Returns
TokensXyzUpstreamClient
Not documented.
Throws
Not documented.
</details> <details> <summary>createTransactionLandingState</summary>createTransactionLandingState#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:211.
export function createTransactionLandingState(options?: TransactionLandingOptions): TransactionLandingState;
Parameters
options: TransactionLandingOptions— Not documented. Default:{}. See TransactionLandingOptions for its declaration and available field documentation.
Returns
TransactionLandingState
Not documented.
Throws
Not documented.
Defaults
options:{}.
createWebSocketAuthPayload#
Not documented.
Declaration source: packages/core/src/auth.ts:136.
export function createWebSocketAuthPayload(headers: WalletAuthHeaders): { signature: string; message: string; publicKey: string; };
Parameters
headers: WalletAuthHeaders— Not documented. See WalletAuthHeaders for its declaration and available field documentation.
Returns
{ signature: string; message: string; publicKey: string; }
Not documented.
Throws
Not documented.
</details> <details> <summary>CreatorFundedExternalMarketPlan</summary>CreatorFundedExternalMarketPlan#
Low-level transaction plan whose outer fee payer must match feePayer.
Declaration source: packages/core/src/instructions.ts:1059.
export interface CreatorFundedExternalMarketPlan {
readonly feePayer: Address;
readonly instructions: readonly Instruction[];
}
CreatorIndexerApiClient#
Not documented.
Declaration source: packages/core/src/referral/creator.ts:61.
export interface CreatorIndexerApiClient {
get<T>(path: string): Promise<T>;
}
CreatorMarketEntry#
Not documented.
Declaration source: packages/core/src/referral/types.ts:102.
export interface CreatorMarketEntry {
/**
* Display label only — typically the trading pair (e.g. "BTC"). Not
* unique: two concurrent markets on the same pair with different durations
* share the same marketId. Use `marketAddress` for identity.
*/
marketId: string;
marketAddress: Address;
pair: string;
state: MarketState;
/** Settlement-mint base units accrued, not yet claimed. */
accumulatedFees: bigint;
/**
* Settlement-token mint for this market's creator-fee balance. `null` when
* the market has no deferred entry (e.g. zero accumulated fees, or the
* indexer hasn't observed any creator fees yet) — consumers must check
* `claimableNow` or this field's nullability before building a claim ix.
*/
settlementMint: Address | null;
/**
* True iff `ClaimCreatorFees` (0x1F) would succeed right now: the program requires
* `market.outcome != 0` AND `accumulated_creator_fees > 0`
* (`program/src/processor/claim_creator_fees.rs`).
*/
claimableNow: boolean;
/**
* True when the market has settled and carries no outstanding creator balance — the fee
* was swept to the creator's token account by `ResolveMarket` / `ExpireMarket` itself
* (`settle_creator_fees_or_defer`). Distinct from "still accruing": there is nothing left
* to claim because it was already paid, not because the market is still open.
*/
feesSettledAtResolution: boolean;
}
Field documentation
marketId— Display label only — typically the trading pair (e.g. "BTC"). Not unique: two concurrent markets on the same pair with different durations share the same marketId. UsemarketAddressfor identity.accumulatedFees— Settlement-mint base units accrued, not yet claimed.settlementMint— Settlement-token mint for this market's creator-fee balance.nullwhen the market has no deferred entry (e.g. zero accumulated fees, or the indexer hasn't observed any creator fees yet) — consumers must checkclaimableNowor this field's nullability before building a claim ix.claimableNow— True iffClaimCreatorFees(0x1F) would succeed right now: the program requiresmarket.outcome != 0ANDaccumulated_creator_fees > 0(program/src/processor/claim_creator_fees.rs).feesSettledAtResolution— True when the market has settled and carries no outstanding creator balance — the fee was swept to the creator's token account byResolveMarket/ExpireMarketitself (settle_creator_fees_or_defer). Distinct from "still accruing": there is nothing left to claim because it was already paid, not because the market is still open.
cumulativeDepth#
Reduce aggregated order-book levels into cumulative depth points.
side: 'bid'— points are ordered price DESCENDING from the best bid; cumulative size grows as price falls toward 0 (deeper into the book).side: 'ask'— points are ordered price ASCENDING from the best ask; cumulative size grows as price rises toward 10000.
Levels are sorted defensively so the output ordering guarantee above holds
even if levels is not pre-sorted. This mirrors (but does not require)
{@link aggregateOrderbook }'s output convention of bids descending / asks
ascending.
Declaration source: packages/core/src/depth.ts:54.
export function cumulativeDepth(levels: OrderbookLevel[], side: "bid" | "ask"): DepthPoint[];
Parameters
levels: OrderbookLevel[]— Not documented.side: "bid" | "ask"— Not documented.
Returns
DepthPoint[]
Not documented.
Throws
Not documented.
</details> <details> <summary>Currency</summary>Currency#
Not documented.
Declaration source: packages/core/src/currency/currency.ts:18.
export interface Currency {
readonly mint: string;
readonly decimals: number;
readonly symbol: string | null;
readonly verified: boolean;
}
CURRENCY_ATTRIBUTION#
Not documented.
Declaration source: packages/core/src/tokensXyz/display.ts:21.
export declare const CURRENCY_ATTRIBUTION: Readonly<Record<CurrencyAttributionProvider, { readonly name: string; readonly url: string; }>>;
CURRENCY_LOGO_HOSTS#
Not documented.
Declaration source: packages/core/src/tokensXyz/logoHosts.ts:15.
export declare const CURRENCY_LOGO_HOSTS: readonly string[];
CURRENCY_LOGO_PATH_PREFIXES#
Logo origins the proxy will pass through and the web CSP allows. Sampled from
the live tokens.xyz registry and variants (2026-11): the first-party logo
bucket serves the large majority, the rest are issuer or provider hosts.
Exact hostnames over https only; no wildcards. Anything else falls back to
an initial. Operators can add exact hosts with TOKENS_XYZ_LOGO_HOSTS.
Declaration source: packages/core/src/tokensXyz/logoHosts.ts:10.
export declare const CURRENCY_LOGO_PATH_PREFIXES: readonly string[];
CURRENCY_METADATA_MAX_MINTS#
Per request to our own proxy.
Declaration source: packages/core/src/tokensXyz/client.ts:34.
export declare const CURRENCY_METADATA_MAX_MINTS: 50;
CURRENCY_SYMBOLS_VERSION#
Reviewed settlement-mint → display symbol table, shared by naming, discovery and currency descriptions. Version 1 holds the default settlement mint of the mainnet deployment (USDT) and the previously reviewed USDC mint. Adding a mint requires review of the mint itself; creators cannot write this table, and a symbol never identifies a currency (anyone can name a mint "USDT").
Lookup is by exact mint address only. An unknown mint renders truncated
(mint 7xKX…9fQ2), never as a guess.
Declaration source: packages/core/src/currencySymbols.ts:15.
export declare const CURRENCY_SYMBOLS_VERSION: 1;
CurrencyAdvisory#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:24.
export interface CurrencyAdvisory {
readonly status: CurrencyAdvisoryStatus;
/** Provider text, safe to show verbatim. Never branch on it. */
readonly reason: string;
readonly url: string | null;
/** Unix milliseconds the current status was set. */
readonly sinceMs: number | null;
readonly source: CurrencyAdvisorySource | null;
}
Field documentation
reason— Provider text, safe to show verbatim. Never branch on it.sinceMs— Unix milliseconds the current status was set.
CurrencyAdvisorySource#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:22.
export type CurrencyAdvisorySource = 'admin' | 'webacy_depeg' | 'peg_guard';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CurrencyAdvisoryStatus#
caution is display only; a future unrecognized status degrades to caution.
Declaration source: packages/core/src/tokensXyz/types.ts:21.
export type CurrencyAdvisoryStatus = 'caution' | 'compromised' | 'blocked';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CurrencyAmountRow#
A single amount tagged with its settlement-currency identity (mint address).
Declaration source: packages/core/src/currency/totals.ts:4.
export interface CurrencyAmountRow {
readonly mint: string;
readonly baseUnits: bigint;
}
CurrencyAttributionProvider#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:93.
export type CurrencyAttributionProvider = 'allium' | 'rwa_xyz';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CurrencyConcentration#
Not documented.
Declaration source: packages/core/src/analytics/concentration.ts:44.
export interface CurrencyConcentration {
currency: string;
decimals: number;
totalAtRiskAtoms: bigint;
byMarket: ConcentrationBreakdown;
bySource: ConcentrationBreakdown;
}
CurrencyEarningsTotal#
An exact lifetime earnings total in one settlement mint's base units.
Declaration source: packages/core/src/currency/earnings.ts:4.
export interface CurrencyEarningsTotal {
readonly mint: string;
readonly amount: bigint;
}
CurrencyFreezeException#
Decoded data only; callers must authenticate the account owner and canonical PDA.
Declaration source: packages/core/src/currency/freezeException.ts:9.
export interface CurrencyFreezeException {
readonly bump: number;
readonly enabled: boolean;
readonly config: Address;
readonly tokenProgram: Address;
readonly mint: Address;
}
CurrencyFreezeExceptionOp#
Current-authority actions for a currency freeze exception.
Declaration source: packages/core/src/instructions.ts:2445.
export declare const CurrencyFreezeExceptionOp: { readonly Initialize: 0; readonly Approve: 1; readonly Revoke: 2; };
CurrencyInputError#
Not documented.
Declaration source: packages/core/src/currency/amount.ts:6.
export type CurrencyInputError = 'invalid' | 'too_precise' | 'out_of_range';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CurrencyInputResult#
Not documented.
Declaration source: packages/core/src/currency/amount.ts:8.
export type CurrencyInputResult =
| { readonly ok: true; readonly baseUnits: bigint }
| { readonly ok: false; readonly error: CurrencyInputError; readonly maxDecimals: number };
currencyLabel#
The reviewed symbol, or a truncated mint that cannot be mistaken for one.
Declaration source: packages/core/src/currencySymbols.ts:29.
export function currencyLabel(mint: string, symbols?: Readonly<Record<string, string>>): string;
Parameters
mint: string— Not documented.symbols: Readonly<Record<string, string>>— Not documented. Default:currencySymbols.
Returns
string
Not documented.
Throws
Not documented.
Defaults
symbols:currencySymbols.
CurrencyListing#
listed: tokens.xyz knows the mint. unlisted: tokens.xyz answered and does
not know it. unknown: no usable answer (key missing, upstream down, rate
limited, nothing cached), so nothing may be implied either way.
Declaration source: packages/core/src/tokensXyz/types.ts:18.
export type CurrencyListing = 'listed' | 'unlisted' | 'unknown';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CurrencyMetadata#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:62.
export interface CurrencyMetadata {
readonly mint: string;
readonly listing: CurrencyListing;
readonly name: string | null;
readonly symbol: string | null;
/** https only, and only from the server's logo host allowlist. */
readonly logoUri: string | null;
/** USD. `null` when unknown. Never zero as a stand-in for unknown. */
readonly priceUsd: number | null;
readonly priceChange24hPct: number | null;
/** Unix ms of the price observation, when the provider reports one. */
readonly priceAsOfMs: number | null;
readonly risk: CurrencyRisk | null;
readonly advisory: CurrencyAdvisory | null;
readonly registry: CurrencyRegistryClass | null;
/** `https://tokens.xyz/{assetId}?solana={mint}` when tokens.xyz has a page. */
readonly tokenPageUrl: string | null;
/** Unix ms this row was assembled from upstream data. */
readonly fetchedAtMs: number;
/** True when the row is served from a cache older than its freshness window. */
readonly stale: boolean;
}
Field documentation
logoUri— https only, and only from the server's logo host allowlist.priceUsd— USD.nullwhen unknown. Never zero as a stand-in for unknown.priceAsOfMs— Unix ms of the price observation, when the provider reports one.tokenPageUrl—https://tokens.xyz/{assetId}?solana={mint}when tokens.xyz has a page.fetchedAtMs— Unix ms this row was assembled from upstream data.stale— True when the row is served from a cache older than its freshness window.
CurrencyMetadataBatcher#
Not documented.
Declaration source: packages/core/src/tokensXyz/batcher.ts:77.
export type CurrencyMetadataBatcher = ReturnType<typeof createCurrencyMetadataBatcher>;
CurrencyMetadataInputs#
Not documented.
Declaration source: packages/core/src/tokensXyz/normalize.ts:5.
export interface CurrencyMetadataInputs {
readonly mint: string;
readonly nowMs: number;
/** v2 `GET /v2/variants` row for the mint, if the call answered and knew it. */
readonly variant?: UpstreamMarketFacts | null;
/** True when the v2 call answered and listed this mint under `missing`. */
readonly variantMissing?: boolean;
/** v1 market-snapshot row: facts, `null` for an unregistered mint, `undefined` if not answered. */
readonly snapshot?: UpstreamMarketFacts | null;
readonly registryRow?: RegistryRow | null;
readonly risk?: CurrencyRisk | null;
/** True when the data comes from a cache past its freshness window. */
readonly stale?: boolean;
/** Decides whether a provider logo URL may be shown (server-side host allowlist). */
readonly isLogoAllowed?: (url: string) => boolean;
}
Field documentation
variant— v2GET /v2/variantsrow for the mint, if the call answered and knew it.variantMissing— True when the v2 call answered and listed this mint undermissing.snapshot— v1 market-snapshot row: facts,nullfor an unregistered mint,undefinedif not answered.stale— True when the data comes from a cache past its freshness window.isLogoAllowed— Decides whether a provider logo URL may be shown (server-side host allowlist).
CurrencyMetadataResponse#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:87.
export interface CurrencyMetadataResponse {
readonly items: readonly CurrencyMetadata[];
readonly source: CurrencyMetadataSource;
readonly generatedAtMs: number;
}
CurrencyMetadataSource#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:85.
export type CurrencyMetadataSource = 'live' | 'cache' | 'stale' | 'unavailable';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
CurrencyMetadataView#
How a metadata row should be presented. trust is about tokens.xyz data
only and says nothing about whether Seesaw admits the currency.
warning is advisory display state. tokens.xyz recommends disabling trading
for compromised and blocked mints, but Seesaw's on-chain currency
registry is the sole authority, so the client only warns and never gates.
Declaration source: packages/core/src/tokensXyz/display.ts:42.
export interface CurrencyMetadataView {
readonly trust: 'listed' | 'unverified' | 'unavailable';
readonly warning: 'none' | 'caution' | 'severe';
readonly riskLevel: 'none' | 'low' | 'medium' | 'high' | 'insufficient';
/** Price to show, or null (hide it; never render zero or a guess). */
readonly priceUsd: number | null;
/** A price exists but is past its hard max-age: render a dash, not the old number. */
readonly priceHidden: boolean;
/** Risk to show, or null when absent or past its hard max-age. */
readonly risk: CurrencyRisk | null;
readonly riskHidden: boolean;
readonly dataStale: boolean;
/** Foundation taxonomy path with consecutive duplicates removed. */
readonly classification: readonly string[];
/** Provider classes/values. Each entry must be rendered with its own attribution. */
readonly providerClasses: readonly ProviderClassEntry[];
}
Field documentation
priceUsd— Price to show, or null (hide it; never render zero or a guess).priceHidden— A price exists but is past its hard max-age: render a dash, not the old number.risk— Risk to show, or null when absent or past its hard max-age.classification— Foundation taxonomy path with consecutive duplicates removed.providerClasses— Provider classes/values. Each entry must be rendered with its own attribution.
CurrencyProtocolTreasuryMissingError#
Thrown when a non-default-currency market's protocol treasury shard for the
requested index does not exist yet. The program would reject the order with
TreasuryRecipientMismatch; anyone can create the shard with
InitializeCurrencyProtocolTreasury (0x52), or the trader picks another
index.
Declaration source: packages/core/src/treasury.ts:161.
export declare class CurrencyProtocolTreasuryMissingError extends Error {
constructor(shard: Address, settlementMint: Address, treasuryIndex: number);
readonly shard: Address;
readonly settlementMint: Address;
readonly treasuryIndex: number;
}
Parameters
shard: Address— Not documented.settlementMint: Address— Not documented.treasuryIndex: number— Not documented.
Throws
Not documented.
</details> <details> <summary>CurrencyProtocolTreasuryShardOccupiedError</summary>CurrencyProtocolTreasuryShardOccupiedError#
Thrown when a protocol treasury shard address holds an account that the
token program does not own and that is not a system-owned prefunded
address. 0x61 would fail with InvalidAccountOwner.
Declaration source: packages/core/src/treasury.ts:308.
export declare class CurrencyProtocolTreasuryShardOccupiedError extends Error {
constructor(shard: Address, treasuryIndex: number, owner: Address);
readonly shard: Address;
readonly treasuryIndex: number;
readonly owner: Address;
}
Parameters
shard: Address— Not documented.treasuryIndex: number— Not documented.owner: Address— Not documented.
Throws
Not documented.
</details> <details> <summary>CurrencyProtocolTreasuryShardPlan</summary>CurrencyProtocolTreasuryShardPlan#
The shards of a currency and the 0x61 instructions for the missing ones.
Declaration source: packages/core/src/treasury.ts:331.
export interface CurrencyProtocolTreasuryShardPlan {
readonly shards: readonly CurrencyProtocolTreasuryShardState[];
/** The missing shard indices, ascending. */
readonly missing: readonly number[];
/** One `InitializeCurrencyProtocolTreasury` per missing shard, in index order. */
readonly instructions: readonly Instruction[];
}
Field documentation
missing— The missing shard indices, ascending.instructions— OneInitializeCurrencyProtocolTreasuryper missing shard, in index order.
CurrencyProtocolTreasuryShardState#
One protocol treasury shard of a currency and whether it already exists.
Declaration source: packages/core/src/treasury.ts:324.
export interface CurrencyProtocolTreasuryShardState {
readonly treasuryIndex: number;
readonly shard: Address;
readonly exists: boolean;
}
currencyProtocolTreasurySupported#
Whether InitializeCurrencyProtocolTreasury (0x52) admits a currency of
tokenProgram. Since task 06 the program creates shards for classic SPL Token
and Token-2022 currencies (spec/IX.md §60.4); any other program fails.
Declaration source: packages/core/src/treasury.ts:299.
export function currencyProtocolTreasurySupported(tokenProgram: Address): boolean;
Parameters
tokenProgram: Address— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>CurrencyRegistryClass</summary>CurrencyRegistryClass#
Solana Foundation Project Canon taxonomy plus provider classes. All fields can be null.
Declaration source: packages/core/src/tokensXyz/types.ts:46.
export interface CurrencyRegistryClass {
readonly assetId: string | null;
readonly group: string | null;
readonly category: string | null;
readonly assetClass: string | null;
/** Allium classification. Showing it or its value requires Allium attribution. */
readonly alliumClass: string | null;
readonly alliumValueUsd: number | null;
/** RWA.xyz classification. Showing it or its value requires RWA.xyz attribution. */
readonly rwaClass: string | null;
readonly rwaValueUsd: number | null;
readonly marketCapUsd: number | null;
/** Registry `syncedAt` (unix ms), the freshness signal. */
readonly syncedAtMs: number | null;
}
Field documentation
alliumClass— Allium classification. Showing it or its value requires Allium attribution.rwaClass— RWA.xyz classification. Showing it or its value requires RWA.xyz attribution.syncedAtMs— RegistrysyncedAt(unix ms), the freshness signal.
CurrencyRisk#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:36.
export interface CurrencyRisk {
/** 0-100. `null` when tokens.xyz has insufficient data (placeholders are dropped). */
readonly score: number | null;
readonly grade: 'A' | 'B' | 'C' | null;
readonly label: string | null;
readonly tone: CurrencyRiskTone | null;
readonly insufficientData: boolean;
}
Field documentation
score— 0-100.nullwhen tokens.xyz has insufficient data (placeholders are dropped).
CurrencyRiskTone#
Not documented.
Declaration source: packages/core/src/tokensXyz/types.ts:34.
export type CurrencyRiskTone = 'risk' | 'warning' | 'safe' | 'info';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
currencySymbols#
Not documented.
Declaration source: packages/core/src/currencySymbols.ts:16.
export declare const currencySymbols: Readonly<Record<string, string>>;
curveFeeNumerator#
Exact rational numerator of one fill's fee, mirroring Rust
curve_fee_numerator: notional × min(cap × 10_000, decay × (10_000 − p)).
Returns null outside the program's domain (price not in 1..10_000,
non-u16 rates, or a notional outside u64) exactly where Rust returns None.
Declaration source: packages/core/src/fee.ts:287.
export function curveFeeNumerator(notional: bigint, priceBps: number, capBps: number, decayBps: number): bigint | null;
Parameters
notional: bigint— Not documented.priceBps: number— Not documented.capBps: number— Not documented.decayBps: number— Not documented.
Returns
bigint | null
Not documented.
Throws
Not documented.
</details> <details> <summary>CurveLevel</summary>CurveLevel#
A compact compiled spline level: exclusive quantity endpoint plus price offset.
Declaration source: packages/core/src/instructions.ts:84.
export interface CurveLevel {
/** D6{share} Exclusive cumulative quantity endpoint, encoded as share lots. */
endQuantityLots: bigint;
/** D4{price_offset_bps} Offset from the spline midpoint. */
priceOffsetBps: number;
}
Field documentation
endQuantityLots— D6{share} Exclusive cumulative quantity endpoint, encoded as share lots.priceOffsetBps— D4{price_offset_bps} Offset from the spline midpoint.
CurveLiquidity#
One seat curve's remaining capacity, expressed in YES prices.
Declaration source: packages/core/src/marketDiscovery.ts:72.
export interface CurveLiquidity {
readonly mid: number;
readonly bids: readonly OrderbookLevel[];
readonly asks: readonly OrderbookLevel[];
}
DailyChallengeMetrics#
Not documented.
Declaration source: packages/core/src/challenges.ts:33.
export interface DailyChallengeMetrics {
/** Number of fills executed today. */
tradeCount: number;
/** Sum of fill notional values executed today. */
totalNotional: number;
/** Count of distinct markets traded today. */
distinctMarkets: number;
/** Number of fills with `outcome: 'win'` today. */
winsToday: number;
/**
* Trailing win streak among today's resolved (win/loss) fills, counted
* backward from the most recent resolved fill. See `computeTrailingWinStreak`
* for the day-boundary simplification this implies.
*/
currentStreak: number;
}
Field documentation
tradeCount— Number of fills executed today.totalNotional— Sum of fill notional values executed today.distinctMarkets— Count of distinct markets traded today.winsToday— Number of fills withoutcome: 'win'today.currentStreak— Trailing win streak among today's resolved (win/loss) fills, counted backward from the most recent resolved fill. SeecomputeTrailingWinStreakfor the day-boundary simplification this implies.
DateRangePreset#
Date-range presets the export sheet offers.
Declaration source: packages/core/src/ux/history.ts:7.
export type DateRangePreset = '30d' | 'ytd' | 'all' | 'custom';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
Decision#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:84.
export type Decision =
| { readonly kind: 'prioritize'; readonly position: number }
| { readonly kind: 'ordinary' }
| { readonly kind: 'superseded'; readonly by_signature: string }
| { readonly kind: 'rejected'; readonly code: string };
DECISION_KINDS#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:81.
export declare const DECISION_KINDS: readonly ["prioritize", "ordinary", "superseded", "rejected"];
DecisionKind#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:82.
export type DecisionKind = (typeof DECISION_KINDS)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
decodeAssertBalancesPayload#
Decode a 53-byte payload (inverse of {@link encodeAssertBalancesPayload}).
Declaration source: packages/core/src/router/assertBalances.ts:152.
export function decodeAssertBalancesPayload(payload: Uint8Array): AssertBalancesBounds;
Parameters
payload: Uint8Array<ArrayBufferLike>— Not documented.
Returns
AssertBalancesBounds
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeAssetState</summary>decodeAssetState#
Decode an AssetState from raw account data.
Declaration source: packages/core/src/generated/program/accounts.ts:1127.
export function decodeAssetState(data: Uint8Array): AssetState;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
AssetState
Not documented.
Throws
if discriminator doesn't match or data is too short.
</details> <details> <summary>decodeBuilderApprovalAccount</summary>decodeBuilderApprovalAccount#
Decode a BuilderApprovalAccount, failing closed on a wrong size,
discriminator or version, or non-zero reserved bytes (the program's
is_well_formed). Layout: discriminator 0..8, trader 8..40, builder 40..72,
max_builder_bps 72..74, bump 74, version 75, reserved 76..80,
created_slot 80..88, expires_at 88..96.
Declaration source: packages/core/src/builder.ts:213.
export function decodeBuilderApprovalAccount(data: Uint8Array): DecodedBuilderApprovalAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
DecodedBuilderApprovalAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeCancellationProgress</summary>decodeCancellationProgress#
The progress body returned by a successful CancelOwnerOrders instruction.
Declaration source: packages/core/src/resumableCancellation.ts:21.
export function decodeCancellationProgress(returnData: CancellationReturnData | undefined, program?: Address): { owner: Address<string>; strategyId: number; nonce: number; operation: number; filter: number; lane: number; groupId: number; tickLimit: number; cutoffSequence: bigint; examined: number; cancelled: number; nextOrderId: bigint; complete: boolean; };
Parameters
returnData: CancellationReturnData | undefined— Not documented. See CancellationReturnData for its declaration and available field documentation.program: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
{ owner: Address<string>; strategyId: number; nonce: number; operation: number; filter: number; lane: number; groupId: number; tickLimit: number; cutoffSequence: bigint; examined: number; cancelled: number; nextOrderId: bigint; complete: boolean; }
Not documented.
Throws
Not documented.
Defaults
program:PROGRAM_ADDRESS.
decodeClockSysvar#
Clock sysvar data: slot u64, epoch start i64, epoch u64, leader epoch u64, unix time i64.
Declaration source: packages/core/src/discoverySnapshot.ts:94.
export function decodeClockSysvar(data: Uint8Array): { slot: bigint; unixTimestamp: bigint; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ slot: bigint; unixTimestamp: bigint; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeClockUnixTimestamp</summary>decodeClockUnixTimestamp#
Not documented.
Declaration source: packages/core/src/market.ts:244.
export function decodeClockUnixTimestamp(clockData: Uint8Array): bigint;
Parameters
clockData: Uint8Array<ArrayBufferLike>— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfidentialError</summary>decodeConfidentialError#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:468.
export function decodeConfidentialError(code: number): { readonly name: "MarketExists"; readonly code: 4097; readonly message: "Market account already exists"; } | { readonly name: "InvalidState"; readonly code: 4098; readonly message: "Operation not valid in current market state"; } | { readonly name: "TradingNotStarted"; readonly code: 4099; readonly message: "Trading has not begun"; } | { readonly name: "TradingEnded"; readonly code: 4100; readonly message: "Trading period has ended"; } | { readonly name: "AlreadyResolved"; readonly code: 4101; readonly message: "Market outcome already determined"; } | { readonly name: "MarketNotResolved"; readonly code: 4102; readonly message: "Market not yet resolved"; } | { readonly name: "TooEarly"; readonly code: 4103; readonly message: "Operation attempted too early"; } | { readonly name: "EpochNotStarted"; readonly code: 4104; readonly message: "Epoch has not started yet"; } | { readonly name: "EpochNotEnded"; readonly code: 4105; readonly message: "Epoch has not ended yet"; } | { readonly name: "NotOwner"; readonly code: 4106; readonly message: "Caller is not the owner"; } | { readonly name: "PositionsRemaining"; readonly code: 4107; readonly message: "Unsettled positions or redeemable bearer supply remain"; } | { readonly name: "MarketCloseTimeout"; readonly code: 4108; readonly message: "Market close timeout not elapsed (7 days after resolution)"; } | { readonly name: "InvalidCreator"; readonly code: 4109; readonly message: "Creator account does not match market creator"; } | { readonly name: "VaultNotEmpty"; readonly code: 4110; readonly message: "Vault still contains funds; cannot close market"; } | { readonly name: "InvalidDuration"; readonly code: 4111; readonly message: "Market duration is outside allowed bounds"; } | { readonly name: "InvalidConfidenceRatio"; readonly code: 4112; readonly message: "Confidence ratio exceeds maximum valid value (10000 bps)"; } | { readonly name: "InvalidStateTransition"; readonly code: 4113; readonly message: "State transition is not valid from current state"; } | { readonly name: "LedgerBalancesRemaining"; readonly code: 4114; readonly message: "Trader-ledger balances remain"; } | { readonly name: "OracleMismatch"; readonly code: 8193; readonly message: "Oracle feed does not match market"; } | { readonly name: "StaleOracle"; readonly code: 8194; readonly message: "Oracle price data is stale"; } | { readonly name: "InvalidPrice"; readonly code: 8195; readonly message: "Oracle reported invalid price"; } | { readonly name: "ConfidenceTooWide"; readonly code: 8196; readonly message: "Oracle confidence interval too wide"; } | { readonly name: "FeedIdMismatch"; readonly code: 8197; readonly message: "Pyth feed ID does not match market configuration"; } | { readonly name: "InvalidOracleData"; readonly code: 8198; readonly message: "Oracle price exponent is outside valid range"; } | { readonly name: "OraclePriceJumpTooLarge"; readonly code: 8199; readonly message: "Oracle price jump exceeds circuit breaker"; } | { readonly name: "InvalidQuantity"; readonly code: 12289; readonly message: "Invalid order quantity"; } | { readonly name: "OrderbookFull"; readonly code: 12290; readonly message: "Order book is full"; } | { readonly name: "OrderNotFound"; readonly code: 12291; readonly message: "Order not found"; } | { readonly name: "WouldCross"; readonly code: 12292; readonly message: "PostOnly order would cross spread"; } | { readonly name: "PriceTooLow"; readonly code: 12293; readonly message: "Price too low (must be at least 1 basis point)"; } | { readonly name: "PriceTooHigh"; readonly code: 12294; readonly message: "Price too high (must be less than 10000 basis points)"; } | { readonly name: "SlippageExceeded"; readonly code: 12295; readonly message: "IOC stopped before any fill at worst_acceptable_price_bps slippage bound"; } | { readonly name: "InsufficientFill"; readonly code: 12296; readonly message: "IOC filled fewer units than min_fill_quantity required"; } | { readonly name: "NoFillForIoc"; readonly code: 12297; readonly message: "IOC order matched no resting liquidity"; } | { readonly name: "SelfTradeAbort"; readonly code: 12298; readonly message: "Self-trade encountered while self_trade_behavior == Abort"; } | { readonly name: "PostOnlyModeActive"; readonly code: 12299; readonly message: "Protocol is in PostOnly mode; submit a Limit or PostOnly order"; } | { readonly name: "OrderNotExpired"; readonly code: 12300; readonly message: "ReclaimExpiredOrder target is not past its TTL or flagged ExpiredClaimable"; } | { readonly name: "InsufficientBalance"; readonly code: 12301; readonly message: "Taker ATA balance is below the required collateral / shares for this order"; } | { readonly name: "MaxTotalSharesExceeded"; readonly code: 12302; readonly message: "MintShares amount would push the per-market YES/NO supply past max_total_shares"; } | { readonly name: "AuthorityClaimNotEligible"; readonly code: 12303; readonly message: "ClaimAuthority called before the pending-authority timelock elapsed"; } | { readonly name: "InsufficientFreeBalance"; readonly code: 12304; readonly message: "WithdrawFunds amount exceeds the trader-ledger quote_free balance"; } | { readonly name: "MinRestingNotionalNotMet"; readonly code: 12305; readonly message: "Resting remainder notional is below config.min_resting_notional"; } | { readonly name: "OrderPriceOutOfBand"; readonly code: 12306; readonly message: "Order price is outside the maker price band (see spec/ORDERBOOK.md)"; } | { readonly name: "TraderLedgerFull"; readonly code: 12307; readonly message: "Trader ledger has no free slot for a new maker (Wave 4b authoritative ledger)"; } | { readonly name: "OrderbookNotEmpty"; readonly code: 12308; readonly message: "CloseMarket: at least one orderbook slot is still occupied; call ReclaimExpiredOrder on expired entries first"; } | { readonly name: "TraderLedgerNotAllocated"; readonly code: 12309; readonly message: "CreateMarket: trader_ledger PDA is not fully allocated. Caller must invoke EnsureTraderLedgerSpace ceil(target_size / 10_240) times before CreateMarket"; } | { readonly name: "TraderLedgerOversized"; readonly code: 12310; readonly message: "EnsureTraderLedgerSpace: account is larger than the canonical trader-ledger size"; } | { readonly name: "OrderbookTreeCorruption"; readonly code: 12311; readonly message: "Deep orderbook tree links are internally inconsistent"; } | { readonly name: "InternalInvariantViolated"; readonly code: 12312; readonly message: "Internal order processing invariant was violated"; } | { readonly name: "BookConsistencyInvariantViolated"; readonly code: 12313; readonly message: "Orderbook slot counts or cached best prices are inconsistent after mutation"; } | { readonly name: "CrossedBookInvariantViolated"; readonly code: 12314; readonly message: "Orderbook has a matchable crossed bid/ask pair after mutation"; } | { readonly name: "UnsupportedAccountVersion"; readonly code: 12315; readonly message: "Account layout version is not supported by this program binary"; } | { readonly name: "PositionMarketMismatch"; readonly code: 12316; readonly message: "ForceClose position does not belong to the supplied market"; } | { readonly name: "PositionAlreadySettled"; readonly code: 12317; readonly message: "ForceClose position is already settled"; } | { readonly name: "ResidualShareLocks"; readonly code: 12318; readonly message: "ForceClose position has residual ask-side share locks"; } | { readonly name: "NothingToForceClose"; readonly code: 12319; readonly message: "ForceClose has no collateral or economic order progress to release"; } | { readonly name: "InvalidOrderTypeForInstruction"; readonly code: 12320; readonly message: "Order type is not supported by this instruction"; } | { readonly name: "MathOverflow"; readonly code: 16385; readonly message: "Arithmetic overflow"; } | { readonly name: "InvalidAccountType"; readonly code: 20481; readonly message: "Invalid account type"; } | { readonly name: "InvalidAccountOwner"; readonly code: 20482; readonly message: "Invalid account owner"; } | { readonly name: "InvalidPDA"; readonly code: 20483; readonly message: "Invalid PDA derivation"; } | { readonly name: "AlreadyInitialized"; readonly code: 20484; readonly message: "Account already initialized"; } | { readonly name: "InsolvencyDetected"; readonly code: 20485; readonly message: "Vault solvency invariant violated"; } | { readonly name: "UnauthorizedInitializer"; readonly code: 20486; readonly message: "Initializer is not the program upgrade authority"; } | { readonly name: "DuplicateAccount"; readonly code: 20487; readonly message: "Duplicate mutable account in instruction"; } | { readonly name: "FailedToSerializeEvent"; readonly code: 20488; readonly message: "Recorder failed to serialize the next event batch"; } | { readonly name: "FailedToFlushBuffer"; readonly code: 20489; readonly message: "Recorder failed to flush a pending event batch"; } | { readonly name: "InvalidRecorderPayloadLength"; readonly code: 20490; readonly message: "Recorder payload length is invalid"; } | { readonly name: "InvalidRecorderVersion"; readonly code: 20491; readonly message: "Recorder payload version is invalid"; } | { readonly name: "InvalidRecorderAuthorityKind"; readonly code: 20492; readonly message: "Recorder payload authority kind is invalid"; } | { readonly name: "InvalidRecorderEventCount"; readonly code: 20493; readonly message: "Recorder payload event count is invalid"; } | { readonly name: "ProtocolPaused"; readonly code: 24577; readonly message: "Protocol is paused"; } | { readonly name: "CannotExpire"; readonly code: 28673; readonly message: "Cannot expire market"; } | { readonly name: "InvalidRedemption"; readonly code: 28674; readonly message: "Cannot redeem tokens that are not winning"; } | { readonly name: "InvalidMint"; readonly code: 28675; readonly message: "Token account mint does not match expected mint"; } | { readonly name: "SolvencyInvariantViolated"; readonly code: 28676; readonly message: "Runtime solvency invariant violated after share or fee mutation"; } | { readonly name: "InvalidSettlementMintDecimals"; readonly code: 28677; readonly message: "Settlement mint decimals must be between 6 and 9"; } | { readonly name: "CollateralMirrorInconsistent"; readonly code: 28678; readonly message: "Collateral mirror is inconsistent with locked collateral in terminal redemption"; } | { readonly name: "InvalidFeeCurve"; readonly code: 32769; readonly message: "Fee curve parameters out of bounds"; } | { readonly name: "InvalidFeeSplit"; readonly code: 32770; readonly message: "Fee split shares do not sum to 10000 bps"; } | { readonly name: "ReferrerAlreadySet"; readonly code: 32771; readonly message: "Referee already has a referrer set"; } | { readonly name: "SelfReferralForbidden"; readonly code: 32772; readonly message: "Self-referral is forbidden"; } | { readonly name: "ReferrerTreasuryMismatch"; readonly code: 32773; readonly message: "Referrer treasury PDA mismatch"; } | { readonly name: "AccumulatedAmountZero"; readonly code: 32774; readonly message: "Claim attempted with zero accumulated balance"; } | { readonly name: "FeeConfigRateLimit"; readonly code: 32775; readonly message: "Fee-governance update called within rate-limit window"; } | { readonly name: "TreasuryIndexOutOfRange"; readonly code: 32776; readonly message: "Treasury index is out of range (>= MAX_TREASURY_RECIPIENTS)"; } | { readonly name: "TreasuryRecipientMismatch"; readonly code: 32777; readonly message: "Treasury token account does not match config.treasury_recipients[index]"; } | { readonly name: "InvalidTreasuryRecipient"; readonly code: 32778; readonly message: "Treasury recipient pubkey is zero (unset sentinel)"; } | { readonly name: "DuplicateTreasuryRecipient"; readonly code: 32779; readonly message: "Treasury recipients array contains a duplicate pubkey"; } | { readonly name: "TreasuryUpdateRateLimit"; readonly code: 32780; readonly message: "UpdateTreasuryRecipients called within rate-limit window"; } | { readonly name: "OperationalParamsRateLimit"; readonly code: 32781; readonly message: "UpdateOperationalParams called within rate-limit window"; } | { readonly name: "MicrostructureRateLimit"; readonly code: 32782; readonly message: "Market microstructure update called within rate-limit window"; } | { readonly name: "ReferralCacheMismatch"; readonly code: 32783; readonly message: "Referral binding does not match the immutable position cache"; } | { readonly name: "InvalidReferralRollupBatch"; readonly code: 32784; readonly message: "Referral rollup batch is invalid"; } | { readonly name: "ReferralFeesPending"; readonly code: 32785; readonly message: "Unswept referral fees are still pending"; } | { readonly name: "ReferralLiabilityMismatch"; readonly code: 32786; readonly message: "Market and position referral liabilities do not match"; } | { readonly name: "InvalidSplineConfig"; readonly code: 32787; readonly message: "Spline configuration is invalid"; } | { readonly name: "InstructionNotYetEnabled"; readonly code: 32788; readonly message: "Instruction is not yet enabled"; } | { readonly name: "InvalidSplineShape"; readonly code: 32789; readonly message: "Spline shape is invalid"; } | { readonly name: "UnauthorizedSplineMaker"; readonly code: 32790; readonly message: "Caller is not the spline maker"; } | { readonly name: "StaleSequence"; readonly code: 32791; readonly message: "Spline update sequence is stale"; } | { readonly name: "InvalidMidPrice"; readonly code: 32792; readonly message: "Spline midpoint is invalid"; } | { readonly name: "InvalidSplineSeries"; readonly code: 32793; readonly message: "Spline and market series do not match"; } | { readonly name: "InsufficientSplineCommitment"; readonly code: 32794; readonly message: "Spline commitment is below the required floor"; } | { readonly name: "SplineGenerationMismatch"; readonly code: 32795; readonly message: "Spline quote targets a different shape generation"; } | { readonly name: "InvalidSplineQuoteOrigin"; readonly code: 32796; readonly message: "Spline quote origin time is invalid or stale"; } | { readonly name: "MissingSplineAccounts"; readonly code: 32797; readonly message: "Required canonical spline account segment is missing"; } | { readonly name: "MakerRebateShareTooHigh"; readonly code: 32798; readonly message: "Maker rebate share exceeds the 4,000-bps hard cap"; } | { readonly name: "MakerRebateRestBoundTooHigh"; readonly code: 32799; readonly message: "Maker rebate minimum resting age exceeds 3,600 seconds"; } | { readonly name: "SeatsStillAttached"; readonly code: 32800; readonly message: "Attached spline seats must leave before close"; } | { readonly name: "OrderIdExhausted"; readonly code: 32801; readonly message: "Opaque order ID space is exhausted"; } | { readonly name: "RestingNotionalTooSmall"; readonly code: 32802; readonly message: "Reduced resting remainder is below config.min_resting_notional"; } | { readonly name: "SplineCommitmentUnderflow"; readonly code: 32803; readonly message: "Spline commitment debit exceeds tracked commitment"; } | { readonly name: "InvalidSequenceAnchor"; readonly code: 32804; readonly message: "Quote sequence anchor is invalid"; } | { readonly name: "AuthorityEpochMismatch"; readonly code: 32805; readonly message: "Quote authority epoch does not match"; } | { readonly name: "QuoteSessionExpired"; readonly code: 32806; readonly message: "Quote delegate session has expired"; } | { readonly name: "InvalidQuoteValidityWindow"; readonly code: 32807; readonly message: "Quote validity profile or slot window is invalid"; } | { readonly name: "SplineReaderWritable"; readonly code: 32808; readonly message: "Spline publication reader account is writable"; } | { readonly name: "QuoteProfileDowngrade"; readonly code: 32809; readonly message: "Quote delegate cannot weaken the validity profile"; } | { readonly name: "SelfBuilderForbidden"; readonly code: 32810; readonly message: "Builder must differ from the trader and be non-zero"; } | { readonly name: "BuilderApprovalMismatch"; readonly code: 32811; readonly message: "Builder approval PDA, trader, owner, or layout does not match"; } | { readonly name: "BuilderApprovalExpired"; readonly code: 32812; readonly message: "Builder approval has expired"; } | { readonly name: "BuilderApprovalNotYetActive"; readonly code: 32813; readonly message: "Builder approval cannot be used in the slot that created it"; } | { readonly name: "BuilderTokenAccountMismatch"; readonly code: 32814; readonly message: "Builder token account mint, owner, state, or distinctness is invalid"; } | { readonly name: "InvalidBuilderShare"; readonly code: 32815; readonly message: "Builder approval max_builder_bps must be 1..=10_000"; } | { readonly name: "ClientOrderIdNotFound"; readonly code: 32816; readonly message: "Client order identifier not found for this owner"; } | { readonly name: "CancelSessionMismatch"; readonly code: 32817; readonly message: "Cancellation session does not match the requested nonce"; } | { readonly name: "CancelSessionActive"; readonly code: 32818; readonly message: "Another principal owns the active cancellation session"; } | { readonly name: "SeatBelowLiquidityFloor"; readonly code: 32819; readonly message: "Spline seat is below the liquidity floor"; } | { readonly name: "SeatStalenessOff"; readonly code: 32820; readonly message: "Spline seat quote age must be nonzero"; } | { readonly name: "SeatCapReached"; readonly code: 32821; readonly message: "Market active spline seat cap reached"; } | { readonly name: "SeatMissTooSoon"; readonly code: 32822; readonly message: "Spline seat floor miss sampled too soon"; } | { readonly name: "SeatMissesBelowThreshold"; readonly code: 32823; readonly message: "Spline seat misses are below the dormancy threshold"; } | { readonly name: "SeatMeetsFloor"; readonly code: 32824; readonly message: "Spline seat meets the liquidity floor"; } | { readonly name: "DuplicateSeat"; readonly code: 32825; readonly message: "Duplicate spline seat in the seat vector"; } | { readonly name: "SeatSeriesMismatch"; readonly code: 32826; readonly message: "Spline seat belongs to another series"; } | { readonly name: "SubscriptionDisabled"; readonly code: 32827; readonly message: "Series subscription is disabled"; } | { readonly name: "SubscriptionSpacing"; readonly code: 32828; readonly message: "Market is inside the series spacing interval"; } | { readonly name: "SubscriptionMarketTooOld"; readonly code: 32829; readonly message: "Market is too old for the series crank"; } | { readonly name: "SubscriptionMarketParamsRejected"; readonly code: 32830; readonly message: "Market parameters are outside the series ranges"; } | { readonly name: "SubscriptionExternalMarket"; readonly code: 32831; readonly message: "Series crank rejects external markets"; } | { readonly name: "SubscriptionConcurrencyReached"; readonly code: 32832; readonly message: "Series concurrent seat limit reached"; } | { readonly name: "SeriesLamportBudgetInsufficient"; readonly code: 32833; readonly message: "Series lamport budget is insufficient"; } | { readonly name: "BalanceBoundViolated"; readonly code: 32834; readonly message: "A balance is below its asserted lower bound"; } | { readonly name: "OrderbookNeedsReclaim"; readonly code: 32835; readonly message: "Order book lane needs reclaim before matching"; } | { readonly name: "ManagedOrderUseBatchReclaim"; readonly code: 32836; readonly message: "Use batch reclaim for managed orders"; } | { readonly name: "NoPendingAuthority"; readonly code: 36865; readonly message: "ClaimAuthority: no authority rotation is pending"; } | { readonly name: "UnauthorizedClaim"; readonly code: 36866; readonly message: "ClaimAuthority: signer is not the pending authority"; } | { readonly name: "EmergencyDelayNotElapsed"; readonly code: 36867; readonly message: "ForceCancelMarketOrders: emergency delay has not elapsed"; } | { readonly name: "UnauthorizedPauser"; readonly code: 36868; readonly message: "Signer is neither config.authority nor configured nonzero config.pauser"; } | { readonly name: "WrongResolver"; readonly code: 40961; readonly message: "Signer does not match the market resolver authority"; } | { readonly name: "UnsupportedMarketKind"; readonly code: 40962; readonly message: "Market kind or leg count is unsupported"; } | { readonly name: "MarketHalted"; readonly code: 40963; readonly message: "Market is halted for new order placement"; } | { readonly name: "ExternalMarketInvalid"; readonly code: 40964; readonly message: "External market configuration is invalid"; } | { readonly name: "InvalidPayoutNumerators"; readonly code: 40965; readonly message: "Payout numerators are invalid"; } | { readonly name: "MarketMetaMismatch"; readonly code: 40966; readonly message: "Market metadata does not match the market"; } | { readonly name: "PreallocationReceiptMismatch"; readonly code: 40967; readonly message: "Preallocation receipt does not match its immutable commitment"; } | { readonly name: "PreallocationReceiptNotActive"; readonly code: 40968; readonly message: "Preallocation receipt is not active"; } | { readonly name: "PreallocationReclaimTooEarly"; readonly code: 40969; readonly message: "Preallocation reclaim is not yet permissionless"; } | { readonly name: "PreallocationTargetMismatch"; readonly code: 40970; readonly message: "Preallocation target size or capacity does not match"; } | { readonly name: "PreallocationDataNotZero"; readonly code: 40971; readonly message: "Preallocation child data is not zero"; } | { readonly name: "PreallocationMarketExists"; readonly code: 40972; readonly message: "Market or metadata already exists"; } | { readonly name: "ExternalCloseTimeOutOfRange"; readonly code: 40973; readonly message: "External market close time is outside the supported horizon"; } | { readonly name: "ExternalExpiryDeadlineOverflow"; readonly code: 40974; readonly message: "External market expiry deadline cannot be represented"; } | { readonly name: "EconomicAccountVersionMismatch"; readonly code: 40975; readonly message: "Economic account version does not match"; } | { readonly name: "EconomicDeltaOverflow"; readonly code: 40976; readonly message: "Economic accounting delta overflowed"; } | { readonly name: "NativeResolutionPolicyMismatch"; readonly code: 40977; readonly message: "Native resolution policy does not match"; } | { readonly name: "NativeResolutionReasonInvalid"; readonly code: 40978; readonly message: "Native resolution reason is invalid"; } | { readonly name: "SourceClaimBindingMismatch"; readonly code: 49153; readonly message: "Source claim bindings do not match"; } | { readonly name: "SourceInvalidTransition"; readonly code: 49154; readonly message: "Source-market transition is invalid"; } | { readonly name: "SourceImmutableBindingMismatch"; readonly code: 49155; readonly message: "Source immutable binding mismatch"; } | { readonly name: "SourceInvalidDefinition"; readonly code: 49156; readonly message: "Invalid source definition"; } | { readonly name: "SourceManualResolutionForbidden"; readonly code: 49157; readonly message: "Manual source-market resolution forbidden"; } | { readonly name: "SourceWindowNotAdmitted"; readonly code: 49158; readonly message: "Source window does not admit the operation"; } | { readonly name: "SourceReviewNotElapsed"; readonly code: 49159; readonly message: "Source review window has not elapsed"; } | { readonly name: "SourceProfileDisabled"; readonly code: 49160; readonly message: "Source profile disabled"; } | { readonly name: "SourceUnsupportedProfile"; readonly code: 49161; readonly message: "Unsupported source profile"; } | { readonly name: "SourceStateRevisionChanged"; readonly code: 49162; readonly message: "Source state revision changed"; } | { readonly name: "SourcePolicyNotEffective"; readonly code: 49163; readonly message: "Source policy not yet effective"; } | { readonly name: "SourceWitnessCountMismatch"; readonly code: 49164; readonly message: "Source witness count mismatch"; } | { readonly name: "SourceMarketKindUnsupported"; readonly code: 49165; readonly message: "Source market kind unsupported"; } | { readonly name: "SourceCaptureWindowInvalid"; readonly code: 49166; readonly message: "Source capture window invalid"; } | { readonly name: "SourceCaptureStale"; readonly code: 49167; readonly message: "Source capture stale"; } | { readonly name: "SourceCaptureFromFuture"; readonly code: 49168; readonly message: "Source capture from the future"; } | { readonly name: "WitnessSlotNotAdmitted"; readonly code: 49169; readonly message: "Witness slot not admitted"; } | { readonly name: "WitnessSlotRevoked"; readonly code: 49170; readonly message: "Witness slot revoked"; } | { readonly name: "WitnessEpochMismatch"; readonly code: 49171; readonly message: "Witness epoch mismatch"; } | { readonly name: "WitnessSignatureInvalid"; readonly code: 49172; readonly message: "Witness signature invalid"; } | { readonly name: "SourceFactOutOfRange"; readonly code: 49173; readonly message: "Source fact out of range"; } | { readonly name: "SourceOperationRedundant"; readonly code: 49174; readonly message: "Source operation redundant"; } | { readonly name: "SourceDefinitionPackageMismatch"; readonly code: 49175; readonly message: "Source definition package mismatch"; } | { readonly name: "StrategyMarketNotAllowed"; readonly code: 53249; readonly message: "Market is not in the strategy's allowed markets"; } | { readonly name: "StrategyCurrencyNotAllowed"; readonly code: 53250; readonly message: "Settlement mint is not in the strategy's allowed mints"; } | { readonly name: "StrategyOrderCapitalExceeded"; readonly code: 53251; readonly message: "Order capital exceeds the strategy's per-order limit"; } | { readonly name: "StrategyCapitalBudgetExceeded"; readonly code: 53252; readonly message: "Order capital exceeds the strategy's turnover budget"; } | { readonly name: "StrategyInventoryExceeded"; readonly code: 53253; readonly message: "Order exceeds the strategy's inventory ceiling"; } | { readonly name: "StrategyFeeExceeded"; readonly code: 53254; readonly message: "Fill fee exceeds the strategy's fee limit"; } | { readonly name: "StrategySlippageExceeded"; readonly code: 53255; readonly message: "Order limit exceeds the strategy's slippage limit"; } | { readonly name: "StrategyExpired"; readonly code: 53256; readonly message: "Strategy has expired"; } | { readonly name: "StrategyActionNotAllowed"; readonly code: 53257; readonly message: "Strategy does not allow this action"; } | { readonly name: "StrategyStopped"; readonly code: 53258; readonly message: "Strategy is stopped"; } | { readonly name: "StrategyDelegateMismatch"; readonly code: 53259; readonly message: "Signer is not the strategy's delegate or owner"; } | { readonly name: "StrategyNotYetActive"; readonly code: 53260; readonly message: "Strategy is not yet active for its delegate"; } | { readonly name: "StrategyDestinationNotAllowed"; readonly code: 53261; readonly message: "Withdrawal destination is not allowed for the delegate"; } | { readonly name: "StrategyLeaseTooShort"; readonly code: 53262; readonly message: "Covered order lease leaves less than the minimum TTL"; } | { readonly name: "StrategyAccountMismatch"; readonly code: 53263; readonly message: "Strategy account does not match"; } | { readonly name: "InvalidStrategyConfig"; readonly code: 53264; readonly message: "Strategy configuration is invalid"; } | { readonly name: "ConfidentialAccountMismatch"; readonly code: 57345; readonly message: "Account is not a confidential market"; } | { readonly name: "ConfidentialInstanceNonceInvalid"; readonly code: 57346; readonly message: "Confidential market nonce is all zero"; } | { readonly name: "ConfidentialProfileInactive"; readonly code: 57347; readonly message: "Confidential profile is unknown or inactive"; } | { readonly name: "ConfidentialPolicyInvalid"; readonly code: 57348; readonly message: "Confidential policy is invalid"; } | { readonly name: "ConfidentialCreationProofUnavailable"; readonly code: 57349; readonly message: "Confidential creation proof is unavailable"; } | { readonly name: "ConfidentialAdapterNotAdmitted"; readonly code: 57350; readonly message: "Confidential terminal adapter is not admitted"; } | { readonly name: "ConfidentialTerminalAlreadyRecorded"; readonly code: 57351; readonly message: "Confidential terminal is already recorded"; } | { readonly name: "ConfidentialTerminalWindowOpen"; readonly code: 57352; readonly message: "Confidential terminal window is still open"; } | { readonly name: "ConfidentialTerminalEvidenceRejected"; readonly code: 57353; readonly message: "Confidential terminal evidence was rejected"; } | undefined;
Parameters
code: number— Not documented.
Returns
{ readonly name: "MarketExists"; readonly code: 4097; readonly message: "Market account already exists"; } | { readonly name: "InvalidState"; readonly code: 4098; readonly message: "Operation not valid in current market state"; } | { readonly name: "TradingNotStarted"; readonly code: 4099; readonly message: "Trading has not begun"; } | { readonly name: "TradingEnded"; readonly code: 4100; readonly message: "Trading period has ended"; } | { readonly name: "AlreadyResolved"; readonly code: 4101; readonly message: "Market outcome already determined"; } | { readonly name: "MarketNotResolved"; readonly code: 4102; readonly message: "Market not yet resolved"; } | { readonly name: "TooEarly"; readonly code: 4103; readonly message: "Operation attempted too early"; } | { readonly name: "EpochNotStarted"; readonly code: 4104; readonly message: "Epoch has not started yet"; } | { readonly name: "EpochNotEnded"; readonly code: 4105; readonly message: "Epoch has not ended yet"; } | { readonly name: "NotOwner"; readonly code: 4106; readonly message: "Caller is not the owner"; } | { readonly name: "PositionsRemaining"; readonly code: 4107; readonly message: "Unsettled positions or redeemable bearer supply remain"; } | { readonly name: "MarketCloseTimeout"; readonly code: 4108; readonly message: "Market close timeout not elapsed (7 days after resolution)"; } | { readonly name: "InvalidCreator"; readonly code: 4109; readonly message: "Creator account does not match market creator"; } | { readonly name: "VaultNotEmpty"; readonly code: 4110; readonly message: "Vault still contains funds; cannot close market"; } | { readonly name: "InvalidDuration"; readonly code: 4111; readonly message: "Market duration is outside allowed bounds"; } | { readonly name: "InvalidConfidenceRatio"; readonly code: 4112; readonly message: "Confidence ratio exceeds maximum valid value (10000 bps)"; } | { readonly name: "InvalidStateTransition"; readonly code: 4113; readonly message: "State transition is not valid from current state"; } | { readonly name: "LedgerBalancesRemaining"; readonly code: 4114; readonly message: "Trader-ledger balances remain"; } | { readonly name: "OracleMismatch"; readonly code: 8193; readonly message: "Oracle feed does not match market"; } | { readonly name: "StaleOracle"; readonly code: 8194; readonly message: "Oracle price data is stale"; } | { readonly name: "InvalidPrice"; readonly code: 8195; readonly message: "Oracle reported invalid price"; } | { readonly name: "ConfidenceTooWide"; readonly code: 8196; readonly message: "Oracle confidence interval too wide"; } | { readonly name: "FeedIdMismatch"; readonly code: 8197; readonly message: "Pyth feed ID does not match market configuration"; } | { readonly name: "InvalidOracleData"; readonly code: 8198; readonly message: "Oracle price exponent is outside valid range"; } | { readonly name: "OraclePriceJumpTooLarge"; readonly code: 8199; readonly message: "Oracle price jump exceeds circuit breaker"; } | { readonly name: "InvalidQuantity"; readonly code: 12289; readonly message: "Invalid order quantity"; } | { readonly name: "OrderbookFull"; readonly code: 12290; readonly message: "Order book is full"; } | { readonly name: "OrderNotFound"; readonly code: 12291; readonly message: "Order not found"; } | { readonly name: "WouldCross"; readonly code: 12292; readonly message: "PostOnly order would cross spread"; } | { readonly name: "PriceTooLow"; readonly code: 12293; readonly message: "Price too low (must be at least 1 basis point)"; } | { readonly name: "PriceTooHigh"; readonly code: 12294; readonly message: "Price too high (must be less than 10000 basis points)"; } | { readonly name: "SlippageExceeded"; readonly code: 12295; readonly message: "IOC stopped before any fill at worst_acceptable_price_bps slippage bound"; } | { readonly name: "InsufficientFill"; readonly code: 12296; readonly message: "IOC filled fewer units than min_fill_quantity required"; } | { readonly name: "NoFillForIoc"; readonly code: 12297; readonly message: "IOC order matched no resting liquidity"; } | { readonly name: "SelfTradeAbort"; readonly code: 12298; readonly message: "Self-trade encountered while self_trade_behavior == Abort"; } | { readonly name: "PostOnlyModeActive"; readonly code: 12299; readonly message: "Protocol is in PostOnly mode; submit a Limit or PostOnly order"; } | { readonly name: "OrderNotExpired"; readonly code: 12300; readonly message: "ReclaimExpiredOrder target is not past its TTL or flagged ExpiredClaimable"; } | { readonly name: "InsufficientBalance"; readonly code: 12301; readonly message: "Taker ATA balance is below the required collateral / shares for this order"; } | { readonly name: "MaxTotalSharesExceeded"; readonly code: 12302; readonly message: "MintShares amount would push the per-market YES/NO supply past max_total_shares"; } | { readonly name: "AuthorityClaimNotEligible"; readonly code: 12303; readonly message: "ClaimAuthority called before the pending-authority timelock elapsed"; } | { readonly name: "InsufficientFreeBalance"; readonly code: 12304; readonly message: "WithdrawFunds amount exceeds the trader-ledger quote_free balance"; } | { readonly name: "MinRestingNotionalNotMet"; readonly code: 12305; readonly message: "Resting remainder notional is below config.min_resting_notional"; } | { readonly name: "OrderPriceOutOfBand"; readonly code: 12306; readonly message: "Order price is outside the maker price band (see spec/ORDERBOOK.md)"; } | { readonly name: "TraderLedgerFull"; readonly code: 12307; readonly message: "Trader ledger has no free slot for a new maker (Wave 4b authoritative ledger)"; } | { readonly name: "OrderbookNotEmpty"; readonly code: 12308; readonly message: "CloseMarket: at least one orderbook slot is still occupied; call ReclaimExpiredOrder on expired entries first"; } | { readonly name: "TraderLedgerNotAllocated"; readonly code: 12309; readonly message: "CreateMarket: trader_ledger PDA is not fully allocated. Caller must invoke EnsureTraderLedgerSpace ceil(target_size / 10_240) times before CreateMarket"; } | { readonly name: "TraderLedgerOversized"; readonly code: 12310; readonly message: "EnsureTraderLedgerSpace: account is larger than the canonical trader-ledger size"; } | { readonly name: "OrderbookTreeCorruption"; readonly code: 12311; readonly message: "Deep orderbook tree links are internally inconsistent"; } | { readonly name: "InternalInvariantViolated"; readonly code: 12312; readonly message: "Internal order processing invariant was violated"; } | { readonly name: "BookConsistencyInvariantViolated"; readonly code: 12313; readonly message: "Orderbook slot counts or cached best prices are inconsistent after mutation"; } | { readonly name: "CrossedBookInvariantViolated"; readonly code: 12314; readonly message: "Orderbook has a matchable crossed bid/ask pair after mutation"; } | { readonly name: "UnsupportedAccountVersion"; readonly code: 12315; readonly message: "Account layout version is not supported by this program binary"; } | { readonly name: "PositionMarketMismatch"; readonly code: 12316; readonly message: "ForceClose position does not belong to the supplied market"; } | { readonly name: "PositionAlreadySettled"; readonly code: 12317; readonly message: "ForceClose position is already settled"; } | { readonly name: "ResidualShareLocks"; readonly code: 12318; readonly message: "ForceClose position has residual ask-side share locks"; } | { readonly name: "NothingToForceClose"; readonly code: 12319; readonly message: "ForceClose has no collateral or economic order progress to release"; } | { readonly name: "InvalidOrderTypeForInstruction"; readonly code: 12320; readonly message: "Order type is not supported by this instruction"; } | { readonly name: "MathOverflow"; readonly code: 16385; readonly message: "Arithmetic overflow"; } | { readonly name: "InvalidAccountType"; readonly code: 20481; readonly message: "Invalid account type"; } | { readonly name: "InvalidAccountOwner"; readonly code: 20482; readonly message: "Invalid account owner"; } | { readonly name: "InvalidPDA"; readonly code: 20483; readonly message: "Invalid PDA derivation"; } | { readonly name: "AlreadyInitialized"; readonly code: 20484; readonly message: "Account already initialized"; } | { readonly name: "InsolvencyDetected"; readonly code: 20485; readonly message: "Vault solvency invariant violated"; } | { readonly name: "UnauthorizedInitializer"; readonly code: 20486; readonly message: "Initializer is not the program upgrade authority"; } | { readonly name: "DuplicateAccount"; readonly code: 20487; readonly message: "Duplicate mutable account in instruction"; } | { readonly name: "FailedToSerializeEvent"; readonly code: 20488; readonly message: "Recorder failed to serialize the next event batch"; } | { readonly name: "FailedToFlushBuffer"; readonly code: 20489; readonly message: "Recorder failed to flush a pending event batch"; } | { readonly name: "InvalidRecorderPayloadLength"; readonly code: 20490; readonly message: "Recorder payload length is invalid"; } | { readonly name: "InvalidRecorderVersion"; readonly code: 20491; readonly message: "Recorder payload version is invalid"; } | { readonly name: "InvalidRecorderAuthorityKind"; readonly code: 20492; readonly message: "Recorder payload authority kind is invalid"; } | { readonly name: "InvalidRecorderEventCount"; readonly code: 20493; readonly message: "Recorder payload event count is invalid"; } | { readonly name: "ProtocolPaused"; readonly code: 24577; readonly message: "Protocol is paused"; } | { readonly name: "CannotExpire"; readonly code: 28673; readonly message: "Cannot expire market"; } | { readonly name: "InvalidRedemption"; readonly code: 28674; readonly message: "Cannot redeem tokens that are not winning"; } | { readonly name: "InvalidMint"; readonly code: 28675; readonly message: "Token account mint does not match expected mint"; } | { readonly name: "SolvencyInvariantViolated"; readonly code: 28676; readonly message: "Runtime solvency invariant violated after share or fee mutation"; } | { readonly name: "InvalidSettlementMintDecimals"; readonly code: 28677; readonly message: "Settlement mint decimals must be between 6 and 9"; } | { readonly name: "CollateralMirrorInconsistent"; readonly code: 28678; readonly message: "Collateral mirror is inconsistent with locked collateral in terminal redemption"; } | { readonly name: "InvalidFeeCurve"; readonly code: 32769; readonly message: "Fee curve parameters out of bounds"; } | { readonly name: "InvalidFeeSplit"; readonly code: 32770; readonly message: "Fee split shares do not sum to 10000 bps"; } | { readonly name: "ReferrerAlreadySet"; readonly code: 32771; readonly message: "Referee already has a referrer set"; } | { readonly name: "SelfReferralForbidden"; readonly code: 32772; readonly message: "Self-referral is forbidden"; } | { readonly name: "ReferrerTreasuryMismatch"; readonly code: 32773; readonly message: "Referrer treasury PDA mismatch"; } | { readonly name: "AccumulatedAmountZero"; readonly code: 32774; readonly message: "Claim attempted with zero accumulated balance"; } | { readonly name: "FeeConfigRateLimit"; readonly code: 32775; readonly message: "Fee-governance update called within rate-limit window"; } | { readonly name: "TreasuryIndexOutOfRange"; readonly code: 32776; readonly message: "Treasury index is out of range (>= MAX_TREASURY_RECIPIENTS)"; } | { readonly name: "TreasuryRecipientMismatch"; readonly code: 32777; readonly message: "Treasury token account does not match config.treasury_recipients[index]"; } | { readonly name: "InvalidTreasuryRecipient"; readonly code: 32778; readonly message: "Treasury recipient pubkey is zero (unset sentinel)"; } | { readonly name: "DuplicateTreasuryRecipient"; readonly code: 32779; readonly message: "Treasury recipients array contains a duplicate pubkey"; } | { readonly name: "TreasuryUpdateRateLimit"; readonly code: 32780; readonly message: "UpdateTreasuryRecipients called within rate-limit window"; } | { readonly name: "OperationalParamsRateLimit"; readonly code: 32781; readonly message: "UpdateOperationalParams called within rate-limit window"; } | { readonly name: "MicrostructureRateLimit"; readonly code: 32782; readonly message: "Market microstructure update called within rate-limit window"; } | { readonly name: "ReferralCacheMismatch"; readonly code: 32783; readonly message: "Referral binding does not match the immutable position cache"; } | { readonly name: "InvalidReferralRollupBatch"; readonly code: 32784; readonly message: "Referral rollup batch is invalid"; } | { readonly name: "ReferralFeesPending"; readonly code: 32785; readonly message: "Unswept referral fees are still pending"; } | { readonly name: "ReferralLiabilityMismatch"; readonly code: 32786; readonly message: "Market and position referral liabilities do not match"; } | { readonly name: "InvalidSplineConfig"; readonly code: 32787; readonly message: "Spline configuration is invalid"; } | { readonly name: "InstructionNotYetEnabled"; readonly code: 32788; readonly message: "Instruction is not yet enabled"; } | { readonly name: "InvalidSplineShape"; readonly code: 32789; readonly message: "Spline shape is invalid"; } | { readonly name: "UnauthorizedSplineMaker"; readonly code: 32790; readonly message: "Caller is not the spline maker"; } | { readonly name: "StaleSequence"; readonly code: 32791; readonly message: "Spline update sequence is stale"; } | { readonly name: "InvalidMidPrice"; readonly code: 32792; readonly message: "Spline midpoint is invalid"; } | { readonly name: "InvalidSplineSeries"; readonly code: 32793; readonly message: "Spline and market series do not match"; } | { readonly name: "InsufficientSplineCommitment"; readonly code: 32794; readonly message: "Spline commitment is below the required floor"; } | { readonly name: "SplineGenerationMismatch"; readonly code: 32795; readonly message: "Spline quote targets a different shape generation"; } | { readonly name: "InvalidSplineQuoteOrigin"; readonly code: 32796; readonly message: "Spline quote origin time is invalid or stale"; } | { readonly name: "MissingSplineAccounts"; readonly code: 32797; readonly message: "Required canonical spline account segment is missing"; } | { readonly name: "MakerRebateShareTooHigh"; readonly code: 32798; readonly message: "Maker rebate share exceeds the 4,000-bps hard cap"; } | { readonly name: "MakerRebateRestBoundTooHigh"; readonly code: 32799; readonly message: "Maker rebate minimum resting age exceeds 3,600 seconds"; } | { readonly name: "SeatsStillAttached"; readonly code: 32800; readonly message: "Attached spline seats must leave before close"; } | { readonly name: "OrderIdExhausted"; readonly code: 32801; readonly message: "Opaque order ID space is exhausted"; } | { readonly name: "RestingNotionalTooSmall"; readonly code: 32802; readonly message: "Reduced resting remainder is below config.min_resting_notional"; } | { readonly name: "SplineCommitmentUnderflow"; readonly code: 32803; readonly message: "Spline commitment debit exceeds tracked commitment"; } | { readonly name: "InvalidSequenceAnchor"; readonly code: 32804; readonly message: "Quote sequence anchor is invalid"; } | { readonly name: "AuthorityEpochMismatch"; readonly code: 32805; readonly message: "Quote authority epoch does not match"; } | { readonly name: "QuoteSessionExpired"; readonly code: 32806; readonly message: "Quote delegate session has expired"; } | { readonly name: "InvalidQuoteValidityWindow"; readonly code: 32807; readonly message: "Quote validity profile or slot window is invalid"; } | { readonly name: "SplineReaderWritable"; readonly code: 32808; readonly message: "Spline publication reader account is writable"; } | { readonly name: "QuoteProfileDowngrade"; readonly code: 32809; readonly message: "Quote delegate cannot weaken the validity profile"; } | { readonly name: "SelfBuilderForbidden"; readonly code: 32810; readonly message: "Builder must differ from the trader and be non-zero"; } | { readonly name: "BuilderApprovalMismatch"; readonly code: 32811; readonly message: "Builder approval PDA, trader, owner, or layout does not match"; } | { readonly name: "BuilderApprovalExpired"; readonly code: 32812; readonly message: "Builder approval has expired"; } | { readonly name: "BuilderApprovalNotYetActive"; readonly code: 32813; readonly message: "Builder approval cannot be used in the slot that created it"; } | { readonly name: "BuilderTokenAccountMismatch"; readonly code: 32814; readonly message: "Builder token account mint, owner, state, or distinctness is invalid"; } | { readonly name: "InvalidBuilderShare"; readonly code: 32815; readonly message: "Builder approval max_builder_bps must be 1..=10_000"; } | { readonly name: "ClientOrderIdNotFound"; readonly code: 32816; readonly message: "Client order identifier not found for this owner"; } | { readonly name: "CancelSessionMismatch"; readonly code: 32817; readonly message: "Cancellation session does not match the requested nonce"; } | { readonly name: "CancelSessionActive"; readonly code: 32818; readonly message: "Another principal owns the active cancellation session"; } | { readonly name: "SeatBelowLiquidityFloor"; readonly code: 32819; readonly message: "Spline seat is below the liquidity floor"; } | { readonly name: "SeatStalenessOff"; readonly code: 32820; readonly message: "Spline seat quote age must be nonzero"; } | { readonly name: "SeatCapReached"; readonly code: 32821; readonly message: "Market active spline seat cap reached"; } | { readonly name: "SeatMissTooSoon"; readonly code: 32822; readonly message: "Spline seat floor miss sampled too soon"; } | { readonly name: "SeatMissesBelowThreshold"; readonly code: 32823; readonly message: "Spline seat misses are below the dormancy threshold"; } | { readonly name: "SeatMeetsFloor"; readonly code: 32824; readonly message: "Spline seat meets the liquidity floor"; } | { readonly name: "DuplicateSeat"; readonly code: 32825; readonly message: "Duplicate spline seat in the seat vector"; } | { readonly name: "SeatSeriesMismatch"; readonly code: 32826; readonly message: "Spline seat belongs to another series"; } | { readonly name: "SubscriptionDisabled"; readonly code: 32827; readonly message: "Series subscription is disabled"; } | { readonly name: "SubscriptionSpacing"; readonly code: 32828; readonly message: "Market is inside the series spacing interval"; } | { readonly name: "SubscriptionMarketTooOld"; readonly code: 32829; readonly message: "Market is too old for the series crank"; } | { readonly name: "SubscriptionMarketParamsRejected"; readonly code: 32830; readonly message: "Market parameters are outside the series ranges"; } | { readonly name: "SubscriptionExternalMarket"; readonly code: 32831; readonly message: "Series crank rejects external markets"; } | { readonly name: "SubscriptionConcurrencyReached"; readonly code: 32832; readonly message: "Series concurrent seat limit reached"; } | { readonly name: "SeriesLamportBudgetInsufficient"; readonly code: 32833; readonly message: "Series lamport budget is insufficient"; } | { readonly name: "BalanceBoundViolated"; readonly code: 32834; readonly message: "A balance is below its asserted lower bound"; } | { readonly name: "OrderbookNeedsReclaim"; readonly code: 32835; readonly message: "Order book lane needs reclaim before matching"; } | { readonly name: "ManagedOrderUseBatchReclaim"; readonly code: 32836; readonly message: "Use batch reclaim for managed orders"; } | { readonly name: "NoPendingAuthority"; readonly code: 36865; readonly message: "ClaimAuthority: no authority rotation is pending"; } | { readonly name: "UnauthorizedClaim"; readonly code: 36866; readonly message: "ClaimAuthority: signer is not the pending authority"; } | { readonly name: "EmergencyDelayNotElapsed"; readonly code: 36867; readonly message: "ForceCancelMarketOrders: emergency delay has not elapsed"; } | { readonly name: "UnauthorizedPauser"; readonly code: 36868; readonly message: "Signer is neither config.authority nor configured nonzero config.pauser"; } | { readonly name: "WrongResolver"; readonly code: 40961; readonly message: "Signer does not match the market resolver authority"; } | { readonly name: "UnsupportedMarketKind"; readonly code: 40962; readonly message: "Market kind or leg count is unsupported"; } | { readonly name: "MarketHalted"; readonly code: 40963; readonly message: "Market is halted for new order placement"; } | { readonly name: "ExternalMarketInvalid"; readonly code: 40964; readonly message: "External market configuration is invalid"; } | { readonly name: "InvalidPayoutNumerators"; readonly code: 40965; readonly message: "Payout numerators are invalid"; } | { readonly name: "MarketMetaMismatch"; readonly code: 40966; readonly message: "Market metadata does not match the market"; } | { readonly name: "PreallocationReceiptMismatch"; readonly code: 40967; readonly message: "Preallocation receipt does not match its immutable commitment"; } | { readonly name: "PreallocationReceiptNotActive"; readonly code: 40968; readonly message: "Preallocation receipt is not active"; } | { readonly name: "PreallocationReclaimTooEarly"; readonly code: 40969; readonly message: "Preallocation reclaim is not yet permissionless"; } | { readonly name: "PreallocationTargetMismatch"; readonly code: 40970; readonly message: "Preallocation target size or capacity does not match"; } | { readonly name: "PreallocationDataNotZero"; readonly code: 40971; readonly message: "Preallocation child data is not zero"; } | { readonly name: "PreallocationMarketExists"; readonly code: 40972; readonly message: "Market or metadata already exists"; } | { readonly name: "ExternalCloseTimeOutOfRange"; readonly code: 40973; readonly message: "External market close time is outside the supported horizon"; } | { readonly name: "ExternalExpiryDeadlineOverflow"; readonly code: 40974; readonly message: "External market expiry deadline cannot be represented"; } | { readonly name: "EconomicAccountVersionMismatch"; readonly code: 40975; readonly message: "Economic account version does not match"; } | { readonly name: "EconomicDeltaOverflow"; readonly code: 40976; readonly message: "Economic accounting delta overflowed"; } | { readonly name: "NativeResolutionPolicyMismatch"; readonly code: 40977; readonly message: "Native resolution policy does not match"; } | { readonly name: "NativeResolutionReasonInvalid"; readonly code: 40978; readonly message: "Native resolution reason is invalid"; } | { readonly name: "SourceClaimBindingMismatch"; readonly code: 49153; readonly message: "Source claim bindings do not match"; } | { readonly name: "SourceInvalidTransition"; readonly code: 49154; readonly message: "Source-market transition is invalid"; } | { readonly name: "SourceImmutableBindingMismatch"; readonly code: 49155; readonly message: "Source immutable binding mismatch"; } | { readonly name: "SourceInvalidDefinition"; readonly code: 49156; readonly message: "Invalid source definition"; } | { readonly name: "SourceManualResolutionForbidden"; readonly code: 49157; readonly message: "Manual source-market resolution forbidden"; } | { readonly name: "SourceWindowNotAdmitted"; readonly code: 49158; readonly message: "Source window does not admit the operation"; } | { readonly name: "SourceReviewNotElapsed"; readonly code: 49159; readonly message: "Source review window has not elapsed"; } | { readonly name: "SourceProfileDisabled"; readonly code: 49160; readonly message: "Source profile disabled"; } | { readonly name: "SourceUnsupportedProfile"; readonly code: 49161; readonly message: "Unsupported source profile"; } | { readonly name: "SourceStateRevisionChanged"; readonly code: 49162; readonly message: "Source state revision changed"; } | { readonly name: "SourcePolicyNotEffective"; readonly code: 49163; readonly message: "Source policy not yet effective"; } | { readonly name: "SourceWitnessCountMismatch"; readonly code: 49164; readonly message: "Source witness count mismatch"; } | { readonly name: "SourceMarketKindUnsupported"; readonly code: 49165; readonly message: "Source market kind unsupported"; } | { readonly name: "SourceCaptureWindowInvalid"; readonly code: 49166; readonly message: "Source capture window invalid"; } | { readonly name: "SourceCaptureStale"; readonly code: 49167; readonly message: "Source capture stale"; } | { readonly name: "SourceCaptureFromFuture"; readonly code: 49168; readonly message: "Source capture from the future"; } | { readonly name: "WitnessSlotNotAdmitted"; readonly code: 49169; readonly message: "Witness slot not admitted"; } | { readonly name: "WitnessSlotRevoked"; readonly code: 49170; readonly message: "Witness slot revoked"; } | { readonly name: "WitnessEpochMismatch"; readonly code: 49171; readonly message: "Witness epoch mismatch"; } | { readonly name: "WitnessSignatureInvalid"; readonly code: 49172; readonly message: "Witness signature invalid"; } | { readonly name: "SourceFactOutOfRange"; readonly code: 49173; readonly message: "Source fact out of range"; } | { readonly name: "SourceOperationRedundant"; readonly code: 49174; readonly message: "Source operation redundant"; } | { readonly name: "SourceDefinitionPackageMismatch"; readonly code: 49175; readonly message: "Source definition package mismatch"; } | { readonly name: "StrategyMarketNotAllowed"; readonly code: 53249; readonly message: "Market is not in the strategy's allowed markets"; } | { readonly name: "StrategyCurrencyNotAllowed"; readonly code: 53250; readonly message: "Settlement mint is not in the strategy's allowed mints"; } | { readonly name: "StrategyOrderCapitalExceeded"; readonly code: 53251; readonly message: "Order capital exceeds the strategy's per-order limit"; } | { readonly name: "StrategyCapitalBudgetExceeded"; readonly code: 53252; readonly message: "Order capital exceeds the strategy's turnover budget"; } | { readonly name: "StrategyInventoryExceeded"; readonly code: 53253; readonly message: "Order exceeds the strategy's inventory ceiling"; } | { readonly name: "StrategyFeeExceeded"; readonly code: 53254; readonly message: "Fill fee exceeds the strategy's fee limit"; } | { readonly name: "StrategySlippageExceeded"; readonly code: 53255; readonly message: "Order limit exceeds the strategy's slippage limit"; } | { readonly name: "StrategyExpired"; readonly code: 53256; readonly message: "Strategy has expired"; } | { readonly name: "StrategyActionNotAllowed"; readonly code: 53257; readonly message: "Strategy does not allow this action"; } | { readonly name: "StrategyStopped"; readonly code: 53258; readonly message: "Strategy is stopped"; } | { readonly name: "StrategyDelegateMismatch"; readonly code: 53259; readonly message: "Signer is not the strategy's delegate or owner"; } | { readonly name: "StrategyNotYetActive"; readonly code: 53260; readonly message: "Strategy is not yet active for its delegate"; } | { readonly name: "StrategyDestinationNotAllowed"; readonly code: 53261; readonly message: "Withdrawal destination is not allowed for the delegate"; } | { readonly name: "StrategyLeaseTooShort"; readonly code: 53262; readonly message: "Covered order lease leaves less than the minimum TTL"; } | { readonly name: "StrategyAccountMismatch"; readonly code: 53263; readonly message: "Strategy account does not match"; } | { readonly name: "InvalidStrategyConfig"; readonly code: 53264; readonly message: "Strategy configuration is invalid"; } | { readonly name: "ConfidentialAccountMismatch"; readonly code: 57345; readonly message: "Account is not a confidential market"; } | { readonly name: "ConfidentialInstanceNonceInvalid"; readonly code: 57346; readonly message: "Confidential market nonce is all zero"; } | { readonly name: "ConfidentialProfileInactive"; readonly code: 57347; readonly message: "Confidential profile is unknown or inactive"; } | { readonly name: "ConfidentialPolicyInvalid"; readonly code: 57348; readonly message: "Confidential policy is invalid"; } | { readonly name: "ConfidentialCreationProofUnavailable"; readonly code: 57349; readonly message: "Confidential creation proof is unavailable"; } | { readonly name: "ConfidentialAdapterNotAdmitted"; readonly code: 57350; readonly message: "Confidential terminal adapter is not admitted"; } | { readonly name: "ConfidentialTerminalAlreadyRecorded"; readonly code: 57351; readonly message: "Confidential terminal is already recorded"; } | { readonly name: "ConfidentialTerminalWindowOpen"; readonly code: 57352; readonly message: "Confidential terminal window is still open"; } | { readonly name: "ConfidentialTerminalEvidenceRejected"; readonly code: 57353; readonly message: "Confidential terminal evidence was rejected"; } | undefined
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfidentialMarketAccount</summary>decodeConfidentialMarketAccount#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:131.
export function decodeConfidentialMarketAccount(data: Uint8Array): ConfidentialMarketAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ConfidentialMarketAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfidentialMarketCreated</summary>decodeConfidentialMarketCreated#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:343.
export function decodeConfidentialMarketCreated(data: Uint8Array): ConfidentialMarketCreated;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ConfidentialMarketCreated
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfidentialMarketPolicy</summary>decodeConfidentialMarketPolicy#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:214.
export function decodeConfidentialMarketPolicy(data: Uint8Array): ConfidentialMarketPolicy;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ConfidentialMarketPolicy
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfidentialNativeDefinition</summary>decodeConfidentialNativeDefinition#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:298.
export function decodeConfidentialNativeDefinition(data: Uint8Array): ConfidentialNativeDefinition;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ConfidentialNativeDefinition
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfidentialTerminalRecorded</summary>decodeConfidentialTerminalRecorded#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:366.
export function decodeConfidentialTerminalRecorded(data: Uint8Array): ConfidentialTerminalRecorded;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ConfidentialTerminalRecorded
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeConfigAccount</summary>decodeConfigAccount#
Decode a ConfigAccount from raw account data.
The historical config is 576 bytes. The 616-byte seat config adds a tail and stores the taker coefficient at offset 412.
Declaration source: packages/core/src/generated/program/accounts.ts:227.
export function decodeConfigAccount(data: Uint8Array): ConfigAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ConfigAccount
Not documented.
Throws
if discriminator doesn't match or data is too short.
</details> <details> <summary>decodeConfigHeader</summary>decodeConfigHeader#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:163.
export function decodeConfigHeader(data: Uint8Array): { rawVersion: bigint; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ rawVersion: bigint; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeCreateConfidentialMarketData</summary>decodeCreateConfidentialMarketData#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:396.
export function decodeCreateConfidentialMarketData(data: Uint8Array): CreateConfidentialMarketData;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
CreateConfidentialMarketData
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeCurrencyFreezeException</summary>decodeCurrencyFreezeException#
Decode the exact version-one freeze-exception layout, or null if invalid.
Declaration source: packages/core/src/currency/freezeException.ts:45.
export function decodeCurrencyFreezeException(data: Uint8Array): CurrencyFreezeException | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
CurrencyFreezeException | null
Not documented.
Throws
Not documented.
</details> <details> <summary>DecodedBuilderApprovalAccount</summary>DecodedBuilderApprovalAccount#
Decoded BuilderApprovalAccount (96 bytes).
Declaration source: packages/core/src/builder.ts:201.
export interface DecodedBuilderApprovalAccount extends BuilderApprovalFields {
bump: number;
version: number;
}
Field documentation
expiresAt— 0 = no expiry.
decodeDeepOrderbookAccount#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:1711.
export function decodeDeepOrderbookAccount(data: Uint8Array): OrderbookAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
OrderbookAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>DecodedReferralAccount</summary>DecodedReferralAccount#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:74.
export interface DecodedReferralAccount {
referee: Address;
referrer: Address;
createdAt: bigint;
expiresAt: bigint;
totalEarned: bigint;
bump: number;
}
DecodedStopLossNonceAccount#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:172.
export interface DecodedStopLossNonceAccount {
readonly authority: Address;
/** The durable nonce: the value a transaction uses as its "recent blockhash". */
readonly nonce: string;
readonly lamportsPerSignature: bigint;
}
Field documentation
nonce— The durable nonce: the value a transaction uses as its "recent blockhash".
decodeMakerQuoteReplacementResult#
Decode the replacement's versionless return data using the count in the signed payload.
Declaration source: packages/core/src/makerQuoteInstructions.ts:529.
export function decodeMakerQuoteReplacementResult(data: Uint8Array, desiredCount: number): ManagedQuoteReplacementResult;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.desiredCount: number— Not documented.
Returns
ManagedQuoteReplacementResult
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeMakerQuoteState</summary>decodeMakerQuoteState#
Decode the account frame. Verify the owning program and canonical PDA when reading RPC data.
Declaration source: packages/core/src/makerQuoteState.ts:41.
export function decodeMakerQuoteState(data: Uint8Array): MakerQuoteState | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
MakerQuoteState | null
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeMakerSeriesAccount</summary>decodeMakerSeriesAccount#
Decode the fixed v1 maker series. Verify the program owner and PDA at the RPC boundary.
Declaration source: packages/core/src/generated/program/accounts.ts:781.
export function decodeMakerSeriesAccount(data: Uint8Array): { bidLevels: CurveLevel[]; askLevels: CurveLevel[]; version: 1; bump: number; vaultBump: number; maker: Address; defaultQuoteAuthority: Address; feedId: Uint8Array<ArrayBuffer>; currencyRecord: Address; durationSeconds: bigint; defaultCommitAmount: bigint; maxQuoteAgeSeconds: number; templateMidBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachActive: boolean; activeSeats: number; maxConcurrentSeats: number; lifetimeSeats: bigint; eventSequence: bigint; autoAttachEnabled: boolean; acceptConfidenceGuardOff: boolean; perMarketCommitment: bigint; minSpacingSeconds: bigint; lastAutoCreatedAt: bigint; rewardCapLamports: bigint; rewardRampSeconds: number; attachMaxAgeSeconds: number; minConfidenceRatioBps: number; maxConfidenceRatioBps: number; minOracleJumpBps: number; maxOracleJumpBps: number; minTotalShares: bigint; maxTotalShares: bigint; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ bidLevels: CurveLevel[]; askLevels: CurveLevel[]; version: 1; bump: number; vaultBump: number; maker: Address; defaultQuoteAuthority: Address; feedId: Uint8Array<ArrayBuffer>; currencyRecord: Address; durationSeconds: bigint; defaultCommitAmount: bigint; maxQuoteAgeSeconds: number; templateMidBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachActive: boolean; activeSeats: number; maxConcurrentSeats: number; lifetimeSeats: bigint; eventSequence: bigint; autoAttachEnabled: boolean; acceptConfidenceGuardOff: boolean; perMarketCommitment: bigint; minSpacingSeconds: bigint; lastAutoCreatedAt: bigint; rewardCapLamports: bigint; rewardRampSeconds: number; attachMaxAgeSeconds: number; minConfidenceRatioBps: number; maxConfidenceRatioBps: number; minOracleJumpBps: number; maxOracleJumpBps: number; minTotalShares: bigint; maxTotalShares: bigint; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeMarketAccount</summary>decodeMarketAccount#
Decode a MarketAccount from raw account data.
Performs a version/discriminator check before decoding to ensure the data belongs to a valid MarketAccount. This prevents silent misinterpretation of data from different account types or corrupted accounts.
Declaration source: packages/core/src/generated/program/accounts.ts:336.
export function decodeMarketAccount(data: Uint8Array): MarketAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
MarketAccount
Not documented.
Throws
if discriminator doesn't match or data is too short.
</details> <details> <summary>decodeMarketMetaAccount</summary>decodeMarketMetaAccount#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:476.
export function decodeMarketMetaAccount(data: Uint8Array): MarketMetaAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
MarketMetaAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeMarketTickV1</summary>decodeMarketTickV1#
Decode only the exact byte layout, without asserting account identity or trust.
Declaration source: packages/core/src/marketTick.ts:78.
export function decodeMarketTickV1(data: Uint8Array): MarketTickV1 | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
MarketTickV1 | null
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeMintDecimals</summary>decodeMintDecimals#
Decimals from raw initialized SPL mint data; null if not an initialized mint. Does not validate the account owner — callers must check it is an SPL Token program.
Declaration source: packages/core/src/currency/mint.ts:12.
export function decodeMintDecimals(data: Uint8Array): number | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>decodePackedU64</summary>decodePackedU64#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:148.
export function decodePackedU64(data: Uint8Array, offset: number): bigint;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.offset: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>decodePositionAccount</summary>decodePositionAccount#
Decode a UserPositionAccount from raw account data.
Declaration source: packages/core/src/generated/program/accounts.ts:1803.
export function decodePositionAccount(data: Uint8Array): UserPositionAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
UserPositionAccount
Not documented.
Throws
if discriminator doesn't match or data is not exactly 256 bytes.
</details> <details> <summary>decodePreallocationReceiptAccount</summary>decodePreallocationReceiptAccount#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:610.
export function decodePreallocationReceiptAccount(data: Uint8Array): PreallocationReceiptAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
PreallocationReceiptAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeRecordConfidentialTerminalData</summary>decodeRecordConfidentialTerminalData#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:419.
export function decodeRecordConfidentialTerminalData(data: Uint8Array): RecordConfidentialTerminalData;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
RecordConfidentialTerminalData
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeRedeemProgress</summary>decodeRedeemProgress#
Decode and authenticate the exact [processed:u16 LE, has_more:u8] result.
Declaration source: packages/core/src/resumableRedeem.ts:168.
export function decodeRedeemProgress(returnData: RedeemReturnData | undefined, expectedProgramAddress: Address): RedeemProgress;
Parameters
returnData: RedeemReturnData | undefined— Not documented. See RedeemReturnData for its declaration and available field documentation.expectedProgramAddress: Address— Not documented.
Returns
RedeemProgress
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeReferralAccountStrict</summary>decodeReferralAccountStrict#
Strict, fail-closed decoder for the immutable referral binding account.
Declaration source: packages/core/src/generated/program/accounts.ts:2004.
export function decodeReferralAccountStrict(data: Uint8Array): DecodedReferralAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
DecodedReferralAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeSeesawBinaryEventBatch</summary>decodeSeesawBinaryEventBatch#
Not documented.
Declaration source: packages/core/src/events.ts:1054.
export function decodeSeesawBinaryEventBatch(data: Uint8Array): BinaryRecorderBatch;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
BinaryRecorderBatch
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeSplineAccount</summary>decodeSplineAccount#
Decode and validate a fixed-layout maker spline account.
Declaration source: packages/core/src/generated/program/accounts.ts:988.
export function decodeSplineAccount(data: Uint8Array): SplineAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
SplineAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeSplineSeatAccount</summary>decodeSplineSeatAccount#
Decode the fixed v1 spline seat, including both rounding epochs and the tick window.
Declaration source: packages/core/src/generated/program/accounts.ts:862.
export function decodeSplineSeatAccount(data: Uint8Array): { roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: CurveLevel[]; askLevels: CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: CurveLevel[]; askLevels: CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeStopLossNonceAccount</summary>decodeStopLossNonceAccount#
Decode an initialized nonce account, or null when it is not one.
Declaration source: packages/core/src/stopLoss/nonce.ts:180.
export function decodeStopLossNonceAccount(data: Uint8Array): DecodedStopLossNonceAccount | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
DecodedStopLossNonceAccount | null
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeStrategyAccount</summary>decodeStrategyAccount#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:281.
export function decodeStrategyAccount(data: Uint8Array): { bump: number; owner: Address<string>; strategyId: number; delegate: Address<string> | null; status: "active" | "stopped"; createdSlot: bigint; expiresAt: bigint; allowedActions: number; allowedMarkets: Address<string>[]; allowedMints: Address<string>[]; maxOrderQuoteAtoms: bigint; capitalBudgetAtoms: bigint; capitalUsedAtoms: bigint; capitalEpoch: number; maxPositionShares: bigint; maxFeeBps: number; maxSlippageBps: number; maxCoveredOrderTtlSeconds: number; withdrawDestinations: Address<string>[]; configGeneration: number; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ bump: number; owner: Address<string>; strategyId: number; delegate: Address<string> | null; status: "active" | "stopped"; createdSlot: bigint; expiresAt: bigint; allowedActions: number; allowedMarkets: Address<string>[]; allowedMints: Address<string>[]; maxOrderQuoteAtoms: bigint; capitalBudgetAtoms: bigint; capitalUsedAtoms: bigint; capitalEpoch: number; maxPositionShares: bigint; maxFeeBps: number; maxSlippageBps: number; maxCoveredOrderTtlSeconds: number; withdrawDestinations: Address<string>[]; configGeneration: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeTraderLedgerAccount</summary>decodeTraderLedgerAccount#
Decode a TraderLedgerAccount. Byte layout mirrors the on-chain program and
seesaw_sdk::codecs::decode_trader_ledger (64-byte header, two 1,064-byte
bitmaps, capacity seats of 144 bytes). Validates discriminator, reserved padding, per-slot occupied
flag, and that the stored occupied_count matches the actual occupied slots.
Declaration source: packages/core/src/generated/program/accounts.ts:1917.
export function decodeTraderLedgerAccount(data: Uint8Array): TraderLedgerAccount;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
TraderLedgerAccount
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeTraderLedgerHeader</summary>decodeTraderLedgerHeader#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:167.
export function decodeTraderLedgerHeader(data: Uint8Array): { capacity: number; ownerRoot: number; occupiedCount: number; version: number; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ capacity: number; ownerRoot: number; occupiedCount: number; version: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeTraderLedgerHeaderStrict</summary>decodeTraderLedgerHeaderStrict#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:2025.
export function decodeTraderLedgerHeaderStrict(data: Uint8Array): { market: Address; capacity: number; ownerRoot: number; occupiedCount: number; bump: number; version: number; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
{ market: Address; capacity: number; ownerRoot: number; occupiedCount: number; bump: number; version: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>decodeTraderLedgerSlot</summary>decodeTraderLedgerSlot#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:189.
export function decodeTraderLedgerSlot(data: Uint8Array, offset: number): { quoteFree: bigint; yesFree: bigint; noFree: bigint; occupied: boolean; };
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.offset: number— Not documented.
Returns
{ quoteFree: bigint; yesFree: bigint; noFree: bigint; occupied: boolean; }
Not documented.
Throws
Not documented.
</details> <details> <summary>dedupeTrustlessProjectionEvents</summary>dedupeTrustlessProjectionEvents#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:151.
export function dedupeTrustlessProjectionEvents(events: readonly TrustlessProjectionEvent[]): TrustlessProjectionEvent[];
Parameters
events: readonly TrustlessProjectionEvent[]— Not documented.
Returns
TrustlessProjectionEvent[]
Not documented.
Throws
Not documented.
</details> <details> <summary>DEEP_ORDERBOOK_ACCOUNT_DISCRIMINATOR</summary>DEEP_ORDERBOOK_ACCOUNT_DISCRIMINATOR#
Deep RBT OrderbookAccount discriminator: DEEPBOOK.
Declaration source: packages/core/src/constants.ts:207.
export declare const DEEP_ORDERBOOK_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
DEEP_ORDERBOOK_ACCOUNT_SIZE#
D0{byte} Exact deep-orderbook account length: 128-byte header + two arenas.
Declaration source: packages/core/src/constants.ts:356.
export declare const DEEP_ORDERBOOK_ACCOUNT_SIZE: number;
DEEP_ORDERBOOK_ACCOUNT_VERSION#
Not documented.
Declaration source: packages/core/src/constants.ts:342.
export declare const DEEP_ORDERBOOK_ACCOUNT_VERSION: 2;
DEEP_ORDERBOOK_HEADER_SIZE#
Not documented.
Declaration source: packages/core/src/constants.ts:343.
export declare const DEEP_ORDERBOOK_HEADER_SIZE: 128;
DEEP_ORDERBOOK_NIL#
Not documented.
Declaration source: packages/core/src/constants.ts:346.
export declare const DEEP_ORDERBOOK_NIL: 4294967295;
DEEP_ORDERBOOK_NODE_SIZE#
Not documented.
Declaration source: packages/core/src/constants.ts:345.
export declare const DEEP_ORDERBOOK_NODE_SIZE: 32;
DEEP_ORDERBOOK_SIDE_HEADER_SIZE#
Not documented.
Declaration source: packages/core/src/constants.ts:344.
export declare const DEEP_ORDERBOOK_SIDE_HEADER_SIZE: 32;
DEFAULT_BUILDER_SHARE_BPS#
D4{bps_of_fee} Launch builder share, FeeSplit5::TARGET.builder_bps.
Declaration source: packages/core/src/constants.ts:458.
export declare const DEFAULT_BUILDER_SHARE_BPS: 500;
DEFAULT_DEPTH_BAND_OFFSETS_BPS#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:126.
export declare const DEFAULT_DEPTH_BAND_OFFSETS_BPS: readonly number[];
DEFAULT_FEE_CURVE_RATES#
Calculator inputs for the shipped coefficient, before the live config loads.
Declaration source: packages/core/src/fee.ts:259.
export declare const DEFAULT_FEE_CURVE_RATES: Readonly<{ capBps: number; decayRateBps: number; }>;
DEFAULT_FEE_SPLIT#
Mirrors FeeSplit5::TARGET in program/src/logic/fee.rs — the tuple every
ConfigAccount ships with: 45 % protocol, 5 % creator, 5 % referral, 5 %
builder, 40 % maker (builder-fee ruling 2026-10-27; F-01 funds the builder
leg from the protocol leg, so the trader's total fee is unchanged).
Declaration source: packages/core/src/fee.ts:77.
export declare const DEFAULT_FEE_SPLIT: FeeSplit;
DEFAULT_MARKET_DURATION_SECONDS#
D0{s} On-chain fallback when a stored market duration is zero.
Declaration source: packages/core/src/constants.ts:364.
export declare const DEFAULT_MARKET_DURATION_SECONDS: 900n;
DEFAULT_MAX_SCENARIOS#
Default cap on enumerated outcome assignments (six markets).
Declaration source: packages/core/src/analytics/scenario.ts:24.
export declare const DEFAULT_MAX_SCENARIOS: 64;
DEFAULT_MAX_TERMINAL_ATTEMPTS#
Terminal records kept for audit; blocking records are never pruned.
Declaration source: packages/core/src/transactionAttempt.ts:43.
export declare const DEFAULT_MAX_TERMINAL_ATTEMPTS: 200;
DEFAULT_NATIVE_PREFIX_INSTRUCTIONS#
The compute-budget pair a sender typically prepends (unit limit + unit price). Values do not change their encoded size.
Declaration source: packages/core/src/transactionPlan.ts:63.
export declare const DEFAULT_NATIVE_PREFIX_INSTRUCTIONS: readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[];
DEFAULT_POSITION_SNAPSHOT_MAX_PAGES#
Not documented.
Declaration source: packages/core/src/api/positionSnapshot.ts:108.
export declare const DEFAULT_POSITION_SNAPSHOT_MAX_PAGES: 50;
DEFAULT_POSITION_SNAPSHOT_MAX_RESTARTS#
Not documented.
Declaration source: packages/core/src/api/positionSnapshot.ts:109.
export declare const DEFAULT_POSITION_SNAPSHOT_MAX_RESTARTS: 2;
DEFAULT_PRICE_GUARD_BPS#
Default price guard: up to 2¢ worse than the best price.
Declaration source: packages/core/src/ux/fillPreview.ts:38.
export declare const DEFAULT_PRICE_GUARD_BPS: 200;
DEFAULT_RECORDING_MAX_TRANSACTIONS#
Not documented.
Declaration source: packages/core/src/replay/recordFromRpc.ts:49.
export declare const DEFAULT_RECORDING_MAX_TRANSACTIONS: 10000;
DEFAULT_SWITCHES#
The Rust Default (conservative choices, not a claim about any provider).
Declaration source: packages/core/src/execution/standins.ts:65.
export declare const DEFAULT_SWITCHES: Switches;
DEFAULT_TAKER_FEE_COEFFICIENT_BPS#
Shipped taker fee coefficient: 2.00% at a 0.50 fill, 3.60% at 0.10.
Mirrors DEFAULT_TAKER_FEE_COEFFICIENT_BPS in
program/src/logic/fee/taker_fee.rs — the coefficient ConfigAccount::new
writes on chain. Clients quote it before the live config has loaded, so it
must track the Rust constant.
Declaration source: packages/core/src/fee.ts:52.
export declare const DEFAULT_TAKER_FEE_COEFFICIENT_BPS: 400;
defaultStopLossLevels#
Suggested trigger and floor: 10¢ under the current bid, floor 10¢ under the
trigger (never under 1¢). With no bid there is no anchor, so the caller gets
null and must ask the user.
Declaration source: packages/core/src/stopLoss/trigger.ts:144.
export function defaultStopLossLevels(currentBidBps: number | null): { triggerBps: number; floorBps: number; } | null;
Parameters
currentBidBps: number | null— Not documented.
Returns
{ triggerBps: number; floorBps: number; } | null
Not documented.
Throws
Not documented.
</details> <details> <summary>deletePriceAlert</summary>deletePriceAlert#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:198.
export function deletePriceAlert(client: ApiClient, signer: WalletMessageSigner, alertId: string, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<void>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.alertId: string— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>DELIVERY_ERROR_CONTENT</summary>DELIVERY_ERROR_CONTENT#
The serde content key of DeliveryError.
Declaration source: packages/core/src/execution/delivery.ts:69.
export declare const DELIVERY_ERROR_CONTENT: "detail";
DELIVERY_ERROR_KINDS#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:60.
export declare const DELIVERY_ERROR_KINDS: readonly ["not_configured", "unavailable", "not_enrolled", "envelope", "transport"];
DELIVERY_ID_VALUES#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:29.
export declare const DELIVERY_ID_VALUES: readonly ["ordinary", "bam_mpp", "harmonic"];
DeliveryError#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:71.
export type DeliveryError =
| { readonly kind: Exclude<DeliveryErrorKind, 'envelope' | 'transport'> }
| { readonly kind: 'envelope'; readonly detail: EnvelopeError }
| { readonly kind: 'transport'; readonly detail: string };
DeliveryErrorKind#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:67.
export type DeliveryErrorKind = (typeof DELIVERY_ERROR_KINDS)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
DeliveryId#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:30.
export type DeliveryId = (typeof DELIVERY_ID_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
depositFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:2666.
export function depositFunds(input: DepositOrWithdrawFundsInput, programAddress?: Address): Promise<SdkResult<DepositOrWithdrawFundsResult>>;
Parameters
input: DepositOrWithdrawFundsInput— Not documented. See DepositOrWithdrawFundsInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<DepositOrWithdrawFundsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
DepositFundsIntent#
Everything DepositFunds needs.
Declaration source: packages/core/src/preflight/types.ts:406.
export interface DepositFundsIntent {
/** Settlement units to move into the vault and credit to `quote_free`. */
amount: bigint;
nowUnix: number;
/** Settlement-mint balance available to the trader, base units. */
walletSettlementUnits: bigint;
}
Field documentation
amount— Settlement units to move into the vault and credit toquote_free.walletSettlementUnits— Settlement-mint balance available to the trader, base units.
depositFundsVerdict#
Decide whether the program would accept this DepositFunds.
Moves settlement units into the market vault and credits the trader-ledger
quote_free bucket by the same amount.
Declaration source: packages/core/src/preflight/funding.ts:288.
export function depositFundsVerdict(config: ConfigSnapshot, market: MarketSnapshot, ledger: LedgerSnapshot, intent: DepositFundsIntent, options?: PreflightOptions): Verdict;
Parameters
config: ConfigSnapshot— Not documented. See ConfigSnapshot for its declaration and available field documentation.market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.ledger: LedgerSnapshot— Not documented. See LedgerSnapshot for its declaration and available field documentation.intent: DepositFundsIntent— Not documented. See DepositFundsIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>DepositOrWithdrawFundsAccounts</summary>DepositOrWithdrawFundsAccounts#
Accounts for DepositFunds and WithdrawFunds. The pair shares the same
account ordering so callers can swap discriminators without re-shaping the
account list. userPosition must point at the canonical PDA for
(market, user); the on-chain processor mirrors
collateral_deposited only when the position PDA is already initialized.
Declaration source: packages/core/src/instructions.ts:3417.
export interface DepositOrWithdrawFundsAccounts extends BinaryRecorderTailAccounts {
market: Address;
traderLedger: Address;
userPosition: Address;
userStablecoinAta: Address;
vault: Address;
user: Address;
config: Address;
tokenProgram: Address;
settlementMint: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
DepositOrWithdrawFundsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2614.
export interface DepositOrWithdrawFundsInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userStablecoinAta: Address;
settlementMint: Address;
amount: bigint;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.
DepositOrWithdrawFundsParams#
Parameters for DepositFunds and WithdrawFunds.
Declaration source: packages/core/src/instructions.ts:3438.
export interface DepositOrWithdrawFundsParams {
/** D6{stablecoin} Stablecoin amount in base units. */
amount: bigint;
}
Field documentation
amount— D6{stablecoin} Stablecoin amount in base units.
DepositOrWithdrawFundsResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2633.
export interface DepositOrWithdrawFundsResult {
market: Address;
traderLedger: Address;
position: Address;
vault: Address;
}
depositSplineVault#
Not documented.
Declaration source: packages/core/src/sdk.ts:3780.
export function depositSplineVault(input: SplineVaultAmountInput, programAddress?: Address): Promise<SdkResult<{ splineVault: Address; }>>;
Parameters
input: SplineVaultAmountInput— Not documented. See SplineVaultAmountInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ splineVault: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
DepthAwareSizePreset#
Not documented.
Declaration source: packages/core/src/depth.ts:121.
export interface DepthAwareSizePreset {
readonly kind: '25' | '50' | 'max';
readonly quantity: bigint;
readonly depthAware: boolean;
readonly consumedSide: 'bid' | 'ask';
readonly impactBps: number | null;
readonly impactCents: number | null;
readonly unfilled: bigint;
}
DepthAwareSizePresets#
Not documented.
Declaration source: packages/core/src/depth.ts:131.
export interface DepthAwareSizePresets {
readonly quarter: DepthAwareSizePreset;
readonly half: DepthAwareSizePreset;
readonly max: DepthAwareSizePreset;
}
DepthBand#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:128.
export interface DepthBand {
offsetBps: number;
/** Cumulative bid size priced at or above `reference - offset` (share atoms). */
bidSize: bigint;
/** Cumulative ask size priced at or below `reference + offset` (share atoms). */
askSize: bigint;
}
Field documentation
bidSize— Cumulative bid size priced at or abovereference - offset(share atoms).askSize— Cumulative ask size priced at or belowreference + offset(share atoms).
DepthBandsView#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:136.
export interface DepthBandsView {
/**
* `mid` when both sides quote; otherwise each side is measured from its own
* best price (`touch`); `null` when the lane is empty.
*/
reference: 'mid' | 'touch' | null;
midBps: number | null;
bands: DepthBand[];
}
Field documentation
reference—midwhen both sides quote; otherwise each side is measured from its own best price (touch);nullwhen the lane is empty.
DepthPoint#
A single cumulative depth point for chart rendering.
Declaration source: packages/core/src/depth.ts:24.
export interface DepthPoint {
/** Price level in basis points [0, 10000]. */
readonly priceBps: number;
/**
* Total size resting at this price level and every level closer to the
* touch (best bid / best ask), in base units.
*/
readonly cumulativeSize: bigint;
}
Field documentation
priceBps— Price level in basis points [0, 10000].cumulativeSize— Total size resting at this price level and every level closer to the touch (best bid / best ask), in base units.
DepthProfileAxis#
Depth-chart x-axis mode (shared parameter type for the geometry helpers in
depthChart.ts): 'full' maps the entire [0, 10000] bps range onto the
viewBox; 'zoom' maps a fixed +/-800bps window centered on the mid price.
Declaration source: packages/core/src/depth.ts:39.
export type DepthProfileAxis = 'full' | 'zoom';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
deriveAssetPda#
Derive the PDA for an asset state account.
Seeds: ["seesaw", "asset", pyth_feed_id]
Declaration source: packages/core/src/pda.ts:554.
export function deriveAssetPda(pythFeedId: Uint8Array, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
pythFeedId: Uint8Array<ArrayBufferLike>— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveAssociatedTokenAddress#
Derive the wallet token account for the mint's token program.
Declaration source: packages/core/src/pda.ts:105.
export function deriveAssociatedTokenAddress(owner: Address, mint: Address, tokenProgram?: Address): Promise<Address>;
Parameters
owner: Address— Not documented.mint: Address— Not documented.tokenProgram: Address— Not documented. Default:TOKEN_PROGRAM_ADDRESS.
Returns
Promise<Address>
Not documented.
Throws
Not documented.
Defaults
tokenProgram:TOKEN_PROGRAM_ADDRESS.
deriveBuilderApprovalPda#
Derive the BuilderApproval PDA for (trader, builder).
Declaration source: packages/core/src/builder.ts:52.
export function deriveBuilderApprovalPda(trader: Address, builder: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
trader: Address— Not documented.builder: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveCanonicalPda#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:34.
export function deriveCanonicalPda(programAddress: Address, seeds: readonly Uint8Array[]): Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>;
Parameters
programAddress: Address— Not documented.seeds: readonly Uint8Array<ArrayBufferLike>[]— Not documented.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveConcentration</summary>deriveConcentration#
Not documented.
Declaration source: packages/core/src/analytics/concentration.ts:86.
export function deriveConcentration(positions: readonly PortfolioRiskPositionInput[], markets: readonly ConcentrationMarketInput[]): ConcentrationView;
Parameters
positions: readonly PortfolioRiskPositionInput[]— Not documented.markets: readonly ConcentrationMarketInput[]— Not documented.
Returns
ConcentrationView
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveConfidentialCustodyPda</summary>deriveConfidentialCustodyPda#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:482.
export function deriveConfidentialCustodyPda(programAddress: Address, market: Address): Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>;
Parameters
programAddress: Address— Not documented.market: Address— Not documented.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveConfidentialMarketPda</summary>deriveConfidentialMarketPda#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:474.
export function deriveConfidentialMarketPda(programAddress: Address, profile: number, nonce: Uint8Array): Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>;
Parameters
programAddress: Address— Not documented.profile: number— Not documented.nonce: Uint8Array<ArrayBufferLike>— Not documented.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveConfigPda</summary>deriveConfigPda#
Derive the PDA for the global config account.
Seeds: ["seesaw", "config"]
Declaration source: packages/core/src/pda.ts:95.
export function deriveConfigPda(programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveCreatorSplinePdaFromMarket#
Derive the only spline address accepted for a decoded market identity.
Declaration source: packages/core/src/pda.ts:542.
export function deriveCreatorSplinePdaFromMarket(market: Pick<MarketAccount, "pythFeedId" | "durationSeconds" | "creator">, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Pick<MarketAccount, "creator" | "durationSeconds" | "pythFeedId">— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveCurrencyFreezeExceptionPda#
Derive a freeze exception for the exact token program and mint.
Declaration source: packages/core/src/pda.ts:118.
export function deriveCurrencyFreezeExceptionPda(mint: Address, tokenProgram: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
mint: Address— Not documented.tokenProgram: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveCurrencyMetadataView#
Not documented.
Declaration source: packages/core/src/tokensXyz/display.ts:68.
export function deriveCurrencyMetadataView(row: CurrencyMetadata | null | undefined, options?: { readonly nowMs: number; readonly source?: CurrencyMetadataSource; }): CurrencyMetadataView;
Parameters
row: CurrencyMetadata | null | undefined— Not documented. See CurrencyMetadata for its declaration and available field documentation.options: { readonly nowMs: number; readonly source?: CurrencyMetadataSource; }— Not documented. Default:{ nowMs: 0 }.
Returns
CurrencyMetadataView
Not documented.
Throws
Not documented.
Defaults
options:{ nowMs: 0 }.
deriveCurrencyProtocolTreasuryPda#
Derive a per-currency protocol treasury shard (spec/IX.md §59.2).
Seeds: ["seesaw", "ccy_protocol_treasury", tokenProgram, mint, [shard]].
The seeds bind the mint and its token program, not the currency record, so an order authenticates the shard from the market binding alone.
Declaration source: packages/core/src/pda.ts:189.
export function deriveCurrencyProtocolTreasuryPda(mint: Address, treasuryIndex: number, tokenProgram?: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
mint: Address— Not documented.treasuryIndex: number— Not documented.tokenProgram: Address— Not documented. Default:TOKEN_PROGRAM_ADDRESS.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
tokenProgram:TOKEN_PROGRAM_ADDRESS.programAddress:PROGRAM_ADDRESS.
deriveCurrencyRecordPda#
Derive an immutable currency identity from its token program and mint.
Declaration source: packages/core/src/pda.ts:130.
export function deriveCurrencyRecordPda(mint: Address, tokenProgram: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
mint: Address— Not documented.tokenProgram: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveCurrencyReferralTreasuryPda#
Derive a currency-specific referral treasury shard.
Declaration source: packages/core/src/pda.ts:159.
export function deriveCurrencyReferralTreasuryPda(currencyRecord: Address, treasuryIndex: number, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
currencyRecord: Address— Not documented.treasuryIndex: number— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveCurrencyReferrerEarningsPda#
Derive one referrer's earnings account for a particular currency record.
Declaration source: packages/core/src/pda.ts:142.
export function deriveCurrencyReferrerEarningsPda(currencyRecord: Address, referrer: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
currencyRecord: Address— Not documented.referrer: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveDailyChallengeMetrics#
Derive today's (UTC calendar day) challenge-relevant metrics from a
wallet's fills. Fills outside the UTC day of now are excluded entirely.
Declaration source: packages/core/src/challenges.ts:107.
export function deriveDailyChallengeMetrics(fills: readonly ChallengeFill[], now?: Date): DailyChallengeMetrics;
Parameters
fills: readonly ChallengeFill[]— - all available fills for the connected wallet (recent trade history; does not need to be lifetime-complete).now: Date— - injection point for deterministic testing; defaults to the real current time. Default:new Date().
Returns
DailyChallengeMetrics
Not documented.
Throws
Not documented.
Defaults
now:new Date().
deriveDepthBands#
Cumulative depth within fixed price offsets, from {@link cumulativeDepth}.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:159.
export function deriveDepthBands(book: AnalyticsBook, offsetsBps?: readonly number[]): DepthBandsView;
Parameters
book: AnalyticsBook— Not documented. See AnalyticsBook for its declaration and available field documentation.offsetsBps: readonly number[]— Not documented. Default:DEFAULT_DEPTH_BAND_OFFSETS_BPS.
Returns
DepthBandsView
Not documented.
Throws
Not documented.
Defaults
offsetsBps:DEFAULT_DEPTH_BAND_OFFSETS_BPS.
deriveExternalMarketPda#
Not documented.
Declaration source: packages/core/src/pda.ts:267.
export function deriveExternalMarketPda(platformId: number, questionHash: Uint8Array, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
platformId: number— Platform namespace; resolver authority is intentionally not an identity seed.questionHash: Uint8Array<ArrayBufferLike>— Canonical question commitment shared by all resolver authorities.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveExternalMarketPolicyPda#
Immutable Seesaw semantic policy: ["seesaw", "external-policy-v1", market].
Declaration source: packages/core/src/pda.ts:309.
export function deriveExternalMarketPolicyPda(market: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveExternalPreallocationPda#
Not documented.
Declaration source: packages/core/src/pda.ts:297.
export function deriveExternalPreallocationPda(market: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveExternalRefHash#
Derive the canonical externalRefHash for an external market: the SHA-256
digest of the raw (un-padded) external reference bytes.
validate_open_external_args (program/src/processor/open_external_market_trait.rs)
requires externalRefHash == sha256(externalRef[..externalRefLen]) on both
OpenExternalMarket and BeginExternalMarketPreallocation. This is the
single derivation of that hash in this package - the instruction builders
in instructions.ts and PDA derivation here both call this function
instead of each computing (or accepting) the hash independently.
Declaration source: packages/core/src/pda.ts:263.
export function deriveExternalRefHash(externalRef: Uint8Array): Uint8Array;
Parameters
externalRef: Uint8Array<ArrayBufferLike>— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveFairValue</summary>deriveFairValue#
Book mid, microprice (best bid and ask weighted by the opposite side's size), last trade and the spline-implied price, each tagged with its source.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:91.
export function deriveFairValue(book: AnalyticsBook, splineQuote?: SplineFairValueInput | null, lastTradePriceBps?: number | null, options?: FairValueOptions): BookFairValueView;
Parameters
book: AnalyticsBook— Not documented. See AnalyticsBook for its declaration and available field documentation.splineQuote: SplineFairValueInput | null | undefined— Not documented. See SplineFairValueInput for its declaration and available field documentation.lastTradePriceBps: number | null | undefined— Not documented.options: FairValueOptions— Not documented. Default:{}. See FairValueOptions for its declaration and available field documentation.
Returns
BookFairValueView
Not documented.
Throws
Not documented.
Defaults
options:{}.
deriveFlattenPreview#
Preview flattening a position at market.
avgExitPriceBps / worstExitPriceBps are in the exited outcome's own
denomination: a NO holder selling into a 65c NO bid reads 6500, because the
canonical price of that bid IS what its owner pays per NO share
(spec/ORDERBOOK.md § 2.3a). Nothing is complemented.
Declaration source: packages/core/src/flatten.ts:58.
export function deriveFlattenPreview(params: DeriveFlattenPreviewParams): FlattenPreview;
Parameters
params: DeriveFlattenPreviewParams— Not documented. See DeriveFlattenPreviewParams for its declaration and available field documentation.
Returns
FlattenPreview
Not documented.
Throws
Not documented.
</details> <details> <summary>DeriveFlattenPreviewParams</summary>DeriveFlattenPreviewParams#
Not documented.
Declaration source: packages/core/src/flatten.ts:35.
export interface DeriveFlattenPreviewParams {
readonly outcome: FlattenOutcome;
readonly holdings: FlattenHoldingsBySource;
/**
* The book to exit into.
*
* Prefer the trader's OWN lane (`orderbook.lanes.yes` / `.no` from the
* indexer): the canonical arrays interleave both outcomes, so a NO exit
* walking them counts YES bids that complementary matching can never fill
* (`spec/ORDERBOOK.md` § 2.3b). Passing the canonical arrays still produces
* correctly-denominated prices, just an optimistic depth.
*/
readonly book: OutcomeLaneBook;
}
Field documentation
book— The book to exit into.
Prefer the trader's OWN lane (orderbook.lanes.yes / .no from the
indexer): the canonical arrays interleave both outcomes, so a NO exit
walking them counts YES bids that complementary matching can never fill
(spec/ORDERBOOK.md § 2.3b). Passing the canonical arrays still produces
correctly-denominated prices, just an optimistic depth.
deriveFreshnessState#
Derives the freshness state of microstructure data from its age and transport health.
Rules (exact, in priority order):
- Transport override: if
!wsConnected && pollFailing, there is no live data path regardless of age -> 'delayed'. - Otherwise, bucket by age against the (possibly custom) thresholds:
- ageSeconds < staleThreshold -> 'fresh'
- staleThreshold <= ageSeconds < delayedThreshold -> 'stale'
- ageSeconds >= delayedThreshold -> 'delayed'
Both threshold comparisons are inclusive at the upper band (
>=).
- Negative or NaN ageSeconds is treated as 'fresh'. This covers clock skew where the recorded last-update timestamp is momentarily in the future relative to the local clock.
Declaration source: packages/core/src/freshness.ts:45.
export function deriveFreshnessState(input: DeriveFreshnessStateInput): FreshnessState;
Parameters
input: DeriveFreshnessStateInput— Not documented. See DeriveFreshnessStateInput for its declaration and available field documentation.
Returns
FreshnessState
Not documented.
Throws
Not documented.
</details> <details> <summary>DeriveFreshnessStateInput</summary>DeriveFreshnessStateInput#
Not documented.
Declaration source: packages/core/src/freshness.ts:16.
export interface DeriveFreshnessStateInput {
/** now - lastMicrostructureUpdateAt, in SECONDS. */
ageSeconds: number;
/** Websocket transport connected. */
wsConnected: boolean;
/** Polling fallback is failing. */
pollFailing: boolean;
/** Defaults to FRESHNESS_STALE_SECONDS. */
staleThresholdSeconds?: number;
/** Defaults to FRESHNESS_DELAYED_SECONDS. */
delayedThresholdSeconds?: number;
}
Field documentation
ageSeconds— now - lastMicrostructureUpdateAt, in SECONDS.wsConnected— Websocket transport connected.pollFailing— Polling fallback is failing.staleThresholdSeconds— Defaults to FRESHNESS_STALE_SECONDS.delayedThresholdSeconds— Defaults to FRESHNESS_DELAYED_SECONDS.
deriveIdleSeatEvacuationDestinationPda#
Fresh owner-controlled token destination for a permissionless idle-seat evacuation.
Declaration source: packages/core/src/pda.ts:229.
export function deriveIdleSeatEvacuationDestinationPda(market: Address, owner: Address, mint: Address, nonce: bigint, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.owner: Address— Not documented.mint: Address— Not documented.nonce: bigint— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveLogAuthorityPda#
Derive the binary-event recorder log-authority PDA.
Seeds: ["log"]
Declaration source: packages/core/src/pda.ts:324.
export function deriveLogAuthorityPda(programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveMakerQuoteStatePda#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:100.
export function deriveMakerQuoteStatePda(market: Address, owner: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.owner: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveMakerSeriesPda#
Derive the currency-scoped maker-series account.
Declaration source: packages/core/src/pda.ts:456.
export function deriveMakerSeriesPda(feedId: Uint8Array, durationSeconds: bigint, currencyRecord: Address, maker: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
feedId: Uint8Array<ArrayBufferLike>— Not documented.durationSeconds: bigint— Not documented.currencyRecord: Address— Not documented.maker: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveMarketMetaPda#
Not documented.
Declaration source: packages/core/src/pda.ts:286.
export function deriveMarketMetaPda(market: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveMarketPda#
Derive the PDA for a market account.
Seeds: ["seesaw", "market", pyth_feed_id (32 bytes), duration_seconds (8 bytes LE), market_id (8 bytes LE), creator (32 bytes), currency_record (32 bytes)]
Each market is uniquely identified by its oracle feed, duration, explicit microsecond intent, creator, and
registered currency record. This matches the on-chain Rust derivation in
program/src/utils/pda.rs::derive_market_pda_for_currency_record.
Declaration source: packages/core/src/pda.ts:371.
export function deriveMarketPda(pythFeedId: Uint8Array, durationSeconds: bigint, marketId: bigint, creator: Address, currencyRecord: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
pythFeedId: Uint8Array<ArrayBufferLike>— - The 32-byte Pyth price feed identifier.durationSeconds: bigint— - Market duration in seconds (as bigint, encoded as 8 bytes LE).marketId: bigint— - The positive microsecond creation intent (u64 LE), persisted before preparation. Reused unchanged across preparation retries; never a source of lifecycle time.creator: Address— - The market creator's wallet address.currencyRecord: Address— - The registered currency record PDA of the market's settlement currency (see {@link deriveCurrencyRecordPda}).programAddress: Address— - The Seesaw program address. Defaults to the canonical program ID. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
A promise resolving to the [Address, bump] ProgramDerivedAddress tuple.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveMarketPdaFromAccount#
Re-derive the PDA of a decoded native market from its stored identity: the settlement mint and settlement token standard (0 = classic Tokenkeg, 1 = Token-2022) select the registered currency record seed.
Declaration source: packages/core/src/pda.ts:396.
export function deriveMarketPdaFromAccount(market: Pick<MarketAccount, "feedIdentity" | "durationSeconds" | "marketId" | "creator" | "settlementMint" | "settlementTokenStandard">, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Pick<MarketAccount, "creator" | "marketId" | "settlementMint" | "durationSeconds" | "feedIdentity" | "settlementTokenStandard">— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveNativeResolutionPolicyPda#
Derive the immutable native-resolution policy PDA. Seeds: ["seesaw", "native-resolution-policy", market].
Declaration source: packages/core/src/pda.ts:218.
export function deriveNativeResolutionPolicyPda(market: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveNoEscrowPda#
Derive the PDA for a NO escrow token account.
Seeds: ["seesaw", "escrow_no", market_pubkey]
Declaration source: packages/core/src/pda.ts:615.
export function deriveNoEscrowPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveNoMintPda#
Derive the PDA for a NO token mint.
Seeds: ["seesaw", "no_mint", market_pubkey]
Declaration source: packages/core/src/pda.ts:585.
export function deriveNoMintPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveOrderbookPda#
Derive the PDA for an orderbook account.
Seeds: ["seesaw", "orderbook", market_pubkey]
Declaration source: packages/core/src/pda.ts:430.
export function deriveOrderbookPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
derivePortfolioRiskView#
Not documented.
Declaration source: packages/core/src/risk.ts:167.
export function derivePortfolioRiskView(input: PortfolioRiskInput): PortfolioRiskView;
Parameters
input: PortfolioRiskInput— Not documented. See PortfolioRiskInput for its declaration and available field documentation.
Returns
PortfolioRiskView
Not documented.
Throws
Not documented.
</details> <details> <summary>derivePositionPda</summary>derivePositionPda#
Derive the PDA for a user's position account.
Seeds: ["seesaw", "position", market_pubkey, user_pubkey]
Declaration source: packages/core/src/pda.ts:630.
export function derivePositionPda(marketAddress: Address, userAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.userAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveReferralBinding#
Derive the single read-only referral binding PDA for the taker wallet.
Declaration source: packages/core/src/widget/referral.ts:39.
export function deriveReferralBinding(takerAddress: Address, programAddress?: Address): Promise<ReferralBindingAccounts>;
Parameters
takerAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<ReferralBindingAccounts>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveReferralPda#
Derive the per-referee ReferralAccount PDA.
Seeds: ["seesaw", "referral", referee]
Declaration source: packages/core/src/pda.ts:652.
export function deriveReferralPda(refereeAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
refereeAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveScenarioExposure#
Per-market YES/NO payout and P&L for held positions, and the portfolio P&L of
every outcome assignment up to maxScenarios (beyond that, best and worst
only). Open orders are not included: this is a view of what is held.
Declaration source: packages/core/src/analytics/scenario.ts:95.
export function deriveScenarioExposure(positions: readonly PortfolioRiskPositionInput[], opts: ScenarioExposureOptions): ScenarioExposureView;
Parameters
positions: readonly PortfolioRiskPositionInput[]— Not documented.opts: ScenarioExposureOptions— Not documented. See ScenarioExposureOptions for its declaration and available field documentation.
Returns
ScenarioExposureView
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveSeriesVaultPda</summary>deriveSeriesVaultPda#
Derive the collateral vault for a maker series.
Declaration source: packages/core/src/pda.ts:478.
export function deriveSeriesVaultPda(series: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
series: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveSettlementSummary#
Derive the settlement print for a resolved/closed market: the window-open price, the final Pyth print used for resolution, and the signed percent move between them.
The on-chain rule compares confidence intervals strictly: UP only when
end_low > start_high, DOWN only when end_high < start_low, and neutral
EXPIRED otherwise (see program/src/logic/resolve_processor.rs). This
helper does NOT re-derive the outcome from the two point prices. It trusts the already-resolved outcome field and only formats
the print around it, so the UI stays correct even where only one of the
two prices ends up available.
Pure function - no i18n copy lives here. Callers render the outcome/price/ delta through their own locale message files, per the repo's i18n convention (English strings never get hardcoded into shared math).
Declaration source: packages/core/src/market.ts:458.
export function deriveSettlementSummary(input: SettlementSummaryInput): SettlementSummary;
Parameters
input: SettlementSummaryInput— Not documented. See SettlementSummaryInput for its declaration and available field documentation.
Returns
SettlementSummary
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveSignedTransactionIdentity</summary>deriveSignedTransactionIdentity#
Parse a signed legacy, v0 or SIMD-0385 v1 wire and derive its identity
locally. Throws {@link TransactionAttemptWireError} for malformed wires, a
missing fee-payer signature, or (when expectedFeePayer is given) a wire
paid by another account. Nothing here trusts a transport response.
Declaration source: packages/core/src/transactionAttempt.ts:90.
export function deriveSignedTransactionIdentity(wire: Uint8Array, options?: { readonly expectedFeePayer?: string; readonly requireFullySigned?: boolean; }): SignedTransactionIdentity;
Parameters
wire: Uint8Array<ArrayBufferLike>— Not documented.options: { readonly expectedFeePayer?: string; readonly requireFullySigned?: boolean; }— Not documented. Default:{}.
Returns
SignedTransactionIdentity
Not documented.
Throws
Not documented.
Defaults
options:{}.
deriveSplinePda#
Derive a maker's spline PDA from its immutable series identity.
Declaration source: packages/core/src/pda.ts:506.
export function deriveSplinePda(feedId: Uint8Array, durationSeconds: bigint, maker: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
feedId: Uint8Array<ArrayBufferLike>— Not documented.durationSeconds: bigint— Not documented.maker: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveSplineSeatPda#
Derive the one seat where a maker quotes on this market.
Declaration source: packages/core/src/pda.ts:489.
export function deriveSplineSeatPda(market: Address, maker: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
market: Address— Not documented.maker: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveSplineVaultPda#
Derive the canonical SPL token vault owned by a spline PDA.
Declaration source: packages/core/src/pda.ts:531.
export function deriveSplineVaultPda(spline: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
spline: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveSponsoredPriceFeedAddress#
The sponsored price-feed account of a feed: the push-oracle PDA with seeds
[shard_id u16 LE, feed_id (32)]. Source: @pythnetwork/pyth-solana-receiver
0.16.0, dist/esm/PythSolanaReceiver.mjs getPriceFeedAccountForProgram
(lines 449–461). The account is a Receiver-owned PriceUpdateV2
(dist/esm/idl/pyth_solana_receiver.mjs: discriminator 8, write authority 32,
verification level — Full is the single byte 1 — price message 84, posted
slot 8). Discovery reads shard 0.
Declaration source: packages/core/src/discoveryReader.ts:74.
export function deriveSponsoredPriceFeedAddress(feedId: Uint8Array, shardId?: number): Promise<Address>;
Parameters
feedId: Uint8Array<ArrayBufferLike>— Not documented.shardId: number— Not documented. Default:0.
Returns
Promise<Address>
Not documented.
Throws
Not documented.
Defaults
shardId:0.
deriveStopLossAta#
The owner's associated token account of mint. Pass the market's quote program for the
settlement account of a Token-2022 market; share mints stay on classic SPL Token.
Declaration source: packages/core/src/stopLoss/transaction.ts:310.
export function deriveStopLossAta(owner: Address, mint: Address, tokenProgram?: Address): Promise<Address>;
Parameters
owner: Address— Not documented.mint: Address— Not documented.tokenProgram: Address— Not documented. Default:TOKEN_PROGRAM_ADDRESS.
Returns
Promise<Address>
Not documented.
Throws
Not documented.
Defaults
tokenProgram:TOKEN_PROGRAM_ADDRESS.
deriveStopLossNonceAddress#
create_with_seed(owner, seed, SystemProgram), computed without WebCrypto.
Declaration source: packages/core/src/stopLoss/nonce.ts:84.
export function deriveStopLossNonceAddress(owner: Address, slot: number): Address;
Parameters
owner: Address— Not documented.slot: number— Not documented.
Returns
Address
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveStrategyPda</summary>deriveStrategyPda#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:77.
export function deriveStrategyPda(owner: Address, strategyId: number, programAddress?: Address): Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>;
Parameters
owner: Address— Not documented.strategyId: number— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveTraderLedgerPda#
Derive the market-owned trader-ledger PDA.
Seeds: ["seesaw", "trader_ledger", market]
Declaration source: packages/core/src/pda.ts:667.
export function deriveTraderLedgerPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveTransactionAttemptState#
Derive the semantic state from the immutable observation set.
Declaration source: packages/core/src/transactionAttempt.ts:498.
export function deriveTransactionAttemptState(record: Pick<TransactionAttemptRecord, "observations">): TransactionAttemptState;
Parameters
record: Pick<TransactionAttemptRecord, "observations">— Not documented.
Returns
TransactionAttemptState
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveVaultPda</summary>deriveVaultPda#
Derive the PDA for a vault token account.
Seeds: ["seesaw", "vault", market_pubkey]
Declaration source: packages/core/src/pda.ts:445.
export function deriveVaultPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveWindowHistoryCells#
Not documented.
Declaration source: packages/core/src/windowHistory.ts:43.
export function deriveWindowHistoryCells(rows: readonly WindowHistoryRow[], options?: WindowHistoryOptions): WindowHistoryCell[];
Parameters
rows: readonly WindowHistoryRow[]— Not documented.options: WindowHistoryOptions— Not documented. Default:{}. See WindowHistoryOptions for its declaration and available field documentation.
Returns
WindowHistoryCell[]
Not documented.
Throws
Not documented.
Defaults
options:{}.
deriveWireConflictKey#
Economic conflict key for a wire (SSW-010/011): the identity of the logical operation, never of the incidental bytes that carry it.
Format: v2|<program>|<action>@<market>;…, one entry per distinct economic
action. The full identity is wallet × cluster × program × market × action:
wallet and cluster come from the journal itself — one journal per
{@link TransactionAttemptScope} (cluster, program, wallet), a stored journal
for another scope is refused as corrupt, and every send path pins the
signed fee payer to that wallet — so two wallets or clusters never share a
key space even though the key string does not repeat them.
Deliberately EXCLUDED, because a retry of the same operation may change them without the user choosing a new exposure:
- the protocol treasury shard (web: timestamp entropy, mobile: slot) and every other incidental writable account (escrows, ATAs, referral PDAs);
- instruction data (price, quantity, client order id, deadlines, shard);
- referral enrollment and account-setup routes ({@link SETUP_TAGS}) and every non-Seesaw instruction (ATA creation, compute budget, memo);
- blockhash, signatures, message version and transport.
Unrelated actions stay distinct: another market or another action (place vs cancel vs redeem …) yields a disjoint entry set. Two keys conflict when they share any entry ({@link conflictKeysOverlap}), so a retry that bundles extra work with the original action is still blocked.
Routes outside the action table keep a conservative per-route identity
(tag-xx@<writable non-signer accounts>). Returns null when the wire
carries no programId instruction.
Declaration source: packages/core/src/transactionAttempt.ts:254.
export function deriveWireConflictKey(wire: Uint8Array, programId: string): string | null;
Parameters
wire: Uint8Array<ArrayBufferLike>— Not documented.programId: string— Not documented.
Returns
string | null
Not documented.
Throws
Not documented.
</details> <details> <summary>deriveYesEscrowPda</summary>deriveYesEscrowPda#
Derive the PDA for a YES escrow token account.
Seeds: ["seesaw", "escrow_yes", market_pubkey]
Declaration source: packages/core/src/pda.ts:600.
export function deriveYesEscrowPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
deriveYesMintPda#
Derive the PDA for a YES token mint.
Seeds: ["seesaw", "yes_mint", market_pubkey]
Declaration source: packages/core/src/pda.ts:570.
export function deriveYesMintPda(marketAddress: Address, programAddress?: Address): Promise<ProgramDerivedAddress>;
Parameters
marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly [Address<string>, import("node_modules/@solana/addresses/dist/types/program-derived-address").ProgramDerivedAddressBump]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
describeCurrency#
Describe a settlement currency from its mint address and on-chain decimals.
Known mint → its symbol with verified: true; unknown mint → symbol: null,
verified: false.
Declaration source: packages/core/src/currency/currency.ts:36.
export function describeCurrency(mint: string, decimals: number): Currency;
Parameters
mint: string— Not documented.decimals: number— Not documented.
Returns
Currency
Not documented.
Throws
RangeError if decimals is not an integer in 0..18 (decimals come
from chain, so a bad value is a programming error).
disablePostOnlyMode#
Not documented.
Declaration source: packages/core/src/sdk.ts:2421.
export function disablePostOnlyMode(input: DisablePostOnlyModeInput, programAddress?: Address): Promise<SdkResult<DisablePostOnlyModeResult>>;
Parameters
input: DisablePostOnlyModeInput— Not documented. See DisablePostOnlyModeInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<DisablePostOnlyModeResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
DisablePostOnlyModeAccounts#
Accounts for DisablePostOnlyMode instruction.
Declaration source: packages/core/src/instructions.ts:4071.
export interface DisablePostOnlyModeAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
DisablePostOnlyModeInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2413.
export interface DisablePostOnlyModeInput {
authority: Address;
}
DisablePostOnlyModeResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2417.
export interface DisablePostOnlyModeResult {
config: Address;
}
DISCOVERY_POLICY_V1#
Not documented.
Declaration source: packages/core/src/discoveryPolicy.ts:23.
export declare const DISCOVERY_POLICY_V1: DiscoveryPolicy;
DiscoveryClock#
The snapshot's Clock: the slot quotes are judged at and unix_timestamp.
Declaration source: packages/core/src/marketDiscovery.ts:60.
export interface DiscoveryClock {
readonly slot: bigint;
readonly unixTimestamp: bigint;
}
DiscoveryDuplicateInput#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:34.
export interface DiscoveryDuplicateInput extends DiscoverySeriesInput {
readonly tStart: bigint;
readonly tEnd: bigint;
readonly startPrice: bigint;
readonly startPriceExpo: number;
readonly maxConfidenceRatioBps: number;
readonly maxOracleJumpBps: number;
readonly creatorFeeBps: number;
}
Field documentation
marketKind— Payout kind. Binary is 0.pythFeedId— Pyth feed for a native market, source reference hash for a mirror.currencyRecord— The market's registered currency record PDA (token program + mint).
DiscoveryEvaluation#
Not documented.
Declaration source: packages/core/src/marketDiscovery.ts:130.
export interface DiscoveryEvaluation {
readonly policyVersion: number;
readonly eligible: boolean;
/** Stable codes in predicate order; any one makes the market ineligible. */
readonly exclusions: readonly DiscoveryExclusion[];
/** Shown, never excluding. */
readonly notes: readonly DiscoveryNote[];
readonly depth: MarketDepth;
/** Information only: slot-bound curves counted when fresh (never ranked). */
readonly protectedDepth: MarketDepth;
/** Larger spread of the quotable lanes; `null` when one is missing or crossed. */
readonly maxLaneSpreadBps: number | null;
}
Field documentation
exclusions— Stable codes in predicate order; any one makes the market ineligible.notes— Shown, never excluding.protectedDepth— Information only: slot-bound curves counted when fresh (never ranked).maxLaneSpreadBps— Larger spread of the quotable lanes;nullwhen one is missing or crossed.
DiscoveryExclusion#
Not documented.
Declaration source: packages/core/src/marketDiscovery.ts:101.
export type DiscoveryExclusion =
| 'not-trading'
| 'halted'
| 'market-not-started'
| 'market-ended'
| 'no-liquidity'
| 'liquidity-state-unavailable'
| 'missing-lane-quotes'
| 'crossed-lane-quotes'
| 'spread-too-wide'
| 'band-depth-below-floor';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
DiscoveryInputAccount#
One input account of a discovery snapshot, as read over RPC.
Declaration source: packages/core/src/discoverySnapshot.ts:11.
export interface DiscoveryInputAccount {
readonly address: Address;
/** `null` when the account does not exist (for example an unsponsored feed). */
readonly account: { readonly owner: Address; readonly data: Uint8Array } | null;
/** RPC context slot of the read that returned this account; `null` when unreported. */
readonly contextSlot: bigint | null;
}
Field documentation
account—nullwhen the account does not exist (for example an unsponsored feed).contextSlot— RPC context slot of the read that returned this account;nullwhen unreported.
DiscoveryList#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:162.
export interface DiscoveryList<T extends DiscoveryRankRow> {
readonly mint: Address | 'all';
readonly sort: DiscoverySort;
/** False for the all-currency list: it is not ranked by liquidity. */
readonly rankedByLiquidity: boolean;
readonly rows: readonly RankedDiscoveryRow<T>[];
}
Field documentation
rankedByLiquidity— False for the all-currency list: it is not ranked by liquidity.
DiscoveryMarket#
Decoded market fields discovery reads, plus its address and currency decimals.
Declaration source: packages/core/src/marketDiscovery.ts:32.
export type DiscoveryMarket = Parameters<typeof getMarketState>[0] &
Pick<
MarketAccount,
| 'marketId'
| 'creator'
| 'settlementMint'
| 'pythFeedId'
| 'durationSeconds'
| 'halted'
| 'tStart'
| 'tEnd'
| 'marketFeatureSetBits'
| 'splineCommittedCollateral'
| 'totalYesShares'
| 'totalNoShares'
| 'maxTotalShares'
> &
Partial<Pick<MarketAccount, 'tradingGeneration' | 'resolverAuthority'>> & {
readonly address: Address;
/**
* Decimals of the settlement mint, read from the mint account; `null` when the mint is
* unreadable (absent, not owned by a token program, or malformed). A trading market in
* an unreadable mint evaluates to `liquidity-state-unavailable` (`spec/DISCOVERY.md` §2).
*/
readonly currencyDecimals: number | null;
};
Field documentation
marketId— Positive preparation timestamp identity; it does not encode the market window.currencyDecimals— Decimals of the settlement mint, read from the mint account;nullwhen the mint is unreadable (absent, not owned by a token program, or malformed). A trading market in an unreadable mint evaluates toliquidity-state-unavailable(spec/DISCOVERY.md§2).
DiscoveryMarketInputs#
Everything the gate needs for one market, as read in the snapshot.
Declaration source: packages/core/src/discoveryReader.ts:101.
export interface DiscoveryMarketInputs {
readonly market: DiscoveryMarket;
readonly account: MarketAccount;
/**
* `not-read`: the market fails E1 from its account alone, so no book is read.
* `unavailable`: the book of a trading market is absent, foreign, malformed or
* bound to another market; the market evaluates to `liquidity-state-unavailable`
* and every other market is unaffected. `read`: `book` holds the decoded book.
*/
readonly bookState: 'read' | 'not-read' | 'unavailable';
readonly book: OrderbookAccount | null;
/** Present when an active covered order required an authenticated ledger read. */
readonly ledger?: TraderLedgerAccount | null;
/** Null when an attached seat set could not be read or authenticated. */
readonly seatLiquidity: DiscoverySplineSeatInputs | null;
/** `null` for a non-native market or one that fails E1 (no feed is read). */
readonly feedAddress: Address | null;
readonly feed: SponsoredFeedAccount;
}
Field documentation
bookState—not-read: the market fails E1 from its account alone, so no book is read.unavailable: the book of a trading market is absent, foreign, malformed or bound to another market; the market evaluates toliquidity-state-unavailableand every other market is unaffected.read:bookholds the decoded book.ledger— Present when an active covered order required an authenticated ledger read.seatLiquidity— Null when an attached seat set could not be read or authenticated.feedAddress—nullfor a non-native market or one that fails E1 (no feed is read).
DiscoveryMarketKind#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:137.
export type DiscoveryMarketKind = 'native' | 'mirror';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
DiscoveryMarketRow#
Not documented.
Declaration source: packages/core/src/api/markets.ts:591.
export interface DiscoveryMarketRow {
/** The listing row; `pythFeedId` is `''` when the server sends null. */
readonly market: Market;
readonly discovery: MarketDiscoveryResult;
}
Field documentation
market— The listing row;pythFeedIdis''when the server sends null.
discoveryMirrorName#
Mirror display name when the snapshot has no authenticated question text.
Declaration source: packages/core/src/discoveryRows.ts:53.
export function discoveryMirrorName(address: Address): string;
Parameters
address: Address— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>DiscoveryNote</summary>DiscoveryNote#
Not documented.
Declaration source: packages/core/src/marketDiscovery.ts:113.
export type DiscoveryNote =
| 'lanes-cross-reflected'
| 'source-feed-not-applicable'
| 'feed-unobserved'
| 'feed-mismatch'
| 'feed-stale'
| 'feed-future';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
DiscoveryPage#
Not documented.
Declaration source: packages/core/src/api/markets.ts:597.
export interface DiscoveryPage {
/** The one snapshot every row was computed from. */
readonly snapshot: DiscoverySnapshot & {
readonly defaultMint: string;
readonly programId: string;
};
readonly list: z.infer<typeof discoveryListWire>;
/** Length of the whole list; rows are the page at `offset`. */
readonly total: number;
readonly limit: number;
readonly offset: number;
readonly bookAsOfSlot: bigint | null;
/** In served (ranked) order. */
readonly rows: readonly DiscoveryMarketRow[];
}
Field documentation
snapshot— The one snapshot every row was computed from.total— Length of the whole list; rows are the page atoffset.rows— In served (ranked) order.
discoveryPolicy#
Look up a published policy by version. Unknown versions are an error, never a default.
Declaration source: packages/core/src/discoveryPolicy.ts:48.
export function discoveryPolicy(version: number): DiscoveryPolicy;
Parameters
version: number— Not documented.
Returns
DiscoveryPolicy
Not documented.
Throws
Not documented.
</details> <details> <summary>DiscoveryPolicy</summary>DiscoveryPolicy#
Versioned public discovery constants (spec/DISCOVERY.md §5).
The values of v1 are provisional (design MD-5): there is no mainnet data yet. A change of any value is a NEW policy version, never an edit of an existing one, so a result that names a version is recomputable forever.
Declaration source: packages/core/src/discoveryPolicy.ts:11.
export interface DiscoveryPolicy {
readonly version: number;
/** Half-width of each lane's band around its reference mid, absolute price bps. */
readonly bandBps: number;
/** Largest best-ask minus best-bid of a quotable lane, absolute price bps. */
readonly maxSpreadBps: number;
/** Rank-depth floor in whole tokens of the market's own currency. */
readonly minRankDepthWholeTokens: bigint;
/** Sponsored feed age above which E4 notes `feed-stale` (notes only in v1). */
readonly feedMaxAgeSeconds: bigint;
}
Field documentation
bandBps— Half-width of each lane's band around its reference mid, absolute price bps.maxSpreadBps— Largest best-ask minus best-bid of a quotable lane, absolute price bps.minRankDepthWholeTokens— Rank-depth floor in whole tokens of the market's own currency.feedMaxAgeSeconds— Sponsored feed age above which E4 notesfeed-stale(notes only in v1).
DiscoveryRankRow#
One market's discovery result, as ranked. Depth is in share atoms of its own mint.
Declaration source: packages/core/src/discoveryRank.ts:122.
export interface DiscoveryRankRow {
readonly address: Address;
readonly settlementMint: Address;
readonly kind?: DiscoveryMarketKind;
readonly eligible: boolean;
/** `min(bid side, ask side)` in share atoms; `null` = unknown (sorts last). */
readonly rankDepth: bigint | null;
readonly tEnd: bigint;
/** Larger spread of the quotable lanes; `null` = a quotable lane is one-sided (sorts last). */
readonly maxLaneSpreadBps: number | null;
/** From {@link duplicateKey}; `null` never collapses. */
readonly duplicateKey: string | null;
}
Field documentation
rankDepth—min(bid side, ask side)in share atoms;null= unknown (sorts last).maxLaneSpreadBps— Larger spread of the quotable lanes;null= a quotable lane is one-sided (sorts last).duplicateKey— From {@link duplicateKey};nullnever collapses.
DiscoveryReadOptions#
Not documented.
Declaration source: packages/core/src/discoveryReader.ts:90.
export interface DiscoveryReadOptions {
readonly programAddress?: Address;
/** Upper bound on the market set. A set that reaches it fails loudly, never ranks partially. */
readonly maxMarkets: number;
/** Full read passes before a skewed snapshot is returned as `consistent: false`. Default 3. */
readonly maxAttempts?: number;
readonly commitment?: string;
readonly policy?: DiscoveryPolicy;
}
Field documentation
maxMarkets— Upper bound on the market set. A set that reaches it fails loudly, never ranks partially.maxAttempts— Full read passes before a skewed snapshot is returned asconsistent: false. Default 3.
DiscoveryReadResult#
Not documented.
Declaration source: packages/core/src/discoveryReader.ts:121.
export interface DiscoveryReadResult {
readonly snapshot: DiscoverySnapshot;
readonly clock: DiscoveryClock;
readonly defaultMint: Address;
readonly programAddress: Address;
/** The complete input set, each with its context slot (for publication and the digest). */
readonly inputs: readonly DiscoveryInputAccount[];
readonly markets: readonly DiscoveryMarketInputs[];
}
Field documentation
inputs— The complete input set, each with its context slot (for publication and the digest).
DiscoveryRow#
One market of a snapshot, ready for {@link rankDiscovery }.
Declaration source: packages/core/src/discoveryRows.ts:31.
export interface DiscoveryRow extends DiscoveryRankRow {
readonly kind: DiscoveryMarketKind;
readonly snapshotId: string;
readonly evaluation: DiscoveryEvaluation;
/** The market's currency record PDA (token program from `settlement_token_standard`). */
readonly currencyRecord: Address;
readonly seriesKey: string | null;
/** The deterministic display name derived from the snapshot. */
readonly marketName: string | null;
readonly marketSlug: string | null;
}
Field documentation
currencyRecord— The market's currency record PDA (token program fromsettlement_token_standard).marketName— The deterministic display name derived from the snapshot.rankDepth—min(bid side, ask side)in share atoms;null= unknown (sorts last).maxLaneSpreadBps— Larger spread of the quotable lanes;null= a quotable lane is one-sided (sorts last).duplicateKey— From {@link duplicateKey};nullnever collapses.
discoveryRows#
The one path from a discovery read to ranked rows: evaluates every market of
the snapshot under its policy (the snapshot's version unless one is given, and
then the versions must agree) and derives keys and identity. The result is in
read order; pass it to rankDiscovery for a list.
Declaration source: packages/core/src/discoveryRows.ts:63.
export function discoveryRows(read: DiscoveryReadResult, policy?: DiscoveryPolicy): Promise<DiscoveryRow[]>;
Parameters
read: DiscoveryReadResult— Not documented. See DiscoveryReadResult for its declaration and available field documentation.policy: DiscoveryPolicy— Not documented. Default:discoveryPolicy(read.snapshot.policyVersion). See DiscoveryPolicy for its declaration and available field documentation.
Returns
Promise<DiscoveryRow[]>
Not documented.
Throws
Not documented.
Defaults
policy:discoveryPolicy(read.snapshot.policyVersion).
DiscoverySeriesInput#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:22.
export interface DiscoverySeriesInput {
/** Payout kind. Binary is 0. */
readonly marketKind: number;
readonly resolverAuthority?: Address;
readonly externalPlatformId?: number;
/** Pyth feed for a native market, source reference hash for a mirror. */
readonly pythFeedId: Uint8Array;
readonly durationSeconds: bigint;
/** The market's registered currency record PDA (token program + mint). */
readonly currencyRecord: Address;
}
Field documentation
marketKind— Payout kind. Binary is 0.pythFeedId— Pyth feed for a native market, source reference hash for a mirror.currencyRecord— The market's registered currency record PDA (token program + mint).
DiscoverySnapshot#
spec/DISCOVERY.md §8.
Declaration source: packages/core/src/discoverySnapshot.ts:20.
export interface DiscoverySnapshot {
/** Equal to {@link DiscoverySnapshot.inputDigest}. */
readonly snapshotId: string;
readonly policyVersion: number;
/** The common context slot, or the largest reported one when `consistent` is false. */
readonly slot: bigint;
/** `Clock.unix_timestamp` from the Clock sysvar in the inputs. */
readonly unixTimestamp: bigint;
/** Every input was read at the same reported context slot. */
readonly consistent: boolean;
readonly inputDigest: string;
}
Field documentation
snapshotId— Equal to {@link DiscoverySnapshot.inputDigest}.slot— The common context slot, or the largest reported one whenconsistentis false.unixTimestamp—Clock.unix_timestampfrom the Clock sysvar in the inputs.consistent— Every input was read at the same reported context slot.
discoverySnapshotWireSchema#
snapshot of a discovery response.
Declaration source: packages/core/src/api/markets.ts:515.
export declare const discoverySnapshotWireSchema: z.ZodObject<{ snapshotId: z.ZodString; policyVersion: z.ZodNumber; slot: z.ZodString; unixTimestamp: z.ZodString; consistent: z.ZodBoolean; inputDigest: z.ZodString; defaultMint: z.ZodString; programId: z.ZodString; }, z.core.$strict>;
DiscoverySort#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:136.
export type DiscoverySort = 'depth' | 'expiry' | 'spread';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
DiscoverySplineSeatInputs#
Not documented.
Declaration source: packages/core/src/marketDiscovery.ts:281.
export interface DiscoverySplineSeatInputs {
readonly attachedSeatCount: number;
readonly seats: RpcReadResult<readonly RpcAddressedValue<SplineSeatAccount>[]>;
readonly marketTick: MarketTickV1Account | null;
}
DiscoveryVerification#
Not documented.
Declaration source: packages/core/src/discoveryVerify.ts:93.
export interface DiscoveryVerification {
/** The snapshot recomputed from the inputs. */
readonly snapshot: DiscoverySnapshot;
readonly read: DiscoveryReadResult;
/** The rows recomputed from the inputs, in read order; rank them with `rankDiscovery`. */
readonly rows: DiscoveryRow[];
/** Whether the recomputed snapshot id equals the expected one. */
readonly matches: boolean;
}
Field documentation
snapshot— The snapshot recomputed from the inputs.rows— The rows recomputed from the inputs, in read order; rank them withrankDiscovery.matches— Whether the recomputed snapshot id equals the expected one.
dispatchCancelOrder#
Not documented.
Declaration source: packages/core/src/orderFunding.ts:190.
export function dispatchCancelOrder(input: CancelDispatchInput, programAddress?: Address): Promise<SdkResult<CancelOrderResult | CancelFamilyWithFreeFundsResult>>;
Parameters
input: CancelDispatchInput— Not documented. See CancelDispatchInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelOrderResult | CancelFamilyWithFreeFundsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
DispatchReceipt#
What a receipt records. Never "accepted".
Declaration source: packages/core/src/execution/delivery.ts:77.
export interface DispatchReceipt {
readonly delivery: DeliveryId;
readonly destinations: readonly string[];
readonly dispatched_at_ms: number;
readonly bytes: number;
}
dispatchReduceOrder#
Not documented.
Declaration source: packages/core/src/orderFunding.ts:237.
export function dispatchReduceOrder(input: ReduceDispatchInput, programAddress?: Address): Promise<SdkResult<CancelFamilyResult | CancelFamilyWithFreeFundsResult>>;
Parameters
input: ReduceDispatchInput— Not documented. See ReduceDispatchInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelFamilyResult | CancelFamilyWithFreeFundsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
displayReferrerLabel#
Not documented.
Declaration source: packages/core/src/referral/display.ts:33.
export function displayReferrerLabel(resolution: ReferrerResolution, opts?: DisplayReferrerLabelOptions): string;
Parameters
resolution: ReferrerResolution— Not documented. See ReferrerResolution for its declaration and available field documentation.opts: DisplayReferrerLabelOptions— Not documented. Default:{}. See DisplayReferrerLabelOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
Defaults
opts:{}.
DisplayReferrerLabelOptions#
Not documented.
Declaration source: packages/core/src/referral/display.ts:26.
export interface DisplayReferrerLabelOptions {
/** Override 'now' for golden-snapshot determinism. Default: Date.now(). */
now?: number;
/** Truncate width for raw-pubkey labels (default 6+...+4). */
truncate?: { head: number; tail: number };
}
Field documentation
now— Override 'now' for golden-snapshot determinism. Default: Date.now().truncate— Truncate width for raw-pubkey labels (default 6+...+4).
duplicateKey#
Duplicate key, lowercase hex of 109 bytes: the 73 series-key bytes ‖ t_start i64 LE ‖ t_end i64 LE ‖ start_price i64 LE ‖ start_price_expo i32 LE ‖ max_confidence_ratio_bps u16 LE ‖ max_oracle_jump_bps u32 LE ‖ creator_fee_bps u16 LE. Equal keys ask the same question at the same cost; they differ only by creator and preparation timestamp.
Declaration source: packages/core/src/discoveryRank.ts:104.
export function duplicateKey(market: DiscoveryDuplicateInput): string | null;
Parameters
market: DiscoveryDuplicateInput— Not documented. See DiscoveryDuplicateInput for its declaration and available field documentation.
Returns
string | null
Not documented.
Throws
Not documented.
</details> <details> <summary>durationSecondsToSymbolPart</summary>durationSecondsToSymbolPart#
Not documented.
Declaration source: packages/core/src/instruments.ts:118.
export function durationSecondsToSymbolPart(durationSeconds: number | bigint): string;
Parameters
durationSeconds: number | bigint— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>durationToSeed</summary>durationToSeed#
Convert a u64 duration to little-endian Uint8Array(8) seed bytes.
Delegates to u64ToSeed.
Declaration source: packages/core/src/pda.ts:79.
export function durationToSeed(durationSeconds: bigint): Uint8Array;
Parameters
durationSeconds: bigint— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>EarningsSnapshot</summary>EarningsSnapshot#
Not documented.
Declaration source: packages/core/src/referral/types.ts:92.
export interface EarningsSnapshot {
/** Claimable amount (settlement-mint base units). */
accumulated: bigint;
/** Lifetime claimed amount (settlement-mint base units). */
totalClaimed: bigint;
refereesCount: number;
/** Unix-ms */
lastCreditAt: number;
}
Field documentation
accumulated— Claimable amount (settlement-mint base units).totalClaimed— Lifetime claimed amount (settlement-mint base units).lastCreditAt— Unix-ms
EarningVolumes#
Not documented.
Declaration source: packages/core/src/feeEarnings.ts:11.
export interface EarningVolumes {
creator: bigint;
referral: bigint;
maker: bigint;
}
effectiveBuilderBps#
The builder bps a fill actually pays: min(governed share, trader cap)
(FR-7). A missing approval means 0, and the whole governed builder slice
stays with protocol through the exact remainder (FR-4).
Declaration source: packages/core/src/fee.ts:143.
export function effectiveBuilderBps(configBuilderShareBps: number, approvalMaxBuilderBps: number | null | undefined): number;
Parameters
configBuilderShareBps: number— Not documented.approvalMaxBuilderBps: number | null | undefined— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>effectiveCoolOffUntilMs</summary>effectiveCoolOffUntilMs#
Monotone combination: any source that says "active" wins. A stale device preference cannot clear an account control, and a failed account read falls back to the last-known account value rather than to "off".
Declaration source: packages/core/src/reviewedIntent.ts:656.
export function effectiveCoolOffUntilMs(observation: VoluntaryControlObservation): number;
Parameters
observation: VoluntaryControlObservation— Not documented. See VoluntaryControlObservation for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>EMBED_DEFAULT_HEIGHT</summary>EMBED_DEFAULT_HEIGHT#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:42.
export declare const EMBED_DEFAULT_HEIGHT: 120;
EMBED_DEFAULT_TITLE#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:39.
export declare const EMBED_DEFAULT_TITLE: "Seesaw market";
EMBED_DEFAULT_WIDTH#
The embed page renders a fixed 400 x 120 card.
Declaration source: packages/core/src/widget/embed.ts:41.
export declare const EMBED_DEFAULT_WIDTH: 400;
EMBED_IFRAME_REFERRER_POLICY#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:38.
export declare const EMBED_IFRAME_REFERRER_POLICY: "strict-origin-when-cross-origin";
EMBED_IFRAME_SANDBOX#
The iframe sandbox: scripts and same-origin for the page, popups for "Trade on Seesaw". TODO(reviewer): enough because the embed is read-only (no wallet connection in the frame).
Declaration source: packages/core/src/widget/embed.ts:36.
export declare const EMBED_IFRAME_SANDBOX: "allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox";
EmbedSnippetOptions#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:54.
export interface EmbedSnippetOptions extends EmbedUrlOptions {
/** The iframe title (required for accessibility); defaults to "Seesaw market". */
title?: string;
width?: number;
height?: number;
}
Field documentation
title— The iframe title (required for accessibility); defaults to "Seesaw market".ref— Pending referrer: a base58 wallet or a handle.
EmbedTheme#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:45.
export type EmbedTheme = 'light' | 'dark';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
EmbedUrlOptions#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:47.
export interface EmbedUrlOptions {
/** Pending referrer: a base58 wallet or a handle. */
ref?: string;
theme?: EmbedTheme;
locale?: string;
}
Field documentation
ref— Pending referrer: a base58 wallet or a handle.
emptyLaneBook#
The empty lane, for callers that have no book for an outcome.
Declaration source: packages/core/src/orderbook.ts:107.
export function emptyLaneBook(): OutcomeLaneBook;
Parameters
No callable parameters.
Returns
OutcomeLaneBook
Not documented.
Throws
Not documented.
</details> <details> <summary>emptyTransactionAttemptJournal</summary>emptyTransactionAttemptJournal#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:671.
export function emptyTransactionAttemptJournal(scope: TransactionAttemptScope): TransactionAttemptJournalDocument;
Parameters
scope: TransactionAttemptScope— Not documented. See TransactionAttemptScope for its declaration and available field documentation.
Returns
TransactionAttemptJournalDocument
Not documented.
Throws
Not documented.
</details> <details> <summary>enablePostOnlyMode</summary>enablePostOnlyMode#
Not documented.
Declaration source: packages/core/src/sdk.ts:2399.
export function enablePostOnlyMode(input: EnablePostOnlyModeInput, programAddress?: Address): Promise<SdkResult<EnablePostOnlyModeResult>>;
Parameters
input: EnablePostOnlyModeInput— Not documented. See EnablePostOnlyModeInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<EnablePostOnlyModeResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
EnablePostOnlyModeAccounts#
Accounts for EnablePostOnlyMode instruction.
Declaration source: packages/core/src/instructions.ts:4045.
export interface EnablePostOnlyModeAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
EnablePostOnlyModeInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2391.
export interface EnablePostOnlyModeInput {
authority: Address;
}
EnablePostOnlyModeResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2395.
export interface EnablePostOnlyModeResult {
config: Address;
}
encodeAssertBalancesPayload#
Encode the 53-byte payload. Throws for a malformed bound set.
Declaration source: packages/core/src/router/assertBalances.ts:114.
export function encodeAssertBalancesPayload(bounds: AssertBalancesBounds): Uint8Array;
Parameters
bounds: AssertBalancesBounds— Not documented. See AssertBalancesBounds for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeConfidentialMarketPolicy</summary>encodeConfidentialMarketPolicy#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:243.
export function encodeConfidentialMarketPolicy(value: ConfidentialMarketPolicy): Uint8Array;
Parameters
value: ConfidentialMarketPolicy— Not documented. See ConfidentialMarketPolicy for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeConfidentialNativeDefinition</summary>encodeConfidentialNativeDefinition#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:310.
export function encodeConfidentialNativeDefinition(value: ConfidentialNativeDefinition): Uint8Array;
Parameters
value: ConfidentialNativeDefinition— Not documented. See ConfidentialNativeDefinition for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeCreateConfidentialMarketData</summary>encodeCreateConfidentialMarketData#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:386.
export function encodeCreateConfidentialMarketData(value: CreateConfidentialMarketData): Uint8Array;
Parameters
value: CreateConfidentialMarketData— Not documented. See CreateConfidentialMarketData for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeMirrorTransaction</summary>encodeMirrorTransaction#
Serialized bytes of a compiled (signed or unsigned) mirror transaction.
Declaration source: packages/core/src/v1Transaction.ts:203.
export function encodeMirrorTransaction(transaction: Transaction): Uint8Array;
Parameters
transaction: Readonly<{ messageBytes: import("node_modules/@solana/transactions/dist/types/transaction").TransactionMessageBytes; signatures: import("node_modules/@solana/transactions/dist/types/transaction").SignaturesMap; }>— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeOwnerCancellation</summary>encodeOwnerCancellation#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:531.
export function encodeOwnerCancellation(operation: StrategyCancelOperation): Uint8Array;
Parameters
operation: StrategyCancelOperation— Not documented. See StrategyCancelOperation for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeRecordConfidentialTerminalData</summary>encodeRecordConfidentialTerminalData#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:409.
export function encodeRecordConfidentialTerminalData(value: RecordConfidentialTerminalData): Uint8Array;
Parameters
value: RecordConfidentialTerminalData— Not documented. See RecordConfidentialTerminalData for its declaration and available field documentation.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>encodeStrategyCancellation</summary>encodeStrategyCancellation#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:527.
export function encodeStrategyCancellation(operation: StrategyCancelOperation, delegated: boolean): Uint8Array<ArrayBuffer>;
Parameters
operation: StrategyCancelOperation— Not documented. See StrategyCancelOperation for its declaration and available field documentation.delegated: boolean— Not documented.
Returns
Uint8Array<ArrayBuffer>
Not documented.
Throws
Not documented.
</details> <details> <summary>EndpointFailureOptions</summary>EndpointFailureOptions#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:64.
export interface EndpointFailureOptions {
readonly nowMs: number;
readonly cooldownMs?: number;
}
EndpointSuccessOptions#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:69.
export interface EndpointSuccessOptions {
readonly nowMs: number;
readonly latencyMs: number;
}
Enrollment#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:39.
export type Enrollment = (typeof ENROLLMENT_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ENROLLMENT_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:38.
export declare const ENROLLMENT_VALUES: readonly ["enrolled", "not_enrolled", "unknown", "not_applicable"];
EnsureDeepOrderbookSpaceAccounts#
Accounts for EnsureDeepOrderbookSpace instruction.
Declaration source: packages/core/src/instructions.ts:1091.
export interface EnsureDeepOrderbookSpaceAccounts extends BinaryRecorderTailAccounts {
/** Pays rent on the first call. Must sign. */
payer: Address;
/**
* Deep orderbook PDA. Derived from `(market, programAddress)` via
* `deriveOrderbookPda`.
*/
orderbook: Address;
/**
* Market PDA. Read-only here; only used to bind the orderbook PDA
* derivation. The market account itself need not yet exist.
*/
market: Address;
systemProgram: Address;
/**
* Canonical registered currency record. Required for receipt-free native
* preparation (account 4); the program derives the currency-scoped market
* PDA from it.
*/
currencyRecord?: Address;
/** Active external preallocation receipt. Omit for native markets. */
preallocationReceipt?: Address;
}
Field documentation
payer— Pays rent on the first call. Must sign.orderbook— Deep orderbook PDA. Derived from(market, programAddress)viaderiveOrderbookPda.market— Market PDA. Read-only here; only used to bind the orderbook PDA derivation. The market account itself need not yet exist.currencyRecord— Canonical registered currency record. Required for receipt-free native preparation (account 4); the program derives the currency-scoped market PDA from it.preallocationReceipt— Active external preallocation receipt. Omit for native markets.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
EnsureDeepOrderbookSpaceIntent#
Native market identity committed by a receipt-free deep-book preallocation.
Declaration source: packages/core/src/instructions.ts:1116.
export interface EnsureDeepOrderbookSpaceIntent {
pythFeedId: Uint8Array;
durationSeconds: bigint;
marketId: bigint;
}
EnsureTraderLedgerSpaceAccounts#
Accounts for EnsureTraderLedgerSpace instruction.
Declaration source: packages/core/src/instructions.ts:944.
export interface EnsureTraderLedgerSpaceAccounts extends BinaryRecorderTailAccounts {
/** Pays rent on the first call. Must sign. */
payer: Address;
/**
* Trader-ledger PDA. Derived from `(market, programAddress)` via
* `deriveTraderLedgerPda`.
*/
traderLedger: Address;
/**
* Market PDA. Read-only here; only used to bind the trader_ledger PDA
* derivation. The market account itself need not yet exist (this
* instruction is designed to precede CreateMarket).
*/
market: Address;
systemProgram: Address;
/**
* Canonical registered currency record. Required for receipt-free native
* preparation (account 4); the program derives the currency-scoped market
* PDA from it.
*/
currencyRecord?: Address;
/** Active external preallocation receipt. Omit for native markets. */
preallocationReceipt?: Address;
}
Field documentation
payer— Pays rent on the first call. Must sign.traderLedger— Trader-ledger PDA. Derived from(market, programAddress)viaderiveTraderLedgerPda.market— Market PDA. Read-only here; only used to bind the trader_ledger PDA derivation. The market account itself need not yet exist (this instruction is designed to precede CreateMarket).currencyRecord— Canonical registered currency record. Required for receipt-free native preparation (account 4); the program derives the currency-scoped market PDA from it.preallocationReceipt— Active external preallocation receipt. Omit for native markets.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
EnsureTraderLedgerSpaceIntent#
Native market identity committed by a receipt-free trader-ledger preallocation.
Declaration source: packages/core/src/instructions.ts:970.
export interface EnsureTraderLedgerSpaceIntent {
pythFeedId: Uint8Array;
durationSeconds: bigint;
marketId: bigint;
}
ENVELOPE_ERROR_CONTENT#
The serde content key of EnvelopeError.
Declaration source: packages/core/src/execution/delivery.ts:50.
export declare const ENVELOPE_ERROR_CONTENT: "detail";
ENVELOPE_ERROR_KINDS#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:35.
export declare const ENVELOPE_ERROR_KINDS: readonly ["message_version", "signers", "instructions", "payload_length", "sequence_offset", "dynamic_keys", "price_below_floor", "price_above_cap", "compute_request", "not_last", "decode"];
EnvelopeError#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:52.
export type EnvelopeError =
| { readonly kind: Exclude<EnvelopeErrorKind, 'payload_length' | 'decode'> }
| {
readonly kind: 'payload_length';
readonly detail: { readonly actual: number; readonly expected: readonly number[] };
}
| { readonly kind: 'decode'; readonly detail: string };
EnvelopeErrorKind#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:48.
export type EnvelopeErrorKind = (typeof ENVELOPE_ERROR_KINDS)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
Environment#
Not documented.
Declaration source: packages/core/src/api/client.ts:109.
export type Environment = 'development' | 'staging' | 'production';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
equivalentOppositeBuyPriceBps#
Entry price at which buying the other outcome has the same payoff as selling
one outcome at sellPriceBps (sell YES at p ≡ buy NO at 10_000 - p).
Hypothetical sizing math only; never a quote or a submitted price.
Declaration source: packages/core/src/price.ts:127.
export function equivalentOppositeBuyPriceBps(sellPriceBps: number): number;
Parameters
sellPriceBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>escapeHtmlAttribute</summary>escapeHtmlAttribute#
Escape an HTML attribute value (&, <, >, ", ').
Declaration source: packages/core/src/widget/embed.ts:104.
export function escapeHtmlAttribute(value: string): string;
Parameters
value: string— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>estimateFeeEarnings</summary>estimateFeeEarnings#
Scenario estimate in quote atoms, not an accrual or a transaction quote. Each role has its own eligible volume; overlapping roles may earn together. Aggregate fee floors deliberately omit per-fill rounding, which depends on the unknown future fill distribution. Actual earnings can differ.
Declaration source: packages/core/src/feeEarnings.ts:44.
export function estimateFeeEarnings(volumes: EarningVolumes, priceBps: number, config: FeeEarningsConfig): (EarningVolumes & { total: bigint; feeBps: number; }) | null;
Parameters
volumes: EarningVolumes— Not documented. See EarningVolumes for its declaration and available field documentation.priceBps: number— Not documented.config: FeeEarningsConfig— Not documented. See FeeEarningsConfig for its declaration and available field documentation.
Returns
(EarningVolumes & { total: bigint; feeBps: number; }) | null
Not documented.
Throws
Not documented.
</details> <details> <summary>estimateFill</summary>estimateFill#
Estimate fill for a market order by walking the named outcome's own lane.
A BUY lifts that lane's asks and a SELL hits its bids. avgPrice and cost
are in the outcome's own denomination.
Declaration source: packages/core/src/orderbook.ts:283.
export function estimateFill(outcome: OutcomeAsset, intent: TradeIntent, quantity: bigint, orderbook: OrderbookAccount): { filled: bigint; remaining: bigint; avgPrice: number; cost: bigint; };
Parameters
outcome: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.quantity: bigint— Not documented.orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
{ filled: bigint; remaining: bigint; avgPrice: number; cost: bigint; }
Estimated fill quantity, average price, and total cost.
Throws
Not documented.
</details> <details> <summary>estimateFillForIntent</summary>estimateFillForIntent#
Walk ONE OUTCOME'S OWN book for a prospective taker and return a UI-ready {@link FillEstimate}: average fill price, price impact, slippage, filled/remaining split, and (optionally) the taker fee.
Why a lane, and not "the book"#
The program keeps one canonical array, but it holds two economically
independent books. A canonical bid at 4800 is a YES buyer at 48c YES
(BuyYes) OR a NO buyer at 48c NO (BuyNo); only SellYes fills the
first and only SellNo fills the second. A NO taker walking the whole canonical array
therefore counts YES liquidity it can never touch, and reports a fill it
cannot get.
Why nothing is complemented#
spec/ORDERBOOK.md § 2.3a: the canonical price of an order is the price its
owner pays or receives per share, in that order's own outcome denomination.
A SellNo resting at canonical 5200 IS a 52c NO offer. So a lane's prices are
already the trader's prices, limitPriceBps is the trader's own price, and
every *PriceBps field comes back in the same denomination. Complementing
anywhere in here would quote 100 − p, which is the defect this replaced.
The walk#
A BUY acquires the outcome and lifts lane.asks (lowest first); a SELL
disposes of it and hits lane.bids (highest first). True in both outcomes —
which is the whole point of the lane view.
Preconditions: lane.bids sorted price-descending, lane.asks
price-ascending — the layout aggregateOrderbookLanes produces and the
indexer's orderbook.lanes serves. Prices are bps; sizes are base units.
Estimate, not settlement: this reads a possibly-stale snapshot. It does
not model maker self-trade or tick rounding of the resting remainder. Fees
are estimated per consumed level from that level's price. The on-chain
worst_acceptable_price_bps remains the authoritative IOC guard.
Declaration source: packages/core/src/orderbook.ts:376.
export function estimateFillForIntent(params: { outcome: OutcomeAsset; intent: TradeIntent; quantity: bigint; orderType: OrderType; limitPriceBps: number; lane: OutcomeLaneBook; fee?: FillEstimateFee; worstAcceptablePriceBps?: number; }): FillEstimate;
Parameters
params: { outcome: OutcomeAsset; intent: TradeIntent; quantity: bigint; orderType: OrderType; limitPriceBps: number; lane: OutcomeLaneBook; fee?: FillEstimateFee; worstAcceptablePriceBps?: number; }— Not documented.
Returns
FillEstimate
Not documented.
Throws
Not documented.
</details> <details> <summary>estimateInstructionSize</summary>estimateInstructionSize#
Estimates the byte size of a single instruction for transaction size budgeting.
This is an approximation. The actual serialized size depends on the transaction format (legacy vs v0), number of unique accounts, and compact-u16 encoding.
Declaration source: packages/core/src/instructions.ts:337.
export function estimateInstructionSize(accountCount: number, dataLength: number): number;
Parameters
accountCount: number— D0{count} Number of account metas in the instruction.dataLength: number— D0{byte} Length of the instruction data.
Returns
number
D0{byte} Estimated byte contribution of this instruction to the transaction.
Throws
Not documented.
</details> <details> <summary>estimateLedgerRentLamports</summary>estimateLedgerRentLamports#
Solana rent-exempt minimum (lamports) for the canonical trader_ledger.
Mirrors the on-chain account size (TRADER_LEDGER_ACCOUNT_SIZE). The creator
pre-pays this and it is refunded when the market is closed.
Declaration source: packages/core/src/constants.ts:607.
export function estimateLedgerRentLamports(rate: RentRate): number;
Parameters
rate: RentRate— Cluster-calibrated rate fromcalibrateRentRate. See RentRate for its declaration and available field documentation.
Returns
number
D0{lamport} Rent-exempt minimum at the cluster's live rate.
Throws
Not documented.
</details> <details> <summary>estimateMakerRebate</summary>estimateMakerRebate#
Conditional rebate if this resting quantity fills at its limit price in one eligible fill.
Declaration source: packages/core/src/feeEarnings.ts:64.
export function estimateMakerRebate(quantity: bigint, priceBps: number, config: FeeEarningsConfig): bigint | null;
Parameters
quantity: bigint— Not documented.priceBps: number— Not documented.config: FeeEarningsConfig— Not documented. See FeeEarningsConfig for its declaration and available field documentation.
Returns
bigint | null
Not documented.
Throws
Not documented.
</details> <details> <summary>estimateTakerFill</summary>estimateTakerFill#
Estimate one IOC taker order against the book and the supplied seats, from a fresh working state. See the module comment for the exact rules.
Declaration source: packages/core/src/router/takerFill.ts:252.
export function estimateTakerFill(params: TakerFillParams): TakerFillEstimate;
Parameters
params: TakerFillParams— Not documented. See TakerFillParams for its declaration and available field documentation.
Returns
TakerFillEstimate
Not documented.
Throws
Not documented.
</details> <details> <summary>evacuateIdleSeat</summary>evacuateIdleSeat#
Not documented.
Declaration source: packages/core/src/sdk.ts:2270.
export function evacuateIdleSeat(input: EvacuateIdleSeatInput, programAddress?: Address): Promise<SdkResult<EvacuateIdleSeatResult>>;
Parameters
input: EvacuateIdleSeatInput— Not documented. See EvacuateIdleSeatInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<EvacuateIdleSeatResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
EvacuateIdleSeatAccounts#
Accounts for the permissionless idle-seat evacuation route (0x45).
Declaration source: packages/core/src/instructions.ts:3974.
export interface EvacuateIdleSeatAccounts extends BinaryRecorderTailAccounts {
market: Address;
traderLedger: Address;
orderbook: Address;
position: Address;
owner: Address;
keeper: Address;
config: Address;
vault: Address;
settlementMint: Address;
quoteDestination: Address;
yesMint: Address;
yesDestination: Address;
noMint: Address;
noDestination: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
systemProgram: Address;
/** Required for an external market; inserted ahead of the risk accounts. */
marketMeta?: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.marketMeta— Required for an external market; inserted ahead of the risk accounts.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
EvacuateIdleSeatInput#
Permissionlessly clear one full-ledger idle seat into owner-controlled accounts.
Declaration source: packages/core/src/sdk.ts:2245.
export interface EvacuateIdleSeatInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
owner: Address;
keeper: Address;
settlementMint: Address;
nonce: bigint;
slotIndex: number;
/** Required only for terminal external markets. */
marketMeta?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.marketMeta— Required only for terminal external markets.
EvacuateIdleSeatResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2262.
export interface EvacuateIdleSeatResult {
position: Address;
traderLedger: Address;
quoteDestination: Address;
yesDestination: Address;
noDestination: Address;
}
evaluateDiscovery#
The eligibility gate E1–E5 and depth for one market at one snapshot.
- E1 lifecycle:
not-trading,halted,market-not-started,market-ended. - E2 liquidity:
liquidity-state-unavailable(also for an unreadable settlement mint), elseno-liquiditywhen nothing is executable. - E3 quotable lanes (YES always; NO when there are attached seats or an
executable NO order):
missing-lane-quotes,crossed-lane-quotes,spread-too-wide; notelanes-cross-reflected. - E4 sponsored feed: notes only.
- E5
band-depth-below-floor:rank < minRankDepthWholeTokens × 10^decimals.
When E1 fails the result is that one exclusion with zero depth and no notes; the
source and the feed are not read. E3 and E5 read liquidity, so they are
evaluated only when E2 passes.
DESIGN-QUESTION: this replaces today's ['no-liquidity', 'missing-lane-quotes']
for an empty book with ['no-liquidity'], so each predicate failing alone gives
one exclusion.
Declaration source: packages/core/src/marketDiscovery.ts:542.
export function evaluateDiscovery(market: DiscoveryMarket, source: LiquiditySource, input: { readonly clock: DiscoveryClock; readonly policy: DiscoveryPolicy; readonly feed: SponsoredFeedAccount; }): DiscoveryEvaluation;
Parameters
market: DiscoveryMarket— Not documented. See DiscoveryMarket for its declaration and available field documentation.source: LiquiditySource— Not documented. See LiquiditySource for its declaration and available field documentation.input: { readonly clock: DiscoveryClock; readonly policy: DiscoveryPolicy; readonly feed: SponsoredFeedAccount; }— Not documented.
Returns
DiscoveryEvaluation
Not documented.
Throws
Not documented.
</details> <details> <summary>evaluateFairValueEdge</summary>evaluateFairValueEdge#
Evaluate whether a submitted YES/NO buy/sell price is rich or cheap versus a fair YES probability. Edge is returned in the same side denomination as the submitted order.
Declaration source: packages/core/src/fairValue.ts:246.
export function evaluateFairValueEdge(input: FairValueEdgeInput): FairValueEdge;
Parameters
input: FairValueEdgeInput— Not documented. See FairValueEdgeInput for its declaration and available field documentation.
Returns
FairValueEdge
Not documented.
Throws
Not documented.
</details> <details> <summary>evaluateStopLossTrigger</summary>evaluateStopLossTrigger#
Evaluate a stop against the current book of its outcome. Pure.
Declaration source: packages/core/src/stopLoss/trigger.ts:62.
export function evaluateStopLossTrigger(input: StopLossTriggerInput): StopLossTriggerEvaluation;
Parameters
input: StopLossTriggerInput— Not documented. See StopLossTriggerInput for its declaration and available field documentation.
Returns
StopLossTriggerEvaluation
Not documented.
Throws
Not documented.
</details> <details> <summary>EXCHANGE_CANDLE_INTERVALS</summary>EXCHANGE_CANDLE_INTERVALS#
Candle bucket lengths the indexer serves, in seconds.
Declaration source: packages/core/src/api/exchange.ts:22.
export declare const EXCHANGE_CANDLE_INTERVALS: readonly [60, 300, 900, 3600, 86400];
ExchangeAccountResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:367.
export type ExchangeAccountResponse = z.infer<typeof exchangeAccountResponseSchema>;
exchangeAccountResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:338.
export declare const exchangeAccountResponseSchema: z.ZodObject<{ walletAddress: z.ZodString; serverTimestamp: z.ZodString; balances: z.ZodArray<z.ZodObject<{ asset: z.ZodLiteral<"SETTLEMENT">; settlementMint: z.ZodNullable<z.ZodString>; available: z.ZodNullable<z.ZodString>; locked: z.ZodString; settledPayouts: z.ZodString; source: z.ZodLiteral<"indexed-positions">; }, z.core.$loose>>; positions: z.ZodArray<z.ZodObject<{ address: z.ZodString; marketAddress: z.ZodString; yesSymbol: z.ZodNullable<z.ZodString>; noSymbol: z.ZodNullable<z.ZodString>; yesShares: z.ZodString; noShares: z.ZodString; collateralDeposited: z.ZodString; totalBought: z.ZodString; totalSold: z.ZodString; settled: z.ZodBoolean; payout: z.ZodString; lastSlot: z.ZodNullable<z.ZodString>; }, z.core.$loose>>; risk: z.ZodObject<{ totalCurrentValue: z.ZodString; maxLoss: z.ZodString; maxPayout: z.ZodString; claimableAmount: z.ZodString; concentrationWarning: z.ZodNullable<z.ZodObject<{ marketAddress: z.ZodString; assetLabel: z.ZodString; worstCaseLoss: z.ZodString; accountValue: z.ZodString; ratioBps: z.ZodNumber; }, z.core.$loose>>; exposures: z.ZodArray<z.ZodObject<{ assetLabel: z.ZodString; netYesShares: z.ZodString; absoluteNetYesShares: z.ZodString; marketCount: z.ZodNumber; worstCaseLoss: z.ZodString; }, z.core.$loose>>; markets: z.ZodArray<z.ZodObject<{ marketAddress: z.ZodString; assetLabel: z.ZodString; yesSymbol: z.ZodNullable<z.ZodString>; noSymbol: z.ZodNullable<z.ZodString>; currentYesPriceBps: z.ZodNumber; netYesShares: z.ZodString; currentValue: z.ZodString; payoutIfYes: z.ZodString; payoutIfNo: z.ZodString; maxPayout: z.ZodString; lossIfYes: z.ZodString; lossIfNo: z.ZodString; worstCaseLoss: z.ZodString; timeToSettlementSeconds: z.ZodNullable<z.ZodNumber>; }, z.core.$loose>>; }, z.core.$loose>; totalPositions: z.ZodNumber; openPositionCount: z.ZodNumber; settledPositionCount: z.ZodNumber; limit: z.ZodNumber; offset: z.ZodNumber; }, z.core.$loose>;
ExchangeCandlesOptions#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:395.
export interface ExchangeCandlesOptions extends ExchangeRequestOptions {
/** Bucket length in seconds: one of {@link EXCHANGE_CANDLE_INTERVALS}. Server default 60. */
interval?: (typeof EXCHANGE_CANDLE_INTERVALS)[number];
/** Buckets to return. Server default 500, maximum 1,000. */
limit?: number;
}
Field documentation
interval— Bucket length in seconds: one of {@link EXCHANGE_CANDLE_INTERVALS}. Server default 60.limit— Buckets to return. Server default 500, maximum 1,000.client— Override the default API client. Useful for custom base URLs and tests.signal— Abort signal for request cancellation.skipDeduplication— Disable same-tick GET de-duplication for latency-sensitive polling loops.
ExchangeCandlesResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:363.
export type ExchangeCandlesResponse = z.infer<typeof exchangeCandlesResponseSchema>;
exchangeCandlesResponseSchema#
Candles are the YES-lane price series; a :NO symbol has none (see the indexer route).
Declaration source: packages/core/src/api/exchange.ts:157.
export declare const exchangeCandlesResponseSchema: z.ZodObject<{ symbol: z.ZodString; marketAddress: z.ZodString; interval: z.ZodNumber; candles: z.ZodArray<z.ZodObject<{ bucketStart: z.ZodString; openPriceBps: z.ZodNumber; highPriceBps: z.ZodNumber; lowPriceBps: z.ZodNumber; closePriceBps: z.ZodNumber; volume: z.ZodString; tradeCount: z.ZodNumber; }, z.core.$loose>>; }, z.core.$loose>;
ExchangeInstrument#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:353.
export type ExchangeInstrument = z.infer<typeof exchangeInstrumentSchema>;
exchangeInstrumentSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:65.
export declare const exchangeInstrumentSchema: z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; }, z.core.$loose>;
ExchangeMarket#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:356.
export type ExchangeMarket = z.infer<typeof exchangeMarketSchema>;
ExchangeMarketResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:358.
export type ExchangeMarketResponse = z.infer<typeof exchangeMarketResponseSchema>;
exchangeMarketResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:105.
export declare const exchangeMarketResponseSchema: z.ZodObject<{ market: z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; bestBid: z.ZodNullable<z.ZodNumber>; bestAsk: z.ZodNullable<z.ZodNumber>; totalVolume: z.ZodString; totalTrades: z.ZodNumber; totalPositions: z.ZodNumber; startPrice: z.ZodNullable<z.ZodString>; endPrice: z.ZodNullable<z.ZodString>; }, z.core.$loose>; }, z.core.$loose>;
exchangeMarketSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:83.
export declare const exchangeMarketSchema: z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; bestBid: z.ZodNullable<z.ZodNumber>; bestAsk: z.ZodNullable<z.ZodNumber>; totalVolume: z.ZodString; totalTrades: z.ZodNumber; totalPositions: z.ZodNumber; startPrice: z.ZodNullable<z.ZodString>; endPrice: z.ZodNullable<z.ZodString>; }, z.core.$loose>;
ExchangeMarketsResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:357.
export type ExchangeMarketsResponse = z.infer<typeof exchangeMarketsResponseSchema>;
exchangeMarketsResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:96.
export declare const exchangeMarketsResponseSchema: z.ZodObject<{ markets: z.ZodArray<z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; bestBid: z.ZodNullable<z.ZodNumber>; bestAsk: z.ZodNullable<z.ZodNumber>; totalVolume: z.ZodString; totalTrades: z.ZodNumber; totalPositions: z.ZodNumber; startPrice: z.ZodNullable<z.ZodString>; endPrice: z.ZodNullable<z.ZodString>; }, z.core.$loose>>; total: z.ZodNumber; limit: z.ZodNumber; offset: z.ZodNumber; }, z.core.$loose>;
ExchangeOrderbookLevel#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:359.
export type ExchangeOrderbookLevel = z.infer<typeof exchangeOrderbookLevelSchema>;
ExchangeOrderbookOptions#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:385.
export interface ExchangeOrderbookOptions extends ExchangeRequestOptions {
/** Maximum depth per side. Server maximum is 200. */
limit?: number;
}
Field documentation
limit— Maximum depth per side. Server maximum is 200.client— Override the default API client. Useful for custom base URLs and tests.signal— Abort signal for request cancellation.skipDeduplication— Disable same-tick GET de-duplication for latency-sensitive polling loops.
ExchangeOrderbookResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:360.
export type ExchangeOrderbookResponse = z.infer<typeof exchangeOrderbookResponseSchema>;
exchangeOrderbookResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:119.
export declare const exchangeOrderbookResponseSchema: z.ZodObject<{ symbol: z.ZodString; marketAddress: z.ZodString; sequence: z.ZodNullable<z.ZodString>; slot: z.ZodNullable<z.ZodString>; checksum: z.ZodNullable<z.ZodString>; serverTimestamp: z.ZodString; bids: z.ZodArray<z.ZodObject<{ priceBps: z.ZodNumber; quantity: z.ZodString; orders: z.ZodNumber; }, z.core.$loose>>; asks: z.ZodArray<z.ZodObject<{ priceBps: z.ZodNumber; quantity: z.ZodString; orders: z.ZodNumber; }, z.core.$loose>>; }, z.core.$loose>;
ExchangePaginationOptions#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:378.
export interface ExchangePaginationOptions extends ExchangeRequestOptions {
/** Page size. Server maximum is 100 for symbol, market, and account pages. */
limit?: number;
/** Offset into the paginated server result set. Server maximum is 1,000,000. */
offset?: number;
}
Field documentation
limit— Page size. Server maximum is 100 for symbol, market, and account pages.offset— Offset into the paginated server result set. Server maximum is 1,000,000.client— Override the default API client. Useful for custom base URLs and tests.signal— Abort signal for request cancellation.skipDeduplication— Disable same-tick GET de-duplication for latency-sensitive polling loops.
ExchangeQualityResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:364.
export type ExchangeQualityResponse = z.infer<typeof exchangeQualityResponseSchema>;
exchangeQualityResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:195.
export declare const exchangeQualityResponseSchema: z.ZodObject<{ status: z.ZodEnum<{ ok: "ok"; stale: "stale"; empty: "empty"; }>; serverTimestamp: z.ZodString; programId: z.ZodString; chain: z.ZodLiteral<"solana">; latestMarketSlot: z.ZodNullable<z.ZodString>; latestOrderSlot: z.ZodNullable<z.ZodString>; latestTradeSlot: z.ZodNullable<z.ZodString>; marketCount: z.ZodNumber; staleMarketCount: z.ZodNumber; warnings: z.ZodArray<z.ZodString>; }, z.core.$loose>;
ExchangeReconcileResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:366.
export type ExchangeReconcileResponse = z.infer<typeof exchangeReconcileResponseSchema>;
exchangeReconcileResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:240.
export declare const exchangeReconcileResponseSchema: z.ZodObject<{ symbol: z.ZodString; marketAddress: z.ZodString; serverTimestamp: z.ZodString; market: z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; bestBid: z.ZodNullable<z.ZodNumber>; bestAsk: z.ZodNullable<z.ZodNumber>; totalVolume: z.ZodString; totalTrades: z.ZodNumber; totalPositions: z.ZodNumber; startPrice: z.ZodNullable<z.ZodString>; endPrice: z.ZodNullable<z.ZodString>; }, z.core.$loose>; orderbook: z.ZodObject<{ symbol: z.ZodString; marketAddress: z.ZodString; sequence: z.ZodNullable<z.ZodString>; slot: z.ZodNullable<z.ZodString>; checksum: z.ZodNullable<z.ZodString>; serverTimestamp: z.ZodString; bids: z.ZodArray<z.ZodObject<{ priceBps: z.ZodNumber; quantity: z.ZodString; orders: z.ZodNumber; }, z.core.$loose>>; asks: z.ZodArray<z.ZodObject<{ priceBps: z.ZodNumber; quantity: z.ZodString; orders: z.ZodNumber; }, z.core.$loose>>; }, z.core.$loose>; latestTrade: z.ZodNullable<z.ZodObject<{ id: z.ZodString; signature: z.ZodString; slot: z.ZodString; fillIndex: z.ZodNullable<z.ZodNumber>; priceBps: z.ZodNumber; quantity: z.ZodString; makerSide: z.ZodNullable<z.ZodNumber>; fee: z.ZodNullable<z.ZodString>; executedAt: z.ZodString; }, z.core.$loose>>; quality: z.ZodObject<{ status: z.ZodEnum<{ ok: "ok"; stale: "stale"; empty: "empty"; }>; symbol: z.ZodString; marketAddress: z.ZodString; marketSlot: z.ZodNullable<z.ZodString>; orderbookSequence: z.ZodNullable<z.ZodString>; latestOrderSlot: z.ZodNullable<z.ZodString>; latestTradeSlot: z.ZodNullable<z.ZodString>; openOrderCount: z.ZodNumber; lastIndexedAt: z.ZodNullable<z.ZodString>; freshnessSeconds: z.ZodNullable<z.ZodNumber>; warnings: z.ZodArray<z.ZodString>; }, z.core.$loose>; recovery: z.ZodObject<{ refetchOnChecksumMismatch: z.ZodBoolean; refetchOnStaleQuality: z.ZodBoolean; compareDirectAccounts: z.ZodBoolean; }, z.core.$loose>; }, z.core.$loose>;
ExchangeRequestOptions#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:369.
export interface ExchangeRequestOptions {
/** Override the default API client. Useful for custom base URLs and tests. */
client?: ApiClient;
/** Abort signal for request cancellation. */
signal?: AbortSignal;
/** Disable same-tick GET de-duplication for latency-sensitive polling loops. */
skipDeduplication?: boolean;
}
Field documentation
client— Override the default API client. Useful for custom base URLs and tests.signal— Abort signal for request cancellation.skipDeduplication— Disable same-tick GET de-duplication for latency-sensitive polling loops.
ExchangeSymbolQualityResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:365.
export type ExchangeSymbolQualityResponse = z.infer<typeof exchangeSymbolQualityResponseSchema>;
exchangeSymbolQualityResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:210.
export declare const exchangeSymbolQualityResponseSchema: z.ZodObject<{ status: z.ZodEnum<{ ok: "ok"; stale: "stale"; empty: "empty"; }>; symbol: z.ZodString; marketAddress: z.ZodString; marketSlot: z.ZodNullable<z.ZodString>; orderbookSequence: z.ZodNullable<z.ZodString>; latestOrderSlot: z.ZodNullable<z.ZodString>; latestTradeSlot: z.ZodNullable<z.ZodString>; openOrderCount: z.ZodNumber; lastIndexedAt: z.ZodNullable<z.ZodString>; freshnessSeconds: z.ZodNullable<z.ZodNumber>; warnings: z.ZodArray<z.ZodString>; }, z.core.$loose>;
ExchangeSymbolResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:355.
export type ExchangeSymbolResponse = z.infer<typeof exchangeSymbolResponseSchema>;
exchangeSymbolResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:77.
export declare const exchangeSymbolResponseSchema: z.ZodObject<{ symbol: z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; }, z.core.$loose>; }, z.core.$loose>;
ExchangeSymbolsResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:354.
export type ExchangeSymbolsResponse = z.infer<typeof exchangeSymbolsResponseSchema>;
exchangeSymbolsResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:68.
export declare const exchangeSymbolsResponseSchema: z.ZodObject<{ symbols: z.ZodArray<z.ZodObject<{ instrumentId: z.ZodString; symbol: z.ZodString; marketAddress: z.ZodString; marketId: z.ZodString; lookupKeys: z.ZodObject<{ symbol: z.ZodString; instrumentId: z.ZodString; marketAddress: z.ZodString; marketOutcome: z.ZodString; marketId: z.ZodString; marketIdOutcome: z.ZodString; pythFeedId: z.ZodString; }, z.core.$loose>; asset: z.ZodString; quote: z.ZodString; outcome: z.ZodEnum<{ YES: "YES"; NO: "NO"; }>; pythFeedId: z.ZodString; durationSeconds: z.ZodString; tStart: z.ZodString; tEnd: z.ZodString; settlementMint: z.ZodNullable<z.ZodString>; tickSizeBps: z.ZodNullable<z.ZodNumber>; minNotional: z.ZodNullable<z.ZodString>; state: z.ZodNumber; creator: z.ZodNullable<z.ZodString>; programId: z.ZodString; chain: z.ZodLiteral<"solana">; }, z.core.$loose>>; total: z.ZodNumber; limit: z.ZodNumber; offset: z.ZodNumber; }, z.core.$loose>;
ExchangeTickerResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:361.
export type ExchangeTickerResponse = z.infer<typeof exchangeTickerResponseSchema>;
exchangeTickerResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:178.
export declare const exchangeTickerResponseSchema: z.ZodObject<{ symbol: z.ZodString; marketAddress: z.ZodString; bestBid: z.ZodNullable<z.ZodNumber>; bestAsk: z.ZodNullable<z.ZodNumber>; midPriceBps: z.ZodNullable<z.ZodNumber>; lastPriceBps: z.ZodNullable<z.ZodNumber>; volume: z.ZodString; tradeCount: z.ZodNumber; state: z.ZodNumber; serverTimestamp: z.ZodString; }, z.core.$loose>;
ExchangeTradesOptions#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:390.
export interface ExchangeTradesOptions extends ExchangeRequestOptions {
/** Most recent trades to return, newest first. Server default 100, maximum 500. */
limit?: number;
}
Field documentation
limit— Most recent trades to return, newest first. Server default 100, maximum 500.client— Override the default API client. Useful for custom base URLs and tests.signal— Abort signal for request cancellation.skipDeduplication— Disable same-tick GET de-duplication for latency-sensitive polling loops.
ExchangeTradesResponse#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:362.
export type ExchangeTradesResponse = z.infer<typeof exchangeTradesResponseSchema>;
exchangeTradesResponseSchema#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:132.
export declare const exchangeTradesResponseSchema: z.ZodObject<{ symbol: z.ZodString; marketAddress: z.ZodString; settlementMint: z.ZodOptional<z.ZodNullable<z.ZodString>>; trades: z.ZodArray<z.ZodObject<{ id: z.ZodString; signature: z.ZodString; slot: z.ZodString; fillIndex: z.ZodNullable<z.ZodNumber>; priceBps: z.ZodNumber; quantity: z.ZodString; makerSide: z.ZodNullable<z.ZodNumber>; fee: z.ZodNullable<z.ZodString>; executedAt: z.ZodString; }, z.core.$loose>>; nextCursor: z.ZodNullable<z.ZodString>; }, z.core.$loose>;
ExecutionCapability#
One capability statement for one stream on one delivery. Slots are bigint.
Declaration source: packages/core/src/execution/capability.ts:61.
export interface ExecutionCapability {
readonly provider: Provider;
readonly ordering: OrderingCapability;
readonly makerSurface: MakerSurface;
readonly programId: string;
readonly policyVersion: string;
readonly deploymentIdentity: string;
readonly enrollmentRevision?: string;
readonly leaderIdentity?: string;
readonly effectiveSlotStart?: bigint;
readonly effectiveSlotEnd?: bigint;
readonly observedAtMs: number;
readonly confidence: Confidence;
readonly failureMode: FailureMode;
readonly enrollment: Enrollment;
readonly availability: Availability;
/** True when the statement comes from a local stand-in; reports then carry the disclaimer. */
readonly standIn: boolean;
}
Field documentation
standIn— True when the statement comes from a local stand-in; reports then carry the disclaimer.
ExecutionCapabilityJson#
The JSON form: slots as decimal strings, absent optionals omitted.
Declaration source: packages/core/src/execution/capability.ts:82.
export interface ExecutionCapabilityJson {
readonly provider: Provider;
readonly ordering: OrderingCapability;
readonly makerSurface: MakerSurface;
readonly programId: string;
readonly policyVersion: string;
readonly deploymentIdentity: string;
readonly enrollmentRevision?: string;
readonly leaderIdentity?: string;
readonly effectiveSlotStart?: string;
readonly effectiveSlotEnd?: string;
readonly observedAtMs: number;
readonly confidence: Confidence;
readonly failureMode: FailureMode;
readonly enrollment: Enrollment;
readonly availability: Availability;
readonly standIn: boolean;
}
executionCapabilityToJson#
Rust's canonical JSON form of a capability (field order as the Rust struct).
Declaration source: packages/core/src/execution/capability.ts:142.
export function executionCapabilityToJson(capability: ExecutionCapability): ExecutionCapabilityJson;
Parameters
capability: ExecutionCapability— Not documented. See ExecutionCapability for its declaration and available field documentation.
Returns
ExecutionCapabilityJson
Not documented.
Throws
Not documented.
</details> <details> <summary>ExecutionContractError</summary>ExecutionContractError#
Not documented.
Declaration source: packages/core/src/execution/parse.ts:10.
export declare class ExecutionContractError extends Error {
constructor(path: string, message: string);
readonly path: string;
}
Parameters
path: string— Not documented.message: string— Not documented.
Throws
Not documented.
</details> <details> <summary>expireMarket</summary>expireMarket#
Build ExpireMarket instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:710.
export function expireMarket(input: ExpireMarketInput, programAddress?: Address): Promise<SdkResult<ExpireMarketResult>>;
Parameters
input: ExpireMarketInput— Not documented. See ExpireMarketInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ExpireMarketResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ExpireMarketAccounts#
Accounts for ExpireMarket instruction.
Declaration source: packages/core/src/instructions.ts:1544.
export interface ExpireMarketAccounts {
market: Address;
assetState: Address;
caller: Address;
config: Address;
vault: Address;
creatorTokenAccount: Address;
settlementMint: Address;
tokenProgram: Address;
selfProgram?: Address;
logAuthority?: Address;
}
ExpireMarketInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:686.
export interface ExpireMarketInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketId: bigint;
pythFeedId: Uint8Array;
durationSeconds: bigint;
creator: Address;
caller: Address;
creatorTokenAccount: Address;
settlementMint: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.
ExpireMarketResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:702.
export interface ExpireMarketResult {
market: Address;
vault: Address;
}
ExpireMarketSnapshot#
Everything ExpireMarket needs.
Source of truth: program/src/processor/expire_market.rs:337-356 plus
MarketAccount::can_expire_with_window (state/market.rs:1780-1788).
Declaration source: packages/core/src/preflight/types.ts:528.
export interface ExpireMarketSnapshot {
/** Derived lifecycle state; `Resolved`/`Closed` mean a terminal outcome. */
state: MarketState;
/**
* `market.outcome` raw byte. Overrides the `state` derivation when supplied,
* which matters for a market whose outcome byte is set but whose derived
* state has not been refreshed.
*/
outcome?: number;
/** `market.t_end` — unix seconds. */
tEnd: number;
nowUnix: number;
/**
* `config.market_expiration_window_seconds`. `0` selects the protocol
* default `MARKET_EXPIRY_WINDOW` (`logic/expire_market/mod.rs:22-29`).
*/
marketExpirationWindowSeconds: number;
/**
* `market.is_native_pyth()`. Only native price markets expire through this
* instruction; an external market raises `WrongResolver`
* (`expire_market.rs:343-345`). Defaults to `true`.
*/
isNativePyth?: boolean;
}
Field documentation
state— Derived lifecycle state;Resolved/Closedmean a terminal outcome.outcome—market.outcomeraw byte. Overrides thestatederivation when supplied, which matters for a market whose outcome byte is set but whose derived state has not been refreshed.tEnd—market.t_end— unix seconds.marketExpirationWindowSeconds—config.market_expiration_window_seconds.0selects the protocol defaultMARKET_EXPIRY_WINDOW(logic/expire_market/mod.rs:22-29).isNativePyth—market.is_native_pyth(). Only native price markets expire through this instruction; an external market raisesWrongResolver(expire_market.rs:343-345). Defaults totrue.
expireMarketVerdict#
Decide whether the program would accept this ExpireMarket.
IDEMPOTENCY NOTE: a market that already carries a terminal outcome does NOT
revert here. prepare_expire_market returns None
(expire_market.rs:349-351) and the caller turns that into Ok(()) with
default return data (expire_market.rs:192-203), so the transaction lands
and does nothing. The verdict mirrors that with allowed: true; a UI should
hide the button on a resolved market for its own reasons, not because the
program would reject the call.
Declaration source: packages/core/src/preflight/lifecycle.ts:308.
export function expireMarketVerdict(snapshot: ExpireMarketSnapshot, options?: PreflightOptions): Verdict;
Parameters
snapshot: ExpireMarketSnapshot— Not documented. See ExpireMarketSnapshot for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>EXTERNAL_ORDERBOOK_CAPACITY</summary>EXTERNAL_ORDERBOOK_CAPACITY#
Not documented.
Declaration source: packages/core/src/constants.ts:280.
export declare const EXTERNAL_ORDERBOOK_CAPACITY: 512;
EXTERNAL_PAYOUT_DENOMINATOR#
Not documented.
Declaration source: packages/core/src/constants.ts:279.
export declare const EXTERNAL_PAYOUT_DENOMINATOR: 10000;
EXTERNAL_TRADER_LEDGER_SEATS#
Not documented.
Declaration source: packages/core/src/constants.ts:281.
export declare const EXTERNAL_TRADER_LEDGER_SEATS: 1025;
ExternalPayout#
Not documented.
Declaration source: packages/core/src/externalPayout.ts:12.
export interface ExternalPayout {
readonly numeratorYes: bigint;
readonly numeratorNo: bigint;
readonly denominator: bigint;
readonly partitionRule: PartitionRule;
readonly origin: PayoutOrigin;
readonly sourceResultCode: SourceResultCode | null;
readonly sourceFactHash: Uint8Array;
}
ExternalPayoutError#
Not documented.
Declaration source: packages/core/src/externalPayout.ts:42.
export declare class ExternalPayoutError extends RangeError {
constructor(code: ExternalPayoutErrorCode);
readonly code: ExternalPayoutErrorCode;
}
Parameters
code: ExternalPayoutErrorCode— Not documented. See ExternalPayoutErrorCode for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>ExternalPayoutErrorCode</summary>ExternalPayoutErrorCode#
Not documented.
Declaration source: packages/core/src/externalPayout.ts:34.
export type ExternalPayoutErrorCode =
| 'InvalidNumber'
| 'Overflow'
| 'OutOfRange'
| 'UnsupportedOutcome'
| 'InvalidResponse'
| 'MathOverflow';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
externalPayoutFromMeta#
Read exact decoded metadata without a D4/percentage/outcome fallback. Callers authenticate the account owner, PDA and market binding separately. A zero source numerator is a valid value, including scalar endpoints.
Declaration source: packages/core/src/externalPayout.ts:192.
export function externalPayoutFromMeta(meta: ExternalPayoutMetaFields): ExternalPayout | null;
Parameters
meta: ExternalPayoutMetaFields— Not documented. See ExternalPayoutMetaFields for its declaration and available field documentation.
Returns
ExternalPayout | null
Not documented.
Throws
Not documented.
</details> <details> <summary>externalPayoutLabel</summary>externalPayoutLabel#
Presentation only. A supplied frozen descriptor's source N is never assumed.
Declaration source: packages/core/src/externalPayout.ts:271.
export function externalPayoutLabel(payout: ExternalPayout, frozenDescriptor?: { readonly sourceNotionalDollars?: string | null; }): string;
Parameters
payout: ExternalPayout— Not documented. See ExternalPayout for its declaration and available field documentation.frozenDescriptor: { readonly sourceNotionalDollars?: string | null; } | undefined— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>ExternalPayoutMetaFields</summary>ExternalPayoutMetaFields#
Decoded terminal fields. This shape is structural; it defines no account ABI.
Declaration source: packages/core/src/externalPayout.ts:174.
export interface ExternalPayoutMetaFields {
readonly resolved: boolean;
readonly legCount: number;
readonly payoutEncoding: number;
readonly payoutNumeratorYes: bigint;
readonly payoutNumeratorNo: bigint;
readonly payoutDenominator: bigint;
readonly payoutOrigin: number;
readonly payoutPartition: number;
readonly payoutSourceResult: number;
readonly terminalFactHash: Uint8Array;
}
externalRedemptionEstimate#
Per instruction/leg floor. Never floor the sum of both legs.
Declaration source: packages/core/src/externalPayout.ts:246.
export function externalRedemptionEstimate(yesAmount: bigint, noAmount: bigint, payout: ExternalPayout): bigint;
Parameters
yesAmount: bigint— Not documented.noAmount: bigint— Not documented.payout: ExternalPayout— Not documented. See ExternalPayout for its declaration and available field documentation.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>FAILURE_MODE_VALUES</summary>FAILURE_MODE_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:49.
export declare const FAILURE_MODE_VALUES: readonly ["none", "provider_failover", "local_scheduler", "unknown"];
FailureMode#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:55.
export type FailureMode = (typeof FAILURE_MODE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FairValueEdge#
Not documented.
Declaration source: packages/core/src/fairValue.ts:64.
export interface FairValueEdge {
outcome: OutcomeAsset;
intent: TradeIntent;
priceBps: number;
sideFairValueBps: number;
breakEvenProbabilityBps: number;
edgeBps: number;
verdict: FairValueVerdict;
syntheticFairProbabilityBps: number;
syntheticEntryPriceBps: number;
kellyFractionBps: number;
}
FairValueEdgeInput#
Not documented.
Declaration source: packages/core/src/fairValue.ts:53.
export interface FairValueEdgeInput {
/** Fair YES probability in bps. NO fair value is `10_000 - fairYesProbabilityBps`. */
fairYesProbabilityBps: number;
/** Named outcome. */
outcome: OutcomeAsset;
/** BUY or SELL. */
intent: TradeIntent;
/** Price in the named outcome's denomination, in bps. */
priceBps: number;
}
Field documentation
fairYesProbabilityBps— Fair YES probability in bps. NO fair value is10_000 - fairYesProbabilityBps.outcome— Named outcome.intent— BUY or SELL.priceBps— Price in the named outcome's denomination, in bps.
FairValueModel#
Not documented.
Declaration source: packages/core/src/fairValue.ts:16.
export type FairValueModel = 'log_return_normal';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FairValueOptions#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:45.
export interface FairValueOptions {
/** Wall clock in unix seconds, for the spline staleness gate. */
nowUnix?: number;
}
Field documentation
nowUnix— Wall clock in unix seconds, for the spline staleness gate.
FairValueReference#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:18.
export interface FairValueReference {
source: FairValueReferenceSource;
/** Price in bps of the lane's outcome; mid and microprice may be fractional. */
priceBps: number;
}
Field documentation
priceBps— Price in bps of the lane's outcome; mid and microprice may be fractional.
FairValueReferenceSource#
Not documented.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:16.
export type FairValueReferenceSource = 'book_mid' | 'book_microprice' | 'last_trade' | 'spline_mid';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FairValueVerdict#
Not documented.
Declaration source: packages/core/src/fairValue.ts:17.
export type FairValueVerdict = 'positive' | 'neutral' | 'negative';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FEE_CONFIG_RATE_LIMIT_SECONDS#
FEE_CONFIG_RATE_LIMIT_SECONDS — program/src/constants.rs:270.
One hour. The other three constants are defined as aliases of this one on chain, so they move together by construction.
Declaration source: packages/core/src/preflight/governance.ts:56.
export declare const FEE_CONFIG_RATE_LIMIT_SECONDS: 3600;
FEE_PAYER_PARTICIPATES_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:39.
export declare const FEE_PAYER_PARTICIPATES_VALUES: readonly ["yes", "no"];
FeeAmounts#
Not documented.
Declaration source: packages/core/src/fee.ts:85.
export interface FeeAmounts {
total: bigint;
protocol: bigint;
creator: bigint;
referral: bigint;
/** Amount actually paid to the approved builder (0 when none). */
builder: bigint;
maker: bigint;
}
Field documentation
builder— Amount actually paid to the approved builder (0 when none).
FeeConfigUpdateParams#
Not documented.
Declaration source: packages/core/src/utils/validation.ts:183.
export interface FeeConfigUpdateParams {
takerFeeCoefficientBps: number;
protocolShareBps: number;
creatorShareBps: number;
referralShareBps: number;
/** Governed builder share, 0..=1000 bps of the taker fee (0 = builder fees off). */
builderShareBps: number;
makerRebateShareBps: number;
makerRebateMinRestSeconds: number;
}
Field documentation
builderShareBps— Governed builder share, 0..=1000 bps of the taker fee (0 = builder fees off).
feeCurveRates#
Map both releases to the exact capped-curve calculator. Setting cap and decay to the coefficient makes the cap unreachable throughout the valid fill-price domain.
Declaration source: packages/core/src/fee.ts:234.
export function feeCurveRates(policy: FeeRatePolicy): { capBps: number; decayRateBps: number; };
Parameters
policy: FeeRatePolicy— Not documented. See FeeRatePolicy for its declaration and available field documentation.
Returns
{ capBps: number; decayRateBps: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>FEED_SYMBOLS_VERSION</summary>FEED_SYMBOLS_VERSION#
Reviewed feed-id → symbol catalogue, shared by naming and indexed filters. Version 1 consolidates the existing core Hermes catalogue; adding a symbol requires reviewing the provider's metadata. Creators cannot write this table.
Declaration source: packages/core/src/feedSymbols.ts:8.
export declare const FEED_SYMBOLS_VERSION: 1;
feedSymbols#
Not documented.
Declaration source: packages/core/src/feedSymbols.ts:9.
export declare const feedSymbols: Readonly<Record<string, string>>;
FeeEarningsConfig#
Not documented.
Declaration source: packages/core/src/feeEarnings.ts:5.
export interface FeeEarningsConfig {
/** `ConfigAccount.taker_fee_coefficient_bps`, `0..=10_000`. */
takerFeeCoefficientBps: number;
split: FeeSplit;
}
Field documentation
takerFeeCoefficientBps—ConfigAccount.taker_fee_coefficient_bps,0..=10_000.
FeePayerParticipates#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:40.
export type FeePayerParticipates = (typeof FEE_PAYER_PARTICIPATES_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FeeRatePolicy#
Not documented.
Declaration source: packages/core/src/fee.ts:222.
export type FeeRatePolicy =
| { feeCapBps: number; decayRateBps: number }
| { takerFeeCoefficientBps: number };
FeeSplit#
Governed five-way split, mirroring FeeSplit5 in program/src/logic/fee.rs.
Declaration source: packages/core/src/fee.ts:62.
export interface FeeSplit {
protocolBps: number;
creatorBps: number;
referralBps: number;
/** Governed builder share (`ConfigAccount.builder_share_bps`), 0..=1000. */
builderBps: number;
makerBps: number;
}
Field documentation
builderBps— Governed builder share (ConfigAccount.builder_share_bps), 0..=1000.
fetchAchievementCatalog#
Read the public achievement catalog: every achievement the indexer defines, in its served order (category, then threshold). No authentication; a wallet's own progress is a separate, authenticated read.
Declaration source: packages/core/src/api/users.ts:101.
export function fetchAchievementCatalog(): Promise<AchievementCatalogEntry[]>;
Parameters
No callable parameters.
Returns
Promise<{ [x: string]: unknown; id: string | number; code: string; name: string; category: string; threshold: number; description?: string | null | undefined; iconUrl?: string | null | undefined; }[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>fetchActiveMarkets</summary>fetchActiveMarkets#
Not documented.
Declaration source: packages/core/src/api/markets.ts:773.
export function fetchActiveMarkets(options?: FetchOptions): Promise<FetchMarketsResult>;
Parameters
options: FetchOptions | undefined— Not documented. See FetchOptions for its declaration and available field documentation.
Returns
Promise<FetchMarketsResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>fetchChainEventsPage</summary>fetchChainEventsPage#
Read one page of the chain-events route.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:118.
export function fetchChainEventsPage(apiBase: string, market: Address, page?: ChainEventsPageRequest): Promise<IndexerChainEventsPage>;
Parameters
apiBase: string— Not documented.market: Address— Not documented.page: ChainEventsPageRequest— Not documented. Default:{}. See ChainEventsPageRequest for its declaration and available field documentation.
Returns
Promise<IndexerChainEventsPage>
Not documented.
Throws
Not documented.
Defaults
page:{}.
fetchCurrencyMetadata#
Reads GET {api}/api/v1/currency-metadata. Throws on transport, status or contract failure.
Declaration source: packages/core/src/tokensXyz/client.ts:252.
export function fetchCurrencyMetadata(options: FetchCurrencyMetadataOptions): Promise<CurrencyMetadataResponse>;
Parameters
options: FetchCurrencyMetadataOptions— Not documented. See FetchCurrencyMetadataOptions for its declaration and available field documentation.
Returns
Promise<CurrencyMetadataResponse>
Not documented.
Throws
Not documented.
</details> <details> <summary>FetchCurrencyMetadataOptions</summary>FetchCurrencyMetadataOptions#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:243.
export interface FetchCurrencyMetadataOptions {
/** Indexer API root, e.g. `https://api.example.com`. The tokens.xyz key is never sent from clients. */
readonly apiBaseUrl: string;
readonly mints: readonly string[];
readonly fetch?: typeof fetch;
readonly signal?: AbortSignal;
}
Field documentation
apiBaseUrl— Indexer API root, e.g.https://api.example.com. The tokens.xyz key is never sent from clients.
fetchDiscovery#
Fetch one page of a discovery list. Every row comes from the one snapshot returned with it; u64 values are bigints.
Declaration source: packages/core/src/api/markets.ts:657.
export function fetchDiscovery(options?: FetchDiscoveryOptions): Promise<FetchDiscoveryResult>;
Parameters
options: FetchDiscoveryOptions— Not documented. Default:{}. See FetchDiscoveryOptions for its declaration and available field documentation.
Returns
Promise<FetchDiscoveryResult>
Not documented.
Throws
Not documented.
Defaults
options:{}.
FetchDiscoveryOptions#
Not documented.
Declaration source: packages/core/src/api/markets.ts:613.
export interface FetchDiscoveryOptions extends FetchOptions {
/** The snapshot returned with the first page. Omit for the current snapshot. */
snapshotId?: string;
/** Filter by settlement resolver. Omit for both kinds. */
kind?: DiscoveryMarketKind;
/** Exact encoded series key from a discovery row, including its currency record. */
seriesKey?: string;
/** A settlement mint, `'all'` (not ranked by liquidity), or absent for the default mint. */
mint?: string;
/** `'depth'` is rejected with `mint: 'all'`. */
sort?: DiscoverySort;
/** `'true'` (default) eligible markets only; `'any'` appends ineligible ones. */
eligible?: 'true' | 'any';
/** Collapse duplicate markets (default true). */
collapse?: boolean;
limit?: number;
offset?: number;
}
Field documentation
snapshotId— The snapshot returned with the first page. Omit for the current snapshot.kind— Filter by settlement resolver. Omit for both kinds.seriesKey— Exact encoded series key from a discovery row, including its currency record.mint— A settlement mint,'all'(not ranked by liquidity), or absent for the default mint.sort—'depth'is rejected withmint: 'all'.eligible—'true'(default) eligible markets only;'any'appends ineligible ones.collapse— Collapse duplicate markets (default true).signal— Abort signal for request cancellation
FetchDiscoveryResult#
Not documented.
Declaration source: packages/core/src/api/markets.ts:632.
export interface FetchDiscoveryResult {
data: DiscoveryPage | null;
error: Error | null;
}
fetchExchangeAccount#
Fetch the authenticated wallet's exchange positions, balances, and risk summary.
This endpoint returns 401 without wallet authentication. Configure the ApiClient
with auth or call client.setAuthToken(...) before invoking this helper.
Declaration source: packages/core/src/api/exchange.ts:624.
export function fetchExchangeAccount(options?: ExchangePaginationOptions): Promise<ExchangeAccountResponse>;
Parameters
options: ExchangePaginationOptions— Not documented. Default:{}. See ExchangePaginationOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; walletAddress: string; serverTimestamp: string; balances: { [x: string]: unknown; asset: "SETTLEMENT"; settlementMint: string | null; available: string | null; locked: string; settledPayouts: string; source: "indexed-positions"; }[]; positions: { [x: string]: unknown; address: string; marketAddress: string; yesSymbol: string | null; noSymbol: string | null; yesShares: string; noShares: string; collateralDeposited: string; totalBought: string; totalSold: string; settled: boolean; payout: string; lastSlot: string | null; }[]; risk: { [x: string]: unknown; totalCurrentValue: string; maxLoss: string; maxPayout: string; claimableAmount: string; concentrationWarning: { [x: string]: unknown; marketAddress: string; assetLabel: string; worstCaseLoss: string; accountValue: string; ratioBps: number; } | null; exposures: { [x: string]: unknown; assetLabel: string; netYesShares: string; absoluteNetYesShares: string; marketCount: number; worstCaseLoss: string; }[]; markets: { [x: string]: unknown; marketAddress: string; assetLabel: string; yesSymbol: string | null; noSymbol: string | null; currentYesPriceBps: number; netYesShares: string; currentValue: string; payoutIfYes: string; payoutIfNo: string; maxPayout: string; lossIfYes: string; lossIfNo: string; worstCaseLoss: string; timeToSettlementSeconds: number | null; }[]; }; totalPositions: number; openPositionCount: number; settledPositionCount: number; limit: number; offset: number; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeCandles#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:569.
export function fetchExchangeCandles(symbolOrInstrumentId: string, options?: ExchangeCandlesOptions): Promise<ExchangeCandlesResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeCandlesOptions— Not documented. Default:{}. See ExchangeCandlesOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbol: string; marketAddress: string; interval: number; candles: { [x: string]: unknown; bucketStart: string; openPriceBps: number; highPriceBps: number; lowPriceBps: number; closePriceBps: number; volume: string; tradeCount: number; }[]; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeMarket#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:516.
export function fetchExchangeMarket(symbolOrInstrumentId: string, options?: ExchangeRequestOptions): Promise<ExchangeMarketResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeRequestOptions— Not documented. Default:{}. See ExchangeRequestOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; market: { [x: string]: unknown; instrumentId: string; symbol: string; marketAddress: string; marketId: string; lookupKeys: { [x: string]: unknown; symbol: string; instrumentId: string; marketAddress: string; marketOutcome: string; marketId: string; marketIdOutcome: string; pythFeedId: string; }; asset: string; quote: string; outcome: "YES" | "NO"; pythFeedId: string; durationSeconds: string; tStart: string; tEnd: string; settlementMint: string | null; tickSizeBps: number | null; minNotional: string | null; state: number; creator: string | null; programId: string; chain: "solana"; bestBid: number | null; bestAsk: number | null; totalVolume: string; totalTrades: number; totalPositions: number; startPrice: string | null; endPrice: string | null; }; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeMarkets#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:505.
export function fetchExchangeMarkets(options?: ExchangePaginationOptions): Promise<ExchangeMarketsResponse>;
Parameters
options: ExchangePaginationOptions— Not documented. Default:{}. See ExchangePaginationOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; markets: { [x: string]: unknown; instrumentId: string; symbol: string; marketAddress: string; marketId: string; lookupKeys: { [x: string]: unknown; symbol: string; instrumentId: string; marketAddress: string; marketOutcome: string; marketId: string; marketIdOutcome: string; pythFeedId: string; }; asset: string; quote: string; outcome: "YES" | "NO"; pythFeedId: string; durationSeconds: string; tStart: string; tEnd: string; settlementMint: string | null; tickSizeBps: number | null; minNotional: string | null; state: number; creator: string | null; programId: string; chain: "solana"; bestBid: number | null; bestAsk: number | null; totalVolume: string; totalTrades: number; totalPositions: number; startPrice: string | null; endPrice: string | null; }[]; total: number; limit: number; offset: number; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeOrderbook#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:524.
export function fetchExchangeOrderbook(symbolOrInstrumentId: string, options?: ExchangeOrderbookOptions): Promise<ExchangeOrderbookResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeOrderbookOptions— Not documented. Default:{}. See ExchangeOrderbookOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbol: string; marketAddress: string; sequence: string | null; slot: string | null; checksum: string | null; serverTimestamp: string; bids: { [x: string]: unknown; priceBps: number; quantity: string; orders: number; }[]; asks: { [x: string]: unknown; priceBps: number; quantity: string; orders: number; }[]; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeQuality#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:596.
export function fetchExchangeQuality(options?: ExchangeRequestOptions): Promise<ExchangeQualityResponse>;
Parameters
options: ExchangeRequestOptions— Not documented. Default:{}. See ExchangeRequestOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; status: "ok" | "stale" | "empty"; serverTimestamp: string; programId: string; chain: "solana"; latestMarketSlot: string | null; latestOrderSlot: string | null; latestTradeSlot: string | null; marketCount: number; staleMarketCount: number; warnings: string[]; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeReconcile#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:610.
export function fetchExchangeReconcile(symbolOrInstrumentId: string, options?: ExchangeRequestOptions): Promise<ExchangeReconcileResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeRequestOptions— Not documented. Default:{}. See ExchangeRequestOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbol: string; marketAddress: string; serverTimestamp: string; market: { [x: string]: unknown; instrumentId: string; symbol: string; marketAddress: string; marketId: string; lookupKeys: { [x: string]: unknown; symbol: string; instrumentId: string; marketAddress: string; marketOutcome: string; marketId: string; marketIdOutcome: string; pythFeedId: string; }; asset: string; quote: string; outcome: "YES" | "NO"; pythFeedId: string; durationSeconds: string; tStart: string; tEnd: string; settlementMint: string | null; tickSizeBps: number | null; minNotional: string | null; state: number; creator: string | null; programId: string; chain: "solana"; bestBid: number | null; bestAsk: number | null; totalVolume: string; totalTrades: number; totalPositions: number; startPrice: string | null; endPrice: string | null; }; orderbook: { [x: string]: unknown; symbol: string; marketAddress: string; sequence: string | null; slot: string | null; checksum: string | null; serverTimestamp: string; bids: { [x: string]: unknown; priceBps: number; quantity: string; orders: number; }[]; asks: { [x: string]: unknown; priceBps: number; quantity: string; orders: number; }[]; }; latestTrade: { [x: string]: unknown; id: string; signature: string; slot: string; fillIndex: number | null; priceBps: number; quantity: string; makerSide: number | null; fee: string | null; executedAt: string; } | null; quality: { [x: string]: unknown; status: "ok" | "stale" | "empty"; symbol: string; marketAddress: string; marketSlot: string | null; orderbookSequence: string | null; latestOrderSlot: string | null; latestTradeSlot: string | null; openOrderCount: number; lastIndexedAt: string | null; freshnessSeconds: number | null; warnings: string[]; }; recovery: { [x: string]: unknown; refetchOnChecksumMismatch: boolean; refetchOnStaleQuality: boolean; compareDirectAccounts: boolean; }; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeSymbol#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:497.
export function fetchExchangeSymbol(symbolOrInstrumentId: string, options?: ExchangeRequestOptions): Promise<ExchangeSymbolResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeRequestOptions— Not documented. Default:{}. See ExchangeRequestOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbol: { [x: string]: unknown; instrumentId: string; symbol: string; marketAddress: string; marketId: string; lookupKeys: { [x: string]: unknown; symbol: string; instrumentId: string; marketAddress: string; marketOutcome: string; marketId: string; marketIdOutcome: string; pythFeedId: string; }; asset: string; quote: string; outcome: "YES" | "NO"; pythFeedId: string; durationSeconds: string; tStart: string; tEnd: string; settlementMint: string | null; tickSizeBps: number | null; minNotional: string | null; state: number; creator: string | null; programId: string; chain: "solana"; }; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeSymbolQuality#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:602.
export function fetchExchangeSymbolQuality(symbolOrInstrumentId: string, options?: ExchangeRequestOptions): Promise<ExchangeSymbolQualityResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeRequestOptions— Not documented. Default:{}. See ExchangeRequestOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; status: "ok" | "stale" | "empty"; symbol: string; marketAddress: string; marketSlot: string | null; orderbookSequence: string | null; latestOrderSlot: string | null; latestTradeSlot: string | null; openOrderCount: number; lastIndexedAt: string | null; freshnessSeconds: number | null; warnings: string[]; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeSymbols#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:486.
export function fetchExchangeSymbols(options?: ExchangePaginationOptions): Promise<ExchangeSymbolsResponse>;
Parameters
options: ExchangePaginationOptions— Not documented. Default:{}. See ExchangePaginationOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbols: { [x: string]: unknown; instrumentId: string; symbol: string; marketAddress: string; marketId: string; lookupKeys: { [x: string]: unknown; symbol: string; instrumentId: string; marketAddress: string; marketOutcome: string; marketId: string; marketIdOutcome: string; pythFeedId: string; }; asset: string; quote: string; outcome: "YES" | "NO"; pythFeedId: string; durationSeconds: string; tStart: string; tEnd: string; settlementMint: string | null; tickSizeBps: number | null; minNotional: string | null; state: number; creator: string | null; programId: string; chain: "solana"; }[]; total: number; limit: number; offset: number; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeTicker#
Not documented.
Declaration source: packages/core/src/api/exchange.ts:542.
export function fetchExchangeTicker(symbolOrInstrumentId: string, options?: ExchangeRequestOptions): Promise<ExchangeTickerResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeRequestOptions— Not documented. Default:{}. See ExchangeRequestOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbol: string; marketAddress: string; bestBid: number | null; bestAsk: number | null; midPriceBps: number | null; lastPriceBps: number | null; volume: string; tradeCount: number; state: number; serverTimestamp: string; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchExchangeTrades#
The symbol's own outcome-lane trade tape, newest first.
Declaration source: packages/core/src/api/exchange.ts:551.
export function fetchExchangeTrades(symbolOrInstrumentId: string, options?: ExchangeTradesOptions): Promise<ExchangeTradesResponse>;
Parameters
symbolOrInstrumentId: string— Not documented.options: ExchangeTradesOptions— Not documented. Default:{}. See ExchangeTradesOptions for its declaration and available field documentation.
Returns
Promise<{ [x: string]: unknown; symbol: string; marketAddress: string; trades: { [x: string]: unknown; id: string; signature: string; slot: string; fillIndex: number | null; priceBps: number; quantity: string; makerSide: number | null; fee: string | null; executedAt: string; }[]; nextCursor: string | null; settlementMint?: string | null | undefined; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
fetchLeaderboard#
Not documented.
Declaration source: packages/core/src/api/users.ts:54.
export function fetchLeaderboard(period?: LeaderboardPeriod, metric?: LeaderboardMetric, currentUserAddress?: string): Promise<LeaderboardEntry[]>;
Parameters
period: LeaderboardPeriod— Not documented. Default:'weekly'. See LeaderboardPeriod for its declaration and available field documentation.metric: LeaderboardMetric— Not documented. Default:'pnl'. See LeaderboardMetric for its declaration and available field documentation.currentUserAddress: string | undefined— Not documented.
Returns
Promise<LeaderboardEntry[]>
Not documented.
Throws
Not documented.
Defaults
period:'weekly'.metric:'pnl'.
fetchMarketDetail#
Not documented.
Declaration source: packages/core/src/api/markets.ts:744.
export function fetchMarketDetail(marketAddress: string, options?: FetchOptions): Promise<FetchMarketDetailResult>;
Parameters
marketAddress: string— Not documented.options: FetchOptions | undefined— Not documented. See FetchOptions for its declaration and available field documentation.
Returns
Promise<FetchMarketDetailResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>FetchMarketDetailResult</summary>FetchMarketDetailResult#
Not documented.
Declaration source: packages/core/src/api/markets.ts:738.
export interface FetchMarketDetailResult {
data: MarketDetail | null;
error: Error | null;
isFromFallback: boolean;
}
fetchMarkets#
Not documented.
Declaration source: packages/core/src/api/markets.ts:443.
export function fetchMarkets(options?: FetchMarketsOptions): Promise<FetchMarketsResult>;
Parameters
options: FetchMarketsOptions | undefined— Not documented. See FetchMarketsOptions for its declaration and available field documentation.
Returns
Promise<FetchMarketsResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>FetchMarketsOptions</summary>FetchMarketsOptions#
Not documented.
Declaration source: packages/core/src/api/markets.ts:395.
export interface FetchMarketsOptions extends FetchOptions {
/** Exact structured search, e.g. "SOL 15m" or "BTC/USD 1h". Not with `view`. */
query?: string;
/**
* Restrict the catalogue to one settlement mint (base58 address). With
* `view: 'discover'`, `'all'` lists every currency (not ranked by liquidity)
* and absent means the snapshot's default mint.
*/
mint?: string;
/** `'discover'`: the ranked discovery lists of spec/DISCOVERY.md, from one snapshot. */
view?: 'discover';
/** Discovery filter by settlement resolver. */
kind?: DiscoveryMarketKind;
/** Discovery sort; `'depth'` is rejected (HTTP 400) with `mint: 'all'`. */
sort?: DiscoverySort;
/** Discovery: `'true'` (default) eligible markets only; `'any'` appends ineligible ones. */
eligible?: 'true' | 'any';
/** Discovery: collapse duplicate markets (default true). */
collapse?: boolean;
}
Field documentation
query— Exact structured search, e.g. "SOL 15m" or "BTC/USD 1h". Not withview.mint— Restrict the catalogue to one settlement mint (base58 address). Withview: 'discover','all'lists every currency (not ranked by liquidity) and absent means the snapshot's default mint.view—'discover': the ranked discovery lists of spec/DISCOVERY.md, from one snapshot.kind— Discovery filter by settlement resolver.sort— Discovery sort;'depth'is rejected (HTTP 400) withmint: 'all'.eligible— Discovery:'true'(default) eligible markets only;'any'appends ineligible ones.collapse— Discovery: collapse duplicate markets (default true).signal— Abort signal for request cancellation
FetchMarketsResult#
Not documented.
Declaration source: packages/core/src/api/markets.ts:384.
export interface FetchMarketsResult {
data: Market[] | null;
error: Error | null;
isFromFallback: boolean;
}
fetchOpenPositions#
Not documented.
Declaration source: packages/core/src/api/positions.ts:229.
export function fetchOpenPositions(ownerAddress: string, options?: FetchOptions): Promise<FetchPositionsResult>;
Parameters
ownerAddress: string— Not documented.options: FetchOptions | undefined— Not documented.
Returns
Promise<FetchPositionsResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>FetchOptions</summary>FetchOptions#
Not documented.
Declaration source: packages/core/src/api/markets.ts:390.
export interface FetchOptions {
/** Abort signal for request cancellation */
signal?: AbortSignal;
}
Field documentation
signal— Abort signal for request cancellation
fetchPendingOrders#
Not documented.
Declaration source: packages/core/src/api/orders.ts:73.
export function fetchPendingOrders(walletAddress: string): Promise<FetchPendingOrdersResult>;
Parameters
walletAddress: string— Not documented.
Returns
Promise<FetchPendingOrdersResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>FetchPendingOrdersResult</summary>FetchPendingOrdersResult#
Not documented.
Declaration source: packages/core/src/api/orders.ts:67.
export interface FetchPendingOrdersResult {
data: PendingOrder[] | null;
error: Error | null;
isFromFallback: boolean;
}
fetchPositions#
Not documented.
Declaration source: packages/core/src/api/positions.ts:150.
export function fetchPositions(ownerAddress: string, options?: FetchOptions): Promise<FetchPositionsResult>;
Parameters
ownerAddress: string— Not documented.options: FetchOptions | undefined— Not documented.
Returns
Promise<FetchPositionsResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>FetchPositionsResult</summary>FetchPositionsResult#
Not documented.
Declaration source: packages/core/src/api/positions.ts:139.
export interface FetchPositionsResult {
data: PositionsResponse | null;
error: Error | null;
isFromFallback: boolean;
}
fetchTradeHistory#
Not documented.
Declaration source: packages/core/src/api/orders.ts:135.
export function fetchTradeHistory(walletAddress: string, page?: number, limit?: number): Promise<FetchTradeHistoryResult>;
Parameters
walletAddress: string— Not documented.page: number— Not documented. Default:0.limit: number— Not documented. Default:20.
Returns
Promise<FetchTradeHistoryResult>
Not documented.
Throws
Not documented.
Defaults
page:0.limit:20.
FetchTradeHistoryResult#
Not documented.
Declaration source: packages/core/src/api/orders.ts:129.
export interface FetchTradeHistoryResult {
data: { trades: Trade[]; total: number; hasMore: boolean } | null;
error: Error | null;
isFromFallback: boolean;
}
fetchUserProfile#
Not documented.
Declaration source: packages/core/src/api/users.ts:106.
export function fetchUserProfile(address: string): Promise<UserProfile>;
Parameters
address: string— Not documented.
Returns
Promise<{ address: string; stats: { totalPnl: number; winRate: number; totalTrades: number; longestStreak: number; }; badges: string[]; displayName?: string | undefined; avatar?: string | undefined; rank?: number | undefined; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>FillEstimate</summary>FillEstimate#
Result of walking the order book for a prospective taker order.
All *PriceBps fields are expressed in the caller's own denomination:
YES price for BuyYes/SellYes, NO price for BuyNo/SellNo. This is the
price the trader sees in the UI, so renderers can display the numbers
directly (after bpsToPercent) without re-deriving NO-side inversions.
priceImpactBps and slippageBps are always non-negative and measured in
the "worse for the taker" direction relative to refPriceBps (the best
opposing level before the order): for buys, higher prices are worse; for
sells, lower prices are worse.
Declaration source: packages/core/src/types.ts:677.
export interface FillEstimate {
/** Base units that fill immediately against resting liquidity. */
readonly filled: bigint;
/** Base units that do NOT fill now (blocked by price bound or thin book). */
readonly remaining: bigint;
/**
* True when `remaining > 0` and the leftover will rest on the book as a
* limit order (Limit / PostOnly). False for ImmediateOrCancel, whose
* unfilled remainder is cancelled rather than posted.
*/
readonly restsRemainder: boolean;
/** Size-weighted average fill price, caller denomination. 0 when nothing fills. */
readonly avgPriceBps: number;
/** Price of the deepest level touched, caller denomination. 0 when nothing fills. */
readonly worstPriceBps: number;
/** Best opposing level before the order, caller denomination. 0 when the book side is empty. */
readonly refPriceBps: number;
/** `worstPriceBps` vs `refPriceBps`, non-negative, worse-for-taker direction. */
readonly priceImpactBps: number;
/** `avgPriceBps` vs `refPriceBps`, non-negative, worse-for-taker direction. */
readonly slippageBps: number;
/** Notional moved, base units, pre-fee: collateral for buys, proceeds for sells. */
readonly cost: bigint;
/** Estimated taker fee, base units. 0 when no fee config supplied. */
readonly feeAmount: bigint;
/**
* Conservative fee ceiling for an aggregated book level. It includes up to
* one extra atom for every additional maker order represented by a level.
*/
readonly feeAmountUpperBound: bigint;
/** Buys: `cost + feeAmount`. Sells: `max(0, cost - feeAmount)`. */
readonly totalCost: bigint;
}
Field documentation
filled— Base units that fill immediately against resting liquidity.remaining— Base units that do NOT fill now (blocked by price bound or thin book).restsRemainder— True whenremaining > 0and the leftover will rest on the book as a limit order (Limit / PostOnly). False for ImmediateOrCancel, whose unfilled remainder is cancelled rather than posted.avgPriceBps— Size-weighted average fill price, caller denomination. 0 when nothing fills.worstPriceBps— Price of the deepest level touched, caller denomination. 0 when nothing fills.refPriceBps— Best opposing level before the order, caller denomination. 0 when the book side is empty.priceImpactBps—worstPriceBpsvsrefPriceBps, non-negative, worse-for-taker direction.slippageBps—avgPriceBpsvsrefPriceBps, non-negative, worse-for-taker direction.cost— Notional moved, base units, pre-fee: collateral for buys, proceeds for sells.feeAmount— Estimated taker fee, base units. 0 when no fee config supplied.feeAmountUpperBound— Conservative fee ceiling for an aggregated book level. It includes up to one extra atom for every additional maker order represented by a level.totalCost— Buys:cost + feeAmount. Sells:max(0, cost - feeAmount).
FillEstimateFee#
Fee curve inputs for a fill preview.
Declaration source: packages/core/src/orderbook.ts:318.
export interface FillEstimateFee {
readonly capBps: number;
readonly decayBps: number;
readonly split?: FeeSplit;
}
FillOrKillOrderInput#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:77.
export interface FillOrKillOrderInput {
outcome: OutcomeAsset;
intent: TradeIntent;
priceBps: number;
quantity: bigint;
worstAcceptablePriceBps?: number;
matchLimit?: number;
selfTradeBehavior?: number;
}
FillPreview#
Not documented.
Declaration source: packages/core/src/ux/fillPreview.ts:78.
export interface FillPreview {
/** Best level of the side the order consumes. */
bestPriceBps: number;
/** Quantity-weighted average fill price, floored (as `estimateFillForIntent`). */
avgPriceBps: number;
/** Last (worst) level the order reaches. */
lastPriceBps: number;
/**
* Put this on the IOC order. Guarded: BUY = best + guard capped at 9999,
* SELL = best − guard floored at 1 (tick-aligned inward when `tickSizeBps`
* is given). No guard: the disable sentinel — 0 for a BUY, 10_000 for a SELL.
*/
worstAcceptablePriceBps: number;
/** Order `price_bps` to submit: the worst acceptable price when guarded, else the last level. */
limitPriceBps: number;
/** Levels the order takes from. */
levelsCrossed: number;
sharesFilled: bigint;
/** Σ per-level notional (`calculateCollateral`). BUY: paid. SELL: gross proceeds. */
costMicro: bigint;
/** Σ per-level exact taker fee. */
feeMicro: bigint;
/** BUY: cost + fee (debited). SELL: cost − fee, floored at 0 (received). */
totalMicro: bigint;
/** BUY: `amountMicro − totalMicro`, the budget the guard/book leaves unspent. SELL: 0. */
unspentMicro: bigint;
/** SELL: share atoms left unsold. BUY: 0. */
unsoldShares: bigint;
/** The guard (not the book) stops the order before the amount is used. */
guardStopsEarly: boolean;
/** The book runs out (within the guard) before the amount is used. */
bookExhausted: boolean;
/**
* BUY: the quote balance the program requires up front for this order —
* notional plus exact fee at `limitPriceBps` for `sharesFilled` (the
* placeOrder preflight's settlement check). It can exceed `amountMicro` when
* the guard sits above the levels actually crossed. SELL: 0.
*/
requiredBalanceMicro: bigint;
/** Every visible level of the consumed side, best first, for the stairs/ladder. */
steps: FillPreviewStep[];
}
Field documentation
bestPriceBps— Best level of the side the order consumes.avgPriceBps— Quantity-weighted average fill price, floored (asestimateFillForIntent).lastPriceBps— Last (worst) level the order reaches.worstAcceptablePriceBps— Put this on the IOC order. Guarded: BUY = best + guard capped at 9999, SELL = best − guard floored at 1 (tick-aligned inward whentickSizeBpsis given). No guard: the disable sentinel — 0 for a BUY, 10_000 for a SELL.limitPriceBps— Orderprice_bpsto submit: the worst acceptable price when guarded, else the last level.levelsCrossed— Levels the order takes from.costMicro— Σ per-level notional (calculateCollateral). BUY: paid. SELL: gross proceeds.feeMicro— Σ per-level exact taker fee.totalMicro— BUY: cost + fee (debited). SELL: cost − fee, floored at 0 (received).unspentMicro— BUY:amountMicro − totalMicro, the budget the guard/book leaves unspent. SELL: 0.unsoldShares— SELL: share atoms left unsold. BUY: 0.guardStopsEarly— The guard (not the book) stops the order before the amount is used.bookExhausted— The book runs out (within the guard) before the amount is used.requiredBalanceMicro— BUY: the quote balance the program requires up front for this order — notional plus exact fee atlimitPriceBpsforsharesFilled(the placeOrder preflight's settlement check). It can exceedamountMicrowhen the guard sits above the levels actually crossed. SELL: 0.steps— Every visible level of the consumed side, best first, for the stairs/ladder.
FillPreviewInput#
Not documented.
Declaration source: packages/core/src/ux/fillPreview.ts:47.
export interface FillPreviewInput {
outcome: OutcomeAsset;
intent: TradeIntent;
/** BUY: fee-inclusive quote budget in USDT atoms. SELL: share atoms to sell. */
amountMicro: bigint;
/** The outcome's own book (asks/bids best-first, in the outcome's own bps). */
lane: OutcomeLaneBook;
/**
* Fee curve. `null` previews with NO taker fee — pass the market's curve
* whenever it is known (a BUY's share count depends on it).
*/
fee: { capBps: number; decayBps: number } | null;
/** bps the order may go past the best price; `null` = no limit. */
guardBps: number | null;
/**
* Optional config tick size. When given (> 1), a guarded order price is
* aligned INWARD to the tick grid (BUY down, SELL up) so the program's
* tick check accepts it; e.g. the BUY cap becomes `10_000 − tick` instead of
* 9999. Omit only when the tick is unknown or 1.
*/
tickSizeBps?: number | null;
}
Field documentation
amountMicro— BUY: fee-inclusive quote budget in USDT atoms. SELL: share atoms to sell.lane— The outcome's own book (asks/bids best-first, in the outcome's own bps).fee— Fee curve.nullpreviews with NO taker fee — pass the market's curve whenever it is known (a BUY's share count depends on it).guardBps— bps the order may go past the best price;null= no limit.tickSizeBps— Optional config tick size. When given (> 1), a guarded order price is aligned INWARD to the tick grid (BUY down, SELL up) so the program's tick check accepts it; e.g. the BUY cap becomes10_000 − tickinstead of
- Omit only when the tick is unknown or 1.
FillPreviewStep#
Not documented.
Declaration source: packages/core/src/ux/fillPreview.ts:70.
export interface FillPreviewStep {
priceBps: number;
/** Quantity resting at this level. */
levelQuantity: bigint;
/** Quantity this order takes from it (0 for levels it does not reach). */
takenQuantity: bigint;
}
Field documentation
levelQuantity— Quantity resting at this level.takenQuantity— Quantity this order takes from it (0 for levels it does not reach).
filterByDateRange#
Rows whose timestamp lies in [fromMs, toMs] (inclusive), in input order.
Rows with no timestamp (null / non-finite) are kept only for the all
range, so an export of everything never silently drops a row.
Declaration source: packages/core/src/ux/history.ts:51.
export function filterByDateRange<T>(rows: T[], getMs: (row: T) => number | null, range: { fromMs: number; toMs: number; }): T[];
Parameters
rows: T[]— Not documented.getMs: (row: T) => number | null— Not documented.range: { fromMs: number; toMs: number; }— Not documented.
Returns
T[]
Not documented.
Throws
Not documented.
</details> <details> <summary>filterKalshiCatalogPage</summary>filterKalshiCatalogPage#
Only currently loaded page matches; never implies an exhaustive source search.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:84.
export function filterKalshiCatalogPage(page: KalshiCatalogPage, search: string): readonly KalshiCatalogRow[];
Parameters
page: KalshiCatalogPage— Not documented. See KalshiCatalogPage for its declaration and available field documentation.search: string— Not documented.
Returns
readonly KalshiCatalogRow[]
Not documented.
Throws
Not documented.
</details> <details> <summary>filterTrades</summary>filterTrades#
Not documented.
Declaration source: packages/core/src/api/orders.ts:180.
export function filterTrades(trades: Trade[], filter?: TradeFilter): Trade[];
Parameters
trades: Trade[]— Not documented.filter: TradeFilter | undefined— Not documented. See TradeFilter for its declaration and available field documentation.
Returns
Trade[]
Not documented.
Throws
Not documented.
</details> <details> <summary>FinalizedAccount</summary>FinalizedAccount#
One account of a finalized multi-account read.
Declaration source: packages/core/src/finalizedRpc.ts:4.
export interface FinalizedAccount {
readonly owner: Address;
readonly data: Uint8Array;
}
FinalizedAccountRpc#
Finalized multi-account reads from one RPC context. Clients read source state, registry and admin accounts through it so a snapshot is coherent.
Declaration source: packages/core/src/finalizedRpc.ts:13.
export interface FinalizedAccountRpc {
getMultipleAccounts(
addresses: readonly Address[],
options: { readonly commitment: 'finalized'; readonly minContextSlot?: bigint }
): Promise<{
readonly contextSlot: bigint;
readonly accounts: readonly (FinalizedAccount | null)[];
}>;
}
findNextRound#
The next round after current: same asset, settlement mint and round length, starting at
or after current.endMs; the earliest such start wins (ties: the one ending
soonest, then id). null when none is listed.
Round length is compared by bucket; a current whose length fits no bucket
only matches rounds of exactly the same duration.
Declaration source: packages/core/src/ux/rounds.ts:161.
export function findNextRound<T extends RoundGridInput>(current: T, markets: T[]): T | null;
Parameters
current: T— Not documented.markets: T[]— Not documented.
Returns
T | null
Not documented.
Throws
Not documented.
</details> <details> <summary>findTraderLedgerBalancesStrict</summary>findTraderLedgerBalancesStrict#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:2062.
export function findTraderLedgerBalancesStrict(data: Uint8Array, trader: Address): { quoteFree: bigint; yesFree: bigint; noFree: bigint; quoteLocked: bigint; yesLocked: bigint; noLocked: bigint; } | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.trader: Address— Not documented.
Returns
{ quoteFree: bigint; yesFree: bigint; noFree: bigint; quoteLocked: bigint; yesLocked: bigint; noLocked: bigint; } | null
Not documented.
Throws
Not documented.
</details> <details> <summary>findUserRank</summary>findUserRank#
Not documented.
Declaration source: packages/core/src/api/users.ts:122.
export function findUserRank(entries: LeaderboardEntry[], address: string): number | null;
Parameters
entries: LeaderboardEntry[]— Not documented.address: string— Not documented.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>FlattenHoldingsBySource</summary>FlattenHoldingsBySource#
Not documented.
Declaration source: packages/core/src/flatten.ts:8.
export interface FlattenHoldingsBySource {
readonly wallet: bigint;
readonly freeFunds: bigint;
}
FlattenOrderIntent#
Not documented.
Declaration source: packages/core/src/flatten.ts:13.
export interface FlattenOrderIntent {
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly quantity: bigint;
readonly minFillQuantity: bigint;
readonly fundingSource: FundingSource;
}
FlattenOutcome#
Not documented.
Declaration source: packages/core/src/flatten.ts:6.
export type FlattenOutcome = 'yes' | 'no';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FlattenPreview#
Not documented.
Declaration source: packages/core/src/flatten.ts:21.
export interface FlattenPreview {
readonly outcome: FlattenOutcome;
/** Always `SELL`: flattening disposes of the held outcome. */
readonly intent: TradeIntent;
readonly requestedQuantity: bigint;
readonly fillableQuantity: bigint;
readonly avgExitPriceBps: number;
readonly worstExitPriceBps: number;
readonly priceImpactBps: number;
readonly unfilledRemainder: bigint;
readonly estimate: FillEstimate;
readonly intents: readonly FlattenOrderIntent[];
}
Field documentation
intent— AlwaysSELL: flattening disposes of the held outcome.
floorMulDiv#
floor(amount * numerator / denominator), matching Rust floor_mul_div. Amount/result are u64, ratio inputs u128; intermediate products may be wider. Each claim is floored independently: splitting can lose rounding dust.
Declaration source: packages/core/src/externalPayout.ts:137.
export function floorMulDiv(amount: bigint, numerator: bigint, denominator: bigint): bigint;
Parameters
amount: bigint— Not documented.numerator: bigint— Not documented.denominator: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>FORCE_CLOSE_COMPUTE_UNIT_LIMIT</summary>FORCE_CLOSE_COMPUTE_UNIT_LIMIT#
Transaction compute-unit limit every ForceClose (0x18) transaction must
request via ComputeBudget::SetComputeUnitLimit. The worst terminal page
(full 512-node scan plus a 6-order removal batch) measures ~829K CU in the
force_close.full_scan_batch_terminal golden, above the 200K runtime
default. Kept equal to FORCE_CLOSE_COMPUTE_UNIT_LIMIT in
program/src/constants.rs; force-close-compute-budget.test.ts fails on
drift or when the limit drops below the golden ceiling.
Declaration source: packages/core/src/constants.ts:35.
export declare const FORCE_CLOSE_COMPUTE_UNIT_LIMIT: 1000000;
forceCancelMarketOrders#
Admin-only force-cancel of a single resting order. The market must already
be in ForceCancelOnly emergency status.
Declaration source: packages/core/src/sdk.ts:2536.
export function forceCancelMarketOrders(input: ForceCancelMarketOrdersInput, programAddress?: Address): Promise<SdkResult<ForceCancelMarketOrdersResult>>;
Parameters
input: ForceCancelMarketOrdersInput— Not documented. See ForceCancelMarketOrdersInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ForceCancelMarketOrdersResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ForceCancelMarketOrdersAccounts#
Accounts for ForceCancelMarketOrders instruction.
Declaration source: packages/core/src/instructions.ts:4173.
export interface ForceCancelMarketOrdersAccounts extends BinaryRecorderTailAccounts {
config: Address;
market: Address;
orderbook: Address;
makerPosition: Address;
makerTokenAccount: Address;
vault: Address;
maker: Address;
/** Must be `config.authority` or a configured nonzero `config.pauser`. */
authority: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
settlementMint: Address;
yesEscrow: Address;
noEscrow: Address;
makerYesAta: Address;
makerNoAta: Address;
yesMint: Address;
noMint: Address;
traderLedger: Address;
}
Field documentation
authority— Must beconfig.authorityor a configured nonzeroconfig.pauser.shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ForceCancelMarketOrdersInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2508.
export interface ForceCancelMarketOrdersInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
/** The maker (original order owner) — NOT the authority. */
maker: Address;
makerTokenAccount: Address;
makerYesAta: Address;
makerNoAta: Address;
authority: Address;
settlementMint: Address;
orderId: bigint;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.maker— The maker (original order owner) — NOT the authority.
ForceCancelMarketOrdersParams#
Parameters for ForceCancelMarketOrders instruction.
Declaration source: packages/core/src/instructions.ts:4197.
export interface ForceCancelMarketOrdersParams {
orderId: bigint; // D0{id}
}
ForceCancelMarketOrdersResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2526.
export interface ForceCancelMarketOrdersResult {
market: Address;
orderbook: Address;
makerPosition: Address;
}
forceClose#
Build ForceClose instruction with automatic PDA derivation.
The on-chain ForceClose processor (program/src/processor/force_close.rs) refunds
unfilled bid collateral after expiry and rejects positions that still have
residual locked YES/NO shares after terminal orderbook cleanup. The YES/NO
escrow accounts and YES/NO mints remain mandatory writable account inputs
(slots 10-13) so the account surface stays stable and the processor can
validate the canonical market accounts. All four are derived as PDAs from
the market address.
Send instructions (or pass computeUnitLimit to a sender that assembles
its own ComputeBudget prelude). Sending the bare instruction under the
200K CU default fails on a worst-case book page.
Declaration source: packages/core/src/sdk.ts:1643.
export function forceClose(input: ForceCloseInput, programAddress?: Address): Promise<ForceCloseSdkResult>;
Parameters
input: ForceCloseInput— Not documented. See ForceCloseInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<ForceCloseSdkResult>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ForceCloseAccounts#
Accounts for ForceClose instruction.
On-chain ForceCloseAccounts::parse requires 14 accounts in exact slot
order (see program/src/processor/force_close.rs). The four escrow / mint accounts
(slots 10-13) are mandatory canonical validation accounts. ForceClose
rejects residual unfilled YES/NO share locks after terminal mirror cleanup,
so these accounts no longer authorize a permissionless share burn.
Declaration source: packages/core/src/instructions.ts:2980.
export interface ForceCloseAccounts extends BinaryRecorderTailAccounts {
market: Address;
position: Address;
vault: Address;
userStablecoinAta: Address;
caller: Address;
config: Address;
tokenProgram: Address;
settlementMint: Address;
orderbook: Address;
traderLedger: Address;
yesEscrow: Address;
noEscrow: Address;
yesMint: Address;
noMint: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ForceCloseInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1592.
export interface ForceCloseInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
positionOwner: Address;
userStablecoinAta: Address;
caller: Address;
settlementMint: Address;
/** Optional orderbook PDA override. Auto-derived when omitted. */
orderbook?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.orderbook— Optional orderbook PDA override. Auto-derived when omitted.
ForceCloseResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1608.
export interface ForceCloseResult {
market: Address;
position: Address;
vault: Address;
}
ForceCloseSdkResult#
ForceClose SDK result. Unlike most helpers it carries a ComputeBudget prelude: the worst terminal page costs ~829K CU, above the 200K runtime default, so every sender must request {@link FORCE_CLOSE_COMPUTE_UNIT_LIMIT}.
Declaration source: packages/core/src/sdk.ts:1619.
export interface ForceCloseSdkResult extends SdkResult<ForceCloseResult> {
/** D0{CU} Transaction compute-unit limit to request. */
computeUnitLimit: number;
/** `[SetComputeUnitLimit]` to prepend when the sender has no CU assembly. */
computeBudgetInstructions: Instruction[];
/** `computeBudgetInstructions` followed by `instruction`, ready to send. */
instructions: Instruction[];
}
Field documentation
computeUnitLimit— D0{CU} Transaction compute-unit limit to request.computeBudgetInstructions—[SetComputeUnitLimit]to prepend when the sender has no CU assembly.instructions—computeBudgetInstructionsfollowed byinstruction, ready to send.
formatBpsPercent#
Not documented.
Declaration source: packages/core/src/display.ts:56.
export function formatBpsPercent(bps: number, digits?: number): string;
Parameters
bps: number— Not documented.digits: number— Not documented. Default:2.
Returns
string
Not documented.
Throws
Not documented.
Defaults
digits:2.
formatCentsPrice#
Format a price in basis points as a cents string (e.g., 6240 -> "62.4¢").
10_000 bps = 100¢, so cents = bps / 100. Rounds to one decimal place and drops a trailing ".0" (6400 -> "64¢", not "64.0¢") — the single formatter behind every avg/worst/impact price readout in the order-ticket price-impact UI (task B5), so cents formatting stays single-sourced across callers.
Declaration source: packages/core/src/price.ts:55.
export function formatCentsPrice(bps: number): string;
Parameters
bps: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatCurrencyAmount</summary>formatCurrencyAmount#
Exact bigint → string in the currency's own decimals, with no currency sign
and no floating point. The whole part is grouped with ,.
Rounding follows the existing @seesaw/core display convention
(formatTokenCompact): values with more fractional digits than
maxFractionDigits (default 2) are rounded half-up on magnitude (away from
zero for negatives). Trailing zeros are then trimmed down to
minFractionDigits (default 0). Both bounds are clamped to the currency's
decimals; negative values carry a leading -, and a value that rounds to
zero is shown without a sign.
Declaration source: packages/core/src/currency/amount.ts:75.
export function formatCurrencyAmount(baseUnits: bigint, currency: { readonly decimals: number; }, options?: { readonly maxFractionDigits?: number; readonly minFractionDigits?: number; }): string;
Parameters
baseUnits: bigint— Not documented.currency: { readonly decimals: number; }— Not documented.options: { readonly maxFractionDigits?: number; readonly minFractionDigits?: number; } | undefined— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatCurrencyInput</summary>formatCurrencyInput#
Exact bigint → input-field string at decimals: no grouping, no rounding,
trailing fraction zeros trimmed. The inverse of {@link parseCurrencyInput}
for any positive amount, so a value written into an amount field parses
back to the same atoms.
Declaration source: packages/core/src/currency/amount.ts:103.
export function formatCurrencyInput(baseUnits: bigint, decimals: number): string;
Parameters
baseUnits: bigint— Not documented.decimals: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatFeeShareBps</summary>formatFeeShareBps#
Not documented.
Declaration source: packages/core/src/display.ts:60.
export function formatFeeShareBps(bps: number): string;
Parameters
bps: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatMarketDuration</summary>formatMarketDuration#
Render protocol seconds without rounding away non-standard cadences.
Declaration source: packages/core/src/marketIdentity.ts:52.
export function formatMarketDuration(durationSeconds: bigint): string;
Parameters
durationSeconds: bigint— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatMarketWindow</summary>formatMarketWindow#
Render a market's immutable window in UTC.
DESIGN-QUESTION: design §9's example shortens a same-day end to 19:45–20:00;
task 01 asks only for the currency and source segments, so both ends keep
their full date here.
Declaration source: packages/core/src/marketIdentity.ts:80.
export function formatMarketWindow(tStart: bigint, tEnd: bigint): string;
Parameters
tStart: bigint— Not documented.tEnd: bigint— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatOraclePrice</summary>formatOraclePrice#
Format a Pyth oracle price with its exponent.
Declaration source: packages/core/src/price.ts:195.
export function formatOraclePrice(price: bigint, expo: number): string;
Parameters
price: bigint— - The raw price value (e.g., 6543210000).expo: number— - The exponent (e.g., -8 means divide by 10^8).
Returns
string
Formatted string (e.g., "65432.10000000").
Throws
Not documented.
</details> <details> <summary>formatPayoutAtoms</summary>formatPayoutAtoms#
Lossless fixed-decimal display, truncating fractional display dust only.
Declaration source: packages/core/src/externalPayout.ts:296.
export function formatPayoutAtoms(atoms: bigint, decimals: number, places?: number): string;
Parameters
atoms: bigint— Not documented.decimals: number— Not documented.places: number— Not documented. Default:2.
Returns
string
Not documented.
Throws
Not documented.
Defaults
places:2.
formatPrice#
Format a price in basis points as a percentage string (e.g., 5000 -> "50.00%").
Declaration source: packages/core/src/price.ts:43.
export function formatPrice(bps: number): string;
Parameters
bps: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatQuantity</summary>formatQuantity#
Format a share or token quantity as a short human-readable string.
One share atom is one settlement-currency atom, so the caller passes the market currency's decimals. Values of one unit or more get two fraction digits or a K/M suffix; smaller values are shown exactly in the currency's decimals, trimmed of trailing zeros. Integer arithmetic only.
Declaration source: packages/core/src/price.ts:320.
export function formatQuantity(quantity: bigint, decimals: number): string;
Parameters
quantity: bigint— - Quantity in atoms.decimals: number— - The market currency's decimals (an integer in 0..18).
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatSignedPercent</summary>formatSignedPercent#
Format an already-computed signed percent delta (e.g. a settlement print's
start->end move) with an explicit leading sign, e.g. 0.25 -> "+0.25%",
-1 -> "-1.00%", 0 -> "+0.00%". Returns an em dash for missing/NaN
input so callers never have to special-case "no delta available".
Declaration source: packages/core/src/display.ts:251.
export function formatSignedPercent(value: number | null | undefined, digits?: number): string;
Parameters
value: number | null | undefined— Not documented.digits: number— Not documented. Default:2.
Returns
string
Not documented.
Throws
Not documented.
Defaults
digits:2.
formatTimeRemaining#
Not documented.
Declaration source: packages/core/src/api/markets.ts:157.
export function formatTimeRemaining(endTime: Date): string;
Parameters
endTime: Date— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatTokenCompact</summary>formatTokenCompact#
Not documented.
Declaration source: packages/core/src/display.ts:180.
export function formatTokenCompact(value: TokenLike, decimals: number, options?: FormatTokenOptions): string;
Parameters
value: TokenLike— Not documented.decimals: number— Not documented.options: FormatTokenOptions | undefined— Not documented. See FormatTokenOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>formatTokenExact</summary>formatTokenExact#
Not documented.
Declaration source: packages/core/src/display.ts:153.
export function formatTokenExact(value: TokenLike, decimals: number, options?: FormatTokenOptions): string;
Parameters
value: TokenLike— Not documented.decimals: number— Not documented.options: FormatTokenOptions | undefined— Not documented. See FormatTokenOptions for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>FormatTokenOptions</summary>FormatTokenOptions#
Not documented.
Declaration source: packages/core/src/display.ts:64.
export interface FormatTokenOptions {
fractionDigits?: number;
}
FreeFunds#
A trader's immediately-available (unlocked) balances in a market's trader ledger.
Declaration source: packages/core/src/traderLedger.ts:20.
export interface FreeFunds {
/** Immediately-available settlement-token credit. */
quoteFree: bigint;
/** Immediately-available YES-share credit. */
yesFree: bigint;
/** Immediately-available NO-share credit. */
noFree: bigint;
}
Field documentation
quoteFree— Immediately-available settlement-token credit.yesFree— Immediately-available YES-share credit.noFree— Immediately-available NO-share credit.
FreeFundsPlaceOrderAccounts#
The free-funds placement processors use the route-to-slot surface. It is intentionally a separate type from PlaceOrderAccounts so a wallet-funded builder cannot be passed to a free-funds instruction by accident.
Declaration source: packages/core/src/instructions.ts:428.
export interface FreeFundsPlaceOrderAccounts extends BinaryRecorderTailAccounts {
/** Compile-time route marker; never serialized as an account. */
readonly __freeFunds: true;
/** Spline seats supplied after the fixed placement accounts. */
splineSeats?: readonly Address[];
/** Supply the canonical read-only tick immediately after the counted seats. */
includeMarketTick?: boolean;
market: Address;
orderbook: Address;
userPosition: Address;
userTokenAccount: Address;
vault: Address;
user: Address;
config: Address;
treasuryTokenAccount: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
systemProgram: Address;
settlementMint: Address;
yesEscrow: Address;
noEscrow: Address;
userYesAta: Address;
userNoAta: Address;
yesMint: Address;
noMint: Address;
traderLedger: Address;
/** Single-seat shorthand for callers with a known creator seat. */
creatorSpline?: Address;
/** Optional canonical referral binding, followed by the recorder tail. */
takerReferralAccount?: Address;
/** Optional builder pair; see {@link TakerBuilderPair}. Taker orders only. */
builderApproval?: Address;
builderTokenAccount?: Address;
}
Field documentation
__freeFunds— Compile-time route marker; never serialized as an account.splineSeats— Spline seats supplied after the fixed placement accounts.includeMarketTick— Supply the canonical read-only tick immediately after the counted seats.shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.creatorSpline— Single-seat shorthand for callers with a known creator seat.takerReferralAccount— Optional canonical referral binding, followed by the recorder tail.builderApproval— Optional builder pair; see {@link TakerBuilderPair}. Taker orders only.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
FRESHNESS_DELAYED_SECONDS#
Age (in seconds) at/after which data is considered delayed.
Declaration source: packages/core/src/freshness.ts:12.
export declare const FRESHNESS_DELAYED_SECONDS: 30;
FRESHNESS_STALE_SECONDS#
Age (in seconds) at/after which data is considered no longer fresh.
Declaration source: packages/core/src/freshness.ts:9.
export declare const FRESHNESS_STALE_SECONDS: 10;
FreshnessState#
Not documented.
Declaration source: packages/core/src/freshness.ts:14.
export type FreshnessState = 'fresh' | 'stale' | 'delayed';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
FUND_MAKER_QUOTE_INVENTORY_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:46.
export declare const FUND_MAKER_QUOTE_INVENTORY_DISCRIMINATOR: 104;
FundingSource#
Not documented.
Declaration source: packages/core/src/orderFunding.ts:96.
export type FundingSource = 'wallet' | 'freeFunds';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
GET_STARTED_MIN_LAMPORTS#
Enough SOL for network fees and account rent: 0.01 SOL.
Declaration source: packages/core/src/ux/getStarted.ts:7.
export declare const GET_STARTED_MIN_LAMPORTS: bigint;
getApiClient#
Get the default API client instance.
SSR-safe: In server-side environments (typeof window === 'undefined'), a new client is created per call to avoid sharing state across requests. On the client side, a singleton is reused for efficiency and to preserve circuit breaker / deduplication state.
Declaration source: packages/core/src/api/client.ts:1149.
export function getApiClient(): ApiClient;
Parameters
No callable parameters.
Returns
ApiClient
Not documented.
Throws
Not documented.
</details> <details> <summary>getApiModuleLogger</summary>getApiModuleLogger#
Get the current API module logger.
Declaration source: packages/core/src/api/logger.ts:59.
export function getApiModuleLogger(): ApiModuleLogger;
Parameters
No callable parameters.
Returns
ApiModuleLogger
Not documented.
Throws
Not documented.
</details> <details> <summary>getBestAsk</summary>getBestAsk#
Get the ask ARENA's best price, or null if no asks exist. Mixes both outcome lanes — see {@link getBestBid}.
Declaration source: packages/core/src/orderbook.ts:225.
export function getBestAsk(orderbook: OrderbookAccount): number | null;
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>getBestBid</summary>getBestBid#
Get the bid ARENA's best price, or null if no bids exist.
The arena interleaves the YES lane (BuyYes, YES prices) and the NO lane
(BuyNo, NO prices), so this is not a quote for either outcome and must not
anchor a maker band, a mark or a NO price. Use aggregateOrderbookLanes.
Declaration source: packages/core/src/orderbook.ts:217.
export function getBestBid(orderbook: OrderbookAccount): number | null;
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>getCreatableMarketTimingFromClockData</summary>getCreatableMarketTimingFromClockData#
Not documented.
Declaration source: packages/core/src/market.ts:254.
export function getCreatableMarketTimingFromClockData(clockData: Uint8Array, durationSeconds: number | bigint, marketId: bigint): CreateMarketTiming;
Parameters
clockData: Uint8Array<ArrayBufferLike>— Not documented.durationSeconds: number | bigint— Not documented.marketId: bigint— Not documented.
Returns
CreateMarketTiming
Not documented.
Throws
Not documented.
</details> <details> <summary>getCreatableMarketTimingFromUnixTimestamp</summary>getCreatableMarketTimingFromUnixTimestamp#
Observed-Clock preview; actual lifetime is assigned when creation lands.
Declaration source: packages/core/src/market.ts:226.
export function getCreatableMarketTimingFromUnixTimestamp(timestampSeconds: number | bigint, durationSeconds: number | bigint, marketId: bigint): CreateMarketTiming;
Parameters
timestampSeconds: number | bigint— Not documented.durationSeconds: number | bigint— Not documented.marketId: bigint— Not documented.
Returns
CreateMarketTiming
Not documented.
Throws
Not documented.
</details> <details> <summary>getCreateMarketRewardFundingLamports</summary>getCreateMarketRewardFundingLamports#
D0{lamport} Reward budget included by native CreateMarket, above market rent. Pass the decoded config's current closerRewardLamports, not the default rate. This is a quote: execution uses the config rate at landing. Both keeper and BYO creates fund this same baseline; it is not an optional extra transfer. TopUpCloserRewards restores this fixed target on an existing market, so appending it to a fresh create at the same config rate is a no-op.
Declaration source: packages/core/src/constants.ts:90.
export function getCreateMarketRewardFundingLamports(closerRewardLamports: bigint): bigint;
Parameters
closerRewardLamports: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>getCurrencySymbol</summary>getCurrencySymbol#
Exact mint address only; never match by symbol, prefix or case-folded text.
Declaration source: packages/core/src/currencySymbols.ts:22.
export function getCurrencySymbol(mint: string): string | undefined;
Parameters
mint: string— Not documented.
Returns
string | undefined
Not documented.
Throws
Not documented.
</details> <details> <summary>getDefaultSeesawWsUrl</summary>getDefaultSeesawWsUrl#
Not documented.
Declaration source: packages/core/src/streams.ts:223.
export function getDefaultSeesawWsUrl(apiUrl?: string): string;
Parameters
apiUrl: string | undefined— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>getErrorDescription</summary>getErrorDescription#
Get the description for a Seesaw error code.
Declaration source: packages/core/src/errors.ts:45.
export function getErrorDescription(code: number): string | undefined;
Parameters
code: number— - The error code (e.g., 0x1001).
Returns
string | undefined
Human-readable description, or undefined if unknown.
Throws
Not documented.
</details> <details> <summary>getErrorName</summary>getErrorName#
Get the name for a Seesaw error code.
Declaration source: packages/core/src/errors.ts:55.
export function getErrorName(code: number): string | undefined;
Parameters
code: number— - The error code (e.g., 0x1001).
Returns
string | undefined
The enum member name (e.g., "MarketExists"), or undefined if unknown.
Throws
Not documented.
</details> <details> <summary>getFeedSymbol</summary>getFeedSymbol#
Exact canonical identity only; never match substrings or nearby feeds.
Declaration source: packages/core/src/feedSymbols.ts:29.
export function getFeedSymbol(feedId: string): string | undefined;
Parameters
feedId: string— Not documented.
Returns
string | undefined
Not documented.
Throws
Not documented.
</details> <details> <summary>getFreeFunds</summary>getFreeFunds#
Fetch and decode owner's free-fund buckets from marketAddress's
trader-ledger PDA.
Returns { quoteFree: 0n, yesFree: 0n, noFree: 0n } when:
- the trader-ledger account does not exist yet (fetcher returns
null- e.g. no one has ever deposited into this market), or - the account exists but
ownerhas no occupied slot in it (never deposited, or fully withdrawn and the slot was cleared).
Decode failures (corrupt account data, unsupported version) propagate as thrown errors rather than being silently swallowed to zero - a malformed account is a bug worth surfacing, not a legitimate "no balance" state.
Declaration source: packages/core/src/traderLedger.ts:54.
export function getFreeFunds(fetcher: (address: Address) => Promise<Uint8Array | null>, marketAddress: Address, owner: Address, programAddress?: Address): Promise<FreeFunds>;
Parameters
fetcher: (address: Address) => Promise<Uint8Array | null>— - a transport-agnostic account-data fetcher. Mirrors {@link getTreasuryRecipients }'s fetcher shape so both the web (RPC-proxy) and mobile (Connection.getAccountInfo) apps can supply their own platform-specific implementation.marketAddress: Address— - the market whose trader ledger to read.owner: Address— - the trader whose slot to look up.programAddress: Address | undefined— - the seesaw program ID; defaults to mainnet.
Returns
Promise<FreeFunds>
Not documented.
Throws
Not documented.
</details> <details> <summary>getJurisdictionAttestation</summary>getJurisdictionAttestation#
Whether the signing wallet has a valid jurisdiction attestation for the current policy.
Declaration source: packages/core/src/api/compliance.ts:45.
export function getJurisdictionAttestation(client: ApiClient, signer: WalletMessageSigner, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<JurisdictionAttestationStatus>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; attested: boolean; version: string | number; timestamp: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>getMarketOutcomeLabel</summary>getMarketOutcomeLabel#
Get a human-readable label for a market outcome.
Declaration source: packages/core/src/market.ts:374.
export function getMarketOutcomeLabel(outcome: Outcome): string;
Parameters
outcome: Outcome— Not documented. See Outcome for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>getMarketPdas</summary>getMarketPdas#
Get all market PDAs for a given market.
Declaration source: packages/core/src/sdk.ts:1550.
export function getMarketPdas(pythFeedId: Uint8Array, durationSeconds: bigint, marketId: bigint, creator: Address, currencyRecord: Address, programAddress?: Address): Promise<{ market: Address; orderbook: Address; vault: Address; }>;
Parameters
pythFeedId: Uint8Array<ArrayBufferLike>— - The 32-byte Pyth price feed identifier.durationSeconds: bigint— - Market duration in seconds.marketId: bigint— - The persisted positive u64 microsecond creation intent.creator: Address— - The market creator's wallet address.currencyRecord: Address— - The registered currency record PDA of the settlement currency.programAddress: Address— - The Seesaw program address. Default:PROGRAM_ADDRESS.
Returns
Promise<{ market: Address; orderbook: Address; vault: Address; }>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
getMarketState#
Derive the market state from account fields.
Mirrors the Rust compute_state() in program/src/state/market.rs.
State is derived purely from on-chain field values (not time),
matching the on-chain implementation exactly:
- If
outcome != None: Resolved or Closed (depending on settlement progress) - If initialized and bound to an external resolver: Trading
- If
endPrice != 0(captured): Settling - If
startPrice != 0(captured): Trading - If
createdAt != 0: Created - Otherwise: Pending
Declaration source: packages/core/src/market.ts:292.
export function getMarketState(market: Pick<MarketAccount, "outcome" | "settledPositions" | "totalPositions" | "totalYesShares" | "totalNoShares" | "economicYesClaims" | "economicNoClaims" | "quoteFreeLiability" | "quoteLockedLiability" | "endPrice" | "startPrice" | "createdAt" | "resolvedAt" | "tStart" | "tEnd"> & Partial<Pick<MarketAccount, "resolverAuthority">>): MarketState;
Parameters
market: Pick<MarketAccount, "tStart" | "tEnd" | "createdAt" | "resolvedAt" | "startPrice" | "endPrice" | "totalYesShares" | "totalNoShares" | "totalPositions" | "settledPositions" | "outcome" | "quoteFreeLiability" | "quoteLockedLiability" | "economicYesClaims" | "economicNoClaims"> & Partial<Pick<MarketAccount, "resolverAuthority">>— - The market account data.
Returns
MarketState
Not documented.
Throws
Not documented.
</details> <details> <summary>getMarketWindow</summary>getMarketWindow#
The authoritative market window, read from the account's tStart/tEnd.
This is the ONLY correct way for a display surface to learn when a market opens and closes. Every market kind carries its actual window on the account; no market ID is a lifecycle time source.
Declaration source: packages/core/src/market.ts:152.
export function getMarketWindow(market: MarketWindowInput): MarketWindow;
Parameters
market: MarketWindowInput— Not documented. See MarketWindowInput for its declaration and available field documentation.
Returns
MarketWindow
Not documented.
Throws
Not documented.
</details> <details> <summary>getMarketWindowProgress</summary>getMarketWindowProgress#
Progress through the market's authoritative window as a percentage [0, 100].
Uses the account window for every market kind. A degenerate window
(tEnd <= tStart) reports 100 rather than dividing by zero.
Declaration source: packages/core/src/market.ts:176.
export function getMarketWindowProgress(market: MarketWindowInput, nowMs?: number): number;
Parameters
market: MarketWindowInput— Not documented. See MarketWindowInput for its declaration and available field documentation.nowMs: number— Not documented. Default:Date.now().
Returns
number
Not documented.
Throws
Not documented.
Defaults
nowMs:Date.now().
getMidPrice#
Arena mid price in basis points, or null if either side is empty. Mixes both outcome lanes — see {@link getBestBid}; it is not a YES or NO mid.
Declaration source: packages/core/src/orderbook.ts:244.
export function getMidPrice(orderbook: OrderbookAccount): number | null;
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>getNotificationPreferences</summary>getNotificationPreferences#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:272.
export function getNotificationPreferences(client: ApiClient, signer: WalletMessageSigner, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<NotificationPreferences>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<NotificationPreferences>
Not documented.
Throws
Not documented.
</details> <details> <summary>getOrdersByOwner</summary>getOrdersByOwner#
Get all live, matchable orders owned by a specific address.
Declaration source: packages/core/src/orderbook.ts:254.
export function getOrdersByOwner(orderbook: OrderbookAccount, owner: Address): Order[];
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.owner: Address— Not documented.
Returns
Order[]
Not documented.
Throws
Not documented.
</details> <details> <summary>getPairFromPythFeed</summary>getPairFromPythFeed#
Not documented.
Declaration source: packages/core/src/api/markets.ts:224.
export function getPairFromPythFeed(pythFeedId: string): string;
Parameters
pythFeedId: string— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>getPositionPda</summary>getPositionPda#
Get position PDA for a user in a market.
Declaration source: packages/core/src/sdk.ts:1579.
export function getPositionPda(marketAddress: Address, userAddress: Address, programAddress?: Address): Promise<Address>;
Parameters
marketAddress: Address— Not documented.userAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Address>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
getProtocolTreasuryDestination#
Fetch the config and return the protocol destination of an order in a
market of settlementMint (see {@link resolveProtocolTreasuryDestination}).
For a non-default currency the shard must exist: a missing shard throws {@link CurrencyProtocolTreasuryMissingError} before any signature is asked.
Declaration source: packages/core/src/treasury.ts:262.
export function getProtocolTreasuryDestination(fetcher: (address: Address) => Promise<Uint8Array | null>, input: { readonly settlementMint: Address; readonly protocolTreasuryIndex: number; readonly tokenProgram?: Address; }, programAddress?: Address): Promise<ProtocolTreasuryDestination>;
Parameters
fetcher: (address: Address) => Promise<Uint8Array | null>— Not documented.input: { readonly settlementMint: Address; readonly protocolTreasuryIndex: number; readonly tokenProgram?: Address; }— Not documented.programAddress: Address | undefined— Not documented.
Returns
Promise<ProtocolTreasuryDestination>
Not documented.
Throws
Not documented.
</details> <details> <summary>getRedeemInstructionIdentity</summary>getRedeemInstructionIdentity#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:138.
export function getRedeemInstructionIdentity(instruction: unknown): string;
Parameters
instruction: unknown— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>getResponsibleTrading</summary>getResponsibleTrading#
Not documented.
Declaration source: packages/core/src/api/compliance.ts:99.
export function getResponsibleTrading(client: ApiClient, signer: WalletMessageSigner, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<ResponsibleTradingState>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ walletAddress: string; coolOffUntil: string | null; blocked: boolean; dailyDepositLimit: string | null; updatedAt: string | null; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>getServerTime</summary>getServerTime#
Public indexer clock, for clock-skew checks (not a chain time).
Declaration source: packages/core/src/api/walletServices.ts:371.
export function getServerTime(client: ApiClient, options?: { signal?: AbortSignal; }): Promise<{ serverTime: number; iso: string; }>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.options: { signal?: AbortSignal; } | undefined— Not documented.
Returns
Promise<{ serverTime: number; iso: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>getServiceStatus</summary>getServiceStatus#
Public indexer status; the indexer owns the field set.
Declaration source: packages/core/src/api/walletServices.ts:356.
export function getServiceStatus(client: ApiClient, options?: { signal?: AbortSignal; }): Promise<Record<string, unknown>>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.options: { signal?: AbortSignal; } | undefined— Not documented.
Returns
Promise<Record<string, unknown>>
Not documented.
Throws
Not documented.
</details> <details> <summary>getShareSnapshot</summary>getShareSnapshot#
Read a share snapshot payload (public); expired snapshots are not served.
Declaration source: packages/core/src/api/social.ts:186.
export function getShareSnapshot(client: ApiClient, id: string, options?: { signal?: AbortSignal; }): Promise<Record<string, unknown>>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.id: string— Not documented.options: { signal?: AbortSignal; } | undefined— Not documented.
Returns
Promise<Record<string, unknown>>
Not documented.
Throws
Not documented.
</details> <details> <summary>getSpread</summary>getSpread#
Arena bid-ask spread in basis points, or null if either side is empty. Mixes both outcome lanes — see {@link getBestBid}; a per-outcome spread must come from that outcome's lane.
Declaration source: packages/core/src/orderbook.ts:234.
export function getSpread(orderbook: OrderbookAccount): number | null;
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>GetStartedInput</summary>GetStartedInput#
Not documented.
Declaration source: packages/core/src/ux/getStarted.ts:9.
export interface GetStartedInput {
/** Wallet SOL balance; `null` = not read yet. */
lamports: bigint | null;
/** Wallet + free settlement-token balance in base units; `null` = not read yet. */
settlementTokenAtoms: bigint | null;
/** Trades this wallet has made; `null` = not read yet. */
tradeCount: number | null;
}
Field documentation
lamports— Wallet SOL balance;null= not read yet.settlementTokenAtoms— Wallet + free settlement-token balance in base units;null= not read yet.tradeCount— Trades this wallet has made;null= not read yet.
GetStartedStepKey#
Not documented.
Declaration source: packages/core/src/ux/getStarted.ts:18.
export type GetStartedStepKey = 'sol' | 'settlementToken' | 'firstTrade';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
getStartedSteps#
The three steps in order — get SOL for fees, get the settlement token,
make a first trade —
each done true/false, or null while its input is unknown (render a
neutral state, never a tick or a cross).
Declaration source: packages/core/src/ux/getStarted.ts:26.
export function getStartedSteps(input: GetStartedInput): Array<{ key: GetStartedStepKey; done: boolean | null; }>;
Parameters
input: GetStartedInput— Not documented. See GetStartedInput for its declaration and available field documentation.
Returns
{ key: GetStartedStepKey; done: boolean | null; }[]
Not documented.
Throws
Not documented.
</details> <details> <summary>getTimeUntilMarketWindowEnd</summary>getTimeUntilMarketWindowEnd#
Milliseconds remaining until the market's authoritative tEnd, clamped at 0.
Reads the account window for every market kind; IDs carry no lifetime.
Declaration source: packages/core/src/market.ts:163.
export function getTimeUntilMarketWindowEnd(market: MarketWindowInput, nowMs?: number): number;
Parameters
market: MarketWindowInput— Not documented. See MarketWindowInput for its declaration and available field documentation.nowMs: number— Not documented. Default:Date.now().
Returns
number
Not documented.
Throws
Not documented.
Defaults
nowMs:Date.now().
getTopThree#
Not documented.
Declaration source: packages/core/src/api/users.ts:127.
export function getTopThree(entries: LeaderboardEntry[]): LeaderboardEntry[];
Parameters
entries: LeaderboardEntry[]— Not documented.
Returns
LeaderboardEntry[]
Not documented.
Throws
Not documented.
</details> <details> <summary>getTreasuryRecipients</summary>getTreasuryRecipients#
Fetch and decode the on-chain ConfigAccount.treasuryRecipients array.
Returns the 8 SPL token-account addresses that
config.treasuryRecipients[i] points at. Callers wanting to build a
place_order instruction can use the result alongside
{@link pickTreasuryIndex} to pick a shard and pass the matching
token account.
Declaration source: packages/core/src/treasury.ts:135.
export function getTreasuryRecipients(fetcher: (address: Address) => Promise<Uint8Array | null>, programAddress?: Address): Promise<readonly Address[]>;
Parameters
fetcher: (address: Address) => Promise<Uint8Array | null>— - a function that fetches raw account data given anAddress. Pass a lightweight fetcher (e.g.solana-kit'sgetAccountInfo) so this helper stays Connection-agnostic.programAddress: Address | undefined— - the seesaw program ID; defaults to mainnet.
Returns
Promise<readonly Address[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>getWalletProfile</summary>getWalletProfile#
Not documented.
Declaration source: packages/core/src/api/social.ts:58.
export function getWalletProfile(client: ApiClient, signer: WalletMessageSigner, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<WalletProfile>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; walletAddress: string; displayName: string | null; avatarUrl: string | null; isAnonymous: boolean; streak?: Record<string, unknown> | null | undefined; stats?: Record<string, unknown> | null | undefined; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>getWatchlistMarkets</summary>getWatchlistMarkets#
Public: indexed market rows for up to 50 addresses (hydrates a local watchlist).
Declaration source: packages/core/src/api/walletServices.ts:118.
export function getWatchlistMarkets(client: ApiClient, addresses: readonly string[], options?: { signal?: AbortSignal; }): Promise<Array<Record<string, unknown>>>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.addresses: readonly string[]— Not documented.options: { signal?: AbortSignal; } | undefined— Not documented.
Returns
Promise<Record<string, unknown>[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>GOVERNANCE_COOLDOWN_SECONDS</summary>GOVERNANCE_COOLDOWN_SECONDS#
The cooldown that applies to each governance clock, in seconds.
Declaration source: packages/core/src/preflight/governance.ts:78.
export declare const GOVERNANCE_COOLDOWN_SECONDS: Readonly<Record<GovernanceCooldownKind, number>>;
GovernanceCooldownIntent#
Everything a governance cooldown check needs.
Source of truth: enforce_config_update_cooldown
(program/src/processor/admin.rs:90-106) and, for the market-local
microstructure clock, enforce_microstructure_cooldown (admin.rs:71-88).
Declaration source: packages/core/src/preflight/types.ts:570.
export interface GovernanceCooldownIntent {
kind: GovernanceCooldownKind;
/**
* The matching `ConfigAccount` timestamp
* (`last_fee_config_update_at`, `last_treasury_update_at`,
* `last_operational_params_update_at`, `last_microstructure_update_at`), or
* the market-local `last_microstructure_update_at`.
*
* `0` means "never updated", which the program treats as always allowed.
*/
lastUpdateAt: number;
nowUnix: number;
/**
* Cooldown override in seconds. Defaults to the constant for `kind`; all
* four are 3 600 today (`program/src/constants.rs:270,303,313,320`).
*/
intervalSeconds?: number;
/**
* `market.emergency_status()` raw byte, for the MARKET-local microstructure
* clock only. A non-`None` status bypasses the cooldown only for the protocol
* admin. Omitted means the protocol-global clock, which has no such bypass.
*/
emergencyStatus?: number;
/** Authenticated market-cap signer role; omission never grants the admin bypass. */
signerRole?: 'creator' | 'protocolAdmin';
}
Field documentation
lastUpdateAt— The matchingConfigAccounttimestamp (last_fee_config_update_at,last_treasury_update_at,last_operational_params_update_at,last_microstructure_update_at), or the market-locallast_microstructure_update_at.
0 means "never updated", which the program treats as always allowed.
intervalSeconds— Cooldown override in seconds. Defaults to the constant forkind; all four are 3 600 today (program/src/constants.rs:270,303,313,320).emergencyStatus—market.emergency_status()raw byte, for the MARKET-local microstructure clock only. A non-Nonestatus bypasses the cooldown only for the protocol admin. Omitted means the protocol-global clock, which has no such bypass.signerRole— Authenticated market-cap signer role; omission never grants the admin bypass.
GovernanceCooldownKind#
Which admin-governance clock a cooldown check applies to. Each maps to its
own ConfigAccount timestamp, its own constant, and its own error code.
Declaration source: packages/core/src/preflight/types.ts:557.
export type GovernanceCooldownKind =
| 'feeConfig'
| 'treasuryRecipients'
| 'operationalParams'
| 'microstructure';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
governanceCooldownRemainingSeconds#
Seconds remaining before this governance clock unlocks. 0 means the update
may land now.
The countdown and the verdict are two views of the same computation, so an
admin page can show remaining > 0 ? countdown : enabled button without them
ever disagreeing.
Declaration source: packages/core/src/preflight/governance.ts:115.
export function governanceCooldownRemainingSeconds(intent: GovernanceCooldownIntent): number;
Parameters
intent: GovernanceCooldownIntent— Not documented. See GovernanceCooldownIntent for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>governanceCooldownVerdict</summary>governanceCooldownVerdict#
Decide whether the program would accept this governance update's cooldown.
This mirrors the COOLDOWN only. Each instruction layers its own value
validation on top (fee-split sums, treasury duplicate/zero-pubkey rejection,
operational-parameter ranges); those are per-instruction and are not modelled
here. A { allowed: true } verdict means "the clock is open", not "this
payload is valid".
Declaration source: packages/core/src/preflight/governance.ts:143.
export function governanceCooldownVerdict(intent: GovernanceCooldownIntent, options?: PreflightOptions): Verdict;
Parameters
intent: GovernanceCooldownIntent— Not documented. See GovernanceCooldownIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>hasStandinDisclaimer</summary>hasStandinDisclaimer#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:138.
export function hasStandinDisclaimer(report: { readonly disclaimer: string; }): boolean;
Parameters
report: { readonly disclaimer: string; }— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>HEALTH_INDEXER_LAG_DELAYED_MS</summary>HEALTH_INDEXER_LAG_DELAYED_MS#
Indexer lag above this reads as delayed.
Declaration source: packages/core/src/ux/health.ts:23.
export declare const HEALTH_INDEXER_LAG_DELAYED_MS: 30000;
HEALTH_PRICE_AGE_DELAYED_MS#
Price age above this reads as delayed.
Declaration source: packages/core/src/ux/health.ts:25.
export declare const HEALTH_PRICE_AGE_DELAYED_MS: 10000;
HealthInput#
Not documented.
Declaration source: packages/core/src/ux/health.ts:9.
export interface HealthInput {
/** Browser/device network reachability. */
online: boolean;
/** Last RPC probe; `null` = not probed yet. */
rpcOk: boolean | null;
/** Indexer lag behind the chain; `null` = unknown. */
indexerLagMs: number | null;
/** Age of the latest oracle price; `null` = unknown. */
priceAgeMs: number | null;
}
Field documentation
online— Browser/device network reachability.rpcOk— Last RPC probe;null= not probed yet.indexerLagMs— Indexer lag behind the chain;null= unknown.priceAgeMs— Age of the latest oracle price;null= unknown.
HealthLevel#
The single status the header dot shows.
Declaration source: packages/core/src/ux/health.ts:7.
export type HealthLevel = 'live' | 'delayed' | 'offline';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
HealthReason#
Not documented.
Declaration source: packages/core/src/ux/health.ts:20.
export type HealthReason = 'offline' | 'rpc' | 'indexer' | 'price';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
HEAP_FRAME_GRANULARITY_BYTES#
D0{byte} Heap-frame request granularity enforced by the runtime.
Declaration source: packages/core/src/constants.ts:395.
export declare const HEAP_FRAME_GRANULARITY_BYTES: 1024;
heapFrameBytesFor#
D0{byte} Heap frame the given instruction discriminator needs, or null
when the instruction runs inside the runtime default and needs no request.
Instructions that need a frame:
0x0CPlaceOrder,0x0ESwapWithFreeFunds,0x0FPlaceLimitWithFreeFunds - a full book can push the matcher past the 32 KiB default, so they take the flatPLACE_ORDER_HEAP_FRAME_BYTES.0x0D/0x10batch post-only - scales withorderCount.
Declaration source: packages/core/src/computeBudget.ts:100.
export function heapFrameBytesFor(discriminator: number, params?: HeapFrameParams): number | null;
Parameters
discriminator: number— Not documented.params: HeapFrameParams— Not documented. Default:{}. See HeapFrameParams for its declaration and available field documentation.
Returns
number | null
Not documented.
Throws
Not documented.
Defaults
params:{}.
heapFrameBytesForInstructions#
D0{byte} Heap frame a transaction carrying instructions needs, or null
when none of them needs more than the runtime default.
Reads the Seesaw discriminator (and, for the batch post-only wrappers, the
bid_count / ask_count prefix bytes) straight off each instruction's data,
so callers cannot forget to pass an entry count that matches what they
actually built. Non-Seesaw instructions are ignored.
Declaration source: packages/core/src/computeBudget.ts:257.
export function heapFrameBytesForInstructions(instructions: readonly HeapFrameScannableInstruction[], programAddress?: string): number | null;
Parameters
instructions: readonly HeapFrameScannableInstruction[]— Not documented.programAddress: string— Not documented. Default:PROGRAM_ADDRESS.
Returns
number | null
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
HeapFrameParams#
Parameters that influence the heap frame for a given instruction.
Declaration source: packages/core/src/computeBudget.ts:85.
export interface HeapFrameParams {
/** Total batch entries (bids + asks) for `0x0D` / `0x10`. */
readonly orderCount?: number;
}
Field documentation
orderCount— Total batch entries (bids + asks) for0x0D/0x10.
HeapFrameScannableInstruction#
Minimal instruction shape {@link heapFrameBytesForInstructions} can read.
Accepts both a Kit Instruction (programAddress, data: Uint8Array) and
a web3.js TransactionInstruction (programId, data: Buffer) so mobile
and web can share one implementation.
Declaration source: packages/core/src/computeBudget.ts:234.
export interface HeapFrameScannableInstruction {
readonly programAddress?: string;
readonly programId?: string | { toBase58(): string };
readonly data?: ArrayLike<number>;
}
HeldOutcomeShares#
Fresh share balances the signer holds, by the custody each funding source
escrows from: the outcome ATAs for wallet orders and the trader-ledger
free buckets for freeFunds orders. null anywhere means the read did not
land (UNKNOWN), which never counts as holdings.
Declaration source: packages/core/src/reviewedIntent.ts:670.
export interface HeldOutcomeShares {
readonly wallet: { readonly YES: bigint | null; readonly NO: bigint | null } | null;
readonly ledger: { readonly YES: bigint | null; readonly NO: bigint | null } | null;
}
hexToBytes#
Not documented.
Declaration source: packages/core/src/utils/hex.ts:9.
export function hexToBytes(hex: string): Uint8Array;
Parameters
hex: string— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>HIGH_WATER_ON_FAILURE_VALUES</summary>HIGH_WATER_ON_FAILURE_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:33.
export declare const HIGH_WATER_ON_FAILURE_VALUES: readonly ["kept", "rolled_back"];
HIGH_WATER_RESET_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:36.
export declare const HIGH_WATER_RESET_VALUES: readonly ["never", "on_request", "fresh_domain"];
HighWaterOnFailure#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:34.
export type HighWaterOnFailure = (typeof HIGH_WATER_ON_FAILURE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
HighWaterReset#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:37.
export type HighWaterReset = (typeof HIGH_WATER_RESET_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
IDL_ABI_VERSION#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:2.
export declare const IDL_ABI_VERSION: "1.0.0";
IDL_CONSTANTS#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:2879.
export declare const IDL_CONSTANTS: { readonly CANONICAL_SCHEMA_VERSION: 1; readonly RECORDER_VERSION: 4; };
IDL_ERROR_CATALOG#
SeesawError custom codes and descriptions, in code order.
Declaration source: packages/core/src/generated/abiFacts.ts:654.
export declare const IDL_ERROR_CATALOG: readonly [{ readonly name: "MarketExists"; readonly code: 4097; readonly message: "Market account already exists"; }, { readonly name: "InvalidState"; readonly code: 4098; readonly message: "Operation not valid in current market state"; }, { readonly name: "TradingNotStarted"; readonly code: 4099; readonly message: "Trading has not begun"; }, { readonly name: "TradingEnded"; readonly code: 4100; readonly message: "Trading period has ended"; }, { readonly name: "AlreadyResolved"; readonly code: 4101; readonly message: "Market outcome already determined"; }, { readonly name: "MarketNotResolved"; readonly code: 4102; readonly message: "Market not yet resolved"; }, { readonly name: "TooEarly"; readonly code: 4103; readonly message: "Operation attempted too early"; }, { readonly name: "EpochNotStarted"; readonly code: 4104; readonly message: "Epoch has not started yet"; }, { readonly name: "EpochNotEnded"; readonly code: 4105; readonly message: "Epoch has not ended yet"; }, { readonly name: "NotOwner"; readonly code: 4106; readonly message: "Caller is not the owner"; }, { readonly name: "PositionsRemaining"; readonly code: 4107; readonly message: "Unsettled positions or redeemable bearer supply remain"; }, { readonly name: "MarketCloseTimeout"; readonly code: 4108; readonly message: "Market close timeout not elapsed (7 days after resolution)"; }, { readonly name: "InvalidCreator"; readonly code: 4109; readonly message: "Creator account does not match market creator"; }, { readonly name: "VaultNotEmpty"; readonly code: 4110; readonly message: "Vault still contains funds; cannot close market"; }, { readonly name: "InvalidDuration"; readonly code: 4111; readonly message: "Market duration is outside allowed bounds"; }, { readonly name: "InvalidConfidenceRatio"; readonly code: 4112; readonly message: "Confidence ratio exceeds maximum valid value (10000 bps)"; }, { readonly name: "InvalidStateTransition"; readonly code: 4113; readonly message: "State transition is not valid from current state"; }, { readonly name: "LedgerBalancesRemaining"; readonly code: 4114; readonly message: "Trader-ledger balances remain"; }, { readonly name: "OracleMismatch"; readonly code: 8193; readonly message: "Oracle feed does not match market"; }, { readonly name: "StaleOracle"; readonly code: 8194; readonly message: "Oracle price data is stale"; }, { readonly name: "InvalidPrice"; readonly code: 8195; readonly message: "Oracle reported invalid price"; }, { readonly name: "ConfidenceTooWide"; readonly code: 8196; readonly message: "Oracle confidence interval too wide"; }, { readonly name: "FeedIdMismatch"; readonly code: 8197; readonly message: "Pyth feed ID does not match market configuration"; }, { readonly name: "InvalidOracleData"; readonly code: 8198; readonly message: "Oracle price exponent is outside valid range"; }, { readonly name: "OraclePriceJumpTooLarge"; readonly code: 8199; readonly message: "Oracle price jump exceeds circuit breaker"; }, { readonly name: "InvalidQuantity"; readonly code: 12289; readonly message: "Invalid order quantity"; }, { readonly name: "OrderbookFull"; readonly code: 12290; readonly message: "Order book is full"; }, { readonly name: "OrderNotFound"; readonly code: 12291; readonly message: "Order not found"; }, { readonly name: "WouldCross"; readonly code: 12292; readonly message: "PostOnly order would cross spread"; }, { readonly name: "PriceTooLow"; readonly code: 12293; readonly message: "Price too low (must be at least 1 basis point)"; }, { readonly name: "PriceTooHigh"; readonly code: 12294; readonly message: "Price too high (must be less than 10000 basis points)"; }, { readonly name: "SlippageExceeded"; readonly code: 12295; readonly message: "IOC stopped before any fill at worst_acceptable_price_bps slippage bound"; }, { readonly name: "InsufficientFill"; readonly code: 12296; readonly message: "IOC filled fewer units than min_fill_quantity required"; }, { readonly name: "NoFillForIoc"; readonly code: 12297; readonly message: "IOC order matched no resting liquidity"; }, { readonly name: "SelfTradeAbort"; readonly code: 12298; readonly message: "Self-trade encountered while self_trade_behavior == Abort"; }, { readonly name: "PostOnlyModeActive"; readonly code: 12299; readonly message: "Protocol is in PostOnly mode; submit a Limit or PostOnly order"; }, { readonly name: "OrderNotExpired"; readonly code: 12300; readonly message: "ReclaimExpiredOrder target is not past its TTL or flagged ExpiredClaimable"; }, { readonly name: "InsufficientBalance"; readonly code: 12301; readonly message: "Taker ATA balance is below the required collateral / shares for this order"; }, { readonly name: "MaxTotalSharesExceeded"; readonly code: 12302; readonly message: "MintShares amount would push the per-market YES/NO supply past max_total_shares"; }, { readonly name: "AuthorityClaimNotEligible"; readonly code: 12303; readonly message: "ClaimAuthority called before the pending-authority timelock elapsed"; }, { readonly name: "InsufficientFreeBalance"; readonly code: 12304; readonly message: "WithdrawFunds amount exceeds the trader-ledger quote_free balance"; }, { readonly name: "MinRestingNotionalNotMet"; readonly code: 12305; readonly message: "Resting remainder notional is below config.min_resting_notional"; }, { readonly name: "OrderPriceOutOfBand"; readonly code: 12306; readonly message: "Order price is outside the maker price band (see spec/ORDERBOOK.md)"; }, { readonly name: "TraderLedgerFull"; readonly code: 12307; readonly message: "Trader ledger has no free slot for a new maker (Wave 4b authoritative ledger)"; }, { readonly name: "OrderbookNotEmpty"; readonly code: 12308; readonly message: "CloseMarket: at least one orderbook slot is still occupied; call ReclaimExpiredOrder on expired entries first"; }, { readonly name: "TraderLedgerNotAllocated"; readonly code: 12309; readonly message: "CreateMarket: trader_ledger PDA is not fully allocated. Caller must invoke EnsureTraderLedgerSpace ceil(target_size / 10_240) times before CreateMarket"; }, { readonly name: "TraderLedgerOversized"; readonly code: 12310; readonly message: "EnsureTraderLedgerSpace: account is larger than the canonical trader-ledger size"; }, { readonly name: "OrderbookTreeCorruption"; readonly code: 12311; readonly message: "Deep orderbook tree links are internally inconsistent"; }, { readonly name: "InternalInvariantViolated"; readonly code: 12312; readonly message: "Internal order processing invariant was violated"; }, { readonly name: "BookConsistencyInvariantViolated"; readonly code: 12313; readonly message: "Orderbook slot counts or cached best prices are inconsistent after mutation"; }, { readonly name: "CrossedBookInvariantViolated"; readonly code: 12314; readonly message: "Orderbook has a matchable crossed bid/ask pair after mutation"; }, { readonly name: "UnsupportedAccountVersion"; readonly code: 12315; readonly message: "Account layout version is not supported by this program binary"; }, { readonly name: "PositionMarketMismatch"; readonly code: 12316; readonly message: "ForceClose position does not belong to the supplied market"; }, { readonly name: "PositionAlreadySettled"; readonly code: 12317; readonly message: "ForceClose position is already settled"; }, { readonly name: "ResidualShareLocks"; readonly code: 12318; readonly message: "ForceClose position has residual ask-side share locks"; }, { readonly name: "NothingToForceClose"; readonly code: 12319; readonly message: "ForceClose has no collateral or economic order progress to release"; }, { readonly name: "InvalidOrderTypeForInstruction"; readonly code: 12320; readonly message: "Order type is not supported by this instruction"; }, { readonly name: "MathOverflow"; readonly code: 16385; readonly message: "Arithmetic overflow"; }, { readonly name: "InvalidAccountType"; readonly code: 20481; readonly message: "Invalid account type"; }, { readonly name: "InvalidAccountOwner"; readonly code: 20482; readonly message: "Invalid account owner"; }, { readonly name: "InvalidPDA"; readonly code: 20483; readonly message: "Invalid PDA derivation"; }, { readonly name: "AlreadyInitialized"; readonly code: 20484; readonly message: "Account already initialized"; }, { readonly name: "InsolvencyDetected"; readonly code: 20485; readonly message: "Vault solvency invariant violated"; }, { readonly name: "UnauthorizedInitializer"; readonly code: 20486; readonly message: "Initializer is not the program upgrade authority"; }, { readonly name: "DuplicateAccount"; readonly code: 20487; readonly message: "Duplicate mutable account in instruction"; }, { readonly name: "FailedToSerializeEvent"; readonly code: 20488; readonly message: "Recorder failed to serialize the next event batch"; }, { readonly name: "FailedToFlushBuffer"; readonly code: 20489; readonly message: "Recorder failed to flush a pending event batch"; }, { readonly name: "InvalidRecorderPayloadLength"; readonly code: 20490; readonly message: "Recorder payload length is invalid"; }, { readonly name: "InvalidRecorderVersion"; readonly code: 20491; readonly message: "Recorder payload version is invalid"; }, { readonly name: "InvalidRecorderAuthorityKind"; readonly code: 20492; readonly message: "Recorder payload authority kind is invalid"; }, { readonly name: "InvalidRecorderEventCount"; readonly code: 20493; readonly message: "Recorder payload event count is invalid"; }, { readonly name: "ProtocolPaused"; readonly code: 24577; readonly message: "Protocol is paused"; }, { readonly name: "CannotExpire"; readonly code: 28673; readonly message: "Cannot expire market"; }, { readonly name: "InvalidRedemption"; readonly code: 28674; readonly message: "Cannot redeem tokens that are not winning"; }, { readonly name: "InvalidMint"; readonly code: 28675; readonly message: "Token account mint does not match expected mint"; }, { readonly name: "SolvencyInvariantViolated"; readonly code: 28676; readonly message: "Runtime solvency invariant violated after share or fee mutation"; }, { readonly name: "InvalidSettlementMintDecimals"; readonly code: 28677; readonly message: "Settlement mint decimals must be between 6 and 9"; }, { readonly name: "CollateralMirrorInconsistent"; readonly code: 28678; readonly message: "Collateral mirror is inconsistent with locked collateral in terminal redemption"; }, { readonly name: "InvalidFeeCurve"; readonly code: 32769; readonly message: "Fee curve parameters out of bounds"; }, { readonly name: "InvalidFeeSplit"; readonly code: 32770; readonly message: "Fee split shares do not sum to 10000 bps"; }, { readonly name: "ReferrerAlreadySet"; readonly code: 32771; readonly message: "Referee already has a referrer set"; }, { readonly name: "SelfReferralForbidden"; readonly code: 32772; readonly message: "Self-referral is forbidden"; }, { readonly name: "ReferrerTreasuryMismatch"; readonly code: 32773; readonly message: "Referrer treasury PDA mismatch"; }, { readonly name: "AccumulatedAmountZero"; readonly code: 32774; readonly message: "Claim attempted with zero accumulated balance"; }, { readonly name: "FeeConfigRateLimit"; readonly code: 32775; readonly message: "Fee-governance update called within rate-limit window"; }, { readonly name: "TreasuryIndexOutOfRange"; readonly code: 32776; readonly message: "Treasury index is out of range (>= MAX_TREASURY_RECIPIENTS)"; }, { readonly name: "TreasuryRecipientMismatch"; readonly code: 32777; readonly message: "Treasury token account does not match config.treasury_recipients[index]"; }, { readonly name: "InvalidTreasuryRecipient"; readonly code: 32778; readonly message: "Treasury recipient pubkey is zero (unset sentinel)"; }, { readonly name: "DuplicateTreasuryRecipient"; readonly code: 32779; readonly message: "Treasury recipients array contains a duplicate pubkey"; }, { readonly name: "TreasuryUpdateRateLimit"; readonly code: 32780; readonly message: "UpdateTreasuryRecipients called within rate-limit window"; }, { readonly name: "OperationalParamsRateLimit"; readonly code: 32781; readonly message: "UpdateOperationalParams called within rate-limit window"; }, { readonly name: "MicrostructureRateLimit"; readonly code: 32782; readonly message: "Market microstructure update called within rate-limit window"; }, { readonly name: "ReferralCacheMismatch"; readonly code: 32783; readonly message: "Referral binding does not match the immutable position cache"; }, { readonly name: "InvalidReferralRollupBatch"; readonly code: 32784; readonly message: "Referral rollup batch is invalid"; }, { readonly name: "ReferralFeesPending"; readonly code: 32785; readonly message: "Unswept referral fees are still pending"; }, { readonly name: "ReferralLiabilityMismatch"; readonly code: 32786; readonly message: "Market and position referral liabilities do not match"; }, { readonly name: "InvalidSplineConfig"; readonly code: 32787; readonly message: "Spline configuration is invalid"; }, { readonly name: "InstructionNotYetEnabled"; readonly code: 32788; readonly message: "Instruction is not yet enabled"; }, { readonly name: "InvalidSplineShape"; readonly code: 32789; readonly message: "Spline shape is invalid"; }, { readonly name: "UnauthorizedSplineMaker"; readonly code: 32790; readonly message: "Caller is not the spline maker"; }, { readonly name: "StaleSequence"; readonly code: 32791; readonly message: "Spline update sequence is stale"; }, { readonly name: "InvalidMidPrice"; readonly code: 32792; readonly message: "Spline midpoint is invalid"; }, { readonly name: "InvalidSplineSeries"; readonly code: 32793; readonly message: "Spline and market series do not match"; }, { readonly name: "InsufficientSplineCommitment"; readonly code: 32794; readonly message: "Spline commitment is below the required floor"; }, { readonly name: "SplineGenerationMismatch"; readonly code: 32795; readonly message: "Spline quote targets a different shape generation"; }, { readonly name: "InvalidSplineQuoteOrigin"; readonly code: 32796; readonly message: "Spline quote origin time is invalid or stale"; }, { readonly name: "MissingSplineAccounts"; readonly code: 32797; readonly message: "Required canonical spline account segment is missing"; }, { readonly name: "MakerRebateShareTooHigh"; readonly code: 32798; readonly message: "Maker rebate share exceeds the 4,000-bps hard cap"; }, { readonly name: "MakerRebateRestBoundTooHigh"; readonly code: 32799; readonly message: "Maker rebate minimum resting age exceeds 3,600 seconds"; }, { readonly name: "SeatsStillAttached"; readonly code: 32800; readonly message: "Attached spline seats must leave before close"; }, { readonly name: "OrderIdExhausted"; readonly code: 32801; readonly message: "Opaque order ID space is exhausted"; }, { readonly name: "RestingNotionalTooSmall"; readonly code: 32802; readonly message: "Reduced resting remainder is below config.min_resting_notional"; }, { readonly name: "SplineCommitmentUnderflow"; readonly code: 32803; readonly message: "Spline commitment debit exceeds tracked commitment"; }, { readonly name: "InvalidSequenceAnchor"; readonly code: 32804; readonly message: "Quote sequence anchor is invalid"; }, { readonly name: "AuthorityEpochMismatch"; readonly code: 32805; readonly message: "Quote authority epoch does not match"; }, { readonly name: "QuoteSessionExpired"; readonly code: 32806; readonly message: "Quote delegate session has expired"; }, { readonly name: "InvalidQuoteValidityWindow"; readonly code: 32807; readonly message: "Quote validity profile or slot window is invalid"; }, { readonly name: "SplineReaderWritable"; readonly code: 32808; readonly message: "Spline publication reader account is writable"; }, { readonly name: "QuoteProfileDowngrade"; readonly code: 32809; readonly message: "Quote delegate cannot weaken the validity profile"; }, { readonly name: "SelfBuilderForbidden"; readonly code: 32810; readonly message: "Builder must differ from the trader and be non-zero"; }, { readonly name: "BuilderApprovalMismatch"; readonly code: 32811; readonly message: "Builder approval PDA, trader, owner, or layout does not match"; }, { readonly name: "BuilderApprovalExpired"; readonly code: 32812; readonly message: "Builder approval has expired"; }, { readonly name: "BuilderApprovalNotYetActive"; readonly code: 32813; readonly message: "Builder approval cannot be used in the slot that created it"; }, { readonly name: "BuilderTokenAccountMismatch"; readonly code: 32814; readonly message: "Builder token account mint, owner, state, or distinctness is invalid"; }, { readonly name: "InvalidBuilderShare"; readonly code: 32815; readonly message: "Builder approval max_builder_bps must be 1..=10_000"; }, { readonly name: "ClientOrderIdNotFound"; readonly code: 32816; readonly message: "Client order identifier not found for this owner"; }, { readonly name: "CancelSessionMismatch"; readonly code: 32817; readonly message: "Cancellation session does not match the requested nonce"; }, { readonly name: "CancelSessionActive"; readonly code: 32818; readonly message: "Another principal owns the active cancellation session"; }, { readonly name: "SeatBelowLiquidityFloor"; readonly code: 32819; readonly message: "Spline seat is below the liquidity floor"; }, { readonly name: "SeatStalenessOff"; readonly code: 32820; readonly message: "Spline seat quote age must be nonzero"; }, { readonly name: "SeatCapReached"; readonly code: 32821; readonly message: "Market active spline seat cap reached"; }, { readonly name: "SeatMissTooSoon"; readonly code: 32822; readonly message: "Spline seat floor miss sampled too soon"; }, { readonly name: "SeatMissesBelowThreshold"; readonly code: 32823; readonly message: "Spline seat misses are below the dormancy threshold"; }, { readonly name: "SeatMeetsFloor"; readonly code: 32824; readonly message: "Spline seat meets the liquidity floor"; }, { readonly name: "DuplicateSeat"; readonly code: 32825; readonly message: "Duplicate spline seat in the seat vector"; }, { readonly name: "SeatSeriesMismatch"; readonly code: 32826; readonly message: "Spline seat belongs to another series"; }, { readonly name: "SubscriptionDisabled"; readonly code: 32827; readonly message: "Series subscription is disabled"; }, { readonly name: "SubscriptionSpacing"; readonly code: 32828; readonly message: "Market is inside the series spacing interval"; }, { readonly name: "SubscriptionMarketTooOld"; readonly code: 32829; readonly message: "Market is too old for the series crank"; }, { readonly name: "SubscriptionMarketParamsRejected"; readonly code: 32830; readonly message: "Market parameters are outside the series ranges"; }, { readonly name: "SubscriptionExternalMarket"; readonly code: 32831; readonly message: "Series crank rejects external markets"; }, { readonly name: "SubscriptionConcurrencyReached"; readonly code: 32832; readonly message: "Series concurrent seat limit reached"; }, { readonly name: "SeriesLamportBudgetInsufficient"; readonly code: 32833; readonly message: "Series lamport budget is insufficient"; }, { readonly name: "BalanceBoundViolated"; readonly code: 32834; readonly message: "A balance is below its asserted lower bound"; }, { readonly name: "OrderbookNeedsReclaim"; readonly code: 32835; readonly message: "Order book lane needs reclaim before matching"; }, { readonly name: "ManagedOrderUseBatchReclaim"; readonly code: 32836; readonly message: "Use batch reclaim for managed orders"; }, { readonly name: "NoPendingAuthority"; readonly code: 36865; readonly message: "ClaimAuthority: no authority rotation is pending"; }, { readonly name: "UnauthorizedClaim"; readonly code: 36866; readonly message: "ClaimAuthority: signer is not the pending authority"; }, { readonly name: "EmergencyDelayNotElapsed"; readonly code: 36867; readonly message: "ForceCancelMarketOrders: emergency delay has not elapsed"; }, { readonly name: "UnauthorizedPauser"; readonly code: 36868; readonly message: "Signer is neither config.authority nor configured nonzero config.pauser"; }, { readonly name: "WrongResolver"; readonly code: 40961; readonly message: "Signer does not match the market resolver authority"; }, { readonly name: "UnsupportedMarketKind"; readonly code: 40962; readonly message: "Market kind or leg count is unsupported"; }, { readonly name: "MarketHalted"; readonly code: 40963; readonly message: "Market is halted for new order placement"; }, { readonly name: "ExternalMarketInvalid"; readonly code: 40964; readonly message: "External market configuration is invalid"; }, { readonly name: "InvalidPayoutNumerators"; readonly code: 40965; readonly message: "Payout numerators are invalid"; }, { readonly name: "MarketMetaMismatch"; readonly code: 40966; readonly message: "Market metadata does not match the market"; }, { readonly name: "PreallocationReceiptMismatch"; readonly code: 40967; readonly message: "Preallocation receipt does not match its immutable commitment"; }, { readonly name: "PreallocationReceiptNotActive"; readonly code: 40968; readonly message: "Preallocation receipt is not active"; }, { readonly name: "PreallocationReclaimTooEarly"; readonly code: 40969; readonly message: "Preallocation reclaim is not yet permissionless"; }, { readonly name: "PreallocationTargetMismatch"; readonly code: 40970; readonly message: "Preallocation target size or capacity does not match"; }, { readonly name: "PreallocationDataNotZero"; readonly code: 40971; readonly message: "Preallocation child data is not zero"; }, { readonly name: "PreallocationMarketExists"; readonly code: 40972; readonly message: "Market or metadata already exists"; }, { readonly name: "ExternalCloseTimeOutOfRange"; readonly code: 40973; readonly message: "External market close time is outside the supported horizon"; }, { readonly name: "ExternalExpiryDeadlineOverflow"; readonly code: 40974; readonly message: "External market expiry deadline cannot be represented"; }, { readonly name: "EconomicAccountVersionMismatch"; readonly code: 40975; readonly message: "Economic account version does not match"; }, { readonly name: "EconomicDeltaOverflow"; readonly code: 40976; readonly message: "Economic accounting delta overflowed"; }, { readonly name: "NativeResolutionPolicyMismatch"; readonly code: 40977; readonly message: "Native resolution policy does not match"; }, { readonly name: "NativeResolutionReasonInvalid"; readonly code: 40978; readonly message: "Native resolution reason is invalid"; }, { readonly name: "SourceClaimBindingMismatch"; readonly code: 49153; readonly message: "Source claim bindings do not match"; }, { readonly name: "SourceInvalidTransition"; readonly code: 49154; readonly message: "Source-market transition is invalid"; }, { readonly name: "SourceImmutableBindingMismatch"; readonly code: 49155; readonly message: "Source immutable binding mismatch"; }, { readonly name: "SourceInvalidDefinition"; readonly code: 49156; readonly message: "Invalid source definition"; }, { readonly name: "SourceManualResolutionForbidden"; readonly code: 49157; readonly message: "Manual source-market resolution forbidden"; }, { readonly name: "SourceWindowNotAdmitted"; readonly code: 49158; readonly message: "Source window does not admit the operation"; }, { readonly name: "SourceReviewNotElapsed"; readonly code: 49159; readonly message: "Source review window has not elapsed"; }, { readonly name: "SourceProfileDisabled"; readonly code: 49160; readonly message: "Source profile disabled"; }, { readonly name: "SourceUnsupportedProfile"; readonly code: 49161; readonly message: "Unsupported source profile"; }, { readonly name: "SourceStateRevisionChanged"; readonly code: 49162; readonly message: "Source state revision changed"; }, { readonly name: "SourcePolicyNotEffective"; readonly code: 49163; readonly message: "Source policy not yet effective"; }, { readonly name: "SourceWitnessCountMismatch"; readonly code: 49164; readonly message: "Source witness count mismatch"; }, { readonly name: "SourceMarketKindUnsupported"; readonly code: 49165; readonly message: "Source market kind unsupported"; }, { readonly name: "SourceCaptureWindowInvalid"; readonly code: 49166; readonly message: "Source capture window invalid"; }, { readonly name: "SourceCaptureStale"; readonly code: 49167; readonly message: "Source capture stale"; }, { readonly name: "SourceCaptureFromFuture"; readonly code: 49168; readonly message: "Source capture from the future"; }, { readonly name: "WitnessSlotNotAdmitted"; readonly code: 49169; readonly message: "Witness slot not admitted"; }, { readonly name: "WitnessSlotRevoked"; readonly code: 49170; readonly message: "Witness slot revoked"; }, { readonly name: "WitnessEpochMismatch"; readonly code: 49171; readonly message: "Witness epoch mismatch"; }, { readonly name: "WitnessSignatureInvalid"; readonly code: 49172; readonly message: "Witness signature invalid"; }, { readonly name: "SourceFactOutOfRange"; readonly code: 49173; readonly message: "Source fact out of range"; }, { readonly name: "SourceOperationRedundant"; readonly code: 49174; readonly message: "Source operation redundant"; }, { readonly name: "SourceDefinitionPackageMismatch"; readonly code: 49175; readonly message: "Source definition package mismatch"; }, { readonly name: "StrategyMarketNotAllowed"; readonly code: 53249; readonly message: "Market is not in the strategy's allowed markets"; }, { readonly name: "StrategyCurrencyNotAllowed"; readonly code: 53250; readonly message: "Settlement mint is not in the strategy's allowed mints"; }, { readonly name: "StrategyOrderCapitalExceeded"; readonly code: 53251; readonly message: "Order capital exceeds the strategy's per-order limit"; }, { readonly name: "StrategyCapitalBudgetExceeded"; readonly code: 53252; readonly message: "Order capital exceeds the strategy's turnover budget"; }, { readonly name: "StrategyInventoryExceeded"; readonly code: 53253; readonly message: "Order exceeds the strategy's inventory ceiling"; }, { readonly name: "StrategyFeeExceeded"; readonly code: 53254; readonly message: "Fill fee exceeds the strategy's fee limit"; }, { readonly name: "StrategySlippageExceeded"; readonly code: 53255; readonly message: "Order limit exceeds the strategy's slippage limit"; }, { readonly name: "StrategyExpired"; readonly code: 53256; readonly message: "Strategy has expired"; }, { readonly name: "StrategyActionNotAllowed"; readonly code: 53257; readonly message: "Strategy does not allow this action"; }, { readonly name: "StrategyStopped"; readonly code: 53258; readonly message: "Strategy is stopped"; }, { readonly name: "StrategyDelegateMismatch"; readonly code: 53259; readonly message: "Signer is not the strategy's delegate or owner"; }, { readonly name: "StrategyNotYetActive"; readonly code: 53260; readonly message: "Strategy is not yet active for its delegate"; }, { readonly name: "StrategyDestinationNotAllowed"; readonly code: 53261; readonly message: "Withdrawal destination is not allowed for the delegate"; }, { readonly name: "StrategyLeaseTooShort"; readonly code: 53262; readonly message: "Covered order lease leaves less than the minimum TTL"; }, { readonly name: "StrategyAccountMismatch"; readonly code: 53263; readonly message: "Strategy account does not match"; }, { readonly name: "InvalidStrategyConfig"; readonly code: 53264; readonly message: "Strategy configuration is invalid"; }, { readonly name: "ConfidentialAccountMismatch"; readonly code: 57345; readonly message: "Account is not a confidential market"; }, { readonly name: "ConfidentialInstanceNonceInvalid"; readonly code: 57346; readonly message: "Confidential market nonce is all zero"; }, { readonly name: "ConfidentialProfileInactive"; readonly code: 57347; readonly message: "Confidential profile is unknown or inactive"; }, { readonly name: "ConfidentialPolicyInvalid"; readonly code: 57348; readonly message: "Confidential policy is invalid"; }, { readonly name: "ConfidentialCreationProofUnavailable"; readonly code: 57349; readonly message: "Confidential creation proof is unavailable"; }, { readonly name: "ConfidentialAdapterNotAdmitted"; readonly code: 57350; readonly message: "Confidential terminal adapter is not admitted"; }, { readonly name: "ConfidentialTerminalAlreadyRecorded"; readonly code: 57351; readonly message: "Confidential terminal is already recorded"; }, { readonly name: "ConfidentialTerminalWindowOpen"; readonly code: 57352; readonly message: "Confidential terminal window is still open"; }, { readonly name: "ConfidentialTerminalEvidenceRejected"; readonly code: 57353; readonly message: "Confidential terminal evidence was rejected"; }];
IDL_EVENT_TAGS#
Binary event tags, reserved holes included, in tag order.
Declaration source: packages/core/src/generated/abiFacts.ts:1739.
export declare const IDL_EVENT_TAGS: readonly [{ readonly name: "OrderFilled"; readonly tag: 1; readonly reserved: false; }, { readonly name: "OrderFilledMaker"; readonly tag: 2; readonly reserved: false; }, { readonly name: "OrderPlaced"; readonly tag: 3; readonly reserved: false; }, { readonly name: "OrderEvicted"; readonly tag: 4; readonly reserved: false; }, { readonly name: "SharesMinted"; readonly tag: 5; readonly reserved: false; }, { readonly name: "SharesRedeemed"; readonly tag: 6; readonly reserved: false; }, { readonly name: "MarketResolved"; readonly tag: 7; readonly reserved: false; }, { readonly name: "MarketExpired"; readonly tag: 8; readonly reserved: false; }, { readonly name: "ForceClosed"; readonly tag: 9; readonly reserved: false; }, { readonly name: "CreatorFeesDeferred"; readonly tag: 10; readonly reserved: false; }, { readonly name: "CreatorFeesClaimed"; readonly tag: 11; readonly reserved: false; }, { readonly name: "OrderCancelled"; readonly tag: 12; readonly reserved: false; }, { readonly name: "OrderForceCancelled"; readonly tag: 13; readonly reserved: false; }, { readonly name: "OrderReclaimed"; readonly tag: 14; readonly reserved: false; }, { readonly name: "SnapshotCaptured"; readonly tag: 15; readonly reserved: false; }, { readonly name: "SharesWithdrawn"; readonly tag: 16; readonly reserved: false; }, { readonly name: "MarketCreated"; readonly tag: 17; readonly reserved: false; }, { readonly name: "MarketClosed"; readonly tag: 18; readonly reserved: false; }, { readonly name: "ConfigInitialized"; readonly tag: 19; readonly reserved: false; }, { readonly name: "ProtocolPaused"; readonly tag: 20; readonly reserved: false; }, { readonly name: "ProtocolUnpaused"; readonly tag: 21; readonly reserved: false; }, { readonly name: "TickSizeUpdated"; readonly tag: 22; readonly reserved: false; }, { readonly name: "MinRestingNotionalUpdated"; readonly tag: 23; readonly reserved: false; }, { readonly name: "FeeConfigUpdated"; readonly tag: 24; readonly reserved: false; }, { readonly name: "ReferrerSet"; readonly tag: 25; readonly reserved: false; }, { readonly name: "ReferralAccrued"; readonly tag: 26; readonly reserved: false; }, { readonly name: "ReferralForfeited"; readonly tag: 27; readonly reserved: false; }, { readonly name: "AuthoritySuccessorNamed"; readonly tag: 28; readonly reserved: false; }, { readonly name: "AuthorityClaimed"; readonly tag: 29; readonly reserved: false; }, { readonly name: "PostOnlyModeEnabled"; readonly tag: 30; readonly reserved: false; }, { readonly name: "PostOnlyModeDisabled"; readonly tag: 31; readonly reserved: false; }, { readonly name: "MarketEmergencyStatusChanged"; readonly tag: 32; readonly reserved: false; }, { readonly name: "PositionClosed"; readonly tag: 33; readonly reserved: false; }, { readonly name: "TreasuryRecipientsUpdated"; readonly tag: 34; readonly reserved: false; }, { readonly name: "FundsDeposited"; readonly tag: 35; readonly reserved: false; }, { readonly name: "FundsWithdrawn"; readonly tag: 36; readonly reserved: false; }, { readonly name: "MakerFillApplied"; readonly tag: 37; readonly reserved: false; }, { readonly name: "OrderReduced"; readonly tag: 38; readonly reserved: false; }, { readonly name: "MarkPositionSettled"; readonly tag: 39; readonly reserved: false; }, { readonly name: "TraderLedgerResized"; readonly tag: 40; readonly reserved: false; }, { readonly name: "ForceCloseOrderRemoved"; readonly tag: 41; readonly reserved: false; }, { readonly name: "ForceCloseProgress"; readonly tag: 42; readonly reserved: false; }, { readonly name: "UpdateOperationalParams"; readonly tag: 43; readonly reserved: false; }, { readonly name: "PauserUpdated"; readonly tag: 44; readonly reserved: false; }, { readonly name: "ReferralFeeDeferred"; readonly tag: 45; readonly reserved: false; }, { readonly name: "ReferralRollupCompleted"; readonly tag: 46; readonly reserved: false; }, { readonly name: "ReferralPendingForfeited"; readonly tag: 47; readonly reserved: false; }, { readonly name: "CloserRewardsToppedUp"; readonly tag: 48; readonly reserved: false; }, { readonly name: "SelfTradePrevented"; readonly tag: 49; readonly reserved: false; }, { readonly name: "MakerRebateCredited"; readonly tag: 50; readonly reserved: false; }, { readonly name: "SplineFill"; readonly tag: 51; readonly reserved: false; }, { readonly name: "SeatAttached"; readonly tag: 52; readonly reserved: false; }, { readonly name: "SeatSettled"; readonly tag: 53; readonly reserved: false; }, { readonly name: "SeatShapeUpdated"; readonly tag: 54; readonly reserved: false; }, { readonly name: "SplineSeriesInitialized"; readonly tag: 55; readonly reserved: false; }, { readonly name: "SeriesVaultDeposited"; readonly tag: 56; readonly reserved: false; }, { readonly name: "SeriesVaultWithdrawn"; readonly tag: 57; readonly reserved: false; }, { readonly name: "SeatClosed"; readonly tag: 58; readonly reserved: false; }, { readonly name: "ExternalMarketOpened"; readonly tag: 59; readonly reserved: false; }, { readonly name: "ExternalMarketPreallocationBegun"; readonly tag: 60; readonly reserved: false; }, { readonly name: "ExternalMarketPreallocationConsumed"; readonly tag: 61; readonly reserved: false; }, { readonly name: "ExternalMarketPreallocationReclaimed"; readonly tag: 62; readonly reserved: false; }, { readonly name: "SeatRecovered"; readonly tag: 63; readonly reserved: false; }, { readonly name: "OrderRemainderDiscarded"; readonly tag: 64; readonly reserved: false; }, { readonly name: "EconomicDeltaApplied"; readonly tag: 65; readonly reserved: false; }, { readonly name: "CompleteSetMerged"; readonly tag: 66; readonly reserved: false; }, { readonly name: "NativeResolutionRecorded"; readonly tag: 67; readonly reserved: false; }, { readonly name: "IdleSeatEvacuated"; readonly tag: 68; readonly reserved: false; }, { readonly name: "SourceMarketPrepared"; readonly tag: 69; readonly reserved: false; }, { readonly name: "SourceMarketOpened"; readonly tag: 70; readonly reserved: false; }, { readonly name: "SourceObservationAccepted"; readonly tag: 71; readonly reserved: false; }, { readonly name: "SourceConflictDetected"; readonly tag: 72; readonly reserved: false; }, { readonly name: "SourceMarketFinalized"; readonly tag: 73; readonly reserved: false; }, { readonly name: "SourceMarketExpired"; readonly tag: 74; readonly reserved: false; }, { readonly name: "SourceAccountsClosed"; readonly tag: 75; readonly reserved: false; }, { readonly name: "SourceProfilePolicyChanged"; readonly tag: 76; readonly reserved: false; }, { readonly name: "WitnessSlotSet"; readonly tag: 77; readonly reserved: false; }, { readonly name: "WitnessSlotRevoked"; readonly tag: 78; readonly reserved: false; }, { readonly name: "WitnessMeasurementSet"; readonly tag: 79; readonly reserved: false; }, { readonly name: "AttestedWitnessRegistered"; readonly tag: 80; readonly reserved: false; }, { readonly name: "SupplyCapUpdated"; readonly tag: 81; readonly reserved: false; }, { readonly name: "SourceResultAccepted"; readonly tag: 82; readonly reserved: false; }, { readonly name: "WitnessRegistryInitialized"; readonly tag: 83; readonly reserved: false; }, { readonly name: "BuilderApproved"; readonly tag: 84; readonly reserved: false; }, { readonly name: "BuilderApprovalRevoked"; readonly tag: 85; readonly reserved: false; }, { readonly name: "CurrencyFreezeExceptionChanged"; readonly tag: 86; readonly reserved: false; }, { readonly name: "CurrencyRegistered"; readonly tag: 87; readonly reserved: false; }, { readonly name: "CurrencyReferralTreasuryInitialized"; readonly tag: 88; readonly reserved: false; }, { readonly name: "CurrencyReferrerEarningsInitialized"; readonly tag: 89; readonly reserved: false; }, { readonly name: "CurrencyReferrerEarningsClaimed"; readonly tag: 90; readonly reserved: false; }, { readonly name: "CurrencyProtocolTreasuryInitialized"; readonly tag: 91; readonly reserved: false; }, { readonly name: "CurrencyProtocolTreasuryWithdrawn"; readonly tag: 92; readonly reserved: false; }, { readonly name: "CancelSessionProgressed"; readonly tag: 93; readonly reserved: false; }, { readonly name: "StrategyConfigured"; readonly tag: 94; readonly reserved: false; }, { readonly name: "StrategyStopped"; readonly tag: 95; readonly reserved: false; }, { readonly name: "StrategyResumed"; readonly tag: 96; readonly reserved: false; }, { readonly name: "StrategyClosed"; readonly tag: 97; readonly reserved: false; }, { readonly name: "StrategyCapitalReset"; readonly tag: 98; readonly reserved: false; }, { readonly name: "OrderReclaimedWithReason"; readonly tag: 99; readonly reserved: false; }, { readonly name: "SeriesTemplateUpdated"; readonly tag: 100; readonly reserved: false; }, { readonly name: "SeriesSubscriptionUpdated"; readonly tag: 101; readonly reserved: false; }, { readonly name: "SeriesLamportsToppedUp"; readonly tag: 102; readonly reserved: false; }, { readonly name: "SplineSeriesClosed"; readonly tag: 103; readonly reserved: false; }, { readonly name: "SeatCommitmentToppedUp"; readonly tag: 104; readonly reserved: false; }, { readonly name: "SeatFlaggedBelowFloor"; readonly tag: 105; readonly reserved: false; }, { readonly name: "SeatMadeDormant"; readonly tag: 106; readonly reserved: false; }, { readonly name: "MakerQuoteAuthoritySet"; readonly tag: 107; readonly reserved: false; }, { readonly name: "MakerQuoteStateInitialized"; readonly tag: 108; readonly reserved: false; }, { readonly name: "MakerQuoteStateClosed"; readonly tag: 109; readonly reserved: false; }, { readonly name: "MakerQuoteInventoryFunded"; readonly tag: 110; readonly reserved: false; }, { readonly name: "MakerQuoteInventoryWithdrawn"; readonly tag: 111; readonly reserved: false; }, { readonly name: "SourceMarketOpeningSnapshot"; readonly tag: 112; readonly reserved: false; }, { readonly name: "ConfidentialMarketCreated"; readonly tag: 113; readonly reserved: false; }, { readonly name: "ConfidentialTerminalRecorded"; readonly tag: 114; readonly reserved: false; }];
IDL_PAYLOAD_LENGTHS#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:219.
export declare const IDL_PAYLOAD_LENGTHS: { readonly InitializeConfig: { readonly kind: "exact"; readonly bytes: 2; }; readonly UpdateAuthority: { readonly kind: "exact"; readonly bytes: 32; }; readonly ClaimAuthority: { readonly kind: "exact"; readonly bytes: 0; }; readonly CreateMarket: { readonly kind: "exact"; readonly bytes: 30; }; readonly SnapshotEnd: { readonly kind: "exact"; readonly bytes: 0; }; readonly ResolveMarket: { readonly kind: "exact"; readonly bytes: 0; }; readonly ExpireMarket: { readonly kind: "exact"; readonly bytes: 0; }; readonly MintShares: { readonly kind: "exact"; readonly bytes: 8; }; readonly DepositFunds: { readonly kind: "exact"; readonly bytes: 8; }; readonly WithdrawFunds: { readonly kind: "exact"; readonly bytes: 9; }; readonly WithdrawShares: { readonly kind: "exact"; readonly bytes: 9; }; readonly MergeCompleteSet: { readonly kind: "exact"; readonly bytes: 25; }; readonly PlaceOrder: { readonly kind: "exact"; readonly bytes: 84; }; readonly PlaceMultiplePostOnly: { readonly kind: "min"; readonly bytes: 60; }; readonly SwapWithFreeFunds: { readonly kind: "exact"; readonly bytes: 86; }; readonly PlaceLimitWithFreeFunds: { readonly kind: "exact"; readonly bytes: 86; }; readonly BatchPostOnlyWithFreeFunds: { readonly kind: "min"; readonly bytes: 62; }; readonly CancelOrder: { readonly kind: "exact"; readonly bytes: 8; }; readonly CancelMultipleOrdersById: { readonly kind: "variable"; }; readonly ReduceOrder: { readonly kind: "exact"; readonly bytes: 16; }; readonly CancelMultipleOrdersByIdWithFreeFunds: { readonly kind: "variable"; }; readonly ReduceOrderWithFreeFunds: { readonly kind: "exact"; readonly bytes: 17; }; readonly ReclaimExpiredOrder: { readonly kind: "exact"; readonly bytes: 8; }; readonly Redeem: { readonly kind: "exact"; readonly bytes: 9; }; readonly ForceClose: { readonly kind: "exact"; readonly bytes: 0; }; readonly MarkPositionSettled: { readonly kind: "exact"; readonly bytes: 0; }; readonly ClosePosition: { readonly kind: "exact"; readonly bytes: 0; }; readonly CloseMarket: { readonly kind: "exact"; readonly bytes: 0; }; readonly UpdateFeeConfig: { readonly kind: "exact"; readonly bytes: 18; }; readonly UpdateTreasuryRecipients: { readonly kind: "exact"; readonly bytes: 0; }; readonly SetReferrer: { readonly kind: "exact"; readonly bytes: 0; }; readonly ClaimCreatorFees: { readonly kind: "exact"; readonly bytes: 0; }; readonly Pause: { readonly kind: "exact"; readonly bytes: 0; }; readonly Unpause: { readonly kind: "exact"; readonly bytes: 0; }; readonly EnablePostOnlyMode: { readonly kind: "exact"; readonly bytes: 0; }; readonly DisablePostOnlyMode: { readonly kind: "exact"; readonly bytes: 0; }; readonly UpdateTickSize: { readonly kind: "exact"; readonly bytes: 2; }; readonly UpdateMinRestingNotional: { readonly kind: "exact"; readonly bytes: 8; }; readonly UpdateMarketCap: { readonly kind: "exact"; readonly bytes: 8; }; readonly SetMarketEmergencyStatus: { readonly kind: "exact"; readonly bytes: 33; }; readonly ForceCancelMarketOrders: { readonly kind: "exact"; readonly bytes: 8; }; readonly SetPauser: { readonly kind: "exact"; readonly bytes: 32; }; readonly UpdateOperationalParams: { readonly kind: "exact"; readonly bytes: 95; }; readonly EnsureTraderLedgerSpace: { readonly kind: "variable"; }; readonly EnsureDeepOrderbookSpace: { readonly kind: "variable"; }; readonly TopUpCloserRewards: { readonly kind: "exact"; readonly bytes: 0; }; readonly InitSplineSeries: { readonly kind: "exact"; readonly bytes: 409; }; readonly UpdateSeriesTemplate: { readonly kind: "exact"; readonly bytes: 334; }; readonly UpdateSeatMid: { readonly kind: "variable"; }; readonly AttachSeat: { readonly kind: "exact"; readonly bytes: 8; }; readonly SettleSeat: { readonly kind: "exact"; readonly bytes: 0; }; readonly RecoverSeat: { readonly kind: "exact"; readonly bytes: 0; }; readonly DepositSeriesVault: { readonly kind: "exact"; readonly bytes: 8; }; readonly WithdrawSeriesVault: { readonly kind: "exact"; readonly bytes: 8; }; readonly CloseSplineSeries: { readonly kind: "exact"; readonly bytes: 0; }; readonly BeginSourceMarket: { readonly kind: "variable"; }; readonly OpenSourceMarket: { readonly kind: "variable"; }; readonly ExpireExternalMarket: { readonly kind: "exact"; readonly bytes: 0; }; readonly ClosePreallocatedChild: { readonly kind: "exact"; readonly bytes: 1; }; readonly ReclaimExternalMarketPreallocation: { readonly kind: "exact"; readonly bytes: 0; }; readonly TopUpExternalProgressReserve: { readonly kind: "exact"; readonly bytes: 0; }; readonly EvacuateIdleSeat: { readonly kind: "exact"; readonly bytes: 12; }; readonly ResolveSourceMarket: { readonly kind: "variable"; }; readonly HaltSourceMarket: { readonly kind: "variable"; }; readonly UpdateSourceClose: { readonly kind: "variable"; }; readonly FinalizeSourceMarket: { readonly kind: "exact"; readonly bytes: 0; }; readonly CloseSourceAccounts: { readonly kind: "exact"; readonly bytes: 0; }; readonly InitializeSourceControl: { readonly kind: "exact"; readonly bytes: 1; }; readonly SetSourceProfilePolicy: { readonly kind: "exact"; readonly bytes: 128; }; readonly InitializeWitnessRegistry: { readonly kind: "exact"; readonly bytes: 69; }; readonly RevokeWitnessSlot: { readonly kind: "exact"; readonly bytes: 5; }; readonly SetWitnessMeasurement: { readonly kind: "exact"; readonly bytes: 35; }; readonly RegisterAttestedWitness: { readonly kind: "exact"; readonly bytes: 497; }; readonly RotateSeatQuoteAuthority: { readonly kind: "exact"; readonly bytes: 44; }; readonly ApproveBuilder: { readonly kind: "exact"; readonly bytes: 10; }; readonly RevokeBuilder: { readonly kind: "exact"; readonly bytes: 0; }; readonly SetCurrencyFreezeException: { readonly kind: "exact"; readonly bytes: 1; }; readonly RegisterCurrency: { readonly kind: "exact"; readonly bytes: 0; }; readonly InitializeCurrencyReferralTreasury: { readonly kind: "exact"; readonly bytes: 1; }; readonly InitializeCurrencyReferrerEarnings: { readonly kind: "exact"; readonly bytes: 1; }; readonly ClaimCurrencyReferrerEarnings: { readonly kind: "exact"; readonly bytes: 0; }; readonly RollupCurrencyReferralFees: { readonly kind: "exact"; readonly bytes: 1; }; readonly InitializeCurrencyProtocolTreasury: { readonly kind: "exact"; readonly bytes: 1; }; readonly WithdrawCurrencyProtocolTreasury: { readonly kind: "exact"; readonly bytes: 9; }; readonly CancelOrderByClientId: { readonly kind: "exact"; readonly bytes: 18; }; readonly CancelOwnerOrders: { readonly kind: "exact"; readonly bytes: 20; }; readonly ConfigureStrategy: { readonly kind: "exact"; readonly bytes: 523; }; readonly StopStrategy: { readonly kind: "exact"; readonly bytes: 1; }; readonly ResumeStrategy: { readonly kind: "exact"; readonly bytes: 0; }; readonly CloseStrategy: { readonly kind: "exact"; readonly bytes: 0; }; readonly ResetStrategyCapital: { readonly kind: "exact"; readonly bytes: 8; }; readonly UpdateSeatShape: { readonly kind: "exact"; readonly bytes: 326; }; readonly TopUpSeatCommitment: { readonly kind: "exact"; readonly bytes: 8; }; readonly AttachSeatFromSeries: { readonly kind: "exact"; readonly bytes: 0; }; readonly UpdateSeriesSubscription: { readonly kind: "exact"; readonly bytes: 66; }; readonly TopUpSeriesLamports: { readonly kind: "exact"; readonly bytes: 8; }; readonly FlagSeatBelowFloor: { readonly kind: "exact"; readonly bytes: 0; }; readonly MakeSeatDormant: { readonly kind: "exact"; readonly bytes: 0; }; readonly CloseSeat: { readonly kind: "exact"; readonly bytes: 0; }; readonly AssertBalances: { readonly kind: "exact"; readonly bytes: 53; }; readonly ReplaceMakerQuotes: { readonly kind: "exact"; readonly bytes: 130; }; readonly SetMakerQuoteAuthority: { readonly kind: "exact"; readonly bytes: 100; }; readonly InitializeMakerQuoteState: { readonly kind: "exact"; readonly bytes: 56; }; readonly CloseMakerQuoteState: { readonly kind: "exact"; readonly bytes: 0; }; readonly FundMakerQuoteInventory: { readonly kind: "exact"; readonly bytes: 18; }; readonly WithdrawMakerQuoteInventory: { readonly kind: "exact"; readonly bytes: 10; }; readonly ReclaimExpiredOrders: { readonly kind: "exact"; readonly bytes: 129; }; readonly CreateConfidentialMarket: { readonly kind: "exact"; readonly bytes: 295; }; readonly RecordConfidentialTerminal: { readonly kind: "variable"; }; };
IDL_PROGRAM_ID#
Production program ID (base58) from program/src/lib.rs.
Declaration source: packages/core/src/generated/abiFacts.ts:6.
export declare const IDL_PROGRAM_ID: "SEEsawgSrxRsgtKRbaThZFEKrVqX3Y64hDipTWyi8F8";
IDL_RECORDER_TAIL_ROUTES#
Routes whose processor rejects a transaction without the recorder tail; every other route accepts it optionally.
Declaration source: packages/core/src/generated/abiFacts.ts:119.
export declare const IDL_RECORDER_TAIL_ROUTES: readonly ["InitializeConfig", "UpdateAuthority", "ClaimAuthority", "CreateMarket", "SnapshotEnd", "ResolveMarket", "ExpireMarket", "MintShares", "DepositFunds", "WithdrawFunds", "WithdrawShares", "MergeCompleteSet", "PlaceOrder", "PlaceMultiplePostOnly", "SwapWithFreeFunds", "PlaceLimitWithFreeFunds", "BatchPostOnlyWithFreeFunds", "CancelOrder", "CancelMultipleOrdersById", "ReduceOrder", "CancelMultipleOrdersByIdWithFreeFunds", "ReduceOrderWithFreeFunds", "ReclaimExpiredOrder", "Redeem", "ForceClose", "MarkPositionSettled", "ClosePosition", "CloseMarket", "UpdateFeeConfig", "UpdateTreasuryRecipients", "SetReferrer", "ClaimCreatorFees", "Pause", "Unpause", "EnablePostOnlyMode", "DisablePostOnlyMode", "UpdateTickSize", "UpdateMinRestingNotional", "UpdateMarketCap", "SetMarketEmergencyStatus", "ForceCancelMarketOrders", "SetPauser", "UpdateOperationalParams", "EnsureTraderLedgerSpace", "TopUpCloserRewards", "AttachSeat", "SettleSeat", "RecoverSeat", "CloseSplineSeries", "BeginSourceMarket", "OpenSourceMarket", "ExpireExternalMarket", "ReclaimExternalMarketPreallocation", "EvacuateIdleSeat", "ResolveSourceMarket", "HaltSourceMarket", "UpdateSourceClose", "FinalizeSourceMarket", "CloseSourceAccounts", "InitializeSourceControl", "SetSourceProfilePolicy", "InitializeWitnessRegistry", "RevokeWitnessSlot", "SetWitnessMeasurement", "RegisterAttestedWitness", "ApproveBuilder", "RevokeBuilder", "SetCurrencyFreezeException", "RegisterCurrency", "InitializeCurrencyReferralTreasury", "InitializeCurrencyReferrerEarnings", "ClaimCurrencyReferrerEarnings", "RollupCurrencyReferralFees", "InitializeCurrencyProtocolTreasury", "WithdrawCurrencyProtocolTreasury", "CancelOrderByClientId", "CancelOwnerOrders", "ConfigureStrategy", "StopStrategy", "ResumeStrategy", "CloseStrategy", "ResetStrategyCapital", "UpdateSeatShape", "TopUpSeatCommitment", "AttachSeatFromSeries", "UpdateSeriesSubscription", "TopUpSeriesLamports", "FlagSeatBelowFloor", "MakeSeatDormant", "CloseSeat", "SetMakerQuoteAuthority", "InitializeMakerQuoteState", "CloseMakerQuoteState", "FundMakerQuoteInventory", "WithdrawMakerQuoteInventory", "ReclaimExpiredOrders", "CreateConfidentialMarket", "RecordConfidentialTerminal"];
IDL_SOURCE_EVENT_FIELDS#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:2311.
export declare const IDL_SOURCE_EVENT_FIELDS: { readonly SourceMarketPrepared: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "creator"; readonly type: "bytes[32]"; }, { readonly name: "profileId"; readonly type: "u16"; }, { readonly name: "sourceContractKey"; readonly type: "bytes[32]"; }, { readonly name: "definitionCommitment"; readonly type: "bytes[32]"; }, { readonly name: "packageLen"; readonly type: "u16"; }]; readonly SourceMarketOpened: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "state"; readonly type: "bytes[32]"; }, { readonly name: "closeTs"; readonly type: "i64"; }, { readonly name: "timeoutTs"; readonly type: "i64"; }, { readonly name: "openedAt"; readonly type: "i64"; }, { readonly name: "resultDigest"; readonly type: "bytes[32]"; }]; readonly SourceObservationAccepted: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "state"; readonly type: "bytes[32]"; }, { readonly name: "operation"; readonly type: "u8"; }, { readonly name: "candidate"; readonly type: "u8"; }, { readonly name: "conflict"; readonly type: "u8"; }, { readonly name: "materialFactHash"; readonly type: "bytes[32]"; }, { readonly name: "evidenceHash"; readonly type: "bytes[32]"; }, { readonly name: "firstAcceptedAt"; readonly type: "i64"; }, { readonly name: "latestObservedAt"; readonly type: "i64"; }, { readonly name: "reviewEndsAt"; readonly type: "i64"; }, { readonly name: "closeTs"; readonly type: "i64"; }, { readonly name: "timeoutTs"; readonly type: "i64"; }, { readonly name: "observationCount"; readonly type: "u64"; }]; readonly SourceConflictDetected: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "state"; readonly type: "bytes[32]"; }, { readonly name: "firstCandidate"; readonly type: "u8"; }, { readonly name: "conflictingCandidate"; readonly type: "u8"; }, { readonly name: "reviewEndsAt"; readonly type: "i64"; }, { readonly name: "observationCount"; readonly type: "u64"; }]; readonly SourceMarketFinalized: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "state"; readonly type: "bytes[32]"; }, { readonly name: "candidate"; readonly type: "u8"; }, { readonly name: "conflict"; readonly type: "u8"; }, { readonly name: "reason"; readonly type: "u8"; }, { readonly name: "payoutEncoding"; readonly type: "u8"; }, { readonly name: "payoutPartition"; readonly type: "u8"; }, { readonly name: "payoutOrigin"; readonly type: "u8"; }, { readonly name: "payoutSourceResult"; readonly type: "u8"; }, { readonly name: "yes"; readonly type: "u128"; }, { readonly name: "no"; readonly type: "u128"; }, { readonly name: "denominator"; readonly type: "u128"; }, { readonly name: "terminalFactHash"; readonly type: "bytes[32]"; }, { readonly name: "reviewEndsAt"; readonly type: "i64"; }, { readonly name: "terminalAt"; readonly type: "i64"; }, { readonly name: "observationCount"; readonly type: "u64"; }, { readonly name: "terminalSlot"; readonly type: "u64"; }]; readonly SourceMarketExpired: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "state"; readonly type: "bytes[32]"; }, { readonly name: "candidate"; readonly type: "u8"; }, { readonly name: "conflict"; readonly type: "u8"; }, { readonly name: "reason"; readonly type: "u8"; }, { readonly name: "payoutEncoding"; readonly type: "u8"; }, { readonly name: "payoutPartition"; readonly type: "u8"; }, { readonly name: "payoutOrigin"; readonly type: "u8"; }, { readonly name: "payoutSourceResult"; readonly type: "u8"; }, { readonly name: "yes"; readonly type: "u128"; }, { readonly name: "no"; readonly type: "u128"; }, { readonly name: "denominator"; readonly type: "u128"; }, { readonly name: "terminalFactHash"; readonly type: "bytes[32]"; }, { readonly name: "reviewEndsAt"; readonly type: "i64"; }, { readonly name: "closeTs"; readonly type: "i64"; }, { readonly name: "timeoutTs"; readonly type: "i64"; }, { readonly name: "terminalAt"; readonly type: "i64"; }, { readonly name: "observationCount"; readonly type: "u64"; }, { readonly name: "terminalSlot"; readonly type: "u64"; }]; readonly SourceAccountsClosed: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "state"; readonly type: "bytes[32]"; }, { readonly name: "creator"; readonly type: "bytes[32]"; }, { readonly name: "reason"; readonly type: "u8"; }, { readonly name: "payoutEncoding"; readonly type: "u8"; }, { readonly name: "payoutPartition"; readonly type: "u8"; }, { readonly name: "payoutOrigin"; readonly type: "u8"; }, { readonly name: "payoutSourceResult"; readonly type: "u8"; }, { readonly name: "yes"; readonly type: "u128"; }, { readonly name: "no"; readonly type: "u128"; }, { readonly name: "denominator"; readonly type: "u128"; }, { readonly name: "terminalFactHash"; readonly type: "bytes[32]"; }, { readonly name: "closedAt"; readonly type: "i64"; }, { readonly name: "stateLamports"; readonly type: "u64"; }, { readonly name: "residualAmount"; readonly type: "u64"; }, { readonly name: "residualRecipient"; readonly type: "bytes[32]"; }]; readonly SourceProfilePolicyChanged: readonly [{ readonly name: "control"; readonly type: "bytes[32]"; }, { readonly name: "profileId"; readonly type: "u16"; }, { readonly name: "before"; readonly type: "bytes[128]"; }, { readonly name: "after"; readonly type: "bytes[128]"; }, { readonly name: "controlEpoch"; readonly type: "u64"; }]; readonly WitnessSlotSet: readonly [{ readonly name: "slot"; readonly type: "u8"; }, { readonly name: "epoch"; readonly type: "u32"; }, { readonly name: "operator"; readonly type: "bytes[32]"; }, { readonly name: "keyDigest"; readonly type: "bytes[32]"; }, { readonly name: "schemeMask"; readonly type: "u16"; }, { readonly name: "validFrom"; readonly type: "i64"; }, { readonly name: "validUntil"; readonly type: "i64"; }]; readonly WitnessSlotRevoked: readonly [{ readonly name: "slot"; readonly type: "u8"; }, { readonly name: "epoch"; readonly type: "u32"; }, { readonly name: "keyDigest"; readonly type: "bytes[32]"; }, { readonly name: "revokedAt"; readonly type: "i64"; }]; readonly WitnessMeasurementSet: readonly [{ readonly name: "entry"; readonly type: "u8"; }, { readonly name: "attestationKind"; readonly type: "u8"; }, { readonly name: "measurementDigest"; readonly type: "bytes[32]"; }, { readonly name: "status"; readonly type: "u8"; }, { readonly name: "effectiveFrom"; readonly type: "i64"; }]; readonly AttestedWitnessRegistered: readonly [{ readonly name: "slot"; readonly type: "u8"; }, { readonly name: "epoch"; readonly type: "u32"; }, { readonly name: "operator"; readonly type: "bytes[32]"; }, { readonly name: "keyDigest"; readonly type: "bytes[32]"; }, { readonly name: "measurementDigest"; readonly type: "bytes[32]"; }, { readonly name: "attestedAtMs"; readonly type: "u64"; }, { readonly name: "registeredAt"; readonly type: "i64"; }]; readonly SourceResultAccepted: readonly [{ readonly name: "market"; readonly type: "bytes[32]"; }, { readonly name: "profileId"; readonly type: "u16"; }, { readonly name: "reporter"; readonly type: "bytes[32]"; }, { readonly name: "sourceEffectiveTime"; readonly type: "i64"; }, { readonly name: "checkpointDigest"; readonly type: "bytes[32]"; }, { readonly name: "factDigest"; readonly type: "bytes[32]"; }, { readonly name: "operation"; readonly type: "u8"; }, { readonly name: "stateRevision"; readonly type: "u64"; }, { readonly name: "resultDigest"; readonly type: "bytes[32]"; }, { readonly name: "witnessCount"; readonly type: "u8"; }]; readonly WitnessRegistryInitialized: readonly [{ readonly name: "registry"; readonly type: "bytes[32]"; }, { readonly name: "deploymentId"; readonly type: "bytes[32]"; }, { readonly name: "clusterCommitment"; readonly type: "bytes[32]"; }, { readonly name: "activationDelayS"; readonly type: "u32"; }, { readonly name: "flags"; readonly type: "u8"; }]; readonly SourceMarketOpeningSnapshot: readonly [{ readonly name: "marketId"; readonly type: "u64"; }, { readonly name: "settlementMint"; readonly type: "publicKey"; }, { readonly name: "externalRefHash"; readonly type: "bytes[32]"; }, { readonly name: "yesMint"; readonly type: "publicKey"; }, { readonly name: "noMint"; readonly type: "publicKey"; }, { readonly name: "creatorFeeBps"; readonly type: "u16"; }, { readonly name: "protocolFeeBps"; readonly type: "u16"; }, { readonly name: "maxTotalShares"; readonly type: "u64"; }]; };
IDL_STORED_ORDER_SIDES#
Stored custody side bytes (Order.original_side); zero is the empty-slot sentinel.
Declaration source: packages/core/src/generated/abiFacts.ts:647.
export declare const IDL_STORED_ORDER_SIDES: { readonly BuyYes: 1; readonly SellYes: 2; readonly BuyNo: 3; readonly SellNo: 4; };
IDL_VALIDATOR_INVENTORY#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:2883.
export declare const IDL_VALIDATOR_INVENTORY: { readonly InitializeConfig: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateAuthority: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ClaimAuthority: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CreateMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 20; readonly validAccountCounts: readonly [20, 21]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withFreezeException"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "assetState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "priceUpdate"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "nativePolicy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withoutFreezeException"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "assetState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "priceUpdate"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "nativePolicy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly SnapshotEnd: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ResolveMarket: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ExpireMarket: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly MintShares: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly DepositFunds: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly WithdrawFunds: { readonly layoutKnown: true; readonly fixedAccountCount: 11; readonly validAccountCounts: readonly [11, 12, 13, 14]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly WithdrawShares: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly MergeCompleteSet: { readonly layoutKnown: true; readonly fixedAccountCount: 16; readonly validAccountCounts: readonly [16, 17, 18]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "quoteDestinationAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "quoteDestinationAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "quoteDestinationAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly PlaceOrder: { readonly layoutKnown: true; readonly fixedAccountCount: 21; readonly validAccountCounts: readonly [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]; readonly dynamicAccountCountFromArg: null; readonly placementTail: { readonly prefixes: { readonly base: 0; }; readonly seats: { readonly max: 8; readonly countFromArg: "splineSeatCount"; readonly firstAccount: { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }; readonly additionalAccount: { readonly name: "splineSeat{index}"; readonly isMut: true; readonly isSigner: false; }; }; readonly marketTick: { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }; readonly referral: { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }; readonly builder: { readonly accounts: readonly [{ readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }]; readonly orderTypePath: readonly ["placement", "orderType"]; }; }; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSpline"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferralAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineReferralAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withTwoSplineSeatsAndMarketTick"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "splineSeat2"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly PlaceMultiplePostOnly: { readonly layoutKnown: true; readonly fixedAccountCount: 21; readonly validAccountCounts: readonly [21, 22, 23, 24]; readonly dynamicAccountCountFromArg: null; readonly placementTail: { readonly prefixes: { readonly base: 0; }; readonly seats: { readonly max: 1; readonly fromAttachedMarket: true; readonly firstAccount: { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }; readonly additionalAccount: { readonly name: "splineSeat{index}"; readonly isMut: true; readonly isSigner: false; }; }; readonly marketTick: { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }; readonly referral: { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }; }; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSpline"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly SwapWithFreeFunds: { readonly layoutKnown: true; readonly fixedAccountCount: 21; readonly validAccountCounts: readonly [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]; readonly dynamicAccountCountFromArg: null; readonly placementTail: { readonly prefixes: { readonly base: 0; readonly nativeOwnerStrategy: 1; readonly nativeDelegateStrategy: 2; readonly externalOwnerStrategy: 1; readonly externalDelegateStrategy: 2; }; readonly seats: { readonly max: 8; readonly countFromArg: "splineSeatCount"; readonly firstAccount: { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }; readonly additionalAccount: { readonly name: "splineSeat{index}"; readonly isMut: true; readonly isSigner: false; }; }; readonly marketTick: { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }; readonly referral: { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }; readonly builder: { readonly accounts: readonly [{ readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }]; }; }; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSpline"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferralAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineReferralAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withTwoSplineSeatsAndMarketTick"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "splineSeat2"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly PlaceLimitWithFreeFunds: { readonly layoutKnown: true; readonly fixedAccountCount: 21; readonly validAccountCounts: readonly [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]; readonly dynamicAccountCountFromArg: null; readonly placementTail: { readonly prefixes: { readonly base: 0; readonly nativeOwnerStrategy: 1; readonly nativeDelegateStrategy: 2; readonly externalOwnerStrategy: 1; readonly externalDelegateStrategy: 2; }; readonly seats: { readonly max: 8; readonly countFromArg: "splineSeatCount"; readonly firstAccount: { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }; readonly additionalAccount: { readonly name: "splineSeat{index}"; readonly isMut: true; readonly isSigner: false; }; }; readonly marketTick: { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }; readonly referral: { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }; readonly builder: { readonly accounts: readonly [{ readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }]; readonly orderTypePath: readonly ["order", "orderType"]; }; }; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSpline"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferralAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withSplineReferralAndBuilder"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderApproval"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "builderTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withTwoSplineSeatsAndMarketTick"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "splineSeat2"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly BatchPostOnlyWithFreeFunds: { readonly layoutKnown: true; readonly fixedAccountCount: 21; readonly validAccountCounts: readonly [21, 22, 23, 24, 25]; readonly dynamicAccountCountFromArg: null; readonly placementTail: { readonly prefixes: { readonly base: 0; readonly nativeOwnerStrategy: 1; readonly nativeDelegateStrategy: 2; readonly externalOwnerStrategy: 1; readonly externalDelegateStrategy: 2; }; readonly seats: { readonly max: 0; readonly firstAccount: { readonly name: "creatorSpline"; readonly isMut: true; readonly isSigner: false; }; readonly additionalAccount: { readonly name: "splineSeat{index}"; readonly isMut: true; readonly isSigner: false; }; }; readonly marketTick: { readonly name: "marketTick"; readonly isMut: false; readonly isSigner: false; }; readonly referral: { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }; }; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withReferral"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "takerReferralAccount"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasuryTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly CancelOrder: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CancelMultipleOrdersById: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ReduceOrder: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CancelMultipleOrdersByIdWithFreeFunds: { readonly layoutKnown: true; readonly fixedAccountCount: 8; readonly validAccountCounts: readonly [8, 9, 10]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "leanOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "leanDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ReduceOrderWithFreeFunds: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9, 10, 11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "leanOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "leanDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ReclaimExpiredOrder: { readonly layoutKnown: true; readonly fixedAccountCount: 19; readonly validAccountCounts: readonly [19, 20, 21]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "maker"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withBounty"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "maker"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "callerStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "maker"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMetaAndBounty"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "maker"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "callerStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly Redeem: { readonly layoutKnown: true; readonly fixedAccountCount: 13; readonly validAccountCounts: readonly [13, 14, 16, 17]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withPositionMirror"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMetaAndPositionMirror"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userStablecoinAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ForceClose: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly MarkPositionSettled: { readonly layoutKnown: true; readonly fixedAccountCount: 10; readonly validAccountCounts: readonly [10, 11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ownerSettlementAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ownerSettlementAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ClosePosition: { readonly layoutKnown: true; readonly fixedAccountCount: 8; readonly validAccountCounts: readonly [8, 9]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "owner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "owner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly CloseMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 17; readonly validAccountCounts: readonly [17, 18, 19, 20]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "nativePolicy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "residualRecipient"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "nativePolicy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativePolicyWithShareMints"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "residualRecipient"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "nativePolicy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalPolicy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "residualRecipient"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "externalPolicy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalPolicyWithShareMints"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "residualRecipient"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "externalPolicy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly UpdateFeeConfig: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateTreasuryRecipients: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly SetReferrer: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ClaimCreatorFees: { readonly layoutKnown: true; readonly fixedAccountCount: 8; readonly validAccountCounts: readonly [8, 9]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creatorTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly Pause: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly Unpause: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly EnablePostOnlyMode: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly DisablePostOnlyMode: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateTickSize: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateMinRestingNotional: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateMarketCap: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly SetMarketEmergencyStatus: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ForceCancelMarketOrders: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly SetPauser: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateOperationalParams: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly EnsureTraderLedgerSpace: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7, 8]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "nativeBinding"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "trader_ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currency_record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalReceipt"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "trader_ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "preallocationReceipt"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "currencyRecordWithReceipt"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "trader_ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currency_record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "preallocationReceipt"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly EnsureDeepOrderbookSpace: { readonly layoutKnown: true; readonly fixedAccountCount: 5; readonly validAccountCounts: readonly [5, 6, 7, 8]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "nativeBinding"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currency_record"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalReceipt"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "preallocationReceipt"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "currencyRecordWithReceipt"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currency_record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "preallocationReceipt"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly TopUpCloserRewards: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7, 8]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly InitSplineSeries: { readonly layoutKnown: true; readonly fixedAccountCount: 8; readonly validAccountCounts: readonly [8, 9, 10, 11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutFreezeException"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withoutFreezeExceptionWithRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withFreezeException"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withFreezeExceptionWithRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly UpdateSeriesTemplate: { readonly layoutKnown: true; readonly fixedAccountCount: 2; readonly validAccountCounts: readonly [2, 4]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }]; }, { readonly name: "withRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly UpdateSeatMid: { readonly layoutKnown: true; readonly fixedAccountCount: 2; readonly validAccountCounts: readonly [2, 4, 5]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "detached"; readonly accountMetas: readonly [{ readonly name: "quoteAuthority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }]; }, { readonly name: "nativeAttached"; readonly accountMetas: readonly [{ readonly name: "quoteAuthority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketVault"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalAttached"; readonly accountMetas: readonly [{ readonly name: "quoteAuthority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketVault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly AttachSeat: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly SettleSeat: { readonly layoutKnown: true; readonly fixedAccountCount: 10; readonly validAccountCounts: readonly [10, 11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly RecoverSeat: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly DepositSeriesVault: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7, 9]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly WithdrawSeriesVault: { readonly layoutKnown: true; readonly fixedAccountCount: 6; readonly validAccountCounts: readonly [6, 8]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withRecorder"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "series"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seriesVault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "makerTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly CloseSplineSeries: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly BeginSourceMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 12; readonly validAccountCounts: readonly [12]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "creator"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "preallocation_receipt"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "trader_ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seesaw_config"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly OpenSourceMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 25; readonly validAccountCounts: readonly [25]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yes_mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "no_mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "seesaw_config"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlement_mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currency_record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freeze_exception"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "token_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "share_token_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yes_escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "no_escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "trader_ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "preallocation_receipt"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "receipt_refund"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "resolver"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ExpireExternalMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reporter"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ClosePreallocatedChild: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ReclaimExternalMarketPreallocation: { readonly layoutKnown: true; readonly fixedAccountCount: 11; readonly validAccountCounts: readonly [11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "receipt"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly TopUpExternalProgressReserve: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly EvacuateIdleSeat: { readonly layoutKnown: true; readonly fixedAccountCount: 19; readonly validAccountCounts: readonly [19, 20]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "owner"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "keeper"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "quoteDestination"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesDestination"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noDestination"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "owner"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "keeper"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "quoteDestination"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesDestination"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noDestination"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ResolveSourceMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 11; readonly validAccountCounts: readonly [11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reporter"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly HaltSourceMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 11; readonly validAccountCounts: readonly [11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reporter"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly UpdateSourceClose: { readonly layoutKnown: true; readonly fixedAccountCount: 11; readonly validAccountCounts: readonly [11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reporter"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly FinalizeSourceMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reporter"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly CloseSourceAccounts: { readonly layoutKnown: true; readonly fixedAccountCount: 20; readonly validAccountCounts: readonly [20]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "creator"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "token_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "share_token_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yes_escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "no_escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "trader_ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "residual_recipient"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "settlement_mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "meta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "source_state"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yes_mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "no_mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly InitializeSourceControl: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "authority"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly SetSourceProfilePolicy: { readonly layoutKnown: true; readonly fixedAccountCount: 6; readonly validAccountCounts: readonly [6]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "source_control"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly InitializeWitnessRegistry: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly RevokeWitnessSlot: { readonly layoutKnown: true; readonly fixedAccountCount: 5; readonly validAccountCounts: readonly [5, 6]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "openRegistry"; readonly accountMetas: readonly [{ readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "refund"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly SetWitnessMeasurement: { readonly layoutKnown: true; readonly fixedAccountCount: 5; readonly validAccountCounts: readonly [5]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly RegisterAttestedWitness: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "operator"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "openRegistry"; readonly accountMetas: readonly [{ readonly name: "operator"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seesaw_config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "witness_registry"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "system_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "self_program"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "log_authority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly RotateSeatQuoteAuthority: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ApproveBuilder: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly RevokeBuilder: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly SetCurrencyFreezeException: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly RegisterCurrency: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7, 8]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutFreezeException"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withFreezeException"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly InitializeCurrencyReferralTreasury: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9, 10]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutFreezeException"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withFreezeException"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly InitializeCurrencyReferrerEarnings: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9, 10]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutFreezeException"; readonly accountMetas: readonly [{ readonly name: "referrer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "earnings"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withFreezeException"; readonly accountMetas: readonly [{ readonly name: "referrer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "earnings"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ClaimCurrencyReferrerEarnings: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly RollupCurrencyReferralFees: { readonly layoutKnown: true; readonly fixedAccountCount: 11; readonly validAccountCounts: readonly [11, 12, 13, 14, 15, 16, 17, 18, 19]; readonly dynamicAccountCountFromArg: "positionCount"; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "earnings"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withMarketMeta"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "earnings"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly InitializeCurrencyProtocolTreasury: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9, 10]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "withoutFreezeException"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withFreezeException"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "record"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "treasury"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly WithdrawCurrencyProtocolTreasury: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CancelOrderByClientId: { readonly layoutKnown: true; readonly fixedAccountCount: 13; readonly validAccountCounts: readonly [13, 14, 15, 16, 18]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "wallet"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userTokenAccount"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userYesAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userNoAta"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "ledger"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly CancelOwnerOrders: { readonly layoutKnown: true; readonly fixedAccountCount: 13; readonly validAccountCounts: readonly [13, 14, 15, 16]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "ledger"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalOwnerStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalDelegateStrategy"; readonly accountMetas: readonly [{ readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "orderbook"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "userPosition"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "user"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "shareTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "delegate"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ConfigureStrategy: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly StopStrategy: { readonly layoutKnown: true; readonly fixedAccountCount: 4; readonly validAccountCounts: readonly [4, 6, 8, 10, 12]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "markets0"; readonly accountMetas: readonly [{ readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "markets1"; readonly accountMetas: readonly [{ readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market0"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger0"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "markets2"; readonly accountMetas: readonly [{ readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market0"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger0"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market1"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger1"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "markets3"; readonly accountMetas: readonly [{ readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market0"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger0"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market1"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger1"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market2"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger2"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "markets4"; readonly accountMetas: readonly [{ readonly name: "strategy"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "authority"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market0"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger0"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market1"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger1"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market2"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger2"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market3"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "ledger3"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ResumeStrategy: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CloseStrategy: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly ResetStrategyCapital: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateSeatShape: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7, 8]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "native"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketVault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "external"; readonly accountMetas: readonly [{ readonly name: "maker"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "seat"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "marketVault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly TopUpSeatCommitment: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly AttachSeatFromSeries: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly UpdateSeriesSubscription: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly TopUpSeriesLamports: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly FlagSeatBelowFloor: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly MakeSeatDormant: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CloseSeat: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly AssertBalances: { readonly layoutKnown: true; readonly fixedAccountCount: 5; readonly validAccountCounts: readonly [5, 6]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "walletOnly"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "walletYes"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "walletNo"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "walletQuote"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "withLedger"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "walletYes"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "walletNo"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "walletQuote"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "traderLedger"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ReplaceMakerQuotes: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly SetMakerQuoteAuthority: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly InitializeMakerQuoteState: { readonly layoutKnown: false; readonly fixedAccountCount: null; readonly validAccountCounts: readonly []; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly hasCustomDataLayout: false; }; readonly CloseMakerQuoteState: { readonly layoutKnown: true; readonly fixedAccountCount: 7; readonly validAccountCounts: readonly [7, 13, 15, 16, 21, 22, 24, 25]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "base"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "baseWithYesReserve"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveYesWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "baseWithNoReserve"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "baseWithBothReserves"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveYesWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeCleanup"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeCleanupWithYesReserve"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveYesWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeCleanupWithNoReserve"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "nativeCleanupWithBothReserves"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveYesWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalCleanup"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalCleanupWithYesReserve"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveYesWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalCleanupWithNoReserve"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "externalCleanupWithBothReserves"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "rentOwner"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "marketMeta"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveSystemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "associatedTokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveYesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveYesWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "reserveNoEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "reserveNoWallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly FundMakerQuoteInventory: { readonly layoutKnown: true; readonly fixedAccountCount: 6; readonly validAccountCounts: readonly [6, 9, 10, 11, 12]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "wallet"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "wallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "ledger"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "walletWithBounty"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "wallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "ledgerWithBounty"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "bountyOnly"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly WithdrawMakerQuoteInventory: { readonly layoutKnown: true; readonly fixedAccountCount: 9; readonly validAccountCounts: readonly [9, 11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "wallet"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "wallet"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "ledger"; readonly accountMetas: readonly [{ readonly name: "owner"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "mint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "escrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "vault"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly ReclaimExpiredOrders: { readonly layoutKnown: true; readonly fixedAccountCount: 13; readonly validAccountCounts: readonly [13]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "managed"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "unmanaged"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "quoteState"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "book"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "ledger"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "position"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "yesEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noMint"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "noEscrow"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "tokenProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly CreateConfidentialMarket: { readonly layoutKnown: true; readonly fixedAccountCount: 10; readonly validAccountCounts: readonly [10, 11]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "publicNative"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "creator"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "openingPriceUpdate"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "publicNativeFreeze"; readonly accountMetas: readonly [{ readonly name: "payer"; readonly isMut: true; readonly isSigner: true; }, { readonly name: "creator"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "currencyRecord"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "settlementMint"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "freezeException"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "openingPriceUpdate"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "systemProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; readonly RecordConfidentialTerminal: { readonly layoutKnown: true; readonly fixedAccountCount: 5; readonly validAccountCounts: readonly [5, 7]; readonly dynamicAccountCountFromArg: null; readonly conditionalSigners: readonly []; readonly authenticatedAccountVariants: readonly [{ readonly name: "resolved"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "endPriceUpdate"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "predecessorUpdate"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }, { readonly name: "timeout"; readonly accountMetas: readonly [{ readonly name: "caller"; readonly isMut: false; readonly isSigner: true; }, { readonly name: "market"; readonly isMut: true; readonly isSigner: false; }, { readonly name: "config"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "selfProgram"; readonly isMut: false; readonly isSigner: false; }, { readonly name: "logAuthority"; readonly isMut: false; readonly isSigner: false; }]; }]; readonly hasCustomDataLayout: false; }; };
IDL_WIRE_INSTRUCTION_INVENTORY#
Not documented.
Declaration source: packages/core/src/generated/abiFacts.ts:7.
export declare const IDL_WIRE_INSTRUCTION_INVENTORY: { readonly InitializeConfig: 0; readonly UpdateAuthority: 1; readonly ClaimAuthority: 2; readonly CreateMarket: 3; readonly SnapshotEnd: 4; readonly ResolveMarket: 5; readonly ExpireMarket: 6; readonly MintShares: 7; readonly DepositFunds: 8; readonly WithdrawFunds: 9; readonly WithdrawShares: 10; readonly MergeCompleteSet: 11; readonly PlaceOrder: 12; readonly PlaceMultiplePostOnly: 13; readonly SwapWithFreeFunds: 14; readonly PlaceLimitWithFreeFunds: 15; readonly BatchPostOnlyWithFreeFunds: 16; readonly CancelOrder: 17; readonly CancelMultipleOrdersById: 18; readonly ReduceOrder: 19; readonly CancelMultipleOrdersByIdWithFreeFunds: 20; readonly ReduceOrderWithFreeFunds: 21; readonly ReclaimExpiredOrder: 22; readonly Redeem: 23; readonly ForceClose: 24; readonly MarkPositionSettled: 25; readonly ClosePosition: 26; readonly CloseMarket: 27; readonly UpdateFeeConfig: 28; readonly UpdateTreasuryRecipients: 29; readonly SetReferrer: 30; readonly ClaimCreatorFees: 31; readonly Pause: 32; readonly Unpause: 33; readonly EnablePostOnlyMode: 34; readonly DisablePostOnlyMode: 35; readonly UpdateTickSize: 36; readonly UpdateMinRestingNotional: 37; readonly UpdateMarketCap: 38; readonly SetMarketEmergencyStatus: 39; readonly ForceCancelMarketOrders: 40; readonly SetPauser: 41; readonly UpdateOperationalParams: 42; readonly EnsureTraderLedgerSpace: 43; readonly EnsureDeepOrderbookSpace: 44; readonly TopUpCloserRewards: 45; readonly InitSplineSeries: 46; readonly UpdateSeriesTemplate: 47; readonly UpdateSeatMid: 48; readonly AttachSeat: 49; readonly SettleSeat: 50; readonly RecoverSeat: 51; readonly DepositSeriesVault: 52; readonly WithdrawSeriesVault: 53; readonly CloseSplineSeries: 54; readonly BeginSourceMarket: 55; readonly OpenSourceMarket: 56; readonly ExpireExternalMarket: 57; readonly ClosePreallocatedChild: 58; readonly ReclaimExternalMarketPreallocation: 59; readonly TopUpExternalProgressReserve: 60; readonly EvacuateIdleSeat: 61; readonly ResolveSourceMarket: 62; readonly HaltSourceMarket: 63; readonly UpdateSourceClose: 64; readonly FinalizeSourceMarket: 65; readonly CloseSourceAccounts: 66; readonly InitializeSourceControl: 67; readonly SetSourceProfilePolicy: 68; readonly InitializeWitnessRegistry: 69; readonly RevokeWitnessSlot: 70; readonly SetWitnessMeasurement: 71; readonly RegisterAttestedWitness: 72; readonly RotateSeatQuoteAuthority: 73; readonly ApproveBuilder: 74; readonly RevokeBuilder: 75; readonly SetCurrencyFreezeException: 76; readonly RegisterCurrency: 77; readonly InitializeCurrencyReferralTreasury: 78; readonly InitializeCurrencyReferrerEarnings: 79; readonly ClaimCurrencyReferrerEarnings: 80; readonly RollupCurrencyReferralFees: 81; readonly InitializeCurrencyProtocolTreasury: 82; readonly WithdrawCurrencyProtocolTreasury: 83; readonly CancelOrderByClientId: 84; readonly CancelOwnerOrders: 85; readonly ConfigureStrategy: 86; readonly StopStrategy: 87; readonly ResumeStrategy: 88; readonly CloseStrategy: 89; readonly ResetStrategyCapital: 90; readonly UpdateSeatShape: 91; readonly TopUpSeatCommitment: 92; readonly AttachSeatFromSeries: 93; readonly UpdateSeriesSubscription: 94; readonly TopUpSeriesLamports: 95; readonly FlagSeatBelowFloor: 96; readonly MakeSeatDormant: 97; readonly CloseSeat: 98; readonly AssertBalances: 99; readonly ReplaceMakerQuotes: 100; readonly SetMakerQuoteAuthority: 101; readonly InitializeMakerQuoteState: 102; readonly CloseMakerQuoteState: 103; readonly FundMakerQuoteInventory: 104; readonly WithdrawMakerQuoteInventory: 105; readonly ReclaimExpiredOrders: 106; readonly CreateConfidentialMarket: 107; readonly RecordConfidentialTerminal: 108; };
impliedProbability#
Get implied probability from a price in basis points (same as bpsToDecimal).
Declaration source: packages/core/src/price.ts:101.
export function impliedProbability(priceBps: number): number;
Parameters
priceBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>IndexedApiMarket</summary>IndexedApiMarket#
Not documented.
Declaration source: packages/core/src/resilientData.ts:150.
export type IndexedApiMarket = Omit<ApiMarket, 'pythFeedId'> & {
readonly pythFeedId: string | null;
};
IndexedApiMarketDetail#
Not documented.
Declaration source: packages/core/src/resilientData.ts:154.
export type IndexedApiMarketDetail = Omit<ApiMarketDetail, 'pythFeedId'> & {
readonly pythFeedId: string | null;
readonly bookAsOfSlot?: string | null;
};
IndexedApiPosition#
Not documented.
Declaration source: packages/core/src/resilientData.ts:159.
export type IndexedApiPosition = Omit<ApiPosition, 'market'> & {
readonly market: Omit<ApiPosition['market'], 'pythFeedId'> & {
readonly pythFeedId: string | null;
};
};
IndexerChainEvent#
One event of the chain-events route (apps/indexer/src/api/routes/chainEvents.ts).
Declaration source: packages/core/src/replay/recordFromIndexer.ts:48.
export interface IndexerChainEvent {
readonly signature: string;
readonly slot: string;
readonly transactionIndex: number;
readonly instructionIndex: number;
readonly topLevelInstructionIndex: number | null;
readonly batchIndex: number;
readonly eventIndex: number;
readonly recorderVersion: number;
readonly instructionKind: number;
readonly eventSequence: string;
readonly unixTimestamp: string;
readonly signer: string;
readonly tag: number;
readonly name: string;
readonly data: Record<string, unknown>;
readonly raw: string;
}
IndexerChainEventsPage#
Not documented.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:67.
export interface IndexerChainEventsPage {
readonly market: string;
readonly subject: string;
readonly events: readonly IndexerChainEvent[];
readonly nextCursor: string | null;
readonly limit: number;
readonly fromSlot: string | null;
readonly quarantine: { readonly excluded: true; readonly excludedEventCount: number };
}
IndexerRecordingOptions#
Not documented.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:90.
export interface IndexerRecordingOptions extends RecordingOptions {
/** Page size for the chain-events route (route maximum 1000). */
readonly pageLimit?: number;
/** Defaults to `globalThis.fetch`. */
readonly fetch?: ReplayFetch;
}
Field documentation
pageLimit— Page size for the chain-events route (route maximum 1000).fetch— Defaults toglobalThis.fetch.programCommit— Program commit of the deployment. Required; never guessed.wireDigest—wiredigest ofspec/launch/version-policy.jsonatprogramCommit. Required.checkpoint— Start from this earlier checkpoint instead of taking a new one.throughSlot— Inclusive last history slot. Requires an existing checkpoint at or before this slot.maxTransactions— Upper bound on history transactions; exceeding it throwsRecordingLimitError.maxSupportedTransactionVersion— Highest transaction version the RPC may return. Defaults to the repo'sMAX_SUPPORTED_TRANSACTION_VERSION(1: Seesaw sends v1 transactions).readMarketTickAtInstruction— Read the exact pre-instruction Market Tick image from a historical source.splines— Additional legacy spline or current seat addresses. Useful with RPCs without seat scans.strategyAccounts— Strategy PDAs to capture at the same slot as the market and trader ledger.relatedMarkets— Other markets whose state must be captured at the same slot.
Ingress#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:79.
export type Ingress = (typeof INGRESS_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
INGRESS_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:78.
export declare const INGRESS_VALUES: readonly ["maker", "ordinary"];
INITIALIZE_MAKER_QUOTE_STATE_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:42.
export declare const INITIALIZE_MAKER_QUOTE_STATE_DISCRIMINATOR: 102;
initializeConfig#
Build InitializeConfig instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:336.
export function initializeConfig(input: InitializeConfigInput, programAddress?: Address): Promise<SdkResult<InitializeConfigResult>>;
Parameters
input: InitializeConfigInput— Not documented. See InitializeConfigInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<InitializeConfigResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
InitializeConfigAccounts#
Accounts for InitializeConfig instruction.
Phase C (multi-fee-recipients): the legacy single treasury slot
grew into MAX_TREASURY_RECIPIENTS (= 8) consecutive token-account
slots. The on-chain processor validates each is an initialized SPL
Token v1 account on the settlement mint and that all 8 are pairwise
distinct (update_treasury_recipients validation).
Declaration source: packages/core/src/instructions.ts:759.
export interface InitializeConfigAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
/** Exactly 8 SPL token-account addresses for `config.treasuryRecipients[0..7]`. */
treasuryRecipients: readonly Address[];
/** Initialized SPL Token v1 mint; the program requires 6 to 9 decimals. */
defaultSettlementMint: Address;
systemProgram: Address;
programData: Address;
}
Field documentation
treasuryRecipients— Exactly 8 SPL token-account addresses forconfig.treasuryRecipients[0..7].defaultSettlementMint— Initialized SPL Token v1 mint; the program requires 6 to 9 decimals.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
InitializeConfigInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:314.
export interface InitializeConfigInput {
authority: Address;
/**
* Phase C (multi-fee-recipients): exactly 8 SPL token-account
* addresses, one per `config.treasuryRecipients[i]`. The on-chain
* processor validates each is initialized on the settlement mint
* and that all 8 are pairwise distinct.
*/
treasuryRecipients: readonly Address[];
/** Initialized SPL Token v1 settlement mint with 6 to 9 decimals. */
settlementMint: Address;
programData: Address;
tickSizeBps: number;
}
Field documentation
treasuryRecipients— Phase C (multi-fee-recipients): exactly 8 SPL token-account addresses, one perconfig.treasuryRecipients[i]. The on-chain processor validates each is initialized on the settlement mint and that all 8 are pairwise distinct.settlementMint— Initialized SPL Token v1 settlement mint with 6 to 9 decimals.
InitializeConfigParams#
Parameters for InitializeConfig instruction.
Declaration source: packages/core/src/types.ts:587.
export interface InitializeConfigParams {
readonly tickSizeBps: number;
}
InitializeConfigResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:329.
export interface InitializeConfigResult {
config: Address;
}
InitializeCurrencyProtocolTreasuryAccounts#
Accounts for permissionless provisioning of a currency protocol treasury shard (0x56).
Declaration source: packages/core/src/instructions.ts:2634.
export interface InitializeCurrencyProtocolTreasuryAccounts extends BinaryRecorderTailAccounts {
payer: Address;
config: Address;
mint: Address;
record: Address;
/** Shard PDA from `deriveCurrencyProtocolTreasuryPda(mint, treasuryIndex, tokenProgram)`. */
treasury: Address;
freezeException?: Address;
/** The currency record's token program (classic SPL Token or Token-2022); classic when omitted. */
tokenProgram?: Address;
}
Field documentation
treasury— Shard PDA fromderiveCurrencyProtocolTreasuryPda(mint, treasuryIndex, tokenProgram).tokenProgram— The currency record's token program (classic SPL Token or Token-2022); classic when omitted.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
InitializeCurrencyReferralTreasuryAccounts#
Accounts for classic-token, currency-specific referral treasury provisioning.
Declaration source: packages/core/src/instructions.ts:2591.
export interface InitializeCurrencyReferralTreasuryAccounts extends BinaryRecorderTailAccounts {
payer: Address;
config: Address;
mint: Address;
record: Address;
treasury: Address;
freezeException?: Address;
/** The currency record's token program (classic SPL Token or Token-2022); classic when omitted. */
tokenProgram?: Address;
}
Field documentation
tokenProgram— The currency record's token program (classic SPL Token or Token-2022); classic when omitted.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
InitializeCurrencyReferrerEarningsAccounts#
Accounts for a referrer's currency-specific earnings initialization.
Declaration source: packages/core/src/instructions.ts:2552.
export interface InitializeCurrencyReferrerEarningsAccounts extends BinaryRecorderTailAccounts {
referrer: Address;
config: Address;
mint: Address;
record: Address;
treasury: Address;
earnings: Address;
freezeException?: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
InitializeMakerQuoteStateParams#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:83.
export interface InitializeMakerQuoteStateParams {
readonly maxBidCollateral: bigint;
/** Limits in the order BuyYes, SellYes, BuyNo, SellNo. */
readonly limits: readonly [
MakerQuoteLaneLimit,
MakerQuoteLaneLimit,
MakerQuoteLaneLimit,
MakerQuoteLaneLimit,
];
}
Field documentation
limits— Limits in the order BuyYes, SellYes, BuyNo, SellNo.
initSpline#
Not documented.
Declaration source: packages/core/src/sdk.ts:3444.
export function initSpline(input: InitSplineInput, programAddress?: Address): Promise<SdkResult<InitSplineResult>>;
Parameters
input: InitSplineInput— Not documented. See InitSplineInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<InitSplineResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
InitSplineAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4443.
export interface InitSplineAccounts extends BinaryRecorderTailAccounts {
creator: Address;
spline: Address;
splineVault: Address;
settlementMint: Address;
config: Address;
/** The settlement mint's owner: classic SPL Token or Token-2022. */
tokenProgram: Address;
systemProgram: Address;
/** The mint's registered currency record PDA (`deriveCurrencyRecordPda(mint, tokenProgram)`). */
currencyRecord: Address;
/**
* Active exact-mint freeze exception. Required only while the settlement mint has a freeze
* authority; omit otherwise (the account is then not sent).
*/
freezeException?: Address;
}
Field documentation
tokenProgram— The settlement mint's owner: classic SPL Token or Token-2022.currencyRecord— The mint's registered currency record PDA (deriveCurrencyRecordPda(mint, tokenProgram)).freezeException— Active exact-mint freeze exception. Required only while the settlement mint has a freeze authority; omit otherwise (the account is then not sent).selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
InitSplineInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3423.
export interface InitSplineInput extends InitSplineParams {
creator: Address;
settlementMint: Address;
/** The settlement mint's owner (classic SPL Token or Token-2022); classic when omitted. */
tokenProgram?: Address;
systemProgram?: Address;
/** The mint's currency record PDA; derived from the mint and token program when omitted. */
currencyRecord?: Address;
/**
* Active exact-mint freeze exception PDA. Required only while the settlement mint has a freeze
* authority (see `resolveCreateMarketCurrencyAccounts`); omit otherwise.
*/
freezeException?: Address;
}
Field documentation
tokenProgram— The settlement mint's owner (classic SPL Token or Token-2022); classic when omitted.currencyRecord— The mint's currency record PDA; derived from the mint and token program when omitted.freezeException— Active exact-mint freeze exception PDA. Required only while the settlement mint has a freeze authority (seeresolveCreateMarketCurrencyAccounts); omit otherwise.
InitSplineParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:4429.
export interface InitSplineParams {
feedId: Uint8Array;
durationSeconds: bigint; // D0{s}
initialMidPriceBps: number; // D4{canonical_price_bps}
maxQuoteAgeSeconds: number; // D0{s}
active: boolean;
quoteAuthority: Address;
defaultCommitment: bigint; // D6{stablecoin}
bidLevelCount: number; // D0{curve_level_count}
askLevelCount: number; // D0{curve_level_count}
bidLevels: readonly CurveLevel[];
askLevels: readonly CurveLevel[];
}
InitSplineResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:3438.
export interface InitSplineResult {
config: Address;
spline: Address;
splineVault: Address;
}
inputDigest#
Hash the account bytes and context slots using the current snapshot format.
Declaration source: packages/core/src/discoverySnapshot.ts:89.
export function inputDigest(inputs: readonly DiscoveryInputAccount[]): string;
Parameters
inputs: readonly DiscoveryInputAccount[]— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>INSTRUCTION_NAMES</summary>INSTRUCTION_NAMES#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:37.
export declare const INSTRUCTION_NAMES: readonly ["ApproveBuilder", "AssertBalances", "AttachSeat", "AttachSeatFromSeries", "BatchPostOnlyWithFreeFunds", "BeginSourceMarket", "CancelMultipleOrdersById", "CancelMultipleOrdersByIdWithFreeFunds", "CancelOrder", "CancelOrderByClientId", "CancelOwnerOrders", "ClaimAuthority", "ClaimCreatorFees", "ClaimCurrencyReferrerEarnings", "CloseMakerQuoteState", "CloseMarket", "ClosePosition", "ClosePreallocatedChild", "CloseSeat", "CloseSourceAccounts", "CloseSplineSeries", "CloseStrategy", "ConfigureStrategy", "CreateConfidentialMarket", "CreateMarket", "DepositFunds", "DepositSeriesVault", "DisablePostOnlyMode", "EnablePostOnlyMode", "EnsureDeepOrderbookSpace", "EnsureTraderLedgerSpace", "EvacuateIdleSeat", "ExpireExternalMarket", "ExpireMarket", "FinalizeSourceMarket", "FlagSeatBelowFloor", "ForceCancelMarketOrders", "ForceClose", "FundMakerQuoteInventory", "HaltSourceMarket", "InitSplineSeries", "InitializeConfig", "InitializeCurrencyProtocolTreasury", "InitializeCurrencyReferralTreasury", "InitializeCurrencyReferrerEarnings", "InitializeMakerQuoteState", "InitializeSourceControl", "InitializeWitnessRegistry", "MakeSeatDormant", "MarkPositionSettled", "MergeCompleteSet", "MintShares", "OpenSourceMarket", "Pause", "PlaceLimitWithFreeFunds", "PlaceMultiplePostOnly", "PlaceOrder", "ReclaimExpiredOrder", "ReclaimExpiredOrders", "ReclaimExternalMarketPreallocation", "RecordConfidentialTerminal", "RecoverSeat", "Redeem", "ReduceOrder", "ReduceOrderWithFreeFunds", "RegisterAttestedWitness", "RegisterCurrency", "ReplaceMakerQuotes", "ResetStrategyCapital", "ResolveMarket", "ResolveSourceMarket", "ResumeStrategy", "RevokeBuilder", "RevokeWitnessSlot", "RollupCurrencyReferralFees", "RotateSeatQuoteAuthority", "SetCurrencyFreezeException", "SetMakerQuoteAuthority", "SetMarketEmergencyStatus", "SetPauser", "SetReferrer", "SetSourceProfilePolicy", "SetWitnessMeasurement", "SettleSeat", "SnapshotEnd", "StopStrategy", "SwapWithFreeFunds", "TopUpCloserRewards", "TopUpExternalProgressReserve", "TopUpSeatCommitment", "TopUpSeriesLamports", "Unpause", "UpdateAuthority", "UpdateFeeConfig", "UpdateMarketCap", "UpdateMinRestingNotional", "UpdateOperationalParams", "UpdateSeatMid", "UpdateSeatShape", "UpdateSeriesSubscription", "UpdateSeriesTemplate", "UpdateSourceClose", "UpdateTickSize", "UpdateTreasuryRecipients", "WithdrawCurrencyProtocolTreasury", "WithdrawFunds", "WithdrawMakerQuoteInventory", "WithdrawSeriesVault", "WithdrawShares"];
InstructionDiscriminator#
D0{instruction_id} Single-byte discriminators for every public route, taken verbatim from the generated compact route table.
Declaration source: packages/core/src/constants.ts:419.
export declare const InstructionDiscriminator: Readonly<{ InitializeConfig: 0; UpdateAuthority: 1; ClaimAuthority: 2; CreateMarket: 3; SnapshotEnd: 4; ResolveMarket: 5; ExpireMarket: 6; MintShares: 7; DepositFunds: 8; WithdrawFunds: 9; WithdrawShares: 10; MergeCompleteSet: 11; PlaceOrder: 12; PlaceMultiplePostOnly: 13; SwapWithFreeFunds: 14; PlaceLimitWithFreeFunds: 15; BatchPostOnlyWithFreeFunds: 16; CancelOrder: 17; CancelMultipleOrdersById: 18; ReduceOrder: 19; CancelMultipleOrdersByIdWithFreeFunds: 20; ReduceOrderWithFreeFunds: 21; ReclaimExpiredOrder: 22; Redeem: 23; ForceClose: 24; MarkPositionSettled: 25; ClosePosition: 26; CloseMarket: 27; UpdateFeeConfig: 28; UpdateTreasuryRecipients: 29; SetReferrer: 30; ClaimCreatorFees: 31; Pause: 32; Unpause: 33; EnablePostOnlyMode: 34; DisablePostOnlyMode: 35; UpdateTickSize: 36; UpdateMinRestingNotional: 37; UpdateMarketCap: 38; SetMarketEmergencyStatus: 39; ForceCancelMarketOrders: 40; SetPauser: 41; UpdateOperationalParams: 42; EnsureTraderLedgerSpace: 43; EnsureDeepOrderbookSpace: 44; TopUpCloserRewards: 45; InitSplineSeries: 46; UpdateSeriesTemplate: 47; UpdateSeatMid: 48; AttachSeat: 49; SettleSeat: 50; RecoverSeat: 51; DepositSeriesVault: 52; WithdrawSeriesVault: 53; CloseSplineSeries: 54; BeginSourceMarket: 55; OpenSourceMarket: 56; ExpireExternalMarket: 57; ClosePreallocatedChild: 58; ReclaimExternalMarketPreallocation: 59; TopUpExternalProgressReserve: 60; EvacuateIdleSeat: 61; ResolveSourceMarket: 62; HaltSourceMarket: 63; UpdateSourceClose: 64; FinalizeSourceMarket: 65; CloseSourceAccounts: 66; InitializeSourceControl: 67; SetSourceProfilePolicy: 68; InitializeWitnessRegistry: 69; RevokeWitnessSlot: 70; SetWitnessMeasurement: 71; RegisterAttestedWitness: 72; RotateSeatQuoteAuthority: 73; ApproveBuilder: 74; RevokeBuilder: 75; SetCurrencyFreezeException: 76; RegisterCurrency: 77; InitializeCurrencyReferralTreasury: 78; InitializeCurrencyReferrerEarnings: 79; ClaimCurrencyReferrerEarnings: 80; RollupCurrencyReferralFees: 81; InitializeCurrencyProtocolTreasury: 82; WithdrawCurrencyProtocolTreasury: 83; CancelOrderByClientId: 84; CancelOwnerOrders: 85; ConfigureStrategy: 86; StopStrategy: 87; ResumeStrategy: 88; CloseStrategy: 89; ResetStrategyCapital: 90; UpdateSeatShape: 91; TopUpSeatCommitment: 92; AttachSeatFromSeries: 93; UpdateSeriesSubscription: 94; TopUpSeriesLamports: 95; FlagSeatBelowFloor: 96; MakeSeatDormant: 97; CloseSeat: 98; AssertBalances: 99; ReplaceMakerQuotes: 100; SetMakerQuoteAuthority: 101; InitializeMakerQuoteState: 102; CloseMakerQuoteState: 103; FundMakerQuoteInventory: 104; WithdrawMakerQuoteInventory: 105; ReclaimExpiredOrders: 106; CreateConfidentialMarket: 107; RecordConfidentialTerminal: 108; }>;
InstructionName#
Public route name.
Declaration source: packages/core/src/constants.ts:422.
export type InstructionName = keyof typeof IDL_WIRE_INSTRUCTION_INVENTORY;
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
instructionRequiresBinaryRecorder#
True when the program rejects discriminator without the recorder tail.
Declaration source: packages/core/src/instructions.ts:486.
export function instructionRequiresBinaryRecorder(discriminator: number): boolean;
Parameters
discriminator: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>InstrumentChain</summary>InstrumentChain#
Not documented.
Declaration source: packages/core/src/instruments.ts:9.
export type InstrumentChain = 'solana';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
InstrumentLookupKeys#
Not documented.
Declaration source: packages/core/src/instruments.ts:51.
export interface InstrumentLookupKeys {
symbol: string;
instrumentId: string;
marketAddress: string;
marketOutcome: string;
marketId: string;
marketIdOutcome: string;
pythFeedId: string | null;
}
InstrumentLookupKeysInput#
Not documented.
Declaration source: packages/core/src/instruments.ts:42.
export interface InstrumentLookupKeysInput {
symbol: string;
instrumentId: string;
marketAddress: string;
marketId: string;
outcome: InstrumentOutcome | Lowercase<InstrumentOutcome> | string;
pythFeedId?: string | null;
}
InstrumentOutcome#
Not documented.
Declaration source: packages/core/src/instruments.ts:8.
export type InstrumentOutcome = 'YES' | 'NO';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
intentFromStoredOrderSide#
Inverse of {@link orderSideFromIntent}. Throws on the empty-slot sentinel or corrupt bytes.
Declaration source: packages/core/src/types.ts:96.
export function intentFromStoredOrderSide(value: number): { outcome: OutcomeAsset; intent: TradeIntent; };
Parameters
value: number— Not documented.
Returns
{ outcome: OutcomeAsset; intent: TradeIntent; }
Not documented.
Throws
Not documented.
</details> <details> <summary>InventorySnapshot</summary>InventorySnapshot#
Not documented.
Declaration source: packages/core/src/terminalInventory.ts:38.
export type InventorySnapshot = { readonly owner: Address; readonly data: Uint8Array };
IocOrderInput#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:66.
export interface IocOrderInput {
outcome: OutcomeAsset;
intent: TradeIntent;
priceBps: number;
quantity: bigint;
worstAcceptablePriceBps?: number;
minFillQuantity?: bigint;
matchLimit?: number;
selfTradeBehavior?: number;
}
isAbortError#
Not documented.
Declaration source: packages/core/src/api/client.ts:529.
export function isAbortError(error: unknown): boolean;
Parameters
error: unknown— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isAmbiguousSubmissionError</summary>isAmbiguousSubmissionError#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:428.
export function isAmbiguousSubmissionError(error: unknown): boolean;
Parameters
error: unknown— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isBidStoredOrderSide</summary>isBidStoredOrderSide#
True for the two stored sides that rest on the BID side of the canonical
orderbook (BuyYes, BuyNo). Bid-side orders escrow the quote token, so
their refund can be routed to either the wallet ATA or the ledger's
quote_free bucket. Ask-side orders (SellYes/SellNo) escrow YES/NO
shares and can only refund through the full-account (wallet) surface.
Declaration source: packages/core/src/orderFunding.ts:143.
export function isBidStoredOrderSide(storedSide: StoredOrderSide): boolean;
Parameters
storedSide: StoredOrderSide— Not documented. See StoredOrderSide for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isBinaryRecorderEventInSchema</summary>isBinaryRecorderEventInSchema#
Not documented.
Declaration source: packages/core/src/events.ts:835.
export function isBinaryRecorderEventInSchema(version: number, event: SeesawBinaryEvent): boolean;
Parameters
version: number— Not documented.event: SeesawBinaryEvent— Not documented. See SeesawBinaryEvent for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isCurrencyLogoAllowed</summary>isCurrencyLogoAllowed#
True for an https logo URL on an allowlisted exact host or bucket path (or an extra exact host).
Declaration source: packages/core/src/tokensXyz/logoHosts.ts:30.
export function isCurrencyLogoAllowed(url: string, extraHosts?: readonly string[]): boolean;
Parameters
url: string— Not documented.extraHosts: readonly string[]— Not documented. Default:[].
Returns
boolean
Not documented.
Throws
Not documented.
Defaults
extraHosts:[].
isDeterministicTransactionFailure#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:444.
export function isDeterministicTransactionFailure(error: unknown): boolean;
Parameters
error: unknown— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isExpiredBlockhashError</summary>isExpiredBlockhashError#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:417.
export function isExpiredBlockhashError(error: unknown): boolean;
Parameters
error: unknown— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isManagedOrderClaimableBySlot</summary>isManagedOrderClaimableBySlot#
Slot-only claimability. Within the grace window, only a lane-prefix unwind is allowed.
Declaration source: packages/core/src/managedReclaimRecovery.ts:77.
export function isManagedOrderClaimableBySlot(bound: bigint | undefined, observedSlot: bigint): boolean;
Parameters
bound: bigint | undefined— Not documented.observedSlot: bigint— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isMarketTradable</summary>isMarketTradable#
Check if a market is currently tradable.
Declaration source: packages/core/src/market.ts:357.
export function isMarketTradable(market: MarketAccount, now?: bigint): boolean;
Parameters
market: MarketAccount— Not documented. See MarketAccount for its declaration and available field documentation.now: bigint— Not documented. Default:BigInt(Math.floor(Date.now() / 1000)).
Returns
boolean
Not documented.
Throws
Not documented.
Defaults
now:BigInt(Math.floor(Date.now() / 1000)).
isNativePythMarket#
Whether a market resolves through the native Pyth path.
MarketAccount::is_native_pyth is resolver_authority == NATIVE_PYTH_RESOLVER
(program/src/state/market.rs:896-898), and that one bit decides a
surprising amount of client behaviour: the funding verdicts apply the
clock/outcome window only on the native branch, ExpireMarket raises
WrongResolver for anything else, and CloseMarket derives the vault
authority differently. Guessing it is exactly the guess the program answers
with WrongResolver, so it belongs in one tested place rather than as a
string compare repeated per surface.
Accepts whichever spelling the caller's decoder produced — a base58
Address, or the raw 32 bytes.
The parameter is deliberately NON-nullable. A caller that has not read the
market account does not have an answer, and must omit
MarketSnapshot.isNativePyth rather than ask this helper to invent one.
Declaration source: packages/core/src/market.ts:42.
export function isNativePythMarket(resolverAuthority: Address | string | Uint8Array | ArrayLike<number>): boolean;
Parameters
resolverAuthority: string | Uint8Array<ArrayBufferLike> | Address | ArrayLike<number>— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isOpenStopLoss</summary>isOpenStopLoss#
Not documented.
Declaration source: packages/core/src/stopLoss/api.ts:72.
export function isOpenStopLoss(record: Pick<StopLossRecord, "status">): boolean;
Parameters
record: Pick<StopLossRecord, "status">— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isProtocolTreasuryDestination</summary>isProtocolTreasuryDestination#
Whether source is an already-resolved destination rather than config facts.
Declaration source: packages/core/src/treasury.ts:202.
export function isProtocolTreasuryDestination(source: ProtocolTreasurySource): source is ProtocolTreasuryDestination;
Parameters
source: ProtocolTreasurySource— Not documented. See ProtocolTreasurySource, ProtocolTreasuryConfigFacts, ProtocolTreasuryDestination for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isQuoteLive</summary>isQuoteLive#
Slot eligibility only; callers must also check activity, source age and generation.
Declaration source: packages/core/src/splineFreshness.ts:20.
export function isQuoteLive(profile: QuoteProfile, installSlot: bigint, validUntilSlot: bigint, currentSlot: bigint | undefined): boolean | "unknown";
Parameters
profile: QuoteProfile— Not documented. See QuoteProfile for its declaration and available field documentation.installSlot: bigint— Not documented.validUntilSlot: bigint— Not documented.currentSlot: bigint | undefined— Not documented.
Returns
boolean | "unknown"
Not documented.
Throws
Not documented.
</details> <details> <summary>isReduceOnlyExit</summary>isReduceOnlyExit#
Whether an order can only REDUCE what the signer already holds.
All of:
- SELL: a SELL escrows the named outcome's shares and receives quote; it
never locks quote and never mints (
transfers.rs), so it cannot open or increase exposure; - ImmediateOrCancel: nothing rests. A resting remainder is NOT treated as reduce-only, conservatively — it would outlive this check and could be filled after the holdings it was sized against are gone;
0 < quantity <= held, whereheldis the fresh balance of that outcome in the ONE custody this funding source escrows from (wallet ATA or ledger bucket; never their sum). An unread balance is not a holding.
Declaration source: packages/core/src/reviewedIntent.ts:704.
export function isReduceOnlyExit(order: ReduceOnlyExitOrder, held: HeldOutcomeShares | null | undefined): boolean;
Parameters
order: ReduceOnlyExitOrder— Not documented. See ReduceOnlyExitOrder for its declaration and available field documentation.held: HeldOutcomeShares | null | undefined— Not documented. See HeldOutcomeShares for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isReferralRef</summary>isReferralRef#
true when value is a ref the web proxy would accept.
Declaration source: packages/core/src/widget/embed.ts:67.
export function isReferralRef(value: unknown): value is string;
Parameters
value: unknown— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isSafeBigInt</summary>isSafeBigInt#
Checks if a BigInt value can be safely converted to a Number.
Declaration source: packages/core/src/utils/bigint.ts:73.
export function isSafeBigInt(value: bigint): boolean;
Parameters
value: bigint— - The BigInt value to check
Returns
boolean
true if the value is within safe integer range, false otherwise
Throws
Not documented.
</details> <details> <summary>isSolanaMintShape</summary>isSolanaMintShape#
Not documented.
Declaration source: packages/core/src/tokensXyz/guards.ts:53.
export function isSolanaMintShape(value: unknown): value is string;
Parameters
value: unknown— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isSplTokenProgram</summary>isSplTokenProgram#
True when owner is a token program that can own a mint.
Declaration source: packages/core/src/currency/mint.ts:25.
export function isSplTokenProgram(owner: string | null | undefined): boolean;
Parameters
owner: string | null | undefined— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isStoredOrderSide</summary>isStoredOrderSide#
Not documented.
Declaration source: packages/core/src/types.ts:80.
export function isStoredOrderSide(value: number): value is StoredOrderSide;
Parameters
value: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isStrategyOrderStopped</summary>isStrategyOrderStopped#
Match the order's stored seat incarnation before comparing its stop epoch.
Declaration source: packages/core/src/managedReclaimRecovery.ts:56.
export function isStrategyOrderStopped(order: Pick<Order, "owner" | "strategyId" | "strategyEpoch" | "seatIndex" | "seatGeneration">, ledger?: Pick<TraderLedgerAccount, "slots">): boolean;
Parameters
order: Pick<Order, "owner" | "strategyId" | "seatGeneration" | "strategyEpoch" | "seatIndex">— Not documented.ledger: Pick<TraderLedgerAccount, "slots"> | undefined— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isSupportedBinaryRecorderVersion</summary>isSupportedBinaryRecorderVersion#
Not documented.
Declaration source: packages/core/src/events.ts:831.
export function isSupportedBinaryRecorderVersion(version: number): boolean;
Parameters
version: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isTransactionAttemptBlocking</summary>isTransactionAttemptBlocking#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:535.
export function isTransactionAttemptBlocking(state: TransactionAttemptState): boolean;
Parameters
state: TransactionAttemptState— Not documented. See TransactionAttemptState for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isValidFeeSplit</summary>isValidFeeSplit#
Not documented.
Declaration source: packages/core/src/display.ts:235.
export function isValidFeeSplit(split: { protocolBps: number; creatorBps: number; referralBps: number; builderBps: number; makerBps: number; }): boolean;
Parameters
split: { protocolBps: number; creatorBps: number; referralBps: number; builderBps: number; makerBps: number; }— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isValidGovernanceFeeSplit</summary>isValidGovernanceFeeSplit#
The vector accepted by public fee governance (UpdateFeeConfig).
With the five-way split the protocol ceiling is part of FeeSplit5::is_valid
itself, so this is the same predicate as {@link isValidSplit}. It keeps its
own name because display and governance callers import it.
Declaration source: packages/core/src/fee.ts:134.
export function isValidGovernanceFeeSplit(split: FeeSplit): boolean;
Parameters
split: FeeSplit— Not documented. See FeeSplit for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isValidReferralAddress</summary>isValidReferralAddress#
Not documented.
Declaration source: packages/core/src/referral/display.ts:16.
export function isValidReferralAddress(value: string | null | undefined): value is string;
Parameters
value: string | null | undefined— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isValidSolanaAddress</summary>isValidSolanaAddress#
Validates that a string is a plausible Solana address.
Checks:
- Non-empty string
- Length between 32 and 44 characters (valid base58-encoded 32-byte public key range)
- Contains only valid base58 characters
Note: This does NOT verify that the address is a valid point on the ed25519 curve.
For full cryptographic validation, use @solana/addresses isAddress().
Declaration source: packages/core/src/utils/validation.ts:46.
export function isValidSolanaAddress(address: string): boolean;
Parameters
address: string— - The string to validate.
Returns
boolean
true if the string looks like a valid Solana address.
Throws
Not documented.
</details> <details> <summary>isValidSplit</summary>isValidSplit#
Mirrors FeeSplit5::is_valid (builder-fee spec FR-13 as ruled 2026-10-27):
- the five shares are u16 and sum to 10,000;
2,000 <= protocol <= 4,500;referral >= 1;0 <= builder <= 1,000(0 turns builder fees off);maker <= 4,000andmaker <= protocol.
Creator has no separate bound, as on chain.
Declaration source: packages/core/src/fee.ts:105.
export function isValidSplit(split: FeeSplit): boolean;
Parameters
split: FeeSplit— Not documented. See FeeSplit for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>isValidTakerFeeCoefficient</summary>isValidTakerFeeCoefficient#
Whether coefficientBps is a coefficient UpdateFeeConfig would accept.
Declaration source: packages/core/src/fee.ts:266.
export function isValidTakerFeeCoefficient(coefficientBps: number): boolean;
Parameters
coefficientBps: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>JurisdictionAttestation</summary>JurisdictionAttestation#
Not documented.
Declaration source: packages/core/src/api/compliance.ts:42.
export type JurisdictionAttestation = z.infer<typeof attestationRecordSchema>;
JurisdictionAttestationStatus#
Not documented.
Declaration source: packages/core/src/api/compliance.ts:36.
export type JurisdictionAttestationStatus = z.infer<typeof attestationStatusSchema>;
KalshiCapitalMetadata#
Not documented.
Declaration source: packages/core/src/sources/kalshiCapitalMetadata.ts:22.
export interface KalshiCapitalMetadata {
readonly version: 1;
readonly source: {
readonly authentication: 'untrusted_observation';
readonly settlementFloorDollars: string | null;
readonly floorUpstreamStatus: 'not_live_upstream';
readonly collateralReturnType: string | null;
readonly mutuallyExclusive: boolean | null;
readonly eventTicker: string | null;
readonly seriesTicker: string | null;
readonly memberSetCertified: false;
};
readonly local: typeof LOCAL;
}
kalshiCapitalMetadataFromObservation#
Not documented.
Declaration source: packages/core/src/sources/kalshiCapitalMetadata.ts:48.
export function kalshiCapitalMetadataFromObservation(market: Readonly<Record<string, unknown>>, event: Readonly<Record<string, unknown>>): KalshiCapitalMetadata;
Parameters
market: Readonly<Record<string, unknown>>— Not documented.event: Readonly<Record<string, unknown>>— Not documented.
Returns
KalshiCapitalMetadata
Not documented.
Throws
Not documented.
</details> <details> <summary>KalshiCatalogPage</summary>KalshiCatalogPage#
Not documented.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:18.
export interface KalshiCatalogPage {
readonly rows: readonly KalshiCatalogRow[];
readonly nextCursor: string;
readonly availability: 'available' | 'not-found' | 'unsupported' | 'not-live';
}
KalshiCatalogPager#
Explicit read-only query/page cursor. Query changes invalidate pending completions.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:94.
export declare class KalshiCatalogPager {
constructor(read: KalshiCatalogRead);
invalidate: () => void;
canPrevious: boolean;
canNext: boolean;
categories: (environment: "Production" | "Demo") => Promise<Readonly<Record<string, readonly string[]>>>;
start: (query: KalshiCatalogQuery) => Promise<KalshiCatalogPage | null>;
previous: () => KalshiCatalogPage;
next: () => Promise<KalshiCatalogPage | null>;
}
Parameters
read: KalshiCatalogRead— Not documented. See KalshiCatalogRead for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>KalshiCatalogQuery</summary>KalshiCatalogQuery#
Not documented.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:4.
export interface KalshiCatalogQuery {
readonly environment: 'Production' | 'Demo';
readonly resource: KalshiCatalogResource;
readonly category?: string;
readonly tags?: string;
readonly seriesTicker?: string;
readonly eventTicker?: string;
}
KalshiCatalogRead#
Not documented.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:23.
export type KalshiCatalogRead = (request: Readonly<Record<string, unknown>>) => Promise<unknown>;
KalshiCatalogResource#
Not documented.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:3.
export type KalshiCatalogResource = 'series-list' | 'events' | 'markets';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
KalshiCatalogRow#
Not documented.
Declaration source: packages/core/src/sources/kalshiSourceCatalog.ts:12.
export interface KalshiCatalogRow {
readonly kind: 'series' | 'event' | 'market';
readonly ticker: string;
readonly title: string;
readonly eventTicker?: string;
}
KillSwitchCancelInput#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:98.
export interface KillSwitchCancelInput {
scope: KillSwitchScope;
reason: KillSwitchReason;
marketAddress?: string;
}
KillSwitchReason#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:16.
export type KillSwitchReason = 'manual' | 'disconnect' | 'risk_limit' | 'session_revoked';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
KillSwitchScope#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:15.
export type KillSwitchScope = 'wallet' | 'market';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
KitLikeRpc#
A @solana/kit-style RPC: every method returns a pending request with send().
Declaration source: packages/core/src/replay/rpc.ts:125.
export interface KitLikeRpc {
getProgramAccounts?(...args: never[]): { send(): Promise<unknown> };
getMultipleAccounts(...args: never[]): { send(): Promise<unknown> };
getSignaturesForAddress(...args: never[]): { send(): Promise<unknown> };
getTransaction(...args: never[]): { send(): Promise<unknown> };
getBlock(...args: never[]): { send(): Promise<unknown> };
}
LandedOrderEffects#
Not documented.
Declaration source: packages/core/src/landedOrderEffects.ts:17.
export interface LandedOrderEffects {
readonly slot: number;
/** Present only when the recorder emits OrderPlaced for the reviewed owner. */
readonly restingOrderId?: string;
/** Present only when the recorder emits the aggregate taker fill. */
readonly filledQuantity?: string;
/** Order IDs reported by authenticated cancellation events. */
readonly cancelledOrderIds?: readonly string[];
}
Field documentation
restingOrderId— Present only when the recorder emits OrderPlaced for the reviewed owner.filledQuantity— Present only when the recorder emits the aggregate taker fill.cancelledOrderIds— Order IDs reported by authenticated cancellation events.
LandedOrderScope#
Not documented.
Declaration source: packages/core/src/landedOrderEffects.ts:27.
export interface LandedOrderScope {
readonly program: Address;
readonly market: Address;
readonly owner: Address;
readonly signature: string;
readonly signedWireBase64: string;
readonly slot: number;
readonly action: 'place' | 'cancel';
}
LaneLevels#
Executable book levels of one outcome lane, best first.
Declaration source: packages/core/src/marketDiscovery.ts:66.
export interface LaneLevels {
readonly bids: readonly OrderbookLevel[];
readonly asks: readonly OrderbookLevel[];
}
laneNotional#
The lane notional of lots share atoms at priceBps, rounded as a seat fill
rounds it: ceil(p · L / 10000) for a payment, floor for proceeds. Mirrors
spline_taker_payment / spline_taker_proceeds. Throws outside
1..=9999 or for a negative / non-u64 lot count.
Declaration source: packages/core/src/router/takerFee.ts:100.
export function laneNotional(priceBps: number, lots: bigint, rounding: NotionalRounding): bigint;
Parameters
priceBps: number— Not documented.lots: bigint— Not documented.rounding: NotionalRounding— Not documented. See NotionalRounding for its declaration and available field documentation.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>LeaderboardEntry</summary>LeaderboardEntry#
Not documented.
Declaration source: packages/core/src/api/types.ts:248.
export interface LeaderboardEntry {
rank: number;
walletAddress: string;
displayName?: string | null;
pnl: string;
winRate: number;
tradeCount: number;
isCurrentUser?: boolean;
}
LeaderboardEntrySchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:182.
export declare const LeaderboardEntrySchema: z.ZodObject<{ rank: z.ZodNumber; walletAddress: z.ZodString; displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>; pnl: z.ZodString; winRate: z.ZodNumber; tradeCount: z.ZodNumber; isCurrentUser: z.ZodOptional<z.ZodBoolean>; }, z.core.$loose>;
LeaderboardMetric#
Not documented.
Declaration source: packages/core/src/api/types.ts:259.
export type LeaderboardMetric = 'pnl' | 'win_rate' | 'trades' | 'streak';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
LeaderboardPeriod#
Not documented.
Declaration source: packages/core/src/api/types.ts:258.
export type LeaderboardPeriod = 'daily' | 'weekly' | 'monthly' | 'allTime';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
LEDGER_BUCKET_MAX#
TraderLedgerSlot::BUCKET_MAX — every ledger bucket is a full u64, so a
credit that would push quote_free above this is rejected rather than
silently saturated (deposit_funds.rs:85-89).
Declaration source: packages/core/src/preflight/funding.ts:112.
export declare const LEDGER_BUCKET_MAX: bigint;
LedgerSnapshot#
One trader's slot in the market-owned TraderLedger PDA.
Source of truth: TraderLedgerSlot (program/src/state/trader_ledger.rs).
Every bucket is u48-backed on chain, so no bucket may exceed
LEDGER_BUCKET_MAX (TraderLedgerSlot::BUCKET_MAX).
The *Free buckets are the ONLY balances the withdrawal paths may move;
quote_locked / yes_locked / no_locked back resting orders and are
deliberately absent from this snapshot.
Declaration source: packages/core/src/preflight/types.ts:346.
export interface LedgerSnapshot {
/** `slot.quote_free` — withdrawable settlement units, base units. */
quoteFree: bigint;
/** `slot.yes_free` — YES shares materializable via `WithdrawShares`. */
yesFree: bigint;
/** `slot.no_free` — NO shares materializable via `WithdrawShares`. */
noFree: bigint;
/** Occupied seats in the ledger. */
seatsUsed: number;
/** Total seats (`MARKET_SEATS`). `<= 0` is read as UNKNOWN. */
seatCapacity: number;
/**
* Whether this trader already occupies a seat. A full ledger only blocks
* traders who still need admission (`find_or_allocate_slot_with_hint`), so
* `true` skips the capacity gate entirely.
*
* Omitted means unknown, which keeps the conservative capacity gate armed.
*/
hasSeat?: boolean;
/**
* Occupied seats whose SIX buckets are all zero — free, locked, every leg.
*
* A full ledger is not necessarily closed to a new trader:
* `find_or_allocate_slot` (`program/src/state/trader_ledger.rs:526-586`)
* scans for the caller's own slot first, and failing that RECYCLES the first
* occupied slot with `balances_are_zero()` — clearing it and handing it to
* the caller without changing `occupied_count`. Only when there is neither an
* own slot NOR a recyclable one does the capacity check fire.
*
* Compute it over every occupied slot; a trader who owns one is short-
* circuited by {@link hasSeat} before this is read.
*
* Omitted means unknown. Preview keeps the conservative pre-L-7 answer (a
* full ledger denies), because over-blocking a deposit is the safe direction
* for a panel; strict mode requires a real count rather than deciding seat
* admission on an assumption.
*/
recyclableSeats?: number;
}
Field documentation
quoteFree—slot.quote_free— withdrawable settlement units, base units.yesFree—slot.yes_free— YES shares materializable viaWithdrawShares.noFree—slot.no_free— NO shares materializable viaWithdrawShares.seatsUsed— Occupied seats in the ledger.seatCapacity— Total seats (MARKET_SEATS).<= 0is read as UNKNOWN.hasSeat— Whether this trader already occupies a seat. A full ledger only blocks traders who still need admission (find_or_allocate_slot_with_hint), sotrueskips the capacity gate entirely.
Omitted means unknown, which keeps the conservative capacity gate armed.
recyclableSeats— Occupied seats whose SIX buckets are all zero — free, locked, every leg.
A full ledger is not necessarily closed to a new trader:
find_or_allocate_slot (program/src/state/trader_ledger.rs:526-586)
scans for the caller's own slot first, and failing that RECYCLES the first
occupied slot with balances_are_zero() — clearing it and handing it to
the caller without changing occupied_count. Only when there is neither an
own slot NOR a recyclable one does the capacity check fire.
Compute it over every occupied slot; a trader who owns one is short- circuited by {@link hasSeat} before this is read.
Omitted means unknown. Preview keeps the conservative pre-L-7 answer (a full ledger denies), because over-blocking a deposit is the safe direction for a panel; strict mode requires a real count rather than deciding seat admission on an assumption.
</details> <details> <summary>lifecycleExclusion</summary>lifecycleExclusion#
E1 from the market account alone; the reader uses it to decide which books to fetch.
Declaration source: packages/core/src/marketDiscovery.ts:470.
export function lifecycleExclusion(market: DiscoveryMarket, now: bigint): DiscoveryExclusion | null;
Parameters
market: DiscoveryMarket— Not documented. See DiscoveryMarket for its declaration and available field documentation.now: bigint— Not documented.
Returns
DiscoveryExclusion | null
Not documented.
Throws
Not documented.
</details> <details> <summary>LiquiditySource</summary>LiquiditySource#
The seam between account layouts and the gate. Phases 5 and 6 replace the source (epoch-aware orders, spline seats); the depth and gate stay.
Declaration source: packages/core/src/marketDiscovery.ts:96.
export interface LiquiditySource {
readonly version: string;
liquidity(market: DiscoveryMarket, clock: DiscoveryClock): MarketLiquidity;
}
liquiditySourceSeats#
Depth from authenticated competitive seats and a book at the discovery Clock slot.
Declaration source: packages/core/src/marketDiscovery.ts:310.
export function liquiditySourceSeats(book: OrderbookAccount, input: DiscoverySplineSeatInputs, ledger?: TraderLedgerAccount | null): LiquiditySource;
Parameters
book: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.input: DiscoverySplineSeatInputs— Not documented. See DiscoverySplineSeatInputs for its declaration and available field documentation.ledger: TraderLedgerAccount | null— Not documented. Default:null. See TraderLedgerAccount for its declaration and available field documentation.
Returns
LiquiditySource
Not documented.
Throws
Not documented.
Defaults
ledger:null.
listCreatorMarkets#
Not documented.
Declaration source: packages/core/src/referral/creator.ts:90.
export function listCreatorMarkets(wallet: Address, api: CreatorIndexerApiClient): Promise<CreatorMarketEntry[]>;
Parameters
wallet: Address— Not documented.api: CreatorIndexerApiClient— Not documented. See CreatorIndexerApiClient for its declaration and available field documentation.
Returns
Promise<CreatorMarketEntry[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>ListMarketsParams</summary>ListMarketsParams#
Not documented.
Declaration source: packages/core/src/client.ts:51.
export interface ListMarketsParams {
state?: number;
limit?: number;
offset?: number;
}
listNotifications#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:237.
export function listNotifications(client: ApiClient, signer: WalletMessageSigner, query?: Record<string, string | number | boolean | undefined>, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<{ notifications: WalletNotification[]; } & Record<string, unknown>>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.query: Record<string, string | number | boolean | undefined>— Not documented. Default:{}.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ notifications: WalletNotification[]; } & Record<string, unknown>>
Not documented.
Throws
Not documented.
Defaults
query:{}.
ListOrdersParams#
Not documented.
Declaration source: packages/core/src/client.ts:57.
export interface ListOrdersParams {
status?: string;
limit?: number;
offset?: number;
}
ListPositionsParams#
Not documented.
Declaration source: packages/core/src/client.ts:63.
export interface ListPositionsParams {
settled?: boolean;
owner?: string;
limit?: number;
offset?: number;
}
listPriceAlerts#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:164.
export function listPriceAlerts(client: ApiClient, signer: WalletMessageSigner, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<WalletPriceAlert[]>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; marketId: string; targetPrice: number; direction: "above" | "below"; isTriggered: boolean; createdAt: string | number; userId?: string | number | null | undefined; triggeredAt?: string | number | null | undefined; }[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>listPushTokens</summary>listPushTokens#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:304.
export function listPushTokens(client: ApiClient, signer: WalletMessageSigner, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<Array<z.infer<typeof pushTokenSchema>>>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; platform: "ios" | "android"; }[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>listWatchlist</summary>listWatchlist#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:60.
export function listWatchlist(client: ApiClient, signer: WalletMessageSigner, query?: { limit?: number; offset?: number; cursor?: string; }, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<WalletWatchlistPage>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.query: { limit?: number; offset?: number; cursor?: string; }— Not documented. Default:{}.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ watchlist: { [x: string]: unknown; id: string | number; userAddress: string; marketAddress: string; addedAt: string | number; market?: Record<string, unknown> | null | undefined; }[]; limit: number; offset: number; nextCursor: string | null; }>
Not documented.
Throws
Not documented.
Defaults
query:{}.
LockReferrerBundle#
Not documented.
Declaration source: packages/core/src/referral/types.ts:172.
export interface LockReferrerBundle {
/** Ordered ix list ready to submit as one transaction. */
instructions: Instruction[];
/** Diagnostic: which referral state the bundle assumes. */
diagnostics: {
eligibleForTriple: boolean;
ataCreateCount: number;
includesFirstOrder: boolean;
};
}
Field documentation
instructions— Ordered ix list ready to submit as one transaction.diagnostics— Diagnostic: which referral state the bundle assumes.
LOG_INSTRUCTION_DISCRIMINATOR#
D0{instruction_id} Internal event-recorder self-CPI tag; never a public route.
Declaration source: packages/core/src/constants.ts:425.
export declare const LOG_INSTRUCTION_DISCRIMINATOR: 255;
LoggingConfig#
Not documented.
Declaration source: packages/core/src/api/client.ts:89.
export interface LoggingConfig {
/** Enable logging (only works in development) */
enabled?: boolean;
/** Custom logger function */
logger?: (level: 'info' | 'warn' | 'error', message: string, data?: unknown) => void;
/** Fields to redact from logs */
redactFields?: string[];
}
Field documentation
enabled— Enable logging (only works in development)logger— Custom logger functionredactFields— Fields to redact from logs
LogReturnBinaryFairValueInput#
Not documented.
Declaration source: packages/core/src/fairValue.ts:19.
export interface LogReturnBinaryFairValueInput {
/** Market start/strike price, already scaled into real units. */
startPrice: number;
/** Current/latest oracle price, already scaled into the same units as startPrice. */
currentPrice: number;
/** Seconds remaining until settlement. Non-positive values resolve deterministically. */
secondsToExpiry: number;
/** Annualized log-return volatility in bps, e.g. 2_000 = 20%. */
annualizedVolatilityBps: number;
/** Optional annualized log-return drift in bps. Defaults to zero drift. */
driftBps?: number;
}
Field documentation
startPrice— Market start/strike price, already scaled into real units.currentPrice— Current/latest oracle price, already scaled into the same units as startPrice.secondsToExpiry— Seconds remaining until settlement. Non-positive values resolve deterministically.annualizedVolatilityBps— Annualized log-return volatility in bps, e.g. 2_000 = 20%.driftBps— Optional annualized log-return drift in bps. Defaults to zero drift.
MAKER_BAND_BPS#
Not documented.
Declaration source: packages/core/src/computeBand.ts:10.
export declare const MAKER_BAND_BPS: 1000;
MAKER_QUOTE_REPLACEMENT_RESULT_MAX_BYTES#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:525.
export declare const MAKER_QUOTE_REPLACEMENT_RESULT_MAX_BYTES: number;
MAKER_QUOTE_STATE_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteState.ts:14.
export declare const MAKER_QUOTE_STATE_DISCRIMINATOR: Uint8Array<ArrayBufferLike>;
MAKER_QUOTE_STATE_MARKET_OFFSET#
Not documented.
Declaration source: packages/core/src/makerQuoteState.ts:16.
export declare const MAKER_QUOTE_STATE_MARKET_OFFSET: 48;
MAKER_QUOTE_STATE_OWNER_OFFSET#
Not documented.
Declaration source: packages/core/src/makerQuoteState.ts:15.
export declare const MAKER_QUOTE_STATE_OWNER_OFFSET: 16;
MAKER_QUOTE_STATE_SIZE#
Not documented.
Declaration source: packages/core/src/makerQuoteState.ts:13.
export declare const MAKER_QUOTE_STATE_SIZE: 304;
MAKER_SERIES_ACCOUNT_SIZE#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:717.
export declare const MAKER_SERIES_ACCOUNT_SIZE: 784;
MAKER_SURFACE_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:34.
export declare const MAKER_SURFACE_VALUES: readonly ["spline_seat", "managed_book_quotes"];
MakerQuoteInventoryAccounts#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:259.
export interface MakerQuoteInventoryAccounts {
readonly market: Address;
readonly owner: Address;
readonly ownerTokenAccount?: Address;
}
MakerQuoteInventoryParams#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:332.
export interface MakerQuoteInventoryParams {
readonly location?: 'wallet' | 'ledger';
readonly outcome: 0 | 1;
readonly quantity: bigint;
}
MakerQuoteLaneLimit#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:77.
export interface MakerQuoteLaneLimit {
readonly minPriceBps: number;
readonly maxPriceBps: number;
readonly maxQuantity: bigint;
}
MakerQuoteState#
Not documented.
Declaration source: packages/core/src/makerQuoteState.ts:19.
export interface MakerQuoteState extends InitializeMakerQuoteStateParams {
readonly bump: number;
readonly owner: Address;
readonly market: Address;
readonly authority: Address | null;
readonly authorityEpoch: number;
readonly sessionExpirySlot: bigint;
readonly marketTradingGeneration: number;
readonly sequence: bigint;
readonly validUntilSlot: bigint;
readonly profile: QuoteProfile;
readonly publishedByDelegate: boolean;
readonly closing: boolean;
readonly yesReserve: bigint;
readonly noReserve: bigint;
readonly closeBounty: bigint;
readonly reclaimBountyPool: bigint;
readonly reclaimBountyPerOrder: bigint;
readonly orderIds: readonly bigint[];
}
Field documentation
limits— Limits in the order BuyYes, SellYes, BuyNo, SellNo.
MakerSelection#
Not documented.
Declaration source: packages/core/src/makerSelector.ts:98.
export interface MakerSelection {
/** Seats to supply, in seat-key order. */
readonly seats: readonly string[];
readonly estimate: MakerSelectorFillEstimate;
readonly computeUnits: number;
readonly withinBudget: boolean;
/** Seat count the account, packet and `MAX_SEATS_PER_TX` budgets allow. */
readonly seatCap: number;
/** Earliest `last_update + max_quote_age` among the chosen seats; rebuild before it. */
readonly rebuildByUnix: bigint | null;
/** Every candidate not chosen, in seat-key order (empty for the baseline). */
readonly skipped: readonly MakerSelectorSkip[];
}
Field documentation
seats— Seats to supply, in seat-key order.seatCap— Seat count the account, packet andMAX_SEATS_PER_TXbudgets allow.rebuildByUnix— Earliestlast_update + max_quote_ageamong the chosen seats; rebuild before it.skipped— Every candidate not chosen, in seat-key order (empty for the baseline).
MakerSelectorAttachmentStatus#
Spline seat attachment status (the 2026-09-24 state machine).
Declaration source: packages/core/src/makerSelectorEstimator.ts:43.
export type MakerSelectorAttachmentStatus = 'unbound' | 'attached' | 'settled';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
MakerSelectorBookOrder#
One resting book order on the side the taker consumes, in the taker's lane price, best first.
Declaration source: packages/core/src/makerSelectorEstimator.ts:82.
export interface MakerSelectorBookOrder {
readonly priceBps: number;
readonly quantity: bigint;
/** An owned order is cancelled under CancelProvide and consumes an iteration. */
readonly owner?: string;
/** Expired or claimable orders are reclaimed inline and consume an iteration. */
readonly reclaimable?: boolean;
}
Field documentation
owner— An owned order is cancelled under CancelProvide and consumes an iteration.reclaimable— Expired or claimable orders are reclaimed inline and consume an iteration.
MakerSelectorBudget#
Transaction budgets. All are inputs: MAX_SEATS_PER_TX and the compute curve are set from
measurement (§7, §14.2), so this module invents no constants.
Declaration source: packages/core/src/makerSelector.ts:53.
export interface MakerSelectorBudget {
/** `MAX_SEATS_PER_TX` of the program. */
readonly maxSeatsPerTx: number;
/** Account slots left for seats after the fixed head and optional tail (format account cap). */
readonly accountSlotsAvailable: number;
/** Packet bytes left for seats in the chosen transaction format. */
readonly packetBytesAvailable: number;
/** Packet bytes one seat adds (key plus account index); must be positive. */
readonly bytesPerSeat: number;
readonly computeUnitsAvailable: number;
/** Order cost with no seats and no fills. */
readonly computeUnitsBase: number;
/** Cost of one supplied seat, filled or not. */
readonly computeUnitsPerSeat: number;
/** Cost of one match iteration (a book order fill or one seat in a seat step). */
readonly computeUnitsPerMatchIteration: number;
/** Quote-atom value charged per supplied seat when ranking sets (fees, priority); may be 0. */
readonly seatCostQuoteAtoms: bigint;
}
Field documentation
maxSeatsPerTx—MAX_SEATS_PER_TXof the program.accountSlotsAvailable— Account slots left for seats after the fixed head and optional tail (format account cap).packetBytesAvailable— Packet bytes left for seats in the chosen transaction format.bytesPerSeat— Packet bytes one seat adds (key plus account index); must be positive.computeUnitsBase— Order cost with no seats and no fills.computeUnitsPerSeat— Cost of one supplied seat, filled or not.computeUnitsPerMatchIteration— Cost of one match iteration (a book order fill or one seat in a seat step).seatCostQuoteAtoms— Quote-atom value charged per supplied seat when ranking sets (fees, priority); may be 0.
makerSelectorCompareKeys#
Code-unit order, identical to Rust str byte order for base58 text. Never localeCompare.
Declaration source: packages/core/src/makerSelectorEstimator.ts:183.
export function makerSelectorCompareKeys(a: string, b: string): number;
Parameters
a: string— Not documented.b: string— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorComparison</summary>MakerSelectorComparison#
Not documented.
Declaration source: packages/core/src/makerSelector.ts:114.
export interface MakerSelectorComparison {
readonly selector: MakerSelection;
readonly baseline: MakerSelection;
/** The selector's result against the baseline's: budget, filled, net value, seat count. */
readonly verdict: MakerSelectorVerdict;
}
Field documentation
verdict— The selector's result against the baseline's: budget, filled, net value, seat count.
makerSelectorComputeUnits#
Compute units of an order supplying seatCount seats that runs matchIterations iterations.
Declaration source: packages/core/src/makerSelector.ts:131.
export function makerSelectorComputeUnits(budget: MakerSelectorBudget, seatCount: number, matchIterations: number): number;
Parameters
budget: MakerSelectorBudget— Not documented. See MakerSelectorBudget for its declaration and available field documentation.seatCount: number— Not documented.matchIterations: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorCurveLevel</summary>MakerSelectorCurveLevel#
One compiled curve level: exclusive cumulative end in share atoms, offset from the mid.
Declaration source: packages/core/src/makerSelectorEstimator.ts:46.
export interface MakerSelectorCurveLevel {
readonly endQuantityLots: bigint;
readonly priceOffsetBps: number;
}
MakerSelectorFillContext#
Not documented.
Declaration source: packages/core/src/makerSelectorEstimator.ts:100.
export interface MakerSelectorFillContext {
/** The order's `match_limit`. */
readonly matchLimit: number;
/** `ConfigAccount.taker_fee_coefficient_bps` (§6.5). */
readonly takerFeeCoefficientBps: number;
/** `max_total_shares` headroom for pair-minting seat fills; `null` is unlimited. */
readonly pairMintHeadroomLots: bigint | null;
/** Unix seconds the estimate is made at. */
readonly nowUnix: bigint;
/** Seconds until the transaction is expected to land; quote age is checked at `now + margin`. */
readonly landingMarginSeconds: number;
}
Field documentation
matchLimit— The order'smatch_limit.takerFeeCoefficientBps—ConfigAccount.taker_fee_coefficient_bps(§6.5).pairMintHeadroomLots—max_total_sharesheadroom for pair-minting seat fills;nullis unlimited.nowUnix— Unix seconds the estimate is made at.landingMarginSeconds— Seconds until the transaction is expected to land; quote age is checked atnow + margin.
MakerSelectorFillEstimate#
Not documented.
Declaration source: packages/core/src/makerSelectorEstimator.ts:118.
export interface MakerSelectorFillEstimate {
readonly filledLots: bigint;
readonly bookFilledLots: bigint;
readonly seatFilledLots: bigint;
/** Σ per-fill payment (buy, rounded up) or proceeds (sell, rounded down). */
readonly quoteAtoms: bigint;
/** Σ per-fill taker fee. */
readonly feeAtoms: bigint;
readonly matchIterations: number;
/** Matching stopped because the next step needed more `match_limit` than was left. */
readonly budgetExhausted: boolean;
/** Seats that filled, in seat-key order. */
readonly seatFills: readonly MakerSelectorSeatFill[];
}
Field documentation
quoteAtoms— Σ per-fill payment (buy, rounded up) or proceeds (sell, rounded down).feeAtoms— Σ per-fill taker fee.budgetExhausted— Matching stopped because the next step needed morematch_limitthan was left.seatFills— Seats that filled, in seat-key order.
MakerSelectorFillEstimator#
The estimator the selector simulates candidate sets with.
Declaration source: packages/core/src/makerSelectorEstimator.ts:134.
export interface MakerSelectorFillEstimator {
estimate(
intent: MakerSelectorIntent,
book: readonly MakerSelectorBookOrder[],
seats: readonly SeatCandidate[],
context: MakerSelectorFillContext
): MakerSelectorFillEstimate;
}
MakerSelectorInput#
Not documented.
Declaration source: packages/core/src/makerSelector.ts:73.
export interface MakerSelectorInput {
readonly intent: MakerSelectorIntent;
readonly book: readonly MakerSelectorBookOrder[];
readonly seats: readonly SeatCandidate[];
readonly context: MakerSelectorFillContext;
readonly budget: MakerSelectorBudget;
}
MakerSelectorIntent#
Not documented.
Declaration source: packages/core/src/makerSelectorEstimator.ts:91.
export interface MakerSelectorIntent {
readonly lane: MakerSelectorLane;
readonly quantity: bigint;
/** Limit in the taker's own lane: a buy fills at `≤`, a sell at `≥`. `1..=9999`. */
readonly limitPriceBps: number;
/** Taker wallet (owner); a seat with this maker is skipped (§6.3). */
readonly taker: string;
}
Field documentation
limitPriceBps— Limit in the taker's own lane: a buy fills at≤, a sell at≥.1..=9999.taker— Taker wallet (owner); a seat with this maker is skipped (§6.3).
makerSelectorIsBuy#
BuyYes and BuyNo pay quote; SellYes and SellNo receive it.
Declaration source: packages/core/src/makerSelectorEstimator.ts:158.
export function makerSelectorIsBuy(lane: MakerSelectorLane): boolean;
Parameters
lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorLane</summary>MakerSelectorLane#
The four taker lanes of design §6.1.
Declaration source: packages/core/src/makerSelectorEstimator.ts:37.
export type MakerSelectorLane = 'BuyYes' | 'SellYes' | 'BuyNo' | 'SellNo';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
makerSelectorLanePrice#
A YES price presented in the lane's own price space.
Declaration source: packages/core/src/makerSelectorEstimator.ts:168.
export function makerSelectorLanePrice(lane: MakerSelectorLane, yesPriceBps: number): number;
Parameters
lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.yesPriceBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>makerSelectorMintsPairs</summary>makerSelectorMintsPairs#
Lanes whose seat fills mint one pair per lot and consume max_total_shares (§6.1).
Declaration source: packages/core/src/makerSelectorEstimator.ts:163.
export function makerSelectorMintsPairs(lane: MakerSelectorLane): boolean;
Parameters
lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>makerSelectorPriceBetter</summary>makerSelectorPriceBetter#
a is strictly better than b for the taker of this lane.
Declaration source: packages/core/src/makerSelectorEstimator.ts:173.
export function makerSelectorPriceBetter(lane: MakerSelectorLane, a: number, b: number): boolean;
Parameters
lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.a: number— Not documented.b: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>makerSelectorProRata</summary>makerSelectorProRata#
§5 rules 2 and 3: floor(q · a_i / Σ a) each, then one lot each to the largest fractional parts
(q · a_i) mod Σ a, ties by input position (callers pass seats in seat-key order). Never
exceeds a_i.
Declaration source: packages/core/src/makerSelectorEstimator.ts:306.
export function makerSelectorProRata(q: bigint, available: readonly bigint[]): bigint[];
Parameters
q: bigint— Not documented.available: readonly bigint[]— Not documented.
Returns
bigint[]
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorQuoteLevel</summary>MakerSelectorQuoteLevel#
A remaining quote level of a seat in the taker's lane price.
Declaration source: packages/core/src/makerSelectorEstimator.ts:144.
export interface MakerSelectorQuoteLevel {
readonly priceBps: number;
readonly quantity: bigint;
}
makerSelectorReferenceEstimator#
REPLACE with the router's seat-quote estimator (design §11.3) when it lands.
Declaration source: packages/core/src/makerSelectorEstimator.ts:451.
export declare const makerSelectorReferenceEstimator: MakerSelectorFillEstimator;
makerSelectorSeatCap#
Seats the account, packet and MAX_SEATS_PER_TX budgets allow.
Declaration source: packages/core/src/makerSelector.ts:122.
export function makerSelectorSeatCap(budget: MakerSelectorBudget): number;
Parameters
budget: MakerSelectorBudget— Not documented. See MakerSelectorBudget for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorSeatFill</summary>MakerSelectorSeatFill#
Not documented.
Declaration source: packages/core/src/makerSelectorEstimator.ts:113.
export interface MakerSelectorSeatFill {
readonly seat: string;
readonly lots: bigint;
}
makerSelectorSeatJoinsMatching#
The program would match this seat (it is not skipped as absent, inert or self-trade).
Declaration source: packages/core/src/makerSelectorEstimator.ts:233.
export function makerSelectorSeatJoinsMatching(seat: SeatCandidate, intent: MakerSelectorIntent, context: MakerSelectorFillContext): boolean;
Parameters
seat: SeatCandidate— Not documented. See SeatCandidate for its declaration and available field documentation.intent: MakerSelectorIntent— Not documented. See MakerSelectorIntent for its declaration and available field documentation.context: MakerSelectorFillContext— Not documented. See MakerSelectorFillContext for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>makerSelectorSeatQuotes</summary>makerSelectorSeatQuotes#
Remaining quote levels of the side a lane consumes, best first, in the lane's price space.
Mirrors the discovery curve walk (marketDiscovery.ts remainingCurveLevels), then caps the
cumulative quantity by the side's available capacity. The walk stops at the first level whose
YES price leaves 1..=9999.
Declaration source: packages/core/src/makerSelectorEstimator.ts:193.
export function makerSelectorSeatQuotes(seat: SeatCandidate, lane: MakerSelectorLane): MakerSelectorQuoteLevel[];
Parameters
seat: SeatCandidate— Not documented. See SeatCandidate for its declaration and available field documentation.lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.
Returns
MakerSelectorQuoteLevel[]
Not documented.
Throws
Not documented.
</details> <details> <summary>makerSelectorSeatSide</summary>makerSelectorSeatSide#
Seat side a lane consumes (§6.1).
Declaration source: packages/core/src/makerSelectorEstimator.ts:153.
export function makerSelectorSeatSide(lane: MakerSelectorLane): MakerSelectorSeatSide;
Parameters
lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.
Returns
MakerSelectorSeatSide
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorSeatSide</summary>MakerSelectorSeatSide#
A seat side in YES price space.
Declaration source: packages/core/src/makerSelectorEstimator.ts:40.
export type MakerSelectorSeatSide = 'bid' | 'ask';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
MakerSelectorSkip#
Not documented.
Declaration source: packages/core/src/makerSelector.ts:93.
export interface MakerSelectorSkip {
readonly seat: string;
readonly reason: MakerSelectorSkipReason;
}
makerSelectorSkipReason#
Why the program would skip this seat, or it cannot fill this order; null if eligible.
Declaration source: packages/core/src/makerSelector.ts:224.
export function makerSelectorSkipReason(seat: SeatCandidate, intent: MakerSelectorIntent, context: MakerSelectorFillContext): Exclude<MakerSelectorSkipReason, "duplicate" | "not_selected"> | null;
Parameters
seat: SeatCandidate— Not documented. See SeatCandidate for its declaration and available field documentation.intent: MakerSelectorIntent— Not documented. See MakerSelectorIntent for its declaration and available field documentation.context: MakerSelectorFillContext— Not documented. See MakerSelectorFillContext for its declaration and available field documentation.
Returns
"settled" | "unbound" | "dormant" | "not_executable" | "stale_at_landing" | "self_trade" | "no_side_capacity" | "beyond_limit" | null
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorSkipReason</summary>MakerSelectorSkipReason#
Not documented.
Declaration source: packages/core/src/makerSelector.ts:81.
export type MakerSelectorSkipReason =
| 'duplicate'
| 'unbound'
| 'settled'
| 'dormant'
| 'not_executable'
| 'stale_at_landing'
| 'self_trade'
| 'no_side_capacity'
| 'beyond_limit'
| 'not_selected';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
makerSelectorStaleAtLanding#
The seat's quote will be older than max_quote_age_seconds when the transaction lands.
Declaration source: packages/core/src/makerSelectorEstimator.ts:223.
export function makerSelectorStaleAtLanding(seat: SeatCandidate, context: MakerSelectorFillContext): boolean;
Parameters
seat: SeatCandidate— Not documented. See SeatCandidate for its declaration and available field documentation.context: MakerSelectorFillContext— Not documented. See MakerSelectorFillContext for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>makerSelectorTakerFee</summary>makerSelectorTakerFee#
§6.5: ceil(notional · k_bps · (10000 − p) / 10000²); zero notional pays zero.
Declaration source: packages/core/src/makerSelectorEstimator.ts:271.
export function makerSelectorTakerFee(notional: bigint, coefficientBps: number, priceBps: number): bigint;
Parameters
notional: bigint— Not documented.coefficientBps: number— Not documented.priceBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSelectorVerdict</summary>MakerSelectorVerdict#
Not documented.
Declaration source: packages/core/src/makerSelector.ts:112.
export type MakerSelectorVerdict = 'better' | 'equal' | 'worse';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
makerSelectorWithinLimit#
The price is inside the taker's limit.
Declaration source: packages/core/src/makerSelectorEstimator.ts:178.
export function makerSelectorWithinLimit(lane: MakerSelectorLane, price: number, limit: number): boolean;
Parameters
lane: MakerSelectorLane— Not documented. See MakerSelectorLane for its declaration and available field documentation.price: number— Not documented.limit: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>MakerSeriesAccount</summary>MakerSeriesAccount#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:858.
export type MakerSeriesAccount = ReturnType<typeof decodeMakerSeriesAccount>;
MakerSeriesIdentity#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:440.
export interface MakerSeriesIdentity {
readonly feedId: Uint8Array;
readonly durationSeconds: bigint;
readonly currencyRecord: Address;
readonly maker: Address;
}
MakerSurface#
Maker surface of a stream. single_spline is gone after phase 6.
Declaration source: packages/core/src/execution/capability.ts:36.
export type MakerSurface = (typeof MAKER_SURFACE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
makeSlotAnchoredSequence#
Encode a slot and per-slot counter without truncation or wrapping.
Declaration source: packages/core/src/splineFreshness.ts:9.
export function makeSlotAnchoredSequence(anchorSlot: bigint, counter: number): bigint;
Parameters
anchorSlot: bigint— Not documented.counter: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>MalformedApiResponseError</summary>MalformedApiResponseError#
Not documented.
Declaration source: packages/core/src/resilientData.ts:139.
export declare class MalformedApiResponseError extends Error {
constructor(message: string | undefined);
constructor(message: string | undefined, options: ErrorOptions | undefined);
readonly name: "MalformedApiResponseError";
}
Parameters
message: string | undefined— Not documented.message: string | undefined— Not documented.options: ErrorOptions | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>MANAGED_RECLAIM_GRACE_SLOTS</summary>MANAGED_RECLAIM_GRACE_SLOTS#
Not documented.
Declaration source: packages/core/src/managedReclaimRecovery.ts:22.
export declare const MANAGED_RECLAIM_GRACE_SLOTS: 150n;
ManagedQuoteEntry#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:60.
export interface ManagedQuoteEntry {
readonly lane: ManagedQuoteLane;
readonly priceBps: number;
readonly quantity: bigint;
}
ManagedQuoteLane#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:59.
export type ManagedQuoteLane = 1 | 2 | 3 | 4;
Field documentation
toString— Returns a string representation of an object.toFixed— Returns a string representing a number in fixed-point notation.toExponential— Returns a string containing a number represented in exponential notation.toPrecision— Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.valueOf— Returns the primitive value of the specified object.toLocaleString— Converts a number to a string by using the current or specified locale.
ManagedQuoteReplacementRecord#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:507.
export interface ManagedQuoteReplacementRecord {
readonly orderId: bigint;
readonly action: 'kept' | 'inserted' | 'removed';
readonly credited: bigint;
readonly originalQuantity: bigint;
readonly placedAtUnix: bigint;
readonly expiresAtUnix: bigint;
}
ManagedQuoteReplacementResult#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:516.
export interface ManagedQuoteReplacementResult {
readonly sequence: bigint;
readonly owner: Address;
readonly validUntilSlot: bigint;
readonly records: readonly ManagedQuoteReplacementRecord[];
}
ManagedRecoveryBook#
Not documented.
Declaration source: packages/core/src/managedReclaimRecovery.ts:125.
export interface ManagedRecoveryBook {
readonly orderbook: OrderbookAccount;
readonly slot: bigint;
readonly unixTimestamp: bigint;
/** Resolve stopped strategies from the same authenticated ledger snapshot, when available. */
readonly strategyStopped?: (order: Order) => boolean;
}
Field documentation
strategyStopped— Resolve stopped strategies from the same authenticated ledger snapshot, when available.
ManagedRecoveryTaker#
Not documented.
Declaration source: packages/core/src/managedReclaimRecovery.ts:133.
export interface ManagedRecoveryTaker {
readonly market: Address;
readonly caller: Address;
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly priceBps: number;
}
mapStateToStatus#
Not documented.
Declaration source: packages/core/src/api/markets.ts:148.
export function mapStateToStatus(state: Market["state"]): Market["status"];
Parameters
state: "resolved" | "pending" | "created" | "trading" | "settling" | "closed"— Not documented.
Returns
"resolved" | "pending" | "settling" | "active" | "settled"
Not documented.
Throws
Not documented.
</details> <details> <summary>mapStateToString</summary>mapStateToString#
Map numeric market state to string representation.
State values mirror the on-chain MarketState enum (see types.ts): 0 = Pending - Market PDA created but not yet funded / initialized 1 = Created - Market funded and awaiting trading window 2 = Trading - Active trading window open 3 = Settling - Trading ended, awaiting oracle resolution 4 = Resolved - Outcome determined, payouts available 5 = Closed - All positions settled, market finalized
Declaration source: packages/core/src/api/markets.ts:113.
export function mapStateToString(state: number): Market["state"];
Parameters
state: number— Not documented.
Returns
"resolved" | "pending" | "created" | "trading" | "settling" | "closed"
Not documented.
Throws
Not documented.
</details> <details> <summary>Market</summary>Market#
Not documented.
Declaration source: packages/core/src/api/types.ts:70.
export interface Market {
id: string;
address: string;
canonicalMarketKey?: string;
marketId: bigint;
/** Unknown on older indexers; never infer a default settlement asset. */
settlementMint?: string | null;
pair: string;
pythFeedId: string;
marketName?: string | null;
marketSlug?: string | null;
state: 'pending' | 'created' | 'trading' | 'settling' | 'resolved' | 'closed';
outcome?: 'up' | 'down' | 'expired';
yesPrice: number;
noPrice: number;
tStart: Date;
tEnd: Date;
/**
* Traded volume in base units of `settlementMint`. Format it with that
* currency's decimals; there is no pre-scaled display number.
*/
totalVolume: bigint;
status: 'active' | 'pending' | 'resolved' | 'settling' | 'settled';
timeRemaining: string;
}
Field documentation
settlementMint— Unknown on older indexers; never infer a default settlement asset.totalVolume— Traded volume in base units ofsettlementMint. Format it with that currency's decimals; there is no pre-scaled display number.
MARKET_ACCOUNT_DISCRIMINATOR#
MarketAccount discriminator: sha256("account:MarketAccount")[..8].
Declaration source: packages/core/src/constants.ts:202.
export declare const MARKET_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
MARKET_ACCOUNT_LAYOUT_VERSION#
D0{id} Explicit layout generation written to newly-created markets.
Declaration source: packages/core/src/constants.ts:283.
export declare const MARKET_ACCOUNT_LAYOUT_VERSION: 2;
MARKET_ACCOUNT_SIZE#
D0{byte} MarketAccount size.
Declaration source: packages/core/src/constants.ts:270.
export declare const MARKET_ACCOUNT_SIZE: 536;
MARKET_EXPIRY_WINDOW#
D0{s} Market expiry window (7 days).
Declaration source: packages/core/src/constants.ts:71.
export declare const MARKET_EXPIRY_WINDOW: 604800n;
MARKET_EXPIRY_WINDOW_SECONDS#
MARKET_EXPIRY_WINDOW — program/src/constants.rs:146.
The default terminal-expiration window applied when
config.market_expiration_window_seconds is 0
(logic/expire_market/mod.rs:22-29).
Declaration source: packages/core/src/preflight/lifecycle.ts:68.
export declare const MARKET_EXPIRY_WINDOW_SECONDS: 604800;
MARKET_META_ACCOUNT_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/constants.ts:236.
export declare const MARKET_META_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
MARKET_META_ACCOUNT_SIZE#
Not documented.
Declaration source: packages/core/src/constants.ts:271.
export declare const MARKET_META_ACCOUNT_SIZE: 448;
MARKET_ORDER_SLOTS#
D0{count} Resting-order slots across both arenas (MARKET_ORDER_SLOTS).
Declaration source: packages/core/src/constants.ts:340.
export declare const MARKET_ORDER_SLOTS: number;
MARKET_SEATS#
D0{count} Trader seats in every market's trader ledger (MARKET_SEATS).
Declaration source: packages/core/src/constants.ts:334.
export declare const MARKET_SEATS: 8193;
MARKET_SPLINE_FEATURE_BIT#
D0{1} Market feature bit indicating that the canonical creator spline is attached.
Declaration source: packages/core/src/constants.ts:299.
export declare const MARKET_SPLINE_FEATURE_BIT: number;
MARKET_TICK_MAX_SPAN#
Maximum window span admitted by the program's Market Tick validator.
Declaration source: packages/core/src/marketTick.ts:9.
export declare const MARKET_TICK_MAX_SPAN: 64n;
MARKET_TICK_PROGRAM_ADDRESS#
Not documented.
Declaration source: packages/core/src/marketTick.ts:5.
export declare const MARKET_TICK_PROGRAM_ADDRESS: Address<"tickUcsEQegChaAuo9VYQQztB4ZGApY6ZT4FkULWY6N">;
MARKET_TICK_V1_ADDRESS#
Not documented.
Declaration source: packages/core/src/marketTick.ts:6.
export declare const MARKET_TICK_V1_ADDRESS: Address<"4cG31VNF9TzFinNc7BmnjhFvGjxkY3sCETVMtMgbrhPs">;
MARKET_TICK_V1_SIZE#
Not documented.
Declaration source: packages/core/src/marketTick.ts:7.
export declare const MARKET_TICK_V1_SIZE: 88;
MarketAccount#
MarketAccount - Per-market state with an explicit preparation identity and stored lifecycle times. Size: 536 bytes (version 1). PDA: native markets use the Pyth seed tuple; external markets use platform/question identity.
Declaration source: packages/core/src/types.ts:287.
export interface MarketAccount {
readonly discriminator: Uint8Array;
/** Positive preparation timestamp identity; it does not encode the market window. */
readonly marketId: bigint;
readonly settlementMint: Address;
readonly tStart: bigint;
readonly tEnd: bigint;
readonly createdAt: bigint;
readonly resolvedAt: bigint;
readonly startPrice: bigint;
readonly startPriceConf: bigint;
readonly startPriceTimestamp: bigint;
readonly endPrice: bigint;
readonly endPriceConf: bigint;
readonly endPriceTimestamp: bigint;
readonly startPriceExpo: number;
readonly endPriceExpo: number;
readonly totalYesShares: bigint;
readonly totalNoShares: bigint;
/**
* FROZEN post-F-020. This is the opaque value retained at account offset
* 152; use the vault SPL token account balance as the authoritative
* collateral source.
*/
readonly frozenTotalCollateral: bigint;
readonly totalVolume: bigint;
readonly totalTrades: number;
readonly totalPositions: number;
readonly settledPositions: number;
readonly maxConfidenceRatioBps: number;
readonly outcome: number;
readonly bump: number;
readonly orderbookBump: number;
readonly vaultBump: number;
readonly pythFeedId: Uint8Array; // 32 bytes, offset 188
/** Source-neutral alias for the 32-byte identity at the same offset. */
readonly feedIdentity: Uint8Array;
readonly yesMint: Address; // offset 220
readonly noMint: Address; // offset 252
readonly creator: Address; // offset 284
readonly yesMintBump: number; // offset 316
readonly noMintBump: number; // offset 317
readonly creatorFeeBps: number; // offset 318
readonly protocolFeeBps: number; // offset 320
readonly expired: number; // offset 322
readonly durationSeconds: bigint; // offset 324
readonly accumulatedCreatorFees: bigint; // offset 332
readonly yesEscrowBump: number; // offset 340
readonly noEscrowBump: number; // offset 341
readonly emergencyStatus: number; // offset 342
readonly eventSequence: bigint; // offset 343
readonly maxTotalShares: bigint; // offset 351
readonly maxOracleJumpBps: number; // offset 359
readonly forceCancelEnabledSlot: bigint; // offset 367
readonly lastMicrostructureUpdateAt: bigint; // offset 375
readonly accumulatedReferralFees: bigint; // offset 383
readonly marketLayoutVersion: number; // offset 391
/** Settlement currency standard: 0 = classic Tokenkeg, 1 = Token-2022. */
readonly settlementTokenStandard: number; // offset 497
readonly marketFeatureSetBits: number; // offset 392
readonly makerRebatesPaid: bigint; // offset 404
readonly splineCommittedCollateral: bigint; // offset 412
readonly activeSeatCount?: number; // offset 392
readonly attachedSeatCount?: number; // offset 397
readonly makerQuoteStateCount?: number; // offset 459
readonly marketKind: number; // offset 420
readonly resolverAuthority: Address; // offset 421
readonly legCount: number; // offset 453
readonly halted: boolean; // offset 454
readonly tradingGeneration?: number; // offset 455; stale standing liquidity remains reclaimable
readonly externalQuestionHash: Uint8Array; // offset 464, 32 bytes
readonly externalPlatformId: number; // offset 496
readonly quoteFreeLiability: bigint; // offset 504
readonly quoteLockedLiability: bigint; // offset 512
readonly economicYesClaims: bigint; // offset 520
readonly economicNoClaims: bigint; // offset 528
}
Field documentation
marketId— Positive preparation timestamp identity; it does not encode the market window.frozenTotalCollateral— FROZEN post-F-020. This is the opaque value retained at account offset 152; use the vault SPL token account balance as the authoritative collateral source.feedIdentity— Source-neutral alias for the 32-byte identity at the same offset.settlementTokenStandard— Settlement currency standard: 0 = classic Tokenkeg, 1 = Token-2022.
MarketDepth#
Per-side band depth in share atoms; rank is the thinner side.
Declaration source: packages/core/src/marketDiscovery.ts:122.
export interface MarketDepth {
/** Taker sells YES or buys NO: YES bids, NO asks, curve bid capacity. */
readonly bid: bigint;
/** Taker buys YES or sells NO: YES asks, NO bids, curve ask capacity. */
readonly ask: bigint;
readonly rank: bigint;
}
Field documentation
bid— Taker sells YES or buys NO: YES bids, NO asks, curve bid capacity.ask— Taker buys YES or sells NO: YES asks, NO bids, curve ask capacity.
MarketDetail#
Not documented.
Declaration source: packages/core/src/api/types.ts:101.
export interface MarketDetail extends Omit<Market, 'status' | 'timeRemaining'> {
totalTrades: number;
startPrice?: number;
endPrice?: number;
orderbook: {
bids: SimplifiedOrderbookLevel[];
asks: SimplifiedOrderbookLevel[];
midPrice: number;
spread: number;
};
}
Field documentation
settlementMint— Unknown on older indexers; never infer a default settlement asset.totalVolume— Traded volume in base units ofsettlementMint. Format it with that currency's decimals; there is no pre-scaled display number.
MarketDiscoveryResult#
Not documented.
Declaration source: packages/core/src/api/markets.ts:576.
export interface MarketDiscoveryResult {
readonly kind?: DiscoveryMarketKind;
readonly eligible: boolean;
readonly exclusions: readonly DiscoveryExclusion[];
readonly notes: readonly DiscoveryNote[];
/** Share atoms of the market's own mint; `rank` null = unknown. */
readonly depth: { readonly bid: bigint; readonly ask: bigint; readonly rank: bigint | null };
readonly protectedDepth: { readonly bid: bigint; readonly ask: bigint; readonly rank: bigint };
readonly maxLaneSpreadBps: number | null;
readonly currencyRecord: string;
readonly seriesKey: string | null;
readonly duplicateKey: string | null;
readonly duplicateCount: number;
}
Field documentation
depth— Share atoms of the market's own mint;ranknull = unknown.
marketDiscoveryWireSchema#
The discovery object of a discovery row.
Declaration source: packages/core/src/api/markets.ts:531.
export declare const marketDiscoveryWireSchema: z.ZodObject<{ kind: z.ZodOptional<z.ZodEnum<{ native: "native"; mirror: "mirror"; }>>; eligible: z.ZodBoolean; exclusions: z.ZodArray<z.ZodEnum<{ halted: "halted"; "not-trading": "not-trading"; "market-not-started": "market-not-started"; "market-ended": "market-ended"; "no-liquidity": "no-liquidity"; "liquidity-state-unavailable": "liquidity-state-unavailable"; "missing-lane-quotes": "missing-lane-quotes"; "crossed-lane-quotes": "crossed-lane-quotes"; "spread-too-wide": "spread-too-wide"; "band-depth-below-floor": "band-depth-below-floor"; }>>; notes: z.ZodArray<z.ZodEnum<{ "lanes-cross-reflected": "lanes-cross-reflected"; "source-feed-not-applicable": "source-feed-not-applicable"; "feed-unobserved": "feed-unobserved"; "feed-mismatch": "feed-mismatch"; "feed-stale": "feed-stale"; "feed-future": "feed-future"; }>>; depth: z.ZodObject<{ bid: z.ZodString; ask: z.ZodString; rank: z.ZodNullable<z.ZodString>; }, z.core.$strict>; protectedDepth: z.ZodObject<{ bid: z.ZodString; ask: z.ZodString; rank: z.ZodString; }, z.core.$strict>; maxLaneSpreadBps: z.ZodNullable<z.ZodNumber>; currencyRecord: z.ZodString; seriesKey: z.ZodNullable<z.ZodString>; duplicateKey: z.ZodNullable<z.ZodString>; duplicateCount: z.ZodNumber; }, z.core.$strict>;
MarketEmergencyStatus#
D0{id} Stored MarketAccount.emergency_status values. Unknown values fail closed.
Declaration source: packages/core/src/constants.ts:370.
export declare const MarketEmergencyStatus: { readonly None: 0; readonly PostOnly: 1; readonly Paused: 2; readonly ForceCancelOnly: 3; };
MarketIdentityMarket#
Not documented.
Declaration source: packages/core/src/marketIdentity.ts:5.
export interface MarketIdentityMarket {
readonly pythFeedId: Uint8Array;
readonly durationSeconds: bigint;
readonly tStart: bigint;
readonly tEnd?: bigint;
readonly marketId: bigint;
readonly creator: string | Uint8Array;
/** The settlement mint: a market PDA seed (through its currency record). */
readonly settlementMint: string | Uint8Array;
/** `MarketAccount.market_kind` (offset 420): 0 = native Pyth Pull. */
readonly marketKind: number;
}
Field documentation
settlementMint— The settlement mint: a market PDA seed (through its currency record).marketKind—MarketAccount.market_kind(offset 420): 0 = native Pyth Pull.
MarketIdentityOptions#
Not documented.
Declaration source: packages/core/src/marketIdentity.ts:18.
export interface MarketIdentityOptions {
/** Feed id keys may be `0x`-prefixed or bare lowercase hexadecimal. */
readonly symbols?: ReadonlyMap<string, string> | Record<string, string>;
/** Settlement-mint → symbol override; defaults to the reviewed `currencySymbols`. */
readonly currencySymbols?: Readonly<Record<string, string>>;
}
Field documentation
symbols— Feed id keys may be0x-prefixed or bare lowercase hexadecimal.currencySymbols— Settlement-mint → symbol override; defaults to the reviewedcurrencySymbols.
marketIdToSeed#
Convert a bigint market ID to little-endian Uint8Array(8) seed bytes.
Delegates to u64ToSeed.
Declaration source: packages/core/src/pda.ts:71.
export function marketIdToSeed(marketId: bigint): Uint8Array;
Parameters
marketId: bigint— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>MarketInfo</summary>MarketInfo#
Market summary for UI display (combines market + orderbook + position data).
Declaration source: packages/core/src/types.ts:712.
export interface MarketInfo {
readonly marketId: bigint;
readonly state: MarketState;
readonly outcome: Outcome;
readonly tStart: Date;
readonly tEnd: Date;
readonly timeRemaining: number;
readonly progress: number;
readonly bestBid: number | null;
readonly bestAsk: number | null;
readonly spread: number | null;
readonly midPrice: number | null;
}
MarketLiquidity#
What a liquidity source yields for one market at one snapshot.
Declaration source: packages/core/src/marketDiscovery.ts:79.
export interface MarketLiquidity {
/** False when the snapshot lacks provider state the market needs. */
readonly complete: boolean;
readonly yes: LaneLevels;
readonly no: LaneLevels;
/** Ordinary curves executable at the snapshot slot. */
readonly curves: readonly CurveLiquidity[];
/** Protected curves executable under their slot or tick constraints at the snapshot slot. */
readonly slotBoundCurves: readonly CurveLiquidity[];
/** Seats share capacity between complementary YES and NO taker directions. */
readonly reflectedCurves?: boolean;
}
Field documentation
complete— False when the snapshot lacks provider state the market needs.curves— Ordinary curves executable at the snapshot slot.slotBoundCurves— Protected curves executable under their slot or tick constraints at the snapshot slot.reflectedCurves— Seats share capacity between complementary YES and NO taker directions.
MarketMakerSelection#
Not documented.
Declaration source: packages/core/src/selectMarketMakers.ts:33.
export interface MarketMakerSelection extends MakerSelectorComparison {
readonly market: Address;
readonly slot: bigint;
readonly landingSlot: bigint;
readonly feeEpoch: number;
}
Field documentation
verdict— The selector's result against the baseline's: budget, filled, net value, seat count.
MarketMakerSelectionOptions#
Not documented.
Declaration source: packages/core/src/selectMarketMakers.ts:28.
export interface MarketMakerSelectionOptions extends SplineLiquidityReadOptions {
readonly budget: MakerSelectorBudget;
readonly matchLimit?: number;
}
Field documentation
landingDelaySlots— Estimated slots and seconds from the observed Clock to transaction landing.
MarketMetaAccount#
Not documented.
Declaration source: packages/core/src/types.ts:365.
export interface MarketMetaAccount {
readonly discriminator: Uint8Array;
readonly bump: number;
readonly market: Address;
readonly platformId: number;
readonly templateVersion: number;
readonly resolutionProvenance: number;
readonly externalRef: Uint8Array;
readonly questionHash: Uint8Array;
readonly haltedAt: bigint;
readonly closeTs: bigint;
readonly openedAt: bigint;
readonly legCount: number;
readonly payoutEncoding: 0 | 1;
readonly payoutPartition: 0 | 1;
readonly payoutOrigin: 0 | 1 | 2 | 3;
readonly payoutSourceResult: 0 | 1 | 2 | 3;
readonly payoutNumeratorYes: bigint;
readonly payoutNumeratorNo: bigint;
readonly payoutDenominator: bigint;
/** Stored canonical fact commitment; decoding does not authenticate its source. */
readonly terminalFactHash: Uint8Array;
readonly resolved: boolean;
/** Immutable lamport bounty paid per distinct external lifecycle progress step. */
readonly externalProgressRewardLamports: bigint;
/** Remaining, separately accounted progress reserve. */
readonly externalProgressReserveLamports: bigint;
readonly eventRefHash: Uint8Array;
readonly eventLegIndex: number;
readonly eventLegCount: number;
/** One bit per processed external lifecycle progress step. */
readonly externalProgressPaidMask: number;
/** Claim identifier that produced the first external directional resolution. */
readonly externalResolutionClaimId: Uint8Array;
}
Field documentation
terminalFactHash— Stored canonical fact commitment; decoding does not authenticate its source.externalProgressRewardLamports— Immutable lamport bounty paid per distinct external lifecycle progress step.externalProgressReserveLamports— Remaining, separately accounted progress reserve.externalProgressPaidMask— One bit per processed external lifecycle progress step.externalResolutionClaimId— Claim identifier that produced the first external directional resolution.
MarketRouteInputs#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:120.
export interface MarketRouteInputs {
/** Slot of the fee configuration and owner balances supplied for the quote. */
readonly slot: bigint;
readonly takerFeeCoefficientBps: number;
readonly tickSizeBps?: number;
/** Candidate seat accounts. A cap-bound route can omit them; an empty list is book-only. */
readonly selectedSeats: readonly Address[];
}
Field documentation
slot— Slot of the fee configuration and owner balances supplied for the quote.selectedSeats— Candidate seat accounts. A cap-bound route can omit them; an empty list is book-only.
MarketRouteQuote#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:614.
export interface MarketRouteQuote extends RouteQuote {
readonly market: Address;
readonly yesMint: Address;
readonly noMint: Address;
readonly settlementMint: Address;
readonly slot: bigint;
readonly landingSlot: bigint;
}
Field documentation
best— The cheapest admissible plan, ornull.candidates— Every admissible plan, best first.
MarketRouteQuoteRequest#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:490.
export type MarketRouteQuoteRequest = Omit<
RouteRequest,
| 'balances'
| 'ledgerSeatIndex'
| 'missingWalletTokenAccounts'
| 'tokenAccountRentLamports'
| 'strategyScope'
> & { readonly strategy?: MarketRouteStrategyRequest };
Field documentation
delegate— Acting as a phase 5 strategy delegate (free funds only).matchLimit— Per-legmatch_limit,1..=12. Default 12.priceToleranceBps— Worst-price tolerance per leg, in bps of price. Default 0.quoteToleranceBps— Quote-bound tolerance per leg, in bps of the leg's net quote. Default 0.strategyMaxFeeBps— Phase 5 strategymax_fee_bps, when the path runs under a strategy.splitSteps— Split grid: candidatesd = q · i / splitSteps. Default 4;1disables splits.
MarketRouteReadOptions#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:437.
export interface MarketRouteReadOptions extends SplineLiquidityReadOptions {
readonly selectedSeats: readonly Address[] | 'auto';
/** Rent estimates for all missing wallet accounts required by the final assertion. */
readonly ataRentLamports?: { readonly classic: bigint; readonly token2022: bigint };
}
Field documentation
ataRentLamports— Rent estimates for all missing wallet accounts required by the final assertion.landingDelaySlots— Estimated slots and seconds from the observed Clock to transaction landing.
MarketRouteStrategyRequest#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:226.
export interface MarketRouteStrategyRequest {
/** The strategy belongs to the quote's taker (the ledger owner). */
readonly strategyId: number;
readonly groupId: number;
/** Signing wallet. Pass the taker for an owner-signed scoped route. */
readonly signer: Address;
}
Field documentation
strategyId— The strategy belongs to the quote's taker (the ledger owner).signer— Signing wallet. Pass the taker for an owner-signed scoped route.
MarketRouteWallet#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:216.
export interface MarketRouteWallet {
readonly yesAta: Address;
readonly noAta: Address;
readonly quoteAta: Address;
readonly settlementTokenProgram: Address;
readonly missing: { readonly yes: boolean; readonly no: boolean; readonly quote: boolean };
}
MarketSearch#
Not documented.
Declaration source: packages/core/src/marketSearch.ts:5.
export interface MarketSearch {
readonly pair: string;
/** The exact feed encodings accepted by the indexer. */
readonly feedIds: readonly string[];
readonly durationSeconds: number | null;
}
Field documentation
feedIds— The exact feed encodings accepted by the indexer.
marketSettlementTokenProgram#
The quote token program of a decoded market; see {@link settlementTokenProgramForStandard}.
Declaration source: packages/core/src/currencyAccounts.ts:115.
export function marketSettlementTokenProgram(market: { readonly settlementTokenStandard: number; }): Address;
Parameters
market: { readonly settlementTokenStandard: number; }— Not documented.
Returns
Address
Not documented.
Throws
Not documented.
</details> <details> <summary>MarketSlippageOrderInput</summary>MarketSlippageOrderInput#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:87.
export interface MarketSlippageOrderInput {
outcome: OutcomeAsset;
intent: TradeIntent;
referencePriceBps: number;
slippageBps: number;
quantity: bigint;
minFillQuantity?: bigint;
matchLimit?: number;
selfTradeBehavior?: number;
}
marketSlug#
Stable URL text; lifecycle state and outcome are intentionally excluded.
A slug is display, never an identity: its creator and mint discriminators are four base58 characters each, which anyone can grind. Routes resolve market addresses only.
Declaration source: packages/core/src/marketIdentity.ts:126.
export function marketSlug(market: Pick<MarketIdentityMarket, "pythFeedId" | "durationSeconds" | "marketId" | "tStart" | "creator" | "settlementMint">): string;
Parameters
market: Pick<MarketIdentityMarket, "creator" | "marketId" | "settlementMint" | "durationSeconds" | "pythFeedId" | "tStart">— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>MarketSnapshot</summary>MarketSnapshot#
Per-market state relevant to placing an order.
Source of truth: MarketAccount (program/src/state/market.rs) plus the
orderbook header counters/capacity.
Every OPTIONAL field below encodes UNKNOWN when omitted. In preview mode an unknown input makes its gate a no-op; in {@link PreflightOptions.strict} mode it denies with {@link UNKNOWN_STATE}. Omit rather than substitute: a substituted "safe" value is indistinguishable from a real read and is exactly how a client verdict ends up looser than the program at the signing step.
Declaration source: packages/core/src/preflight/types.ts:138.
export interface MarketSnapshot {
/** Derived lifecycle state. Only `Trading` accepts new orders. */
state: MarketState;
/** `market.t_start` — unix seconds; placement before this is rejected. */
tStart: number;
/** `market.t_end` — unix seconds; placement at or after this is rejected. */
tEnd: number;
/**
* `market.emergency_status` raw byte. `0 = None`, `1 = PostOnly`,
* `2 = Paused`, `3 = ForceCancelOnly`. Any other value fails closed to
* `ForceCancelOnly`, mirroring `MarketAccount::emergency_status()`.
*
* Omitted means UNKNOWN (preview reads it as `None`).
*/
emergencyStatus?: number;
/**
* Per-market tick size, for display/parity checks only. The program applies
* `config.tick_size_bps`; this field is NOT consulted by the verdict.
*/
tickSizeBps?: number;
/**
* `market.halted` — set by an external resolver; blocks new placement.
* Omitted means UNKNOWN (preview reads it as not halted).
*/
halted?: boolean;
/**
* Live canonical bid ORDER count on the orderbook — every open order on the
* side, not the served level page. Omitted means UNKNOWN; preview falls back
* to the book's level count, which is a lower bound and therefore cannot make
* the capacity gate fire.
*/
bidCount?: number;
/** Live canonical ask order count. Omitted means UNKNOWN — see `bidCount`. */
askCount?: number;
/**
* Canonical bid slot capacity (`DeepOrderbook` tier). Omitted means UNKNOWN,
* which makes the `OrderbookFull` gate a no-op in preview. Do NOT substitute
* `Infinity` or `Number.MAX_SAFE_INTEGER`: both are recognised as unknown by
* strict mode, but omitting says so honestly.
*/
bidCapacity?: number;
/** Canonical ask slot capacity. Omitted means UNKNOWN — see `bidCapacity`. */
askCapacity?: number;
// --- Maker spline (residual L-5) -----------------------------------------
/**
* `MarketAccount::spline_feature_enabled()` —
* `market_feature_set_bits & MARKET_SPLINE_FEATURE_BIT`.
*
* This decides whether PlaceOrder consults a spline at all. With the bit
* CLEAR the program passes an all-`None` snapshot array
* (`empty_place_order_spline_inputs`, `place_order/trailing_layout.rs:104`)
* and the spline arm of `would_post_only_cross` can never fire. With it SET
* the instruction REQUIRES the canonical creator-owned spline account in the
* trailing tail, so a client that has not read the bit cannot know whether
* the PostOnly gate has a second arm.
*
* Omitted means UNKNOWN: preview leaves the spline arm inert, strict denies.
*/
splineFeatureEnabled?: boolean;
/**
* The market's canonical creator-owned maker spline, as PlaceOrder sees it.
*
* Only read when {@link splineFeatureEnabled} is `true`; omitted means
* UNKNOWN, which leaves the spline arm inert in preview and denies in strict
* mode. Supply it from `decodeSplineAccount` on the PDA at
* `["seesaw", "spline", feed_id, duration_seconds, creator]`.
*/
splineQuote?: SplineQuoteSnapshot;
// --- Funding-instruction fields (task B4) --------------------------------
//
// These are OPTIONAL so existing PlaceOrder callers keep compiling. Every
// funding verdict follows one uniform rule for them: `undefined` means
// UNKNOWN. In PREVIEW mode an unknown input never produces a denial on its
// own check; in `strict` mode it denies with UNKNOWN_STATE, because a
// signing step that cannot read a gate's input must not sign through it.
/**
* `market.outcome` raw byte — `0 = None`, `1 = Up`, `2 = Down`,
* `3 = Expired`. Anything else is an unrecognised byte and fails closed.
*
* `WithdrawFunds` callers SHOULD always supply this: a native `Expired`
* market (`outcome == 3`) is the one terminal state that still permits a
* free-quote withdrawal (`withdraw_funds.rs:105`), and that path is
* unreachable from `state` alone because `compute_state()` reports any
* resolved market as `Resolved`/`Closed` (`market.rs:1108-1136`).
*
* Defaults to `0` (None) when omitted.
*/
outcome?: number;
/**
* `market.is_native_pyth()`. Native price markets stay clock-bound even
* though `compute_state()` is time-agnostic, so the `start_price`/`t_start`/
* `t_end` gates apply to them in paths where external markets skip them.
*
* Defaults to `true` (the native path, which is the stricter of the two).
*/
isNativePyth?: boolean;
/**
* `market.start_price != 0` — the opening oracle snapshot has been captured.
* Native-only; external markets leave `start_price` at zero forever.
*
* Only an explicit `false` denies. Omitted means unknown.
*/
startPriceCaptured?: boolean;
// --- Order-management fields (task B5) -----------------------------------
/**
* `market.resolved_at` — unix seconds the terminal outcome was written.
* `0` means "not resolved yet" on chain.
*
* `ReclaimExpiredOrder` needs this for the terminal-forfeit branch, which
* opens at `resolved_at + CLOSE_TIMEOUT_SECONDS` and bypasses the per-order
* TTL entirely (`logic/reclaim_expired/mod.rs:178-184`).
*
* Omitted means unknown, which keeps the terminal-forfeit branch closed.
*/
resolvedAt?: number;
}
Field documentation
state— Derived lifecycle state. OnlyTradingaccepts new orders.tStart—market.t_start— unix seconds; placement before this is rejected.tEnd—market.t_end— unix seconds; placement at or after this is rejected.emergencyStatus—market.emergency_statusraw byte.0 = None,1 = PostOnly,2 = Paused,3 = ForceCancelOnly. Any other value fails closed toForceCancelOnly, mirroringMarketAccount::emergency_status().
Omitted means UNKNOWN (preview reads it as None).
tickSizeBps— Per-market tick size, for display/parity checks only. The program appliesconfig.tick_size_bps; this field is NOT consulted by the verdict.halted—market.halted— set by an external resolver; blocks new placement. Omitted means UNKNOWN (preview reads it as not halted).bidCount— Live canonical bid ORDER count on the orderbook — every open order on the side, not the served level page. Omitted means UNKNOWN; preview falls back to the book's level count, which is a lower bound and therefore cannot make the capacity gate fire.askCount— Live canonical ask order count. Omitted means UNKNOWN — seebidCount.bidCapacity— Canonical bid slot capacity (DeepOrderbooktier). Omitted means UNKNOWN, which makes theOrderbookFullgate a no-op in preview. Do NOT substituteInfinityorNumber.MAX_SAFE_INTEGER: both are recognised as unknown by strict mode, but omitting says so honestly.askCapacity— Canonical ask slot capacity. Omitted means UNKNOWN — seebidCapacity.splineFeatureEnabled—MarketAccount::spline_feature_enabled()—market_feature_set_bits & MARKET_SPLINE_FEATURE_BIT.
This decides whether PlaceOrder consults a spline at all. With the bit
CLEAR the program passes an all-None snapshot array
(empty_place_order_spline_inputs, place_order/trailing_layout.rs:104)
and the spline arm of would_post_only_cross can never fire. With it SET
the instruction REQUIRES the canonical creator-owned spline account in the
trailing tail, so a client that has not read the bit cannot know whether
the PostOnly gate has a second arm.
Omitted means UNKNOWN: preview leaves the spline arm inert, strict denies.
splineQuote— The market's canonical creator-owned maker spline, as PlaceOrder sees it.
Only read when {@link splineFeatureEnabled} is true; omitted means
UNKNOWN, which leaves the spline arm inert in preview and denies in strict
mode. Supply it from decodeSplineAccount on the PDA at
["seesaw", "spline", feed_id, duration_seconds, creator].
outcome—market.outcomeraw byte —0 = None,1 = Up,2 = Down,3 = Expired. Anything else is an unrecognised byte and fails closed.
WithdrawFunds callers SHOULD always supply this: a native Expired
market (outcome == 3) is the one terminal state that still permits a
free-quote withdrawal (withdraw_funds.rs:105), and that path is
unreachable from state alone because compute_state() reports any
resolved market as Resolved/Closed (market.rs:1108-1136).
Defaults to 0 (None) when omitted.
isNativePyth—market.is_native_pyth(). Native price markets stay clock-bound even thoughcompute_state()is time-agnostic, so thestart_price/t_start/t_endgates apply to them in paths where external markets skip them.
Defaults to true (the native path, which is the stricter of the two).
startPriceCaptured—market.start_price != 0— the opening oracle snapshot has been captured. Native-only; external markets leavestart_priceat zero forever.
Only an explicit false denies. Omitted means unknown.
resolvedAt—market.resolved_at— unix seconds the terminal outcome was written.0means "not resolved yet" on chain.
ReclaimExpiredOrder needs this for the terminal-forfeit branch, which
opens at resolved_at + CLOSE_TIMEOUT_SECONDS and bypasses the per-order
TTL entirely (logic/reclaim_expired/mod.rs:178-184).
Omitted means unknown, which keeps the terminal-forfeit branch closed.
</details> <details> <summary>MarketState</summary>MarketState#
Market lifecycle state. Mirrors MarketState in market.rs.
Declaration source: packages/core/src/types.ts:38.
export enum MarketState {
Pending = 0,
Created = 1,
Trading = 2,
Settling = 3,
Resolved = 4,
Closed = 5,
}
MarketTickV1#
Raw upstream clock fields; decoding alone does not establish trust or freshness.
Declaration source: packages/core/src/marketTick.ts:14.
export interface MarketTickV1 {
readonly signer: Address;
readonly slot: bigint;
readonly firstTimestampNs: bigint;
readonly timestampNs: bigint;
readonly sequence: bigint;
readonly targetIntervalNs: bigint;
readonly observedIntervalNs: bigint;
}
MarketTickV1Account#
Read-only account evidence supplied by the caller's RPC or transaction context.
Declaration source: packages/core/src/marketTick.ts:94.
export interface MarketTickV1Account {
readonly address: Address;
readonly owner: Address;
readonly data: Uint8Array;
readonly isWritable: boolean;
}
MarketTickWindow#
Clock window fixed by the signer before publication, inclusive at both ends.
Declaration source: packages/core/src/marketTick.ts:25.
export interface MarketTickWindow {
readonly validSlot: bigint;
readonly expectedTickSigner: Address;
readonly expectedFirstTimestampNs: bigint;
readonly validFromTickSequence: bigint;
readonly validUntilTickSequence: bigint;
}
marketTickWindowPermits#
Compare a previously validated tick with its signed window. maxSpan must
match the eventual on-chain program constant; it must not come from the
signed instruction. This helper does not authenticate the tick itself.
Declaration source: packages/core/src/marketTick.ts:42.
export function marketTickWindowPermits(window: MarketTickWindow, tick: MarketTickV1, currentSlot: bigint, maxSpan: bigint): boolean;
Parameters
window: MarketTickWindow— Not documented. See MarketTickWindow for its declaration and available field documentation.tick: MarketTickV1— Not documented. See MarketTickV1 for its declaration and available field documentation.currentSlot: bigint— Not documented.maxSpan: bigint— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>MarketWindow</summary>MarketWindow#
Not documented.
Declaration source: packages/core/src/market.ts:102.
export interface MarketWindow {
readonly start: Date;
readonly end: Date;
}
MarketWindowBoundary#
A tStart/tEnd boundary in any spelling a decoder or the REST API produces.
Declaration source: packages/core/src/market.ts:85.
export type MarketWindowBoundary = bigint | number | string | Date;
Field documentation
toString— Returns a string representation of a string. Returns a string representation of an object. Returns a string representation of a date. The format of the string depends on the locale.valueOf— Returns the primitive value of the specified object. Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.toLocaleString— Returns a date converted to a string using the current locale. Converts a number to a string by using the current or specified locale. Returns a string representation appropriate to the host environment's current locale. Returns a value as a string value appropriate to the host environment's current locale. Converts a date and time to a string by using the current or specified locale.
MarketWindowInput#
The authoritative trading window of a market, in whatever spelling the caller's source produced.
bigint/number: Unix SECONDS, asMarketAccount.tStart/tEndcarry them on-chain.string: either an all-digit Unix-seconds string (REST serialises u64s as decimal strings) or an ISO-8601 datetime.Date: used as-is.
Declaration source: packages/core/src/market.ts:97.
export interface MarketWindowInput {
readonly tStart: MarketWindowBoundary;
readonly tEnd: MarketWindowBoundary;
}
markNotificationRead#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:253.
export function markNotificationRead(client: ApiClient, signer: WalletMessageSigner, notificationId: string, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<void>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.notificationId: string— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>markPositionSettled</summary>markPositionSettled#
Permissionless post-grace settle-and-pay. Derives the position PDA from the (market, positionOwner) pair, the market's trader-ledger PDA, and the market vault PDA.
Audit remediation (H-01 / M-04 / L-04): the on-chain account list grew
from 4 to 8 base accounts — this instruction now pays the abandoned
position's owner from the market vault rather than just flipping the
settled flag. The caller must supply ownerSettlementAta and
settlementMint.
Declaration source: packages/core/src/sdk.ts:2212.
export function markPositionSettled(input: MarkPositionSettledInput, programAddress?: Address): Promise<SdkResult<MarkPositionSettledResult>>;
Parameters
input: MarkPositionSettledInput— Not documented. See MarkPositionSettledInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<MarkPositionSettledResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
MarkPositionSettledAccounts#
Accounts for MarkPositionSettled instruction.
Audit remediation (H-01 / M-04 / L-04): the account list grew from 4 to
8 base accounts. MarkPositionSettled no longer just flips the
settled flag — it now PAYS the position owner the value they are owed
from the market vault, so it needs the vault, the owner's settlement
token account, the settlement mint, and the SPL token program. An
optional 2-account self-CPI recorder tail (selfProgram, logAuthority)
may follow.
On-chain layout (program/src/processor/mark_position_settled.rs):
0: position (W) — UserPositionAccount PDA (settled flag set)
1: market (W) — parent market PDA (settled_positions++)
2: trader_ledger (W) — trader-ledger PDA (slot cleared after payout)
3: caller (S) — permissionless caller
4: vault (W) — market vault PDA (source of the payout)
5: owner_settlement_ata (W) — position owner's settlement-token account (sink)
6: settlement_mint (R) — settlement (stablecoin) mint, for TransferChecked
7: token_program (R) — SPL Token Program
8: market_meta (R) — MarketMeta PDA, external markets ONLY
8/9: self_program (R) — optional self program for recorder CPI dispatch
9/10: log_authority (R) — optional log authority PDA for binary recording
Declaration source: packages/core/src/instructions.ts:3867.
export interface MarkPositionSettledAccounts extends BinaryRecorderTailAccounts {
position: Address;
market: Address;
traderLedger: Address;
caller: Address;
/** Market vault PDA — source of the owner's payout. */
vault: Address;
/** Position owner's settlement-token account — payout sink. */
ownerSettlementAta: Address;
/** Settlement (stablecoin) mint — required for the TransferChecked CPI. */
settlementMint: Address;
/** SPL Token program. */
tokenProgram: Address;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth
* markets.** `mark_position_settled.rs` inserts it at head index 8, before
* the optional recorder tail, and authenticates the shape against the
* decoded market kind BEFORE the idempotent already-settled return:
* `NotEnoughAccountKeys` when a non-native market omits it,
* `InvalidInstructionData` when a native market supplies it.
*
* Callers decide from the decoded market, exactly as they do for
* {@link RedeemAccounts.marketMeta}.
*/
marketMeta?: Address;
}
Field documentation
vault— Market vault PDA — source of the owner's payout.ownerSettlementAta— Position owner's settlement-token account — payout sink.settlementMint— Settlement (stablecoin) mint — required for the TransferChecked CPI.tokenProgram— SPL Token program.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets.mark_position_settled.rsinserts it at head index 8, before the optional recorder tail, and authenticates the shape against the decoded market kind BEFORE the idempotent already-settled return:NotEnoughAccountKeyswhen a non-native market omits it,InvalidInstructionDatawhen a native market supplies it.
Callers decide from the decoded market, exactly as they do for {@link RedeemAccounts.marketMeta}.
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
MarkPositionSettledInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2158.
export interface MarkPositionSettledInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
positionOwner: Address;
caller: Address;
/**
* The position owner's settlement-token account — the payout sink.
* Audit remediation (H-01): MarkPositionSettled now pays the owner the
* value they are owed. This account is owner-controlled (typically the
* owner's settlement-mint ATA) and cannot be derived; the caller must
* supply it. A stale/closed account only fails the caller's own
* transaction without harming the owner.
*/
ownerSettlementAta: Address;
/** The settlement (stablecoin) mint — required for the TransferChecked CPI. */
settlementMint: Address;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth
* markets** — `mark_position_settled.rs` inserts it at head index 8 and
* authenticates the shape against the decoded market kind before the
* idempotent already-settled return: `NotEnoughAccountKeys` when a
* non-native market omits it, `InvalidInstructionData` when a native market
* supplies it.
*
* Callers decide from the decoded market: supply
* `deriveMarketMetaPda(market)` when the market is NOT native Pyth, and omit
* it otherwise.
*/
marketMeta?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.ownerSettlementAta— The position owner's settlement-token account — the payout sink. Audit remediation (H-01): MarkPositionSettled now pays the owner the value they are owed. This account is owner-controlled (typically the owner's settlement-mint ATA) and cannot be derived; the caller must supply it. A stale/closed account only fails the caller's own transaction without harming the owner.settlementMint— The settlement (stablecoin) mint — required for the TransferChecked CPI.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets —mark_position_settled.rsinserts it at head index 8 and authenticates the shape against the decoded market kind before the idempotent already-settled return:NotEnoughAccountKeyswhen a non-native market omits it,InvalidInstructionDatawhen a native market supplies it.
Callers decide from the decoded market: supply
deriveMarketMetaPda(market) when the market is NOT native Pyth, and omit
it otherwise.
MarkPositionSettledResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2194.
export interface MarkPositionSettledResult {
position: Address;
market: Address;
traderLedger: Address;
vault: Address;
}
MAX_APPROVAL_MAX_BUILDER_BPS#
Not documented.
Declaration source: packages/core/src/constants.ts:464.
export declare const MAX_APPROVAL_MAX_BUILDER_BPS: 10000;
MAX_BUILDER_SHARE_BPS#
D4{bps_of_fee} Inclusive maximum governed builder share (ruling 2026-10-27).
Declaration source: packages/core/src/constants.ts:456.
export declare const MAX_BUILDER_SHARE_BPS: 1000;
MAX_CANCEL_EXAMINED#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:58.
export declare const MAX_CANCEL_EXAMINED: 64;
MAX_CANCEL_REMOVED#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:59.
export declare const MAX_CANCEL_REMOVED: 32;
MAX_CREATION_WINDOW#
D0{s} Historical constant retained for parity; timestamp-only CreateMarket does not apply it.
Declaration source: packages/core/src/constants.ts:68.
export declare const MAX_CREATION_WINDOW: 86400n;
MAX_EXTERNAL_MARKET_LEGS#
Not documented.
Declaration source: packages/core/src/constants.ts:278.
export declare const MAX_EXTERNAL_MARKET_LEGS: 8;
MAX_HEAP_FRAME_BYTES#
D0{byte} Largest heap frame the Solana runtime accepts.
Declaration source: packages/core/src/constants.ts:392.
export declare const MAX_HEAP_FRAME_BYTES: number;
MAX_MANAGED_QUOTES#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:52.
export declare const MAX_MANAGED_QUOTES: 8;
MAX_MANAGED_RECLAIM_PREFIX#
Not documented.
Declaration source: packages/core/src/managedReclaimRecovery.ts:21.
export declare const MAX_MANAGED_RECLAIM_PREFIX: 64;
MAX_ORDER_MATCH_LIMIT#
D0{count} Maximum per-order matching iterations. A wire value of zero uses this default.
Declaration source: packages/core/src/constants.ts:367.
export declare const MAX_ORDER_MATCH_LIMIT: 12;
MAX_PERMITTED_DATA_INCREASE#
D0{byte/chunk} Maximum data a program may add to an account in a single top-level
instruction (Solana runtime limit). Determines how many
EnsureTraderLedgerSpace invocations are needed to fully size a
trader_ledger PDA: Math.ceil(targetSize / MAX_PERMITTED_DATA_INCREASE).
Declaration source: packages/core/src/constants.ts:433.
export declare const MAX_PERMITTED_DATA_INCREASE: 10240;
MAX_PROTECTED_VALIDITY_SLOTS#
Not documented.
Declaration source: packages/core/src/splineFreshness.ts:5.
export declare const MAX_PROTECTED_VALIDITY_SLOTS: 150;
MAX_PROTOCOL_SHARE_BPS#
D4{bps_of_fee} Inclusive protocol-share ceiling, matching
program/src/logic/fee.rs::MAX_PROTOCOL_SHARE_BPS.
Lowered from 5,000 to the 4,500 launch level by the 2026-10-27 builder-fee ruling, so governance can lower the protocol leg but never vote back the builder leg (spec/IX.md §20 PRE-5).
Declaration source: packages/core/src/constants.ts:448.
export declare const MAX_PROTOCOL_SHARE_BPS: 4500;
MAX_RECLAIM_BATCH#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:53.
export declare const MAX_RECLAIM_BATCH: 16;
MAX_RECLAIM_SWEEP_ORDERS#
Upper bound for one keeper sweep. ReclaimExpiredOrder is deliberately single-target on-chain, so a sweep returns independently sendable instructions rather than pretending the protocol has an atomic batch ABI. Keeping the bound explicit prevents an unbounded stale-frontier scan from exhausting a keeper's RPC/transaction queue.
Declaration source: packages/core/src/sdk.ts:2058.
export declare const MAX_RECLAIM_SWEEP_ORDERS: 64;
MAX_RESOLVERS#
Not documented.
Declaration source: packages/core/src/constants.ts:277.
export declare const MAX_RESOLVERS: 8;
MAX_RESUMABLE_REDEEM_CALLS#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:7.
export declare const MAX_RESUMABLE_REDEEM_CALLS: 2048;
MAX_RPC_SCAN_LIMIT#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:39.
export declare const MAX_RPC_SCAN_LIMIT: 1000;
MAX_SCENARIOS_CEILING#
Hard ceiling so a caller cannot ask for an unbounded enumeration.
Declaration source: packages/core/src/analytics/scenario.ts:26.
export declare const MAX_SCENARIOS_CEILING: 4096;
MAX_SPLINE_MID_JUMP_RESET_BPS#
Largest spline midpoint-reset threshold that cannot disable every valid jump.
Declaration source: packages/core/src/utils/validation.ts:79.
export declare const MAX_SPLINE_MID_JUMP_RESET_BPS: number;
MAX_SUPPORTED_TRANSACTION_VERSION#
Highest Solana transaction version supported by this SDK's RPC consumers.
Declaration source: packages/core/src/transactionPriorityFee.ts:4.
export declare const MAX_SUPPORTED_TRANSACTION_VERSION: 1;
MAX_TAKER_FEE_COEFFICIENT_BPS#
Largest governed taker fee coefficient. Mirrors
MAX_TAKER_FEE_COEFFICIENT_BPS in program/src/logic/fee/taker_fee.rs. The
exact linear fee itself is computeTakerFee / takerFeeNumerator in
router/takerFee.ts.
Declaration source: packages/core/src/fee.ts:43.
export declare const MAX_TAKER_FEE_COEFFICIENT_BPS: 10000;
MAX_TREASURY_RECIPIENTS#
D0{count} Number of parallel protocol fee recipients on-chain.
Mirrors seesaw::constants::MAX_TREASURY_RECIPIENTS. Power of two so
client-side index selection can use & (N - 1) instead of modulo.
See spec/MULTI_FEE_RECIPIENTS_PLAN.md §3.1.
Declaration source: packages/core/src/constants.ts:120.
export declare const MAX_TREASURY_RECIPIENTS: 8;
maxBaseUnits#
Returns the larger of two base-unit bigint values, parsed from strings. Used to derive aggregate "open interest" as max(totalYesShares, totalNoShares) — shared here so web/mobile never re-implement the same comparison independently.
Declaration source: packages/core/src/display.ts:207.
export function maxBaseUnits(a: string, b: string): bigint;
Parameters
a: string— Not documented.b: string— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>maxBuyShareQuantityForBudget</summary>maxBuyShareQuantityForBudget#
Greatest share quantity whose fee-inclusive BUY debit at priceBps fits a
quote budget: calculateCollateral(p, q) + exactFee(p, collateral) <= budget.
The left side is non-decreasing in q, so a binary search is exact (INV-10 /
SSW-026 MAX sizing). The budget is QUOTE atoms only; SOL network fees and
account rent are a separate reserve and are never deducted here.
Declaration source: packages/core/src/reviewedIntent.ts:313.
export function maxBuyShareQuantityForBudget(budget: bigint, priceBps: number, fee: Pick<ReviewedFeePolicy, "capBps" | "decayRateBps">): bigint;
Parameters
budget: bigint— Not documented.priceBps: number— Not documented.fee: Pick<ReviewedFeePolicy, "capBps" | "decayRateBps">— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>maxMergeableCompleteSets</summary>maxMergeableCompleteSets#
min(YES, NO) across both sources: the largest set one instruction can merge.
Declaration source: packages/core/src/completeSetMerge.ts:92.
export function maxMergeableCompleteSets(holdings: CompleteSetHoldings): bigint;
Parameters
holdings: CompleteSetHoldings— Not documented. See CompleteSetHoldings for its declaration and available field documentation.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>maxQuoteAmountForBalance</summary>maxQuoteAmountForBalance#
Finds the greatest quote amount whose amount + rounded-up fee fits a balance. All values stay in token base units, so MAX never depends on floating point.
Declaration source: packages/core/src/fee.ts:202.
export function maxQuoteAmountForBalance(balance: bigint, feeBps: number): bigint;
Parameters
balance: bigint— Not documented.feeBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>maxQuoteAmountForBalanceAtPrice</summary>maxQuoteAmountForBalanceAtPrice#
Greatest quote amount q with q + exactFee(q) <= balance.
q + exactFee(q) is monotone non-decreasing in q, so a binary search over
integers is exact — no closed form over a ceiling can drift by an atom.
Declaration source: packages/core/src/fee.ts:344.
export function maxQuoteAmountForBalanceAtPrice(balance: bigint, priceBps: number, capBps: number, decayBps: number): bigint;
Parameters
balance: bigint— Not documented.priceBps: number— Not documented.capBps: number— Not documented.decayBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>maxTransactionSize</summary>maxTransactionSize#
Not documented.
Declaration source: packages/core/src/instructions.ts:310.
export function maxTransactionSize(version?: SolanaTransactionVersion): number;
Parameters
version: SolanaTransactionVersion | undefined— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>MeasuredInstructionGroup</summary>MeasuredInstructionGroup#
One measured group. instructions excludes the transport prefix.
Declaration source: packages/core/src/transactionPlan.ts:69.
export interface MeasuredInstructionGroup {
readonly instructions: Instruction[];
/** D0{byte/transaction} Serialized wire including the prefix. */
readonly wireBytes: number;
}
Field documentation
wireBytes— D0{byte/transaction} Serialized wire including the prefix.
measureMirrorTransaction#
Measure the complete signed version 1 transaction of instructions paid by
feePayer with resources, against every version 1 limit.
Declaration source: packages/core/src/v1Transaction.ts:227.
export function measureMirrorTransaction(instructions: readonly Instruction[], feePayer: Address, resources: MirrorTransactionResources): MirrorPacketMeasurement;
Parameters
instructions: readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]— Not documented.feePayer: Address— Not documented.resources: MirrorTransactionResources— Not documented. See MirrorTransactionResources for its declaration and available field documentation.
Returns
MirrorPacketMeasurement
Not documented.
Throws
Not documented.
</details> <details> <summary>measureNativeTransactionBytes</summary>measureNativeTransactionBytes#
Serialized wire length of instructions (after the transport prefix) as
the official compiler emits it. Throws when the message cannot be compiled.
Declaration source: packages/core/src/transactionPlan.ts:117.
export function measureNativeTransactionBytes(instructions: readonly Instruction[], transport: ResolvedTransport): number;
Parameters
instructions: readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]— Not documented.transport: ResolvedTransport— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>MergeCompleteSetAccounts</summary>MergeCompleteSetAccounts#
Accounts for MergeCompleteSet (0x0B), in the exact 15-account order.
Declaration source: packages/core/src/instructions.ts:403.
export interface MergeCompleteSetAccounts extends BinaryRecorderTailAccounts {
market: Address;
vault: Address;
quoteDestinationAta: Address;
caller: Address;
traderLedger: Address;
userPosition: Address;
userYesAta: Address;
userNoAta: Address;
yesMint: Address;
noMint: Address;
settlementMint: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
config: Address;
/** A scoped merge burns ledger shares and credits quote back to the ledger. */
strategy?: PrefundedStrategyAccounts;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.strategy— A scoped merge burns ledger shares and credits quote back to the ledger.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
MergeCompleteSetParams#
Not documented.
Declaration source: packages/core/src/types.ts:643.
export interface MergeCompleteSetParams {
readonly quantity: bigint;
readonly walletYes?: bigint;
readonly walletNo?: bigint;
}
mergeCompleteSetParamsFromPlan#
The instruction payload for a plan (buildMergeCompleteSetIx params).
Declaration source: packages/core/src/completeSetMerge.ts:159.
export function mergeCompleteSetParamsFromPlan(plan: CompleteSetMergePlan): MergeCompleteSetParams;
Parameters
plan: CompleteSetMergePlan— Not documented. See CompleteSetMergePlan for its declaration and available field documentation.
Returns
MergeCompleteSetParams
Not documented.
Throws
Not documented.
</details> <details> <summary>mergeRedeemRecoveryProgress</summary>mergeRedeemRecoveryProgress#
Monotonically merge a recovery update (typically the shape carried by a thrown {@link ResumableRedeemSequenceError}) into the durable progress.
SSW-010: a generic error can carry a shorter completed prefix or no pending
entry at all; neither may erase a saved current signature, completed
instruction or pending page. Signatures are only ever added; a pending entry
is only released by an authenticated completion (it moves into completed).
A signature-less active entry is the pre-signature checkpoint and is
dropped, because nothing reached the chain.
Declaration source: packages/core/src/resumableRedeem.ts:260.
export function mergeRedeemRecoveryProgress<TSignature = string>(current: RedeemRecoveryProgress<TSignature>, update: Partial<RedeemRecoveryProgress<TSignature>>): RedeemRecoveryProgress<TSignature>;
Parameters
current: RedeemRecoveryProgress<TSignature>— Not documented. See RedeemRecoveryProgress for its declaration and available field documentation.update: Partial<RedeemRecoveryProgress<TSignature>>— Not documented.
Returns
RedeemRecoveryProgress<TSignature>
Not documented.
Throws
Not documented.
</details> <details> <summary>mergeTransactionAttemptJournals</summary>mergeTransactionAttemptJournals#
Union-merge two journal copies. Neither copy can erase the other's evidence.
Declaration source: packages/core/src/transactionAttempt.ts:584.
export function mergeTransactionAttemptJournals(a: TransactionAttemptJournalDocument, b: TransactionAttemptJournalDocument): TransactionAttemptJournalDocument;
Parameters
a: TransactionAttemptJournalDocument— Not documented. See TransactionAttemptJournalDocument for its declaration and available field documentation.b: TransactionAttemptJournalDocument— Not documented. See TransactionAttemptJournalDocument for its declaration and available field documentation.
Returns
TransactionAttemptJournalDocument
Not documented.
Throws
Not documented.
</details> <details> <summary>MESSAGE_VERSION_VALUES</summary>MESSAGE_VERSION_VALUES#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:32.
export declare const MESSAGE_VERSION_VALUES: readonly ["legacy", "v0"];
MessageVersion#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:33.
export type MessageVersion = (typeof MESSAGE_VERSION_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
MetadataBatcherOptions#
Not documented.
Declaration source: packages/core/src/tokensXyz/batcher.ts:9.
export interface MetadataBatcherOptions {
/** Resolved per flush so a late-configured base URL is honored. */
readonly apiBaseUrl: () => string;
readonly fetch?: typeof fetch;
/** Mints requested within this window share one request. */
readonly windowMs?: number;
}
Field documentation
apiBaseUrl— Resolved per flush so a late-configured base URL is honored.windowMs— Mints requested within this window share one request.
MICROSTRUCTURE_UPDATE_RATE_LIMIT_SECONDS#
MICROSTRUCTURE_UPDATE_RATE_LIMIT_SECONDS — program/src/constants.rs:320.
NOTE the name: the plan brief calls this MICROSTRUCTURE_RATE_LIMIT_SECONDS,
which does not exist in the program.
Declaration source: packages/core/src/preflight/governance.ts:75.
export declare const MICROSTRUCTURE_UPDATE_RATE_LIMIT_SECONDS: 3600;
MIN_APPROVAL_MAX_BUILDER_BPS#
D4{bps_of_fee} Inclusive bounds of a trader-signed BuilderApproval.max_builder_bps
(ApproveBuilder 0x4A rejects 0 and anything above 10,000).
Declaration source: packages/core/src/constants.ts:463.
export declare const MIN_APPROVAL_MAX_BUILDER_BPS: 1;
MIN_BUILDER_SHARE_BPS#
D4{bps_of_fee} Inclusive minimum governed builder share. 0 turns builder fees off: the builder slice then stays with protocol (ruling 2026-10-27).
Declaration source: packages/core/src/constants.ts:454.
export declare const MIN_BUILDER_SHARE_BPS: 0;
MIN_ORDER_TTL_SECONDS#
Minimum remaining lifetime of an order that can rest on the book.
Declaration source: packages/core/src/preflight/placeOrder.ts:57.
export declare const MIN_ORDER_TTL_SECONDS: 60;
minCommitmentForDiscovery#
E5 depth floor in quote atoms, also the lower bound for a seat to clear E5 on its own.
Declaration source: packages/core/src/discoveryPolicy.ts:32.
export function minCommitmentForDiscovery(decimals: number, policy?: DiscoveryPolicy): bigint;
Parameters
decimals: number— Not documented.policy: DiscoveryPolicy— Not documented. Default:DISCOVERY_POLICY_V1. See DiscoveryPolicy for its declaration and available field documentation.
Returns
bigint
Not documented.
Throws
Not documented.
Defaults
policy:DISCOVERY_POLICY_V1.
minReducibleRemainder#
The smallest remainder that still clears minRestingNotional, in share
atoms. A reduce input should be capped at remaining - minReducibleRemainder
so the slider can never land in the rejected band.
Rounds UP, inverting calculate_collateral's floor division: a remainder of
exactly this size produces a notional at or above the floor.
priceBps is the resting order's price in its named outcome's own price
space — the same price {@link ReduceOrderIntent.priceBps} takes.
Returns 0n when the floor is disabled or the price is unusable, which
leaves the reduce input unbounded (the program applies no floor either).
Declaration source: packages/core/src/preflight/orders.ts:337.
export function minReducibleRemainder(priceBps: number, minRestingNotional: bigint): bigint;
Parameters
priceBps: number— Not documented.minRestingNotional: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>mintHasFreezeAuthority</summary>mintHasFreezeAuthority#
Whether an SPL mint account carries a freeze authority.
Declaration source: packages/core/src/currencyAccounts.ts:27.
export function mintHasFreezeAuthority(mintData: Uint8Array): boolean;
Parameters
mintData: Uint8Array<ArrayBufferLike>— Not documented.
Returns
boolean
Not documented.
Throws
{SeesawValidationError} When the data is not a well-formed SPL mint.
</details> <details> <summary>mintShares</summary>mintShares#
Build MintShares instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1072.
export function mintShares(input: MintSharesInput, programAddress?: Address): Promise<SdkResult<MintSharesResult>>;
Parameters
input: MintSharesInput— Not documented. See MintSharesInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<MintSharesResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
MintSharesAccounts#
Accounts for MintShares instruction.
Declaration source: packages/core/src/instructions.ts:2087.
export interface MintSharesAccounts extends BinaryRecorderTailAccounts {
market: Address;
yesMint: Address;
noMint: Address;
userYesAta: Address;
userNoAta: Address;
userStablecoinAta: Address;
vault: Address;
user: Address;
config: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
settlementMint: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
MintSharesInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1044.
export interface MintSharesInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userYesAta: Address;
userNoAta: Address;
userStablecoinAta: Address;
settlementMint: Address;
/** Authenticated MarketMeta PDA for external markets; omit for native markets. */
marketMeta?: Address;
amount: bigint;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.marketMeta— Authenticated MarketMeta PDA for external markets; omit for native markets.
MintSharesIntent#
Everything MintShares needs, plus the wallet + supply state it draws on.
Declaration source: packages/core/src/preflight/types.ts:387.
export interface MintSharesIntent {
/** Settlement units to deposit; mints the same number of YES and NO shares. */
amount: bigint;
nowUnix: number;
/** Settlement-mint balance available to the trader, base units. */
walletSettlementUnits: bigint;
/** `market.total_yes_shares` before this mint. */
totalYesShares: bigint;
/** `market.total_no_shares` before this mint. */
totalNoShares: bigint;
/**
* `market.max_total_shares()`. `0n` means the cap is disabled
* (`mint_shares.rs:161`); `undefined` means the indexer has not surfaced it
* yet and the cap check is SKIPPED rather than guessed.
*/
maxTotalShares?: bigint;
}
Field documentation
amount— Settlement units to deposit; mints the same number of YES and NO shares.walletSettlementUnits— Settlement-mint balance available to the trader, base units.totalYesShares—market.total_yes_sharesbefore this mint.totalNoShares—market.total_no_sharesbefore this mint.maxTotalShares—market.max_total_shares().0nmeans the cap is disabled (mint_shares.rs:161);undefinedmeans the indexer has not surfaced it yet and the cap check is SKIPPED rather than guessed.
MintSharesParams#
Parameters for MintShares instruction.
Declaration source: packages/core/src/instructions.ts:2104.
export interface MintSharesParams {
/** D6{stablecoin}; mints the same D6 quantity of each side-specific share. */
amount: bigint;
}
Field documentation
amount— D6{stablecoin}; mints the same D6 quantity of each side-specific share.
MintSharesResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1062.
export interface MintSharesResult {
market: Address;
vault: Address;
yesMint: Address;
noMint: Address;
}
mintSharesVerdict#
Decide whether the program would accept this MintShares.
Pair-mints amount YES and amount NO shares against amount settlement
units. Returns { allowed: true } when every mirrored gate passes, otherwise
the FIRST gate that would reject.
NOTE: MintShares has no max_order_size bound — that gate is specific to
PlaceOrder (place_order_processor/validation.rs:93). The only quantity
rejection here is amount == 0 (mint_shares.rs:246-248); adding an order-
size cap would be more strict than the program and would block valid mints.
Declaration source: packages/core/src/preflight/funding.ts:199.
export function mintSharesVerdict(config: ConfigSnapshot, market: MarketSnapshot, intent: MintSharesIntent, options?: PreflightOptions): Verdict;
Parameters
config: ConfigSnapshot— Not documented. See ConfigSnapshot for its declaration and available field documentation.market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.intent: MintSharesIntent— Not documented. See MintSharesIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>MIRROR_LOADED_ACCOUNTS_DATA_SIZE_LIMIT_BYTES</summary>MIRROR_LOADED_ACCOUNTS_DATA_SIZE_LIMIT_BYTES#
D0{byte} Loaded-accounts data size limit of a mirror transaction. A version 1 transaction that omits the limit gets zero, so it is always stated. This is the value a transaction without the limit had before version 1 (64 MiB), not a measured requirement.
Declaration source: packages/core/src/v1Transaction.ts:54.
export declare const MIRROR_LOADED_ACCOUNTS_DATA_SIZE_LIMIT_BYTES: number;
MIRROR_TRANSACTION_HEAP_STEP_BYTES#
Not documented.
Declaration source: packages/core/src/v1Transaction.ts:47.
export declare const MIRROR_TRANSACTION_HEAP_STEP_BYTES: 1024;
MIRROR_TRANSACTION_MAX_ADDRESSES#
A version 1 transaction names every address inline. D0{count}
Declaration source: packages/core/src/v1Transaction.ts:37.
export declare const MIRROR_TRANSACTION_MAX_ADDRESSES: 64;
MIRROR_TRANSACTION_MAX_BYTES#
The largest serialized version 1 transaction. D0{byte}
Declaration source: packages/core/src/v1Transaction.ts:35.
export declare const MIRROR_TRANSACTION_MAX_BYTES: 4096;
MIRROR_TRANSACTION_MAX_COMPUTE_UNITS#
D0{compute unit} The most one transaction may request.
Declaration source: packages/core/src/v1Transaction.ts:43.
export declare const MIRROR_TRANSACTION_MAX_COMPUTE_UNITS: 1400000;
MIRROR_TRANSACTION_MAX_HEAP_BYTES#
Not documented.
Declaration source: packages/core/src/v1Transaction.ts:46.
export declare const MIRROR_TRANSACTION_MAX_HEAP_BYTES: number;
MIRROR_TRANSACTION_MAX_INSTRUCTIONS#
D0{count}
Declaration source: packages/core/src/v1Transaction.ts:39.
export declare const MIRROR_TRANSACTION_MAX_INSTRUCTIONS: 64;
MIRROR_TRANSACTION_MAX_SIGNATURES#
D0{count}
Declaration source: packages/core/src/v1Transaction.ts:41.
export declare const MIRROR_TRANSACTION_MAX_SIGNATURES: 12;
MIRROR_TRANSACTION_MIN_HEAP_BYTES#
D0{byte} Bounds and step of the requested heap.
Declaration source: packages/core/src/v1Transaction.ts:45.
export declare const MIRROR_TRANSACTION_MIN_HEAP_BYTES: number;
MIRROR_TRANSACTION_VERSION_BYTE#
First byte of a serialized version 1 transaction. D0{byte}
Declaration source: packages/core/src/v1Transaction.ts:33.
export declare const MIRROR_TRANSACTION_VERSION_BYTE: 129;
MirrorPacketMeasurement#
Not documented.
Declaration source: packages/core/src/v1Transaction.ts:75.
export interface MirrorPacketMeasurement {
readonly version: 1;
readonly limit: typeof MIRROR_TRANSACTION_MAX_BYTES;
readonly feePayer: Address;
/**
* Complete signed version 1 transaction. D0{byte} `null` when the format
* cannot express the transaction at all (a count limit is exceeded).
*/
readonly bytes: number | null;
/** Required signatures, fee payer included. D0{count} */
readonly signatureCount: number;
/** Inline addresses, programs and signers included. D0{count} */
readonly addressCount: number;
/** D0{count} */
readonly instructionCount: number;
readonly resources: MirrorTransactionResources;
/** Every version 1 limit the transaction is over; empty when it can be sent. */
readonly exceeded: readonly MirrorTransactionLimit[];
readonly fits: boolean;
}
Field documentation
bytes— Complete signed version 1 transaction. D0{byte}nullwhen the format cannot express the transaction at all (a count limit is exceeded).signatureCount— Required signatures, fee payer included. D0{count}addressCount— Inline addresses, programs and signers included. D0{count}instructionCount— D0{count}exceeded— Every version 1 limit the transaction is over; empty when it can be sent.
MirrorTransactionLifetime#
Not documented.
Declaration source: packages/core/src/v1Transaction.ts:68.
export interface MirrorTransactionLifetime {
readonly blockhash: string;
readonly lastValidBlockHeight: bigint;
}
MirrorTransactionLimit#
Not documented.
Declaration source: packages/core/src/v1Transaction.ts:73.
export type MirrorTransactionLimit = 'bytes' | 'addresses' | 'instructions' | 'signatures';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
MirrorTransactionResources#
The resource configuration every mirror transaction states explicitly.
Declaration source: packages/core/src/v1Transaction.ts:57.
export interface MirrorTransactionResources {
/** D0{compute unit} */
readonly computeUnitLimit: number;
/** D0{byte} */
readonly heapBytes: number;
/** D0{byte} */
readonly loadedAccountsDataSizeLimit: number;
/** D0{lamport} Total priority fee of the transaction, not a per-unit price. */
readonly priorityFeeLamports: bigint;
}
Field documentation
computeUnitLimit— D0{compute unit}heapBytes— D0{byte}loadedAccountsDataSizeLimit— D0{byte}priorityFeeLamports— D0{lamport} Total priority fee of the transaction, not a per-unit price.
NATIVE_PYTH_RESOLVER_ADDRESS#
NATIVE_PYTH_RESOLVER — program/src/state/market.rs:19.
The all-zero key a native price market carries in resolver_authority, in
its base58 spelling (the same 32 zero bytes the system program's id uses).
Declaration source: packages/core/src/market.ts:21.
export declare const NATIVE_PYTH_RESOLVER_ADDRESS: Address;
NATIVE_RESOLUTION_OUTCOMES#
Terminal outcome bytes carried by NativeResolutionRecorded (state/market.rs::Outcome).
Declaration source: packages/core/src/resolutionDisclosure.ts:55.
export declare const NATIVE_RESOLUTION_OUTCOMES: { readonly Up: 1; readonly Down: 2; readonly Neutral: 3; };
NATIVE_RESOLUTION_POLICY_SIZE#
Not documented.
Declaration source: packages/core/src/nativeResolutionPolicy.ts:9.
export declare const NATIVE_RESOLUTION_POLICY_SIZE: 176;
NATIVE_RESOLUTION_REASONS#
Stable native-resolution reason values emitted by the recorder ABI.
Declaration source: packages/core/src/resolutionDisclosure.ts:2.
export declare const NATIVE_RESOLUTION_REASONS: { readonly DirectionalUp: 0; readonly DirectionalDown: 1; readonly IntervalOverlapOrEquality: 2; readonly MissingStart: 3; readonly MissingEnd: 4; readonly StaleBoundary: 5; readonly JumpRejected: 6; readonly OrdinaryTimeout: 7; readonly EmergencyNeutralization: 8; readonly ConfidenceGuardRejected: 9; };
NATIVE_TRANSACTION_MAX_BYTES#
D0{byte/transaction} Inclusive legacy/v0 wire cap (PACKET_DATA_SIZE).
Declaration source: packages/core/src/transactionPlan.ts:35.
export declare const NATIVE_TRANSACTION_MAX_BYTES: 1232;
nativePayoutNumerators#
The per-leg payout numerators a NATIVE market's outcome byte implies.
Mirrors Outcome::yes_redemption_rate_bps / no_redemption_rate_bps
(program/src/state/market.rs:478-508), which is where
redemption_numerator_for_leg reads them from for a native market
(logic/redeem/mod.rs:562-571) — the same vector CloseMarket's
bearer-supply gate is decided on.
None maps to [0, 0], exactly as the program does. That is not a claim
that an unresolved market is closable: the verdict's resolution gate denies
first, and the program's own redemption_numerator_for_leg raises
MarketNotResolved before the vector is ever used.
External markets use the exact YES/NO factors and denominator in their
MarketMeta account, decoded by decodeMarketMetaAccount.
Declaration source: packages/core/src/preflight/lifecycle.ts:96.
export function nativePayoutNumerators(outcome: Outcome | number): { yes: number; no: number; };
Parameters
outcome: number— Not documented.
Returns
{ yes: number; no: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>NativeResolutionDisclosure</summary>NativeResolutionDisclosure#
Not documented.
Declaration source: packages/core/src/resolutionDisclosure.ts:36.
export interface NativeResolutionDisclosure {
version: number;
reason: number;
outcome: number;
startPrice: bigint;
startConf: bigint;
startExpo: number;
endPrice: bigint;
endConf: bigint;
endExpo: number;
startTimestamp: bigint;
endTimestamp: bigint;
payoutDenominator: bigint;
yesWeight: bigint;
noWeight: bigint;
policyHash: string;
}
NativeResolutionDisclosureView#
Indexed resolution disclosure as served by the market API (string-encoded integers).
Declaration source: packages/core/src/resolutionDisclosure.ts:153.
export interface NativeResolutionDisclosureView {
reason?: number | null;
payoutDenominator?: Amount;
yesWeight?: Amount;
noWeight?: Amount;
policyHash?: string | null;
}
NativeResolutionOutcome#
Not documented.
Declaration source: packages/core/src/resolutionDisclosure.ts:57.
export type NativeResolutionOutcome =
(typeof NATIVE_RESOLUTION_OUTCOMES)[keyof typeof NATIVE_RESOLUTION_OUTCOMES];
Field documentation
toString— Returns a string representation of an object.toFixed— Returns a string representing a number in fixed-point notation.toExponential— Returns a string containing a number represented in exponential notation.toPrecision— Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.valueOf— Returns the primitive value of the specified object.toLocaleString— Converts a number to a string by using the current or specified locale.
nativeResolutionPayoutText#
"YES 50 / NO 50 of 100 (YES 50.00%, NO 50.00%)", or an explicit not-indexed marker.
Declaration source: packages/core/src/resolutionDisclosure.ts:169.
export function nativeResolutionPayoutText(view: NativeResolutionDisclosureView): string;
Parameters
view: NativeResolutionDisclosureView— Not documented. See NativeResolutionDisclosureView for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>NativeResolutionPolicyExpectations</summary>NativeResolutionPolicyExpectations#
Not documented.
Declaration source: packages/core/src/nativeResolutionPolicy.ts:17.
export interface NativeResolutionPolicyExpectations {
readonly programAddress: Address;
readonly owner: Address;
readonly market: Address;
readonly config: Address;
readonly feedIdentity: Uint8Array;
}
NativeResolutionPolicyRow#
Not documented.
Declaration source: packages/core/src/resolutionDisclosure.ts:186.
export interface NativeResolutionPolicyRow {
key: 'feed' | 'confidence' | 'jump' | 'timeout' | 'rounding' | 'policyHash';
label: string;
value: string;
}
nativeResolutionPolicyRows#
One ordered, display-ready description of the policy shared by web and mobile.
Declaration source: packages/core/src/resolutionDisclosure.ts:197.
export function nativeResolutionPolicyRows(policy: NativeResolutionPolicyView): NativeResolutionPolicyRow[];
Parameters
policy: NativeResolutionPolicyView— Not documented. See NativeResolutionPolicyView for its declaration and available field documentation.
Returns
NativeResolutionPolicyRow[]
Not documented.
Throws
Not documented.
</details> <details> <summary>NativeResolutionPolicyView</summary>NativeResolutionPolicyView#
Immutable settlement policy fields bound at market creation. Absent fields render as not indexed.
Declaration source: packages/core/src/resolutionDisclosure.ts:178.
export interface NativeResolutionPolicyView {
feedId?: string | null;
maxConfidenceRatioBps?: number | null;
maxOracleJumpBps?: number | null;
resolutionTimeoutSeconds?: Amount;
policyHash?: string | null;
}
NativeResolutionReason#
Not documented.
Declaration source: packages/core/src/resolutionDisclosure.ts:15.
export type NativeResolutionReason =
(typeof NATIVE_RESOLUTION_REASONS)[keyof typeof NATIVE_RESOLUTION_REASONS];
Field documentation
toString— Returns a string representation of an object.toFixed— Returns a string representing a number in fixed-point notation.toExponential— Returns a string containing a number represented in exponential notation.toPrecision— Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.valueOf— Returns the primitive value of the specified object.toLocaleString— Converts a number to a string by using the current or specified locale.
nativeResolutionReasonLabel#
Return a disclosure-safe label; unknown future values remain explicit.
Declaration source: packages/core/src/resolutionDisclosure.ts:32.
export function nativeResolutionReasonLabel(reason: number): string;
Parameters
reason: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>nativeResolutionReasonText</summary>nativeResolutionReasonText#
"Intervals overlap or touch", or an explicit not-indexed marker.
Declaration source: packages/core/src/resolutionDisclosure.ts:162.
export function nativeResolutionReasonText(view: NativeResolutionDisclosureView): string;
Parameters
view: NativeResolutionDisclosureView— Not documented. See NativeResolutionDisclosureView for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>NativeTransactionTransport</summary>NativeTransactionTransport#
How the sender will transport each planned group.
Declaration source: packages/core/src/transactionPlan.ts:41.
export interface NativeTransactionTransport {
/** Message version. Default `0`. Version 1 is not a native helper transport. */
readonly version?: NativeTransactionVersion;
/** Outer fee payer. Defaults to the plan's payer. */
readonly feePayer?: Address;
/**
* Instructions the sender prepends to every group (compute budget, a
* co-signer instruction, ...). They are measured, never returned. Defaults
* to {@link DEFAULT_NATIVE_PREFIX_INSTRUCTIONS}; pass `[]` only when the
* sender will add nothing.
*/
readonly prefixInstructions?: readonly Instruction[];
/** v0 only: lookup tables the sender will compile against. */
readonly addressLookupTables?: AddressesByLookupTableAddress;
/** D0{byte/transaction} Defaults to and may not exceed 1,232. */
readonly maxTransactionBytes?: number;
}
Field documentation
version— Message version. Default0. Version 1 is not a native helper transport.feePayer— Outer fee payer. Defaults to the plan's payer.prefixInstructions— Instructions the sender prepends to every group (compute budget, a co-signer instruction, ...). They are measured, never returned. Defaults to {@link DEFAULT_NATIVE_PREFIX_INSTRUCTIONS}; pass[]only when the sender will add nothing.addressLookupTables— v0 only: lookup tables the sender will compile against.maxTransactionBytes— D0{byte/transaction} Defaults to and may not exceed 1,232.
NativeTransactionVersion#
Native message versions the create-market helper plans for.
Declaration source: packages/core/src/transactionPlan.ts:38.
export type NativeTransactionVersion = 'legacy' | 0;
Field documentation
toString— Returns a string representation of an object. Returns a string representation of a string.valueOf— Returns the primitive value of the specified object.toLocaleString— Converts a number to a string by using the current or specified locale. Returns a date converted to a string using the current locale.
needsAdvisoryConfirm#
Informational friction for flagged currencies.
tokens.xyz recommends treating compromised and blocked mints as
do-not-trade. Seesaw only shows a confirm dialog before the user selects or
uses such a currency in a picker or at market creation. The user can always
continue and nothing here changes, gates or reads on-chain behavior.
Declaration source: packages/core/src/tokensXyz/advisory.ts:12.
export function needsAdvisoryConfirm(row: CurrencyMetadata | null | undefined): boolean;
Parameters
row: CurrencyMetadata | null | undefined— Not documented. See CurrencyMetadata for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>noProbabilityBpsFromYes</summary>noProbabilityBpsFromYes#
NO probability implied by a YES probability, both in bps (10_000 - yes).
A valuation identity for marks and fair values. It is never a NO quote and is
never applied to a stored or public order/fill price: a NO order's price is
already in NO terms and a NO quote comes from the NO lane (spec/ORDERBOOK.md
§ 2.3b).
Declaration source: packages/core/src/price.ts:113.
export function noProbabilityBpsFromYes(yesProbabilityBps: number): number;
Parameters
yesProbabilityBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>normalizeClientOrderIdHex</summary>normalizeClientOrderIdHex#
Normalize an explicitly entered, nonzero client order ID to lowercase hex.
Declaration source: packages/core/src/api/ownerOrders.ts:41.
export function normalizeClientOrderIdHex(value: string): string | null;
Parameters
value: string— Not documented.
Returns
string | null
Not documented.
Throws
Not documented.
</details> <details> <summary>normalizedFeedIdsForPair</summary>normalizedFeedIdsForPair#
Both database encodings of every exact matching feed, in stable order.
Declaration source: packages/core/src/feedSymbols.ts:35.
export function normalizedFeedIdsForPair(pair: string): string[];
Parameters
pair: string— Not documented.
Returns
string[]
Not documented.
Throws
Not documented.
</details> <details> <summary>normalizeKalshiPayout</summary>normalizeKalshiPayout#
Pure candidate normalization. Adapters must bind N to frozen creation notional, qualify scalar endpoints, and authenticate lexemes/hash separately. Only Kalshi ratios are reduced; do not use this to reduce a Poly probe Q.
Declaration source: packages/core/src/externalPayout.ts:97.
export function normalizeKalshiPayout(notionalValueDollars: string, settlementValueDollars: string, result: string, sourceFactHash: Uint8Array): ExternalPayout;
Parameters
notionalValueDollars: string— Not documented.settlementValueDollars: string— Not documented.result: string— Not documented.sourceFactHash: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ExternalPayout
Not documented.
Throws
Not documented.
</details> <details> <summary>normalizeWalletAuthAction</summary>normalizeWalletAuthAction#
Not documented.
Declaration source: packages/core/src/auth.ts:30.
export function normalizeWalletAuthAction(method: string, pathname: string): string;
Parameters
method: string— Not documented.pathname: string— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>NotificationPreferences</summary>NotificationPreferences#
Notification preferences; the indexer owns the full field set.
Declaration source: packages/core/src/api/walletServices.ts:233.
export type NotificationPreferences = Record<string, unknown>;
NotionalRounding#
How a lane rounds a fill's notional (ceil for a payment, floor for proceeds).
Declaration source: packages/core/src/router/takerFee.ts:45.
export type NotionalRounding = 'up' | 'down';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
OBSERVATION_KIND_KINDS#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:84.
export declare const OBSERVATION_KIND_KINDS: readonly ["admitted", "admission_unknown", "superseded", "selected", "not_enrolled", "sequence_rejected", "fee_below_floor", "bank_failure", "rejected", "unknown"];
ObservationKind#
What a provider's diagnostics said. Missing telemetry is unknown.
Declaration source: packages/core/src/execution/delivery.ts:99.
export type ObservationKind =
| { readonly kind: Exclude<ObservationKindTag, 'rejected'> }
| { readonly kind: 'rejected'; readonly reason: string };
ObservationKindTag#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:96.
export type ObservationKindTag = (typeof OBSERVATION_KIND_KINDS)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ObservedProgramAccount#
An account read back from the cluster: owner and current data length.
Declaration source: packages/core/src/instructions.ts:1242.
export interface ObservedProgramAccount {
readonly owner: Address;
/** D0{byte} */
readonly dataLength: number;
}
Field documentation
dataLength— D0{byte}
OpenMarketCurrencyAccounts#
Accounts an OpenReclaimExternalMarket (legacy or native) sends for one currency.
Declaration source: packages/core/src/currencyAccounts.ts:74.
export interface OpenMarketCurrencyAccounts {
/** Registered currency record PDA of the settlement mint. */
readonly currencyRecord: Address;
/** Canonical exact-mint freeze exception PDA; always sent (accounts 8 and 9). */
readonly freezeException: Address;
}
Field documentation
currencyRecord— Registered currency record PDA of the settlement mint.freezeException— Canonical exact-mint freeze exception PDA; always sent (accounts 8 and 9).
OPERATIONAL_PARAMS_RATE_LIMIT_SECONDS#
OPERATIONAL_PARAMS_RATE_LIMIT_SECONDS — program/src/constants.rs:313.
NOTE the name: the plan brief calls this OPERATIONAL_PARAMS_MIN_INTERVAL,
which does not exist in the program.
Declaration source: packages/core/src/preflight/governance.ts:67.
export declare const OPERATIONAL_PARAMS_RATE_LIMIT_SECONDS: 3600;
oracleConfidenceGuard#
Report whether a market bounds oracle uncertainty, from its raw setting.
maxConfidenceRatioBps === 0 is the on-chain sentinel that disables the
confidence check entirely (program/src/logic/create_market/mod.rs), and
market creation is permissionless, so any creator may open a market that will
settle on an arbitrarily uncertain oracle price. Callers should branch on this
rather than re-deriving the 0 convention, which is easy to miss.
Returns null when the setting is absent — an external resolver market takes
no Pyth price, so the guard does not apply to it.
Declaration source: packages/core/src/oracleConfidence.ts:18.
export function oracleConfidenceGuard(maxConfidenceRatioBps: number | null | undefined): OracleConfidenceGuard | null;
Parameters
maxConfidenceRatioBps: number | null | undefined— Not documented.
Returns
OracleConfidenceGuard | null
Not documented.
Throws
Not documented.
</details> <details> <summary>OracleConfidenceGuard</summary>OracleConfidenceGuard#
Whether a native market enforces the Pyth confidence guard at resolution.
Declaration source: packages/core/src/oracleConfidence.ts:4.
export type OracleConfidenceGuard = 'enforced' | 'disabled';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
Order#
Individual order entry in the orderbook. Size: 96 bytes on the legacy book or 128 bytes on the indexed book.
Declaration source: packages/core/src/types.ts:488.
export interface Order {
readonly tradingGeneration?: number;
readonly validUntilSlot?: bigint;
readonly strategyId?: number;
readonly groupId?: number;
readonly strategyEpoch?: number;
/** Physical seat incarnation for an indexed order. */
readonly seatIndex?: number;
readonly seatGeneration?: number;
readonly orderId: bigint;
readonly owner: Address;
readonly quantity: bigint;
readonly originalQuantity: bigint;
readonly timestamp: bigint;
readonly priceBps: number;
/** Stored side byte. Zero appears only in inactive zero-filled slots. */
readonly originalSide: StoredOrderSide | 0;
readonly isActive: boolean;
/** Lifecycle status: 0 = active/matchable, 1 = expired claimable. */
readonly status: number;
/** Stored effective TTL. Live placement converts a zero request to its market-close cap. */
readonly maxAgeSeconds: number;
readonly clientOrderId: Uint8Array;
}
Field documentation
seatIndex— Physical seat incarnation for an indexed order.originalSide— Stored side byte. Zero appears only in inactive zero-filled slots.status— Lifecycle status: 0 = active/matchable, 1 = expired claimable.maxAgeSeconds— Stored effective TTL. Live placement converts a zero request to its market-close cap.
ORDER_SIZE#
D0{byte/entry} Order entry size.
Declaration source: packages/core/src/constants.ts:349.
export declare const ORDER_SIZE: 128;
OrderbookAccount#
OrderbookAccount - Order book with bids and asks. PDA: ["seesaw", "orderbook", market_pubkey].
Declaration source: packages/core/src/types.ts:517.
export interface OrderbookAccount {
readonly tradingGeneration?: number;
readonly discriminator: Uint8Array;
readonly layout: 'deep';
readonly capacity: number;
readonly bidCapacity: number;
readonly askCapacity: number;
readonly market: Address;
/** Monotonic sequence used to derive opaque order IDs; not itself an order ID. */
readonly nextOrderSequence: bigint;
readonly bestBidPrice: number;
readonly bestAskPrice: number;
readonly bidCount: number;
readonly askCount: number;
readonly bump: number;
readonly bids: readonly Order[];
readonly asks: readonly Order[];
}
Field documentation
nextOrderSequence— Monotonic sequence used to derive opaque order IDs; not itself an order ID.
OrderbookLevel#
Aggregated orderbook price level for UI display.
Declaration source: packages/core/src/types.ts:658.
export interface OrderbookLevel {
readonly price: number;
readonly quantity: bigint;
readonly orders: number;
}
OrderExecutionControls#
Not documented.
Declaration source: packages/core/src/api/ownerOrders.ts:101.
export type OrderExecutionControls = z.infer<typeof orderExecutionControlsSchema>;
orderExecutionControlsSchema#
Values signed in the placing instruction. Batch quote bounds apply to the entire batch.
Declaration source: packages/core/src/api/ownerOrders.ts:85.
export declare const orderExecutionControlsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"single">; selfTradeBehavior: z.ZodNumber; minFillQuantity: z.ZodString; maxQuoteInput: z.ZodString; minQuoteOutput: z.ZodString; expectedFeeEpoch: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"batch">; selfTradeBehavior: z.ZodNumber; maxQuoteInput: z.ZodOptional<z.ZodString>; }, z.core.$strict>], "kind">;
ORDERING_CAPABILITY_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:25.
export declare const ORDERING_CAPABILITY_VALUES: readonly ["ordinary", "bundle_order_only", "maker_batch_priority", "maker_slot_prefix"];
OrderingCapability#
Ordering a delivery can offer. maker_slot_prefix is never produced by phase 7.
Declaration source: packages/core/src/execution/capability.ts:32.
export type OrderingCapability = (typeof ORDERING_CAPABILITY_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
OrderIntent#
A trader's order in the named outcome's own price space.
Declaration source: packages/core/src/types.ts:62.
export interface OrderIntent {
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly priceBps: number;
readonly quantity: bigint;
}
orderPlacementMetadata#
Not documented.
Declaration source: packages/core/src/api/ownerOrders.ts:45.
export function orderPlacementMetadata(order: { clientOrderId?: string | Uint8Array | null; groupId?: number | null; placementSignature?: string | null; }): OrderPlacementMetadata;
Parameters
order: { clientOrderId?: string | Uint8Array | null; groupId?: number | null; placementSignature?: string | null; }— Not documented.
Returns
OrderPlacementMetadata
Not documented.
Throws
Not documented.
</details> <details> <summary>OrderPlacementMetadata</summary>OrderPlacementMetadata#
Placement identifiers known from the indexer or a decoded live order slot.
Declaration source: packages/core/src/api/ownerOrders.ts:32.
export interface OrderPlacementMetadata {
clientOrderId?: string;
groupId?: number;
placementSignature?: string;
}
OrderPricingPreview#
Result of {@link previewOrderPricing}.
Declaration source: packages/core/src/orderPricing.ts:14.
export interface OrderPricingPreview {
/** Lane side the order rests on: BUY is a bid, SELL is an ask. */
readonly canonicalSide: CanonicalSide;
/** Tick-aligned price in the order's own outcome denomination. */
readonly alignedPriceBps: number;
/** Quote notional at the aligned price, rounded down. */
readonly grossQuote: bigint;
/** Non-null when tick alignment moved the price. */
readonly warning: string | null;
}
Field documentation
canonicalSide— Lane side the order rests on: BUY is a bid, SELL is an ask.alignedPriceBps— Tick-aligned price in the order's own outcome denomination.grossQuote— Quote notional at the aligned price, rounded down.warning— Non-null when tick alignment moved the price.
OrderRemainderDiscardedBinaryEvent#
Not documented.
Declaration source: packages/core/src/events.ts:122.
export interface OrderRemainderDiscardedBinaryEvent extends SeesawBinaryEvent {
tag: typeof BINARY_EVENT_TAGS.OrderRemainderDiscarded;
name: 'OrderRemainderDiscarded';
fields: { side: number; priceBps: number; quantity: bigint; reason: number };
}
ORDERS_PER_ARENA#
D0{count} Resting-order slots in each of the two book arenas (ORDERS_PER_ARENA).
Declaration source: packages/core/src/constants.ts:337.
export declare const ORDERS_PER_ARENA: 4096;
orderSideFromIntent#
The single mapping from public outcome/intent to the stored custody side.
Declaration source: packages/core/src/types.ts:90.
export function orderSideFromIntent(outcome: OutcomeAsset, intent: TradeIntent): StoredOrderSide;
Parameters
outcome: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.
Returns
StoredOrderSide
Not documented.
Throws
Not documented.
</details> <details> <summary>OrderStatus</summary>OrderStatus#
Not documented.
Declaration source: packages/core/src/api/types.ts:174.
export type OrderStatus = 'open' | 'partial' | 'filled' | 'cancelled';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
OrderStatusSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:138.
export declare const OrderStatusSchema: z.ZodEnum<{ open: "open"; partial: "partial"; filled: "filled"; cancelled: "cancelled"; }>;
OrderType#
Order execution type. Mirrors OrderType in orderbook.rs.
Declaration source: packages/core/src/types.ts:130.
export enum OrderType {
Limit = 0,
PostOnly = 1,
ImmediateOrCancel = 2,
}
Outcome#
Market outcome. Mirrors Outcome in market.rs.
Declaration source: packages/core/src/types.ts:48.
export enum Outcome {
None = 0,
Up = 1,
Down = 2,
Expired = 3,
}
OutcomeAsset#
Public order outcome. Encoded on the wire as YES=0, NO=1.
Declaration source: packages/core/src/types.ts:56.
export type OutcomeAsset = 'YES' | 'NO';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
OutcomeLaneBook#
One outcome's own order book.
Prices are in THAT outcome's own denomination — NO cents for the NO lane —
and are NOT complemented, because a canonical price already IS the price its
owner pays or receives per share in its own outcome (spec/ORDERBOOK.md
§ 2.3a). Within a lane a bids entry always ACQUIRES the outcome and an
asks entry always DISPOSES of it, in both outcomes, so a NO buyer lifts
no.asks and a NO seller hits no.bids.
Declaration source: packages/core/src/orderbook.ts:93.
export interface OutcomeLaneBook {
readonly bids: readonly OrderbookLevel[];
readonly asks: readonly OrderbookLevel[];
}
OutcomeLaneBooks#
Both outcome lanes carved out of one canonical book.
Declaration source: packages/core/src/orderbook.ts:99.
export interface OutcomeLaneBooks {
readonly yes: OutcomeLaneBook;
readonly no: OutcomeLaneBook;
}
outcomeToSide#
YES → up, NO → down.
Declaration source: packages/core/src/ux/sides.ts:20.
export function outcomeToSide(outcome: OutcomeAsset): SideKey;
Parameters
outcome: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.
Returns
SideKey
Not documented.
Throws
Not documented.
</details> <details> <summary>OwnerOrder</summary>OwnerOrder#
Not documented.
Declaration source: packages/core/src/api/ownerOrders.ts:188.
export type OwnerOrder = z.infer<typeof ownerOrderSchema>;
Field documentation
quantity— Remaining unfilled size.filledis cumulative executed size.
ownerOrderSchema#
Not documented.
Declaration source: packages/core/src/api/ownerOrders.ts:103.
export declare const ownerOrderSchema: z.ZodObject<{ id: z.ZodString; orderId: z.ZodString; clientOrderId: z.ZodOptional<z.ZodNullable<z.ZodString>>; groupId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; strategyAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>; placementSignature: z.ZodOptional<z.ZodNullable<z.ZodString>>; executionControls: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"single">; selfTradeBehavior: z.ZodNumber; minFillQuantity: z.ZodString; maxQuoteInput: z.ZodString; minQuoteOutput: z.ZodString; expectedFeeEpoch: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"batch">; selfTradeBehavior: z.ZodNumber; maxQuoteInput: z.ZodOptional<z.ZodString>; }, z.core.$strict>], "kind">>>; marketAddress: z.ZodString; marketId: z.ZodString; settlementMint: z.ZodString; pair: z.ZodString; owner: z.ZodString; side: z.ZodEnum<{ yes: "yes"; no: "no"; unknown: "unknown"; }>; sideCode: z.ZodNumber; sideLabel: z.ZodEnum<{ unknown: "unknown"; buy_yes: "buy_yes"; sell_yes: "sell_yes"; buy_no: "buy_no"; sell_no: "sell_no"; }>; originalSideCode: z.ZodNumber; canonicalSideCode: z.ZodNumber; canonicalSideLabel: z.ZodEnum<{ bid: "bid"; ask: "ask"; }>; isYes: z.ZodBoolean; priceBps: z.ZodNumber; quantity: z.ZodString; filled: z.ZodString; filledQuantity: z.ZodString; status: z.ZodEnum<{ unknown: "unknown"; expired: "expired"; open: "open"; filled: "filled"; cancelled: "cancelled"; pending_cancel: "pending_cancel"; cancel_failed: "cancel_failed"; }>; statusCode: z.ZodNumber; orderType: z.ZodNumber; createdAt: z.ZodNullable<z.ZodString>; updatedAt: z.ZodNullable<z.ZodString>; expiresAt: z.ZodNullable<z.ZodString>; expiredClaimable: z.ZodNullable<z.ZodBoolean>; }, z.core.$strip>;
OwnerOrdersPage#
Not documented.
Declaration source: packages/core/src/api/ownerOrders.ts:189.
export type OwnerOrdersPage = z.infer<typeof ownerOrdersPageSchema>;
ownerOrdersPageSchema#
Not documented.
Declaration source: packages/core/src/api/ownerOrders.ts:179.
export declare const ownerOrdersPageSchema: z.ZodObject<{ orders: z.ZodArray<z.ZodObject<{ id: z.ZodString; orderId: z.ZodString; clientOrderId: z.ZodOptional<z.ZodNullable<z.ZodString>>; groupId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; strategyAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>; placementSignature: z.ZodOptional<z.ZodNullable<z.ZodString>>; executionControls: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"single">; selfTradeBehavior: z.ZodNumber; minFillQuantity: z.ZodString; maxQuoteInput: z.ZodString; minQuoteOutput: z.ZodString; expectedFeeEpoch: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"batch">; selfTradeBehavior: z.ZodNumber; maxQuoteInput: z.ZodOptional<z.ZodString>; }, z.core.$strict>], "kind">>>; marketAddress: z.ZodString; marketId: z.ZodString; settlementMint: z.ZodString; pair: z.ZodString; owner: z.ZodString; side: z.ZodEnum<{ yes: "yes"; no: "no"; unknown: "unknown"; }>; sideCode: z.ZodNumber; sideLabel: z.ZodEnum<{ unknown: "unknown"; buy_yes: "buy_yes"; sell_yes: "sell_yes"; buy_no: "buy_no"; sell_no: "sell_no"; }>; originalSideCode: z.ZodNumber; canonicalSideCode: z.ZodNumber; canonicalSideLabel: z.ZodEnum<{ bid: "bid"; ask: "ask"; }>; isYes: z.ZodBoolean; priceBps: z.ZodNumber; quantity: z.ZodString; filled: z.ZodString; filledQuantity: z.ZodString; status: z.ZodEnum<{ unknown: "unknown"; expired: "expired"; open: "open"; filled: "filled"; cancelled: "cancelled"; pending_cancel: "pending_cancel"; cancel_failed: "cancel_failed"; }>; statusCode: z.ZodNumber; orderType: z.ZodNumber; createdAt: z.ZodNullable<z.ZodString>; updatedAt: z.ZodNullable<z.ZodString>; expiresAt: z.ZodNullable<z.ZodString>; expiredClaimable: z.ZodNullable<z.ZodBoolean>; }, z.core.$strip>>; total: z.ZodNumber; limit: z.ZodNumber; offset: z.ZodNumber; nextCursor: z.ZodNullable<z.ZodString>; }, z.core.$strip>;
OwnerOrdersQuery#
Filters for orders belonging to the signing wallet.
Declaration source: packages/core/src/api/ownerOrders.ts:15.
export interface OwnerOrdersQuery {
status?: (typeof OWNER_ORDER_STATUSES)[number];
market?: string;
/** Nonzero 16-byte client order ID encoded as hex. */
clientOrderId?: string;
/** Strategy group number between 1 and 255. */
groupId?: number;
/** Strategy ID under the authenticated owner. */
strategyId?: number;
includePlacement?: boolean;
includeExecutionControls?: boolean;
limit?: number;
/** Opaque cursor returned by the preceding page. */
cursor?: string;
}
Field documentation
clientOrderId— Nonzero 16-byte client order ID encoded as hex.groupId— Strategy group number between 1 and 255.strategyId— Strategy ID under the authenticated owner.cursor— Opaque cursor returned by the preceding page.
OwnerStrategiesPage#
Not documented.
Declaration source: packages/core/src/api/ownerStrategies.ts:51.
export type OwnerStrategiesPage = z.infer<typeof ownerStrategiesPageSchema>;
ownerStrategiesPageSchema#
Not documented.
Declaration source: packages/core/src/api/ownerStrategies.ts:22.
export declare const ownerStrategiesPageSchema: z.ZodObject<{ owner: z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>; programId: z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>; asOfSlot: z.ZodString; strategies: z.ZodArray<z.ZodObject<{ address: z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>; strategyId: z.ZodNumber; delegate: z.ZodNullable<z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>>; status: z.ZodEnum<{ active: "active"; stopped: "stopped"; }>; createdSlot: z.ZodString; expiresAt: z.ZodString; allowedActions: z.ZodNumber; allowedMarkets: z.ZodArray<z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>>; allowedMints: z.ZodArray<z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>>; maxOrderQuoteAtoms: z.ZodString; capitalBudgetAtoms: z.ZodString; capitalUsedAtoms: z.ZodString; capitalEpoch: z.ZodNumber; maxPositionShares: z.ZodString; maxFeeBps: z.ZodNumber; maxSlippageBps: z.ZodNumber; maxCoveredOrderTtlSeconds: z.ZodNumber; withdrawDestinations: z.ZodArray<z.ZodString & z.ZodType<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string, z.core.$ZodTypeInternals<import("node_modules/@solana/addresses/dist/types/address").Address<string>, string>>>; configGeneration: z.ZodNumber; }, z.core.$strict>>; nextAfterId: z.ZodNullable<z.ZodNumber>; }, z.core.$strict>;
OwnerStrategiesQuery#
Not documented.
Declaration source: packages/core/src/api/ownerStrategies.ts:50.
export type OwnerStrategiesQuery = z.infer<typeof ownerStrategiesQuerySchema>;
ownerStrategiesQuerySchema#
Not documented.
Declaration source: packages/core/src/api/ownerStrategies.ts:14.
export declare const ownerStrategiesQuerySchema: z.ZodObject<{ strategyId: z.ZodOptional<z.ZodNumber>; afterId: z.ZodOptional<z.ZodNumber>; limit: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>;
OwnRestingLevel#
One of the trader's own resting orders.
Declaration source: packages/core/src/preflight/placeOrder.ts:127.
export interface OwnRestingLevel {
/** `0` = bid (BUY), `1` = ask (SELL) — the indexer's `canonicalSideCode`. */
canonicalSide: CanonicalSide;
/** The price the order rests at, in its own outcome's price space, bps. */
canonicalPriceBps: number;
/**
* The resting order's outcome lane. A YES order and a NO order never cross
* (each lane is priced in its own outcome space), so a level with a known
* outcome only counts against an order in the same outcome. Omitted matches
* either outcome, which can only over-claim the self-cross copy.
*/
outcome?: OutcomeAsset;
}
Field documentation
canonicalSide—0= bid (BUY),1= ask (SELL) — the indexer'scanonicalSideCode.canonicalPriceBps— The price the order rests at, in its own outcome's price space, bps.outcome— The resting order's outcome lane. A YES order and a NO order never cross (each lane is priced in its own outcome space), so a level with a known outcome only counts against an order in the same outcome. Omitted matches either outcome, which can only over-claim the self-cross copy.
PaginatedResponse#
Not documented.
Declaration source: packages/core/src/api/types.ts:18.
export interface PaginatedResponse<T> {
data: T[];
total: number;
page: number;
limit: number;
hasMore: boolean;
}
PaginatedResponseSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:49.
export function PaginatedResponseSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{ data: z.ZodArray<T>; total: z.ZodNumber; page: z.ZodNumber; limit: z.ZodNumber; hasMore: z.ZodBoolean; }, z.core.$loose>;
Parameters
itemSchema: T— Not documented.
Returns
z.ZodObject<{ data: z.ZodArray<T>; total: z.ZodNumber; page: z.ZodNumber; limit: z.ZodNumber; hasMore: z.ZodBoolean; }, z.core.$loose>
Not documented.
Throws
Not documented.
</details> <details> <summary>parseAdvisory</summary>parseAdvisory#
null advisory means "not flagged". An unrecognized status degrades to caution, never silence.
Declaration source: packages/core/src/tokensXyz/upstream.ts:46.
export function parseAdvisory(value: unknown): CurrencyAdvisory | null;
Parameters
value: unknown— Not documented.
Returns
CurrencyAdvisory | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseAvailability</summary>parseAvailability#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:188.
export function parseAvailability(value: unknown, path?: string): Availability;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Availability'.
Returns
"available" | "unavailable"
Not documented.
Throws
Not documented.
Defaults
path:'Availability'.
parseCanonicalInstrumentId#
Not documented.
Declaration source: packages/core/src/instruments.ts:201.
export function parseCanonicalInstrumentId(symbol: string): ParsedCanonicalInstrumentId;
Parameters
symbol: string— Not documented.
Returns
ParsedCanonicalInstrumentId
Not documented.
Throws
Not documented.
</details> <details> <summary>parseCanonicalSymbol</summary>parseCanonicalSymbol#
Not documented.
Declaration source: packages/core/src/instruments.ts:176.
export function parseCanonicalSymbol(symbol: string): ParsedCanonicalSymbol;
Parameters
symbol: string— Not documented.
Returns
ParsedCanonicalSymbol
Not documented.
Throws
Not documented.
</details> <details> <summary>parseCaseOutcome</summary>parseCaseOutcome#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:254.
export function parseCaseOutcome(value: unknown, path?: string): CaseOutcome;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'CaseOutcome'.
Returns
"fail" | "pass" | "provider_failing_reported_correctly"
Not documented.
Throws
Not documented.
Defaults
path:'CaseOutcome'.
parseCaseResult#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:258.
export function parseCaseResult(value: unknown, path?: string): CaseResult;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'CaseResult'.
Returns
CaseResult
Not documented.
Throws
Not documented.
Defaults
path:'CaseResult'.
parseCoalescingMode#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:180.
export function parseCoalescingMode(value: unknown, path?: string): "single_market" | "multi_market";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'CoalescingMode'.
Returns
"single_market" | "multi_market"
Not documented.
Throws
Not documented.
Defaults
path:'CoalescingMode'.
parseConfidence#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:191.
export function parseConfidence(value: unknown, path?: string): Confidence;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Confidence'.
Returns
"unknown" | "configured" | "verified_active"
Not documented.
Throws
Not documented.
Defaults
path:'Confidence'.
parseCorpusReport#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:270.
export function parseCorpusReport(value: unknown, path?: string): CorpusReport;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'CorpusReport'.
Returns
CorpusReport
Not documented.
Throws
Not documented.
Defaults
path:'CorpusReport'.
parseCurrencyInput#
Exact parse of a user-entered amount into base units at decimals.
Never rounds: input with more fractional digits than decimals is refused
as too_precise, and values outside (0, u64::MAX] are refused as
out_of_range. Anything that is not a plain non-negative decimal numeral
(empty, signed, exponent, separators, over-long) is invalid, as is a
decimals argument that is not a non-negative integer.
Declaration source: packages/core/src/currency/amount.ts:38.
export function parseCurrencyInput(input: string, decimals: number): CurrencyInputResult;
Parameters
input: string— Not documented.decimals: number— Not documented.
Returns
CurrencyInputResult
Not documented.
Throws
Not documented.
</details> <details> <summary>parseCurrencyMetadata</summary>parseCurrencyMetadata#
One row of the proxy response; null when malformed so a bad row is dropped, not trusted.
Declaration source: packages/core/src/tokensXyz/client.ts:208.
export function parseCurrencyMetadata(value: unknown): CurrencyMetadata | null;
Parameters
value: unknown— Not documented.
Returns
CurrencyMetadata | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseCurrencyMetadataResponse</summary>parseCurrencyMetadataResponse#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:232.
export function parseCurrencyMetadataResponse(data: unknown): CurrencyMetadataResponse | null;
Parameters
data: unknown— Not documented.
Returns
CurrencyMetadataResponse | null
Not documented.
Throws
Not documented.
</details> <details> <summary>ParsedCanonicalInstrumentId</summary>ParsedCanonicalInstrumentId#
Not documented.
Declaration source: packages/core/src/instruments.ts:35.
export interface ParsedCanonicalInstrumentId {
chain: InstrumentChain;
programId: string;
marketAddress: string;
outcome: InstrumentOutcome;
}
ParsedCanonicalSymbol#
Not documented.
Declaration source: packages/core/src/instruments.ts:19.
export interface ParsedCanonicalSymbol {
base: string;
quote: string;
pair: string;
tStart: Date;
durationSeconds: bigint;
outcome: InstrumentOutcome;
}
parseDecimalToBaseUnits#
Parses a non-negative decimal string into base units at the given number
of decimals (e.g., parseDecimalToBaseUnits('10.5', 6) === 10_500_000n;
parseDecimalToBaseUnits('64.35', 2) === 6435n).
Returns null — never a substituted value — when the input is not a plain
non-negative decimal numeral or carries more fractional digits than
decimals can represent exactly.
Declaration source: packages/core/src/utils/decimal.ts:25.
export function parseDecimalToBaseUnits(value: string, decimals: number): bigint | null;
Parameters
value: string— Not documented.decimals: number— Not documented.
Returns
bigint | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseDecision</summary>parseDecision#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:203.
export function parseDecision(value: unknown, path?: string): Decision;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Decision'.
Returns
Decision
Not documented.
Throws
Not documented.
Defaults
path:'Decision'.
parseDeliveryError#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:154.
export function parseDeliveryError(value: unknown, path?: string): DeliveryError;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'DeliveryError'.
Returns
DeliveryError
Not documented.
Throws
Not documented.
Defaults
path:'DeliveryError'.
parseDeliveryId#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:112.
export function parseDeliveryId(value: unknown, path?: string): DeliveryId;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'DeliveryId'.
Returns
"harmonic" | "ordinary" | "bam_mpp"
Not documented.
Throws
Not documented.
Defaults
path:'DeliveryId'.
parseDispatchReceipt#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:168.
export function parseDispatchReceipt(value: unknown, path?: string): DispatchReceipt;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'DispatchReceipt'.
Returns
DispatchReceipt
Not documented.
Throws
Not documented.
Defaults
path:'DispatchReceipt'.
ParsedRegistry#
Not documented.
Declaration source: packages/core/src/tokensXyz/upstream.ts:160.
export interface ParsedRegistry {
readonly byMint: ReadonlyMap<string, RegistryRow>;
readonly total: number | null;
/** Unix ms of the last successful registry sync; the freshness signal. */
readonly syncedAtMs: number | null;
readonly generatedAt: string | null;
}
Field documentation
syncedAtMs— Unix ms of the last successful registry sync; the freshness signal.
ParsedStopLossTransaction#
Not documented.
Declaration source: packages/core/src/stopLoss/transaction.ts:93.
export interface ParsedStopLossTransaction {
/** base58 fee-payer signature: the transaction id and the idempotency key. */
readonly signature: string;
readonly signatureBytes: Uint8Array;
readonly messageBytes: Uint8Array;
readonly owner: Address;
readonly nonceAccount: Address;
/** The durable nonce the wire was signed against. */
readonly nonceValue: string;
readonly route: 'wallet' | 'freeFunds';
readonly market: Address;
readonly outcome: OutcomeAsset;
readonly quantity: bigint;
readonly priceBps: number;
readonly worstPriceBps: number;
readonly minFillQuantity: bigint;
readonly executionValidUntil: bigint;
readonly computeUnitPrice: bigint | null;
readonly splineSeatCount: number;
/** The placement's accounts, in order. */
readonly placementAccounts: readonly Address[];
}
Field documentation
signature— base58 fee-payer signature: the transaction id and the idempotency key.nonceValue— The durable nonce the wire was signed against.placementAccounts— The placement's accounts, in order.
parseEarningsVolume#
Settlement-token volume (six decimals). Reject malformed or out-of-range input.
Declaration source: packages/core/src/feeEarnings.ts:31.
export function parseEarningsVolume(input: string): bigint | null;
Parameters
input: string— Not documented.
Returns
bigint | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseEnrollment</summary>parseEnrollment#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:185.
export function parseEnrollment(value: unknown, path?: string): Enrollment;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Enrollment'.
Returns
"unknown" | "enrolled" | "not_enrolled" | "not_applicable"
Not documented.
Throws
Not documented.
Defaults
path:'Enrollment'.
parseEnvelopeError#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:131.
export function parseEnvelopeError(value: unknown, path?: string): EnvelopeError;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'EnvelopeError'.
Returns
EnvelopeError
Not documented.
Throws
Not documented.
Defaults
path:'EnvelopeError'.
parseExecutionCapability#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:111.
export function parseExecutionCapability(value: unknown, path?: string): ExecutionCapability;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'ExecutionCapability'.
Returns
ExecutionCapability
Not documented.
Throws
Not documented.
Defaults
path:'ExecutionCapability'.
parseFailureMode#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:194.
export function parseFailureMode(value: unknown, path?: string): FailureMode;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'FailureMode'.
Returns
"unknown" | "none" | "provider_failover" | "local_scheduler"
Not documented.
Throws
Not documented.
Defaults
path:'FailureMode'.
parseFeePayerParticipates#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:189.
export function parseFeePayerParticipates(value: unknown, path?: string): "yes" | "no";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'FeePayerParticipates'.
Returns
"yes" | "no"
Not documented.
Throws
Not documented.
Defaults
path:'FeePayerParticipates'.
parseHighWaterOnFailure#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:183.
export function parseHighWaterOnFailure(value: unknown, path?: string): "kept" | "rolled_back";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'HighWaterOnFailure'.
Returns
"kept" | "rolled_back"
Not documented.
Throws
Not documented.
Defaults
path:'HighWaterOnFailure'.
parseHighWaterReset#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:186.
export function parseHighWaterReset(value: unknown, path?: string): "never" | "on_request" | "fresh_domain";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'HighWaterReset'.
Returns
"never" | "on_request" | "fresh_domain"
Not documented.
Throws
Not documented.
Defaults
path:'HighWaterReset'.
parseIngress#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:199.
export function parseIngress(value: unknown, path?: string): Ingress;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Ingress'.
Returns
"maker" | "ordinary"
Not documented.
Throws
Not documented.
Defaults
path:'Ingress'.
parseKalshiDecimal#
Exact nonnegative dollar lexeme to 10^4 units; never rounds or defaults N.
Declaration source: packages/core/src/externalPayout.ts:55.
export function parseKalshiDecimal(value: string): bigint;
Parameters
value: string— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>parseMakerSurface</summary>parseMakerSurface#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:182.
export function parseMakerSurface(value: unknown, path?: string): MakerSurface;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'MakerSurface'.
Returns
"spline_seat" | "managed_book_quotes"
Not documented.
Throws
Not documented.
Defaults
path:'MakerSurface'.
parseMarketSearch#
Parse a reviewed symbol plus optional cadence, e.g. SOL, SOL/USD, SOL 15m. A bare base asset means its USD pair. Unknown or malformed searches match nothing; creator descriptions and partial symbol matches are never consulted.
Declaration source: packages/core/src/marketSearch.ts:17.
export function parseMarketSearch(query: string): MarketSearch | null;
Parameters
query: string— Not documented.
Returns
MarketSearch | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseMarketSnapshots</summary>parseMarketSnapshots#
POST /v1/assets/market-snapshots -> facts per mint. A row whose token is
null is unregistered (or not cached yet) and maps to null. A non-positive
price is "no data", never a price of zero.
Declaration source: packages/core/src/tokensXyz/upstream.ts:99.
export function parseMarketSnapshots(json: unknown): ReadonlyMap<string, UpstreamMarketFacts | null>;
Parameters
json: unknown— Not documented.
Returns
ReadonlyMap<string, UpstreamMarketFacts | null>
Not documented.
Throws
Not documented.
</details> <details> <summary>parseMessageVersion</summary>parseMessageVersion#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:116.
export function parseMessageVersion(value: unknown, path?: string): MessageVersion;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'MessageVersion'.
Returns
"legacy" | "v0"
Not documented.
Throws
Not documented.
Defaults
path:'MessageVersion'.
parseObservationKind#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:180.
export function parseObservationKind(value: unknown, path?: string): ObservationKind;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'ObservationKind'.
Returns
ObservationKind
Not documented.
Throws
Not documented.
Defaults
path:'ObservationKind'.
parseOraclePrice#
Not documented.
Declaration source: packages/core/src/display.ts:14.
export function parseOraclePrice(price: string | number | null | undefined, expo: number | null | undefined): number | null;
Parameters
price: string | number | null | undefined— Not documented.expo: number | null | undefined— Not documented.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseOrderingCapability</summary>parseOrderingCapability#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:179.
export function parseOrderingCapability(value: unknown, path?: string): "ordinary" | "bundle_order_only" | "maker_batch_priority" | "maker_slot_prefix";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'OrderingCapability'.
Returns
"ordinary" | "bundle_order_only" | "maker_batch_priority" | "maker_slot_prefix"
Not documented.
Throws
Not documented.
Defaults
path:'OrderingCapability'.
parsePayloadLengths#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:195.
export function parsePayloadLengths(value: unknown, path?: string): "one" | "two";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'PayloadLengths'.
Returns
"one" | "two"
Not documented.
Throws
Not documented.
Defaults
path:'PayloadLengths'.
parsePositionsReadSessionGrant#
Validate an issuing response against the expected owner/program. Throws {@link SeesawValidationError} when the server returned a session for a different scope, so a token can never be used for the wrong wallet.
Declaration source: packages/core/src/api/readSession.ts:66.
export function parsePositionsReadSessionGrant(raw: unknown, expected: { readonly owner: string; readonly programId?: string; }): PositionsReadSessionGrant;
Parameters
raw: unknown— Not documented.expected: { readonly owner: string; readonly programId?: string; }— Not documented.
Returns
PositionsReadSessionGrant
Not documented.
Throws
Not documented.
</details> <details> <summary>parseProvider</summary>parseProvider#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:176.
export function parseProvider(value: unknown, path?: string): Provider;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Provider'.
Returns
"rpc" | "bam" | "harmonic"
Not documented.
Throws
Not documented.
Defaults
path:'Provider'.
parseProviderObservation#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:188.
export function parseProviderObservation(value: unknown, path?: string): ProviderObservation;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'ProviderObservation'.
Returns
ProviderObservation
Not documented.
Throws
Not documented.
Defaults
path:'ProviderObservation'.
parsePublicationHeader#
u64 fields are JSON numbers in the Rust form; values above Number.MAX_SAFE_INTEGER are
rejected because JSON.parse has already lost their precision.
Declaration source: packages/core/src/execution/stream.ts:79.
export function parsePublicationHeader(value: unknown, path?: string): PublicationHeader;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'PublicationHeader'.
Returns
PublicationHeader
Not documented.
Throws
Not documented.
Defaults
path:'PublicationHeader'.
parsePublicationProfile#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:68.
export function parsePublicationProfile(value: unknown, path?: string): PublicationProfile;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'QuoteProfile'.
Returns
"bounded" | "ordinary" | "same_slot"
Not documented.
Throws
Not documented.
Defaults
path:'QuoteProfile'.
parsePublicationState#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:65.
export function parsePublicationState(value: unknown, path?: string): "finalized" | "confirmed" | "signed" | "constructed" | "validated" | "dispatched" | "admitted" | "admission_unknown" | "superseded" | "selected" | "execution_success" | "execution_failure" | "execution_unknown";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'PublicationState'.
Returns
"finalized" | "confirmed" | "signed" | "constructed" | "validated" | "dispatched" | "admitted" | "admission_unknown" | "superseded" | "selected" | "execution_success" | "execution_failure" | "execution_unknown"
Not documented.
Throws
Not documented.
Defaults
path:'PublicationState'.
parseRecordedTransaction#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:220.
export function parseRecordedTransaction(value: unknown, path?: string): RecordedTransaction;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'RecordedTransaction'.
Returns
RecordedTransaction
Not documented.
Throws
Not documented.
Defaults
path:'RecordedTransaction'.
parseRecoveryState#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:68.
export function parseRecoveryState(value: unknown, path?: string): "rotated_on_chain" | "provider_enrollment_recovery_needed" | "priority_unavailable" | "priority_restored";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'RecoveryState'.
Returns
"rotated_on_chain" | "provider_enrollment_recovery_needed" | "priority_unavailable" | "priority_restored"
Not documented.
Throws
Not documented.
Defaults
path:'RecoveryState'.
parseRegistryItem#
Not documented.
Declaration source: packages/core/src/tokensXyz/upstream.ts:168.
export function parseRegistryItem(value: unknown, syncedAtMs: number | null): RegistryRow | null;
Parameters
value: unknown— Not documented.syncedAtMs: number | null— Not documented.
Returns
RegistryRow | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseRegistryResponse</summary>parseRegistryResponse#
GET /v2/registry page.
Declaration source: packages/core/src/tokensXyz/upstream.ts:196.
export function parseRegistryResponse(json: unknown): ParsedRegistry;
Parameters
json: unknown— Not documented.
Returns
ParsedRegistry
Not documented.
Throws
Not documented.
</details> <details> <summary>parseRiskSummary</summary>parseRiskSummary#
GET /v1/assets/risk-summary?mint=. Placeholder score/grade/tone are dropped when data is insufficient.
Declaration source: packages/core/src/tokensXyz/upstream.ts:132.
export function parseRiskSummary(json: unknown): CurrencyRisk | null;
Parameters
json: unknown— Not documented.
Returns
CurrencyRisk | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseRiverOrderRequest</summary>parseRiverOrderRequest#
Check the shape of a simple order read from untrusted input (a file, a prompt). Refuses
subaccount_id and any other field the gateway would not accept from this client.
Declaration source: packages/core/src/riverClient.ts:387.
export function parseRiverOrderRequest(value: unknown): RiverOrderRequest;
Parameters
value: unknown— Not documented.
Returns
RiverOrderRequest
Not documented.
Throws
Not documented.
</details> <details> <summary>parseRoundQuery</summary>parseRoundQuery#
Split a query into search tokens and an optional round length.
The first token that reads as a round length is taken as the length and
removed: 15, 15m, 15min, 1h, 1, 4, 4h, 1d, 24h, daily,
hourly. Bare numbers map 5 → 5m, 15 → 15m, 1/60 → 1h, 4/240 → 4h,
24/1440 → 1d. Everything else stays a lowercase token
("sol 15" → { tokens: ['sol'], length: '15m' }).
Declaration source: packages/core/src/ux/search.ts:78.
export function parseRoundQuery(query: string): { tokens: string[]; length: RoundLengthKey | null; };
Parameters
query: string— Not documented.
Returns
{ tokens: string[]; length: RoundLengthKey | null; }
Not documented.
Throws
Not documented.
</details> <details> <summary>parseSeesawError</summary>parseSeesawError#
Parse a Solana transaction error into a Seesaw error.
Handles both custom program errors (with Seesaw error codes) and generic Solana errors.
Declaration source: packages/core/src/errors.ts:68.
export function parseSeesawError(error: unknown): SeesawError | null;
Parameters
error: unknown— - The caught error from a transaction.
Returns
SeesawError | null
Parsed error, or null if not a Seesaw error.
Throws
Not documented.
</details> <details> <summary>parseSeesawEventLog</summary>parseSeesawEventLog#
Not documented.
Declaration source: packages/core/src/events.ts:1016.
export function parseSeesawEventLog(log: string): SeesawTextEvent | null;
Parameters
log: string— Not documented.
Returns
SeesawTextEvent | null
Not documented.
Throws
Not documented.
</details> <details> <summary>parseSeesawEventLogs</summary>parseSeesawEventLogs#
Not documented.
Declaration source: packages/core/src/events.ts:1048.
export function parseSeesawEventLogs(logs: readonly string[]): SeesawTextEvent[];
Parameters
logs: readonly string[]— Not documented.
Returns
SeesawTextEvent[]
Not documented.
Throws
Not documented.
</details> <details> <summary>parseStandinRecording</summary>parseStandinRecording#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:242.
export function parseStandinRecording(value: unknown, path?: string): StandinRecording;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Recording'.
Returns
StandinRecording
Not documented.
Throws
Not documented.
Defaults
path:'Recording'.
parseStopLossTransaction#
Structural parse of a signed stop wire. Synchronous and network-free; does not re-derive PDAs or verify the signature (see {@link validateStopLossTransaction}).
Declaration source: packages/core/src/stopLoss/transaction.ts:134.
export function parseStopLossTransaction(wire: Uint8Array, programAddress: Address): ParsedStopLossTransaction;
Parameters
wire: Uint8Array<ArrayBufferLike>— Not documented.programAddress: Address— Not documented.
Returns
ParsedStopLossTransaction
Not documented.
Throws
Not documented.
</details> <details> <summary>parseStreamCondition</summary>parseStreamCondition#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:71.
export function parseStreamCondition(value: unknown, path?: string): "not_enrolled" | "healthy" | "provider_unavailable" | "poisoned_stream" | "fee_cap_reached" | "suspended";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'StreamCondition'.
Returns
"not_enrolled" | "healthy" | "provider_unavailable" | "poisoned_stream" | "fee_cap_reached" | "suspended"
Not documented.
Throws
Not documented.
Defaults
path:'StreamCondition'.
parseStreamId#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:55.
export function parseStreamId(value: unknown, path?: string): StreamId;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'StreamId'.
Returns
StreamId
Not documented.
Throws
Not documented.
Defaults
path:'StreamId'.
parseSwitches#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:142.
export function parseSwitches(value: unknown, path?: string): Switches;
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'Switches'.
Returns
Switches
Not documented.
Throws
Not documented.
Defaults
path:'Switches'.
parseTransactionAttemptJournal#
Parse and authenticate a stored journal. A journal for another scope is a corruption, not an empty journal: silently ignoring it could hide a pending liability behind a wallet/network switch.
Declaration source: packages/core/src/transactionAttempt.ts:688.
export function parseTransactionAttemptJournal(encoded: string | null, scope: TransactionAttemptScope): TransactionAttemptJournalDocument;
Parameters
encoded: string | null— Not documented.scope: TransactionAttemptScope— Not documented. See TransactionAttemptScope for its declaration and available field documentation.
Returns
TransactionAttemptJournalDocument
Not documented.
Throws
Not documented.
</details> <details> <summary>parseUnusedWritableKeys</summary>parseUnusedWritableKeys#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:192.
export function parseUnusedWritableKeys(value: unknown, path?: string): "rejected" | "counted" | "ignored";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'UnusedWritableKeys'.
Returns
"rejected" | "counted" | "ignored"
Not documented.
Throws
Not documented.
Defaults
path:'UnusedWritableKeys'.
parseUpstreamError#
tokens.xyz error envelope: { error: { _tag, message, details?: { code } } }. Branch on tag, then code.
Declaration source: packages/core/src/tokensXyz/upstream.ts:219.
export function parseUpstreamError(status: number, json: unknown): UpstreamErrorInfo;
Parameters
status: number— Not documented.json: unknown— Not documented.
Returns
UpstreamErrorInfo
Not documented.
Throws
Not documented.
</details> <details> <summary>parseUserCapabilityState</summary>parseUserCapabilityState#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:74.
export function parseUserCapabilityState(value: unknown, path?: string): "confirmation_unknown" | "not_enrolled" | "priority_unavailable" | "quote_active" | "quote_expired" | "bounded_not_current_slot" | "refresh_failed" | "provider_fallback";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'UserCapabilityState'.
Returns
"confirmation_unknown" | "not_enrolled" | "priority_unavailable" | "quote_active" | "quote_expired" | "bounded_not_current_slot" | "refresh_failed" | "provider_fallback"
Not documented.
Throws
Not documented.
Defaults
path:'UserCapabilityState'.
parseVariantsBatch#
GET /v2/variants?keys=solana:<mint>,... -> facts per registered mint, plus unknown mints.
Declaration source: packages/core/src/tokensXyz/upstream.ts:62.
export function parseVariantsBatch(json: unknown): { readonly variants: ReadonlyMap<string, UpstreamMarketFacts>; readonly missing: ReadonlySet<string>; };
Parameters
json: unknown— Not documented.
Returns
{ readonly variants: ReadonlyMap<string, UpstreamMarketFacts>; readonly missing: ReadonlySet<string>; }
Not documented.
Throws
Not documented.
</details> <details> <summary>parseWriterAuthorization</summary>parseWriterAuthorization#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:177.
export function parseWriterAuthorization(value: unknown, path?: string): "per_program" | "per_signer";
Parameters
value: unknown— Not documented.path: string— Not documented. Default:'WriterAuthorization'.
Returns
"per_program" | "per_signer"
Not documented.
Throws
Not documented.
Defaults
path:'WriterAuthorization'.
partitionInstructionsByWireSize#
Deterministically partition ordered instructions into the fewest consecutive groups that each fit the transport, preserving order. Every group is measured before this returns; an instruction that cannot fit even alone fails planning instead of producing an unsendable group.
Declaration source: packages/core/src/transactionPlan.ts:148.
export function partitionInstructionsByWireSize(instructions: readonly Instruction[], transport: ResolvedTransport, label: string): MeasuredInstructionGroup[];
Parameters
instructions: readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]— Not documented.transport: ResolvedTransport— Not documented.label: string— Not documented.
Returns
MeasuredInstructionGroup[]
Not documented.
Throws
Not documented.
</details> <details> <summary>PartitionRule</summary>PartitionRule#
Only the full partition exists: Seesaw mirrors no combination markets.
Declaration source: packages/core/src/externalPayout.ts:8.
export type PartitionRule = 'FullPartition';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
pause#
Build Pause instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1308.
export function pause(input: PauseInput, programAddress?: Address): Promise<SdkResult<PauseResult>>;
Parameters
input: PauseInput— Not documented. See PauseInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PauseResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
PauseAccounts#
Accounts for Pause instruction.
Declaration source: packages/core/src/instructions.ts:2360.
export interface PauseAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
PauseInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1297.
export interface PauseInput {
authority: Address;
}
PauseResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1301.
export interface PauseResult {
config: Address;
}
PAYLOAD_LENGTHS_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:45.
export declare const PAYLOAD_LENGTHS_VALUES: readonly ["one", "two"];
PayloadLengths#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:46.
export type PayloadLengths = (typeof PAYLOAD_LENGTHS_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
payoutAtomsForShares#
Settlement atoms paid by shareAtoms winning share atoms.
Outcome mints are created with the decimals of the market's settlement currency, so one share atom pays exactly one currency atom at every admitted decimal count (design: "one atom to one atom"). The decimals argument is kept so callers state which currency they mean; it does not scale the result.
Declaration source: packages/core/src/display.ts:231.
export function payoutAtomsForShares(shareAtoms: bigint, _moneyDecimals?: number): bigint;
Parameters
shareAtoms: bigint— Not documented._moneyDecimals: number | undefined— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>PayoutOrigin</summary>PayoutOrigin#
Not documented.
Declaration source: packages/core/src/externalPayout.ts:9.
export type PayoutOrigin = 'SourceFinal' | 'LocalTimeout' | 'LocalConflict';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PDA_SEEDS#
Not documented.
Declaration source: packages/core/src/generated/program/index.ts:4.
export declare const PDA_SEEDS: { readonly config: "config"; readonly traderLedger: "trader_ledger"; readonly market: "market"; readonly orderbook: "orderbook"; readonly vault: "vault"; readonly escrowYes: "escrow_yes"; readonly escrowNo: "escrow_no"; readonly referrerTreasury: "referrer_treasury"; readonly referrerEarnings: "referrer_earnings"; readonly externalPreallocation: "external_preallocation"; readonly seesaw: "seesaw"; readonly position: "position"; readonly asset: "asset"; readonly yesMint: "yes_mint"; readonly noMint: "no_mint"; readonly logAuthority: "log"; readonly referral: "referral"; readonly spline: "spline"; readonly splineVault: "spline_vault"; readonly makerSeries: "spline_series"; readonly seriesVault: "spline_series_vault"; readonly splineSeat: "spline_seat"; readonly marketExt: "market_ext"; readonly marketMeta: "market_meta"; };
peekSeatLevel#
The first unconsumed level of a side, in the taker's lane, or null when
the side is exhausted, its price leaves 1..=9999, or the price is beyond
the taker's bound (mirrors SplineSnapshot::peek_level).
Declaration source: packages/core/src/router/seatQuote.ts:156.
export function peekSeatLevel(levels: readonly SeatCurveLevel[], midPriceBps: number, side: SeatSide, consumedLots: bigint, lane: QuoteLane, isBuy: boolean, boundBps: number, tickSizeBps?: number): SeatLevelQuote | null;
Parameters
levels: readonly SeatCurveLevel[]— Not documented.midPriceBps: number— Not documented.side: SeatSide— Not documented. See SeatSide for its declaration and available field documentation.consumedLots: bigint— Not documented.lane: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.isBuy: boolean— Not documented.boundBps: number— Not documented.tickSizeBps: number— Not documented. Default:1.
Returns
SeatLevelQuote | null
Not documented.
Throws
Not documented.
Defaults
tickSizeBps:1.
PendingOrder#
Not documented.
Declaration source: packages/core/src/api/types.ts:176.
export interface PendingOrder {
id: string;
marketAddress: string;
marketPair: string;
side: ApiOrderSide;
price: number;
quantity: bigint;
filledQuantity: bigint;
status: OrderStatus;
createdAt: string;
marketEndTime: number;
}
PendingOrderSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:140.
export declare const PendingOrderSchema: z.ZodObject<{ id: z.ZodString; marketAddress: z.ZodString; marketPair: z.ZodString; side: z.ZodEnum<{ buy_yes: "buy_yes"; sell_yes: "sell_yes"; buy_no: "buy_no"; sell_no: "sell_no"; }>; price: z.ZodNumber; quantity: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; filledQuantity: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; status: z.ZodEnum<{ open: "open"; partial: "partial"; filled: "filled"; cancelled: "cancelled"; }>; createdAt: z.ZodString; marketEndTime: z.ZodNumber; }, z.core.$loose>;
PendingRedeemInstruction#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:37.
export interface PendingRedeemInstruction<TSignature = string> {
readonly instructionIndex: number;
readonly instructionIdentity: string;
/** Submitted signatures whose terminal progress could not be authenticated. */
readonly signatures: TSignature[];
}
Field documentation
signatures— Submitted signatures whose terminal progress could not be authenticated.
PendingRedeemReconciliation#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:285.
export type PendingRedeemReconciliation<TSignature = string> =
| { readonly outcome: 'none'; readonly progress: RedeemRecoveryProgress<TSignature> }
| { readonly outcome: 'completed'; readonly progress: RedeemRecoveryProgress<TSignature> }
| { readonly outcome: 'more'; readonly progress: RedeemRecoveryProgress<TSignature> }
| { readonly outcome: 'failed'; readonly progress: RedeemRecoveryProgress<TSignature> }
| {
readonly outcome: 'unknown';
readonly progress: RedeemRecoveryProgress<TSignature>;
readonly error: unknown;
};
percentToBps#
Convert percent to basis points (e.g., 50 -> 5000).
Declaration source: packages/core/src/price.ts:29.
export function percentToBps(pct: number): number;
Parameters
pct: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>PersonalStats</summary>PersonalStats#
Not documented.
Declaration source: packages/core/src/api/types.ts:302.
export interface PersonalStats {
totalTrades: number;
winRate: number;
totalPnl: number;
averagePnl: number;
profitFactor: number;
currentWinStreak: number;
longestWinStreak: number;
currentDayStreak: number;
bestTrade: { pair: string; pnl: number; date: string } | null;
worstTrade: { pair: string; pnl: number; date: string } | null;
bestDay: { date: string; pnl: number } | null;
worstDay: { date: string; pnl: number } | null;
preferredSide: 'yes' | 'no' | 'balanced';
mostTradedPair: string | null;
averageHoldTime: number;
tradesByHour: number[];
tradesByDayOfWeek: number[];
mostActiveHour: number;
mostActiveDay: number;
vsAverageWinRate: number;
}
PersonalStatsSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:277.
export declare const PersonalStatsSchema: z.ZodObject<{ totalTrades: z.ZodNumber; winRate: z.ZodNumber; totalPnl: z.ZodNumber; averagePnl: z.ZodNumber; profitFactor: z.ZodNumber; currentWinStreak: z.ZodNumber; longestWinStreak: z.ZodNumber; currentDayStreak: z.ZodNumber; bestTrade: z.ZodNullable<z.ZodObject<{ pair: z.ZodString; pnl: z.ZodNumber; date: z.ZodString; }, z.core.$loose>>; worstTrade: z.ZodNullable<z.ZodObject<{ pair: z.ZodString; pnl: z.ZodNumber; date: z.ZodString; }, z.core.$loose>>; bestDay: z.ZodNullable<z.ZodObject<{ date: z.ZodString; pnl: z.ZodNumber; }, z.core.$loose>>; worstDay: z.ZodNullable<z.ZodObject<{ date: z.ZodString; pnl: z.ZodNumber; }, z.core.$loose>>; preferredSide: z.ZodEnum<{ yes: "yes"; no: "no"; balanced: "balanced"; }>; mostTradedPair: z.ZodNullable<z.ZodString>; averageHoldTime: z.ZodNumber; tradesByHour: z.ZodArray<z.ZodNumber>; tradesByDayOfWeek: z.ZodArray<z.ZodNumber>; mostActiveHour: z.ZodNumber; mostActiveDay: z.ZodNumber; vsAverageWinRate: z.ZodNumber; }, z.core.$loose>;
pickTreasuryIndex#
Pick a protocol-treasury shard index for a place-order transaction.
Matches the Rust SDK's pda::pick_treasury_index exactly, so a
cross-language client and server agree on which shard a given
(payer, slot) pair maps to.
n MUST be a power of two — the function uses & (n - 1) instead of
modulo for cheap dispatch and to match the documented index-selection
algorithm. Throws if n is zero or not a power of two.
Declaration source: packages/core/src/treasury.ts:62.
export function pickTreasuryIndex(payer: Address, slot: bigint, n?: number): number;
Parameters
payer: Address— - the transaction payer's public key.slot: bigint— - a strictly-increasing per-call value. Real Solana slot is ideal; an in-process counter is sufficient for the shard-distribution objective.n: number— - shard count, defaults to {@link MAX_TREASURY_RECIPIENTS}. Default:MAX_TREASURY_RECIPIENTS.
Returns
number
shard index ∈ [0, n).
Throws
Not documented.
Defaults
n:MAX_TREASURY_RECIPIENTS.
PLACE_ORDER_HEAP_BYTES_PER_BATCHED_ORDER#
D0{byte/order} Heap retained by ONE PlaceOrder sub-call inside a batching
wrapper.
PlaceMultiplePostOnly (0x0D) and its free-funds twin (0x10) loop
the canonical place_order processor once per entry. The BPF bump allocator
never frees, so each entry retains a full per-call footprint (rollback
journal, spline snapshot array, input/output boxes) instead of reusing the
previous entry's block. Mirrors
PLACE_ORDER_HEAP_BYTES_PER_BATCHED_ORDER in program/src/constants.rs;
see that constant for the LiteSVM measurement it is derived from.
Declaration source: packages/core/src/constants.ts:409.
export declare const PLACE_ORDER_HEAP_BYTES_PER_BATCHED_ORDER: number;
PLACE_ORDER_HEAP_FRAME_BYTES#
D0{byte} Heap frame requested for worst-case PlaceOrder transactions.
The live matcher can exceed Solana's default 32 KiB program heap on a
fully populated book, so clients should prepend a compute-budget
requestHeapFrame instruction before PlaceOrder.
Declaration source: packages/core/src/constants.ts:389.
export declare const PLACE_ORDER_HEAP_FRAME_BYTES: number;
PlaceFamilyAccountsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2897.
export interface PlaceFamilyAccountsInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
/** Authenticated market state used to attach the mandatory spline segment. */
marketState?: PlaceOrderInput['marketState'];
marketAddress: Address;
user: Address;
userTokenAccount: Address;
/**
* Required source of `PlaceOrder` account 7: config facts or a destination
* resolved for this market's mint and `params.treasuryIndex` (see
* `PlaceOrderInput.protocolTreasury`).
*/
protocolTreasury: ProtocolTreasurySource;
settlementMint: Address;
userYesAta: Address;
userNoAta: Address;
/** Canonical referral-binding PDA for `user`, after resolver eligibility checks. */
takerReferralAccount?: Address;
/** Optional approved taker builder; see {@link TakerBuilderInput}. */
builder?: TakerBuilderInput;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.marketState— Authenticated market state used to attach the mandatory spline segment.protocolTreasury— Required source ofPlaceOrderaccount 7: config facts or a destination resolved for this market's mint andparams.treasuryIndex(seePlaceOrderInput.protocolTreasury).takerReferralAccount— Canonical referral-binding PDA foruser, after resolver eligibility checks.builder— Optional approved taker builder; see {@link TakerBuilderInput}.
PlaceFamilyResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2984.
export interface PlaceFamilyResult {
market: Address;
orderbook: Address;
position: Address;
vault: Address;
traderLedger: Address;
}
placeLimitOrderWithFreeFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:3149.
export function placeLimitOrderWithFreeFunds(input: PlaceOrderInput, programAddress?: Address): Promise<SdkResult<PlaceOrderResult>>;
Parameters
input: PlaceOrderInput— Not documented. See PlaceOrderInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PlaceOrderResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
PlaceMultiplePostOnlyInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2969.
export interface PlaceMultiplePostOnlyInput extends PlaceFamilyAccountsInput {
params: BatchPostOnlyParams;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.marketState— Authenticated market state used to attach the mandatory spline segment.protocolTreasury— Required source ofPlaceOrderaccount 7: config facts or a destination resolved for this market's mint andparams.treasuryIndex(seePlaceOrderInput.protocolTreasury).takerReferralAccount— Canonical referral-binding PDA foruser, after resolver eligibility checks.builder— Optional approved taker builder; see {@link TakerBuilderInput}.
placeMultiplePostOnlyOrders#
Not documented.
Declaration source: packages/core/src/sdk.ts:2992.
export function placeMultiplePostOnlyOrders(input: PlaceMultiplePostOnlyInput, programAddress?: Address): Promise<SdkResult<PlaceFamilyResult>>;
Parameters
input: PlaceMultiplePostOnlyInput— Not documented. See PlaceMultiplePostOnlyInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PlaceFamilyResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
placeMultiplePostOnlyOrdersWithFreeFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:3016.
export function placeMultiplePostOnlyOrdersWithFreeFunds(input: PlaceMultiplePostOnlyInput, programAddress?: Address): Promise<SdkResult<PlaceFamilyResult>>;
Parameters
input: PlaceMultiplePostOnlyInput— Not documented. See PlaceMultiplePostOnlyInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PlaceFamilyResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
placeOrder#
Build PlaceOrder instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:888.
export function placeOrder(input: PlaceOrderInput, programAddress?: Address): Promise<SdkResult<PlaceOrderResult>>;
Parameters
input: PlaceOrderInput— Not documented. See PlaceOrderInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PlaceOrderResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
PlaceOrderAccounts#
Accounts for PlaceOrder instruction.
Declaration source: packages/core/src/instructions.ts:1592.
export interface PlaceOrderAccounts {
market: Address;
orderbook: Address;
userPosition: Address;
userTokenAccount: Address;
vault: Address;
user: Address;
config: Address;
treasuryTokenAccount: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
systemProgram: Address;
settlementMint: Address;
yesEscrow: Address;
noEscrow: Address;
userYesAta: Address;
userNoAta: Address;
yesMint: Address;
noMint: Address;
/** 17. `[writable]` Market-owned trader-ledger PDA. */
traderLedger: Address;
/** Single-seat shorthand for callers with a known creator seat. */
creatorSpline?: Address;
/** Spline seats supplied after the fixed placement accounts. */
splineSeats?: readonly Address[];
/** Supply the canonical read-only tick immediately after the counted seats. */
includeMarketTick?: boolean;
/** Optional market-local referral-binding PDA. */
takerReferralAccount?: Address;
/** Optional builder pair; see {@link TakerBuilderPair}. Taker orders only. */
builderApproval?: Address;
builderTokenAccount?: Address;
/** Optional self program for the binary-event recorder CPI tail. */
selfProgram?: Address;
/** Optional log authority PDA for the binary-event recorder CPI tail. */
logAuthority?: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.traderLedger— 17.[writable]Market-owned trader-ledger PDA.creatorSpline— Single-seat shorthand for callers with a known creator seat.splineSeats— Spline seats supplied after the fixed placement accounts.includeMarketTick— Supply the canonical read-only tick immediately after the counted seats.takerReferralAccount— Optional market-local referral-binding PDA.builderApproval— Optional builder pair; see {@link TakerBuilderPair}. Taker orders only.selfProgram— Optional self program for the binary-event recorder CPI tail.logAuthority— Optional log authority PDA for the binary-event recorder CPI tail.
PlaceOrderInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:756.
export interface PlaceOrderInput extends ProtocolTreasuryInput {
marketAddress: Address;
user: Address;
userTokenAccount: Address;
settlementMint: Address;
userYesAta: Address;
userNoAta: Address;
/** Explicit spline seats selected for this placement. An empty list uses only the book. */
splineSeats?: readonly Address[];
/** Include the read-only Market Tick account for tick-bound quotes. */
includeMarketTick?: boolean;
outcome: OutcomeAsset;
intent: TradeIntent;
/** Price in the named outcome's denomination. */
priceBps: number;
quantity: bigint;
orderType: OrderType;
worstAcceptablePriceBps?: number;
minFillQuantity?: bigint;
matchLimit?: number;
/**
* Self-trade policy byte; see `SelfTradeBehavior`. Defaults to
* `SelfTradeBehavior.CancelProvide` (1).
*/
selfTradeBehavior?: number;
/**
* Relative resting lifetime in seconds (0 = market close). Not an oracle
* age. Immediate-or-cancel placements must leave it 0.
*/
maxAgeSeconds?: number;
/**
* Post-only cross policy byte; see `PostOnlyCrossPolicy`. Defaults to
* `PostOnlyCrossPolicy.Reject` (1); `Slide` (0) reprices a crossing
* post-only order one tick beyond the best crossing maker.
*/
rejectPostOnlyWouldCross?: number;
/** Canonical referral-binding PDA for `user`, after resolver eligibility checks. */
takerReferralAccount?: Address;
/** Optional approved taker builder; see {@link TakerBuilderInput}. */
builder?: TakerBuilderInput;
/**
* Phase D (multi-fee-recipients): index ∈ [0, MAX_TREASURY_RECIPIENTS)
* selecting the protocol fee shard: `config.treasuryRecipients[i]` for a
* default-mint market, else the currency protocol treasury shard `i`.
* `protocolTreasury` decides account 7 for this index. Callers should pass
* an explicit index, for example from `pickTreasuryIndex`.
*/
protocolTreasuryIndex: number;
/** Optional 16-byte caller correlation/idempotency key. */
clientOrderId?: Uint8Array;
/**
* Absolute Unix-second execution deadline (0 or omitted = none). The
* program rejects the placement at or after this time; it never becomes a
* resting expiry.
*/
executionValidUntil?: bigint;
/**
* Absolute Unix-second resting expiry (0 or omitted = market close). When
* nonzero the program requires it to be at least the minimum order TTL in
* the future, and immediate-or-cancel placements must leave it 0.
*/
restingExpiresAt?: bigint;
/**
* Upper bound on the quote the placement may debit (buy). Omitted selects
* `u64::MAX`, which disables the bound.
*/
maxQuoteInput?: bigint;
/**
* Lower bound on the net quote a sell must receive, pro rata to the filled
* quantity. Omitted or 0 disables the bound.
*/
minQuoteOutput?: bigint;
/**
* Config fee epoch the caller priced against. The program rejects the
* placement when it differs from the current epoch. Omitted or 0 disables
* the check.
*/
expectedFeeEpoch?: number;
}
Field documentation
splineSeats— Explicit spline seats selected for this placement. An empty list uses only the book.includeMarketTick— Include the read-only Market Tick account for tick-bound quotes.priceBps— Price in the named outcome's denomination.selfTradeBehavior— Self-trade policy byte; seeSelfTradeBehavior. Defaults toSelfTradeBehavior.CancelProvide(1).maxAgeSeconds— Relative resting lifetime in seconds (0 = market close). Not an oracle age. Immediate-or-cancel placements must leave it 0.rejectPostOnlyWouldCross— Post-only cross policy byte; seePostOnlyCrossPolicy. Defaults toPostOnlyCrossPolicy.Reject(1);Slide(0) reprices a crossing post-only order one tick beyond the best crossing maker.takerReferralAccount— Canonical referral-binding PDA foruser, after resolver eligibility checks.builder— Optional approved taker builder; see {@link TakerBuilderInput}.protocolTreasuryIndex— Phase D (multi-fee-recipients): index ∈ [0, MAX_TREASURY_RECIPIENTS) selecting the protocol fee shard:config.treasuryRecipients[i]for a default-mint market, else the currency protocol treasury shardi.protocolTreasurydecides account 7 for this index. Callers should pass an explicit index, for example frompickTreasuryIndex.clientOrderId— Optional 16-byte caller correlation/idempotency key.executionValidUntil— Absolute Unix-second execution deadline (0 or omitted = none). The program rejects the placement at or after this time; it never becomes a resting expiry.restingExpiresAt— Absolute Unix-second resting expiry (0 or omitted = market close). When nonzero the program requires it to be at least the minimum order TTL in the future, and immediate-or-cancel placements must leave it 0.maxQuoteInput— Upper bound on the quote the placement may debit (buy). Omitted selectsu64::MAX, which disables the bound.minQuoteOutput— Lower bound on the net quote a sell must receive, pro rata to the filled quantity. Omitted or 0 disables the bound.expectedFeeEpoch— Config fee epoch the caller priced against. The program rejects the placement when it differs from the current epoch. Omitted or 0 disables the check.settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.protocolTreasury— Required source ofPlaceOrderaccount 7 (spec/IX.md§59.1, §59.5): the config facts (defaultSettlementMintandtreasuryRecipients, which a decodedConfigAccountcarries), or a destination already resolved byresolveProtocolTreasuryDestination/getProtocolTreasuryDestinationfor this market's mint andprotocolTreasuryIndex. There is no free fee-recipient address field.marketState— Decoded market identity for callers that still supply a creator-seat hint.
PlaceOrderIntent#
Everything the user chose, plus the wallet state the order will draw on.
Declaration source: packages/core/src/preflight/types.ts:643.
export interface PlaceOrderIntent {
currentSlot?: bigint;
/** The outcome the order trades: `YES` or `NO`. */
outcome: OutcomeAsset;
/** `BUY` acquires `outcome` and locks quote; `SELL` disposes of it and escrows shares. */
intent: TradeIntent;
type: PreflightOrderType;
/** Price in the named outcome's own price space, bps. Never complemented. */
priceBps: number;
quantity: bigint;
/** IOC only. `0n` disables the atomic min-fill gate. */
minFillQuantity: bigint;
maxRestingAgeSeconds?: number;
restingExpiresAt?: bigint;
/** Post-only crossing policy. Omitted or 1 rejects; 0 permits a slide. */
rejectPostOnlyWouldCross?: 0 | 1;
nowUnix: number;
/**
* Settlement-mint balance available to the trader, base units.
* Omitted means UNKNOWN: preview skips the balance gate, strict denies.
* Never substitute a large sentinel — omit.
*/
walletSettlementUnits?: bigint;
/** YES share balance available to the trader, base units. UNKNOWN if omitted. */
walletYes?: bigint;
/** NO share balance available to the trader, base units. UNKNOWN if omitted. */
walletNo?: bigint;
/**
* Effective taker fee rate in bps, used for the collateral headroom check.
* Omitted means UNKNOWN: preview charges no fee headroom, strict denies.
*/
feeBps?: number;
/**
* The live fee curve (`ConfigAccount.fee_cap_bps` / `decay_rate_bps`). When
* present the balance headroom uses the exact fractional per-fill fee
* (`compute_fee_amount_at_price`) instead of the truncated {@link feeBps}.
*/
feeCurve?: { capBps: number; decayRateBps: number };
/**
* The SIGNER's address — the program's `taker_key`.
*
* Read by exactly one gate: `best_spline_quote_peek` skips a spline whose
* `maker` equals it (`spline_integration.rs:150-181`), so a maker's own
* PostOnly order does not cross their own curve. The order BOOK half of
* `would_post_only_cross` takes no taker key at all — see the note below.
*
* Only required (strict mode) when {@link MarketSnapshot.splineFeatureEnabled}
* is `true`. Omitted means UNKNOWN, which leaves the spline arm inert rather
* than guessing which way the self-skip falls.
*/
trader?: string;
// NOTE: `ownOrderPricesBps` and `ownQuantityAtPrice` are GONE (residual L-4).
//
// Both were added on the premise that `would_post_only_cross` skips the
// caller's own resting orders, so a crossing level the trader owned entirely
// was harmless. That premise is WRONG for the order book: the book half of
// that check is `best_crossing_book_price`
// (`program/src/logic/place_order_processor/pricing.rs:170-216`), which takes
// no taker key and compares no owner. Only the SPLINE peek beside it
// (`pricing.rs:44-57`) is owner-aware, and that lane is a separate input.
// Crediting book ownership made the mirror LOOSER than the program at the
// signing step, so the two fields were first made inert and are now removed
// outright rather than left in the type as a trap for the next caller.
}
Field documentation
outcome— The outcome the order trades:YESorNO.intent—BUYacquiresoutcomeand locks quote;SELLdisposes of it and escrows shares.priceBps— Price in the named outcome's own price space, bps. Never complemented.minFillQuantity— IOC only.0ndisables the atomic min-fill gate.rejectPostOnlyWouldCross— Post-only crossing policy. Omitted or 1 rejects; 0 permits a slide.walletSettlementUnits— Settlement-mint balance available to the trader, base units. Omitted means UNKNOWN: preview skips the balance gate, strict denies. Never substitute a large sentinel — omit.walletYes— YES share balance available to the trader, base units. UNKNOWN if omitted.walletNo— NO share balance available to the trader, base units. UNKNOWN if omitted.feeBps— Effective taker fee rate in bps, used for the collateral headroom check. Omitted means UNKNOWN: preview charges no fee headroom, strict denies.feeCurve— The live fee curve (ConfigAccount.fee_cap_bps/decay_rate_bps). When present the balance headroom uses the exact fractional per-fill fee (compute_fee_amount_at_price) instead of the truncated {@link feeBps}.trader— The SIGNER's address — the program'staker_key.
Read by exactly one gate: best_spline_quote_peek skips a spline whose
maker equals it (spline_integration.rs:150-181), so a maker's own
PostOnly order does not cross their own curve. The order BOOK half of
would_post_only_cross takes no taker key at all — see the note below.
Only required (strict mode) when {@link MarketSnapshot.splineFeatureEnabled}
is true. Omitted means UNKNOWN, which leaves the spline arm inert rather
than guessing which way the self-skip falls.
PlaceOrderParams#
Parameters for the canonical outcome/intent placement wire format.
Declaration source: packages/core/src/types.ts:603.
export interface PlaceOrderParams {
/** Public outcome name; encoded as YES=0, NO=1. */
readonly outcome: OutcomeAsset;
/** Public trade intent; encoded as BUY=0, SELL=1. */
readonly intent: TradeIntent;
readonly priceBps: number;
readonly quantity: bigint;
readonly orderType: OrderType;
readonly worstPriceBps?: number;
readonly minFillQuantity?: bigint;
readonly matchLimit?: number;
readonly selfTradeBehavior?: number;
readonly maxRestingAgeSeconds?: number;
readonly rejectPostOnlyWouldCross?: number;
readonly treasuryIndex: number;
readonly clientOrderId?: Uint8Array;
readonly executionValidUntil?: bigint;
readonly restingExpiresAt?: bigint;
readonly maxQuoteInput?: bigint;
readonly minQuoteOutput?: bigint;
readonly expectedFeeEpoch?: number;
}
Field documentation
outcome— Public outcome name; encoded as YES=0, NO=1.intent— Public trade intent; encoded as BUY=0, SELL=1.
placeOrderParamsFromReviewedIntent#
The canonical PlaceOrderParams for a reviewed intent, with every
first-party economic guard active.
Every byte of the encoded PlaceOrder body comes from the intent, so the
digest names the signed instruction data. The one exception is
treasuryIndex, the protocol treasury shard: the program treats it as a
routing preference only (any config-approved recipient is accepted, and
the fee amount does not depend on it), so it carries no consent and is
read at signing time.
Callers must not spread further PlaceOrderParams fields over the result:
a field changed after review would be signed outside the digest.
Declaration source: packages/core/src/reviewedIntent.ts:576.
export function placeOrderParamsFromReviewedIntent(intent: ReviewedOrderIntent, treasuryIndex: number): PlaceOrderParams;
Parameters
intent: ReviewedOrderIntent— Not documented. See ReviewedOrderIntent for its declaration and available field documentation.treasuryIndex: number— Not documented.
Returns
PlaceOrderParams
Not documented.
Throws
Not documented.
</details> <details> <summary>PlaceOrderResult</summary>PlaceOrderResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:836.
export interface PlaceOrderResult {
market: Address;
orderbook: Address;
position: Address;
vault: Address;
traderLedger: Address;
creatorSpline?: Address;
}
placeOrderVerdict#
Decide whether the program would accept this PlaceOrder.
Returns { allowed: true } when every mirrored gate passes, otherwise the
FIRST gate that would reject, carrying the on-chain error code plus an i18n
KEY (never prose) describing it.
With { strict: true } an unknown required input returns UNKNOWN_STATE
BEFORE any gate runs, rather than letting that input's gate go inert. Every
pre-signature re-check must use it; previews must not.
Declaration source: packages/core/src/preflight/placeOrder.ts:302.
export function placeOrderVerdict(config: ConfigSnapshot, market: MarketSnapshot, book: BookSnapshot, intent: PlaceOrderIntent, options?: PreflightOptions): Verdict;
Parameters
config: ConfigSnapshot— Not documented. See ConfigSnapshot for its declaration and available field documentation.market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.book: BookSnapshot— Not documented. See BookSnapshot for its declaration and available field documentation.intent: PlaceOrderIntent— Not documented. See PlaceOrderIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>placeOrderWithStrategy</summary>placeOrderWithStrategy#
Build a prefunded placement against a strategy resolved by the caller.
Declaration source: packages/core/src/sdk.ts:3045.
export function placeOrderWithStrategy(input: PlaceOrderInput | PlaceMultiplePostOnlyInput, scope: Pick<StrategyPlacementAccounts, "strategyAccount" | "delegate" | "marketMeta"> & { groupId: number; }, programAddress?: Address): Promise<SdkResult<PlaceFamilyResult>>;
Parameters
input: PlaceOrderInput | PlaceMultiplePostOnlyInput— Not documented. See PlaceOrderInput, PlaceMultiplePostOnlyInput for its declaration and available field documentation.scope: Pick<StrategyPlacementAccounts, "marketMeta" | "delegate" | "strategyAccount"> & { groupId: number; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PlaceFamilyResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
planCancelOrderAndWithdraw#
Build one atomic transaction that cancels an exact order and withdraws the requested amount of its refund asset to the owner's canonical ATA.
The amount can draw on the owner's existing free balance as well as the refund. A missing order or insufficient free balance makes the whole transaction fail. The result excludes the measured transport prefix, as with other native transaction plans. Submit the instructions together with that prefix and simulate to verify compute and live market constraints.
Declaration source: packages/core/src/cancelAndWithdraw.ts:58.
export function planCancelOrderAndWithdraw(rpc: RpcDataSource, input: CancelOrderAndWithdrawInput, program?: Address): Promise<CancelOrderAndWithdrawPlan>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.input: CancelOrderAndWithdrawInput— Not documented. See CancelOrderAndWithdrawInput for its declaration and available field documentation.program: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<CancelOrderAndWithdrawPlan>
Not documented.
Throws
Not documented.
Defaults
program:PROGRAM_ADDRESS.
planCompleteSetMerge#
Split quantity into the wallet/ledger portions one instruction encodes.
Wallet first, then the free ledger bucket. Throws for zero or for more than
{@link maxMergeableCompleteSets}.
Declaration source: packages/core/src/completeSetMerge.ts:136.
export function planCompleteSetMerge(holdings: CompleteSetHoldings, quantity: bigint): CompleteSetMergePlan;
Parameters
holdings: CompleteSetHoldings— Not documented. See CompleteSetHoldings for its declaration and available field documentation.quantity: bigint— Not documented.
Returns
CompleteSetMergePlan
Not documented.
Throws
Not documented.
</details> <details> <summary>planCreateMarketTransactionGroups</summary>planCreateMarketTransactionGroups#
Plan every native create-market transaction before anything is sent
(SSW-045): allocation preludes are split into the fewest ordered groups
that each fit the transport after official compilation, the final group is
CreateMarket alone, and every group (including CreateMarket) is measured.
With progress, only the authenticated unfinished remainder is planned, so
a lost acknowledgement never re-pays a completed allocation and an existing
market yields an empty plan.
Declaration source: packages/core/src/instructions.ts:1325.
export function planCreateMarketTransactionGroups(params: CreateMarketParams, accounts: CreateMarketAccounts, options?: CreateMarketPlanOptions): CreateMarketTransactionPlan;
Parameters
params: CreateMarketParams— Not documented. See CreateMarketParams for its declaration and available field documentation.accounts: CreateMarketAccounts— Not documented. See CreateMarketAccounts for its declaration and available field documentation.options: CreateMarketPlanOptions— Not documented. Default:{}. See CreateMarketPlanOptions for its declaration and available field documentation.
Returns
CreateMarketTransactionPlan
Not documented.
Throws
Not documented.
Defaults
options:{}.
planCurrencyProtocolTreasuryShards#
Read the eight protocol treasury shards of a registered currency and
build InitializeCurrencyProtocolTreasury (0x52, spec/IX.md §59.3) for
every shard that does not exist yet. payer funds the rent of each new
shard.
fetchOwner returns the program that owns an address, or null when no
account exists there. A shard owned by the token program exists and is
skipped; an empty or system-owned (prefunded) address is created; any other
owner throws {@link CurrencyProtocolTreasuryShardOccupiedError}. The record
must exist by the time the instructions execute: send them after
RegisterCurrency (0x4D), in the same transaction or a later one.
Declaration source: packages/core/src/treasury.ts:352.
export function planCurrencyProtocolTreasuryShards(input: { readonly payer: Address; readonly mint: Address; readonly tokenProgram: Address; readonly fetchOwner: (address: Address) => Promise<Address | null>; readonly programAddress?: Address; }): Promise<CurrencyProtocolTreasuryShardPlan>;
Parameters
input: { readonly payer: Address; readonly mint: Address; readonly tokenProgram: Address; readonly fetchOwner: (address: Address) => Promise<Address | null>; readonly programAddress?: Address; }— Not documented.
Returns
Promise<CurrencyProtocolTreasuryShardPlan>
Not documented.
Throws
Not documented.
</details> <details> <summary>planMakerQuoteClose</summary>planMakerQuoteClose#
Derive the close accounts from the state and market, including any terminal cleanup.
Declaration source: packages/core/src/makerQuoteActions.ts:144.
export function planMakerQuoteClose(rpc: RpcDataSource, input: { readonly market: Address; readonly owner: Address; readonly caller: Address; }, program: Address): Promise<Instruction>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.input: { readonly market: Address; readonly owner: Address; readonly caller: Address; }— Not documented.program: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>planMakerQuoteInventory</summary>planMakerQuoteInventory#
Plan funding or withdrawal in either custody location. Wallet withdrawals create the default ATA if needed.
Declaration source: packages/core/src/makerQuoteActions.ts:38.
export function planMakerQuoteInventory(input: MakerQuoteInventoryParams & { readonly market: Address; readonly owner: Address; readonly ownerTokenAccount?: Address; readonly operation: "fund" | "withdraw"; readonly bountyLamports?: bigint; }, program: Address): Promise<Instruction[]>;
Parameters
input: MakerQuoteInventoryParams & { readonly market: Address; readonly owner: Address; readonly ownerTokenAccount?: Address; readonly operation: "fund" | "withdraw"; readonly bountyLamports?: bigint; }— Not documented. See MakerQuoteInventoryParams for its declaration and available field documentation.program: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]>
Not documented.
Throws
Not documented.
</details> <details> <summary>planMakerQuoteReplacement</summary>planMakerQuoteReplacement#
Build a one-off complete replacement. The caller must put it last and serialize with its publisher.
Declaration source: packages/core/src/makerQuoteActions.ts:87.
export function planMakerQuoteReplacement(rpc: Pick<RpcDataSource, "getMultipleAccountsInfo">, input: { readonly market: Address; readonly owner: Address; readonly signer: Address; readonly quotes: readonly ManagedQuoteEntry[]; readonly sourceObservedAtUnix?: bigint; readonly profile?: QuoteProfile; readonly validitySlots?: number; }, program: Address): Promise<Instruction>;
Parameters
rpc: Pick<RpcDataSource, "getMultipleAccountsInfo">— Not documented.input: { readonly market: Address; readonly owner: Address; readonly signer: Address; readonly quotes: readonly ManagedQuoteEntry[]; readonly sourceObservedAtUnix?: bigint; readonly profile?: QuoteProfile; readonly validitySlots?: number; }— Not documented.program: Address— Not documented.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>planMarketRoute</summary>planMarketRoute#
Plan against one market's coherent RPC liquidity, fee config and account balances.
Declaration source: packages/core/src/router/marketRoute.ts:624.
export function planMarketRoute(snapshot: SplineLiquiditySnapshot, inputs: MarketRouteInputs, request: RouteRequest): MarketRouteQuote;
Parameters
snapshot: SplineLiquiditySnapshot— Not documented. See SplineLiquiditySnapshot for its declaration and available field documentation.inputs: MarketRouteInputs— Not documented. See MarketRouteInputs for its declaration and available field documentation.request: RouteRequest— Not documented. See RouteRequest for its declaration and available field documentation.
Returns
MarketRouteQuote
Not documented.
Throws
Not documented.
</details> <details> <summary>PlannedSeriesAttachment</summary>PlannedSeriesAttachment#
Not documented.
Declaration source: packages/core/src/seriesCrank.ts:75.
export interface PlannedSeriesAttachment {
readonly market: Address;
readonly createdAt: bigint;
readonly commitment: bigint;
readonly rewardLamports: bigint;
/** Seat rent deficit, prepaid settle bounty and the reward. */
readonly reimbursementLamports: bigint;
}
Field documentation
reimbursementLamports— Seat rent deficit, prepaid settle bounty and the reward.
planRoute#
Plan a route for one intent in one market. Throws {@link SeesawValidationError} for a malformed request (a delegate in wallet mode, a free-funds request with no ledger seat hint, a budget without a cost model, bad tolerances).
Declaration source: packages/core/src/router/routePlan.ts:463.
export function planRoute(snapshot: RouterMarketSnapshot, request: RouteRequest): RouteQuote;
Parameters
snapshot: RouterMarketSnapshot— Not documented. See RouterMarketSnapshot for its declaration and available field documentation.request: RouteRequest— Not documented. See RouteRequest for its declaration and available field documentation.
Returns
RouteQuote
Not documented.
Throws
Not documented.
</details> <details> <summary>planRouteWithSeatAlternatives</summary>planRouteWithSeatAlternatives#
When supplied seats make a path exceed the share cap, try the book alone and each single-seat omission. Each alternative runs the complete matcher with the exact same seat list that its guarded instructions will carry.
Declaration source: packages/core/src/router/routePlan.ts:417.
export function planRouteWithSeatAlternatives(snapshot: RouterMarketSnapshot, request: RouteRequest): RouteQuote;
Parameters
snapshot: RouterMarketSnapshot— Not documented. See RouterMarketSnapshot for its declaration and available field documentation.request: RouteRequest— Not documented. See RouteRequest for its declaration and available field documentation.
Returns
RouteQuote
Not documented.
Throws
Not documented.
</details> <details> <summary>planSeriesAttachments</summary>planSeriesAttachments#
Plan serial keeper attachments against a coherent read. Re-read after each landed crank.
Declaration source: packages/core/src/seriesCrank.ts:185.
export function planSeriesAttachments(snapshot: SeriesCrankSnapshot): { readonly attachments: readonly PlannedSeriesAttachment[]; readonly skipped: readonly { readonly market: Address; readonly reason: SeriesCrankSkip; }[]; };
Parameters
snapshot: SeriesCrankSnapshot— Not documented. See SeriesCrankSnapshot for its declaration and available field documentation.
Returns
{ readonly attachments: readonly PlannedSeriesAttachment[]; readonly skipped: readonly { readonly market: Address; readonly reason: SeriesCrankSkip; }[]; }
Not documented.
Throws
Not documented.
</details> <details> <summary>planStrategyLedgerOperation</summary>planStrategyLedgerOperation#
Resolve canonical accounts for a scoped ledger operation.
Declaration source: packages/core/src/strategyAccounts.ts:346.
export function planStrategyLedgerOperation(rpc: RpcDataSource, identity: { readonly market: Address; readonly owner: Address; readonly signer: Address; readonly strategyId: number; }, operation: StrategyLedgerOperation, program?: Address, readConfig?: RpcReadConfig): Promise<{ instruction: Instruction; destination?: Address; }>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.identity: { readonly market: Address; readonly owner: Address; readonly signer: Address; readonly strategyId: number; }— Not documented.operation: StrategyLedgerOperation— Not documented. See StrategyLedgerOperation for its declaration and available field documentation.program: Address— Not documented. Default:PROGRAM_ADDRESS.readConfig: RpcReadConfig— Not documented. Default:{ commitment: 'confirmed' }. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<{ instruction: Instruction; destination?: Address; }>
Not documented.
Throws
Not documented.
Defaults
program:PROGRAM_ADDRESS.readConfig:{ commitment: 'confirmed' }.
PolymarketV2ConditionId#
Not documented.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:152.
export declare class PolymarketV2ConditionId {
constructor(raw: Uint8Array<ArrayBufferLike>);
static fromBeBytes: (raw: Uint8Array) => PolymarketV2ConditionId;
static fromWord: (raw: Uint8Array) => PolymarketV2ConditionId;
static encode: (fields: PolymarketV2FieldsInput) => PolymarketV2ConditionId;
toBeBytes: () => Uint8Array;
/**
* Solidity bytes31 ABI word: left aligned, right padded.
*/
toWord: () => Uint8Array;
fields: () => PolymarketV2Fields;
eventId: () => PolymarketV2EventId;
positionId: (outcome: number) => PolymarketV2PositionId;
isValidEventId: () => boolean;
}
Parameters
raw: Uint8Array<ArrayBufferLike>— Not documented.
Throws
Not documented.
</details> <details> <summary>PolymarketV2EventId</summary>PolymarketV2EventId#
Not documented.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:196.
export declare class PolymarketV2EventId {
constructor(raw: Uint8Array<ArrayBufferLike>);
static fromBeBytes: (raw: Uint8Array) => PolymarketV2EventId;
static fromWord: (raw: Uint8Array) => PolymarketV2EventId;
static encode: (input: PolymarketV2FieldsInput) => PolymarketV2EventId;
toBeBytes: () => Uint8Array;
/**
* Solidity bytes29 ABI word: left aligned, right padded.
*/
toWord: () => Uint8Array;
fields: () => PolymarketV2Fields;
conditionId: (index: number) => PolymarketV2ConditionId;
asCondition: () => PolymarketV2ConditionId;
}
Parameters
raw: Uint8Array<ArrayBufferLike>— Not documented.
Throws
Not documented.
</details> <details> <summary>PolymarketV2Fields</summary>PolymarketV2Fields#
baseHash is the retained 16-byte hash, not the original bytes32 hash.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:54.
export declare class PolymarketV2Fields implements PolymarketV2FieldsInput {
constructor(input: PolymarketV2FieldsInput);
static fromBaseHash: (module: PolymarketV2Module, hash: Uint8Array, arity: number, conditionIndex: number) => PolymarketV2Fields;
readonly module: PolymarketV2Module;
readonly arity: number;
readonly conditionIndex: number;
baseHash: Uint8Array<ArrayBufferLike>;
negRiskMemberCount: () => number;
isOther: () => boolean;
}
Parameters
input: PolymarketV2FieldsInput— Not documented. See PolymarketV2FieldsInput for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>PolymarketV2FieldsInput</summary>PolymarketV2FieldsInput#
Not documented.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:46.
export interface PolymarketV2FieldsInput {
readonly module: PolymarketV2Module;
readonly baseHash: Uint8Array;
readonly arity: number;
readonly conditionIndex: number;
}
PolymarketV2IdError#
Not documented.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:17.
export declare class PolymarketV2IdError extends Error {
constructor(code: PolymarketV2IdErrorCode);
readonly code: PolymarketV2IdErrorCode;
}
Parameters
code: PolymarketV2IdErrorCode— Not documented. See PolymarketV2IdErrorCode for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>PolymarketV2IdErrorCode</summary>PolymarketV2IdErrorCode#
Not documented.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:8.
export type PolymarketV2IdErrorCode =
| 'UnknownModule'
| 'NonZeroPadding'
| 'UnknownResolutionChain'
| 'InvalidOutcome'
| 'InvalidNegRiskShape'
| 'InvalidLength'
| 'InvalidInteger';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PolymarketV2Module#
Module 3, the source's combinatorial module, is unknown: Seesaw mirrors no combination markets.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:3.
export enum PolymarketV2Module {
Binary = 1,
NegRisk = 2,
}
PolymarketV2PositionId#
Not documented.
Declaration source: packages/core/src/sources/polymarketV2Id.ts:127.
export declare class PolymarketV2PositionId {
constructor(raw: Uint8Array<ArrayBufferLike>);
static fromBeBytes: (raw: Uint8Array) => PolymarketV2PositionId;
toBeBytes: () => Uint8Array;
outcomeIndex: () => 0 | 1;
conditionId: () => PolymarketV2ConditionId;
fields: () => PolymarketV2Fields;
}
Parameters
raw: Uint8Array<ArrayBufferLike>— Not documented.
Throws
Not documented.
</details> <details> <summary>PortfolioAssetExposure</summary>PortfolioAssetExposure#
Not documented.
Declaration source: packages/core/src/risk.ts:35.
export interface PortfolioAssetExposure {
assetLabel: string;
netYesShares: bigint;
absoluteNetYesShares: bigint;
marketCount: number;
}
PortfolioConcentrationWarning#
Not documented.
Declaration source: packages/core/src/risk.ts:55.
export interface PortfolioConcentrationWarning {
marketAddress: string;
assetLabel: string;
worstCaseLossMicro: bigint;
accountValueMicro: bigint;
ratioBps: number;
}
PortfolioMarketRisk#
Not documented.
Declaration source: packages/core/src/risk.ts:42.
export interface PortfolioMarketRisk {
marketAddress: string;
assetLabel: string;
netYesShares: bigint;
currentValueMicro: bigint;
payoutIfYesMicro: bigint;
payoutIfNoMicro: bigint;
maxPayoutMicro: bigint;
lossIfYesMicro: bigint;
lossIfNoMicro: bigint;
worstCaseLossMicro: bigint;
}
PortfolioRiskInput#
Not documented.
Declaration source: packages/core/src/risk.ts:23.
export interface PortfolioRiskInput {
/**
* Settlement mint decimals. Outcome mints use the same decimals, so one share
* atom is one settlement atom; the value is validated, never used to scale.
*/
settlementDecimals?: number;
/** Account value in settlement base units (historical name retained for the API). */
accountValueMicro?: bigint | string | number | null;
positions: PortfolioRiskPositionInput[];
orders: PortfolioRiskOrderInput[];
}
Field documentation
settlementDecimals— Settlement mint decimals. Outcome mints use the same decimals, so one share atom is one settlement atom; the value is validated, never used to scale.accountValueMicro— Account value in settlement base units (historical name retained for the API).
PortfolioRiskOrderInput#
Not documented.
Declaration source: packages/core/src/risk.ts:12.
export interface PortfolioRiskOrderInput {
marketAddress: string;
assetLabel: string;
side: PortfolioRiskOrderSide;
outcome: PortfolioRiskOutcome;
/** The order's own price in its outcome's space (a NO order's NO price); never complemented. */
priceBps: number;
quantity: bigint | string | number;
filledQuantity?: bigint | string | number;
}
Field documentation
priceBps— The order's own price in its outcome's space (a NO order's NO price); never complemented.
PortfolioRiskOrderSide#
Not documented.
Declaration source: packages/core/src/risk.ts:2.
export type PortfolioRiskOrderSide = 'buy' | 'sell';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PortfolioRiskOutcome#
Not documented.
Declaration source: packages/core/src/risk.ts:1.
export type PortfolioRiskOutcome = 'yes' | 'no';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PortfolioRiskPositionInput#
Not documented.
Declaration source: packages/core/src/risk.ts:4.
export interface PortfolioRiskPositionInput {
marketAddress: string;
assetLabel: string;
yesShares: bigint | string | number;
noShares: bigint | string | number;
currentYesPriceBps: number;
}
PortfolioRiskView#
Not documented.
Declaration source: packages/core/src/risk.ts:63.
export interface PortfolioRiskView {
exposures: PortfolioAssetExposure[];
markets: PortfolioMarketRisk[];
totalCurrentValueMicro: bigint;
maxPayoutMicro: bigint;
maxLossMicro: bigint;
concentrationWarning: PortfolioConcentrationWarning | null;
}
PortfolioScenario#
Not documented.
Declaration source: packages/core/src/analytics/scenario.ts:52.
export interface PortfolioScenario {
/** One outcome per entry of `markets`, in the same order. */
outcomes: readonly ScenarioOutcome[];
pnlAtoms: bigint;
}
Field documentation
outcomes— One outcome per entry ofmarkets, in the same order.
PortfolioSummary#
Not documented.
Declaration source: packages/core/src/api/positions.ts:246.
export interface PortfolioSummary {
totalValue: number;
totalPnl: number;
totalPnlPercent: number;
availableBalance: number;
}
Position#
Not documented.
Declaration source: packages/core/src/api/types.ts:135.
export interface Position {
id: string;
address: string;
marketAddress: string;
marketPair: string;
yesShares: bigint;
noShares: bigint;
avgBuyPrice: number;
currentPrice: number;
pnl: number;
pnlPercent: number;
settled: boolean;
payout: bigint;
}
POSITION_ACCOUNT_DISCRIMINATOR#
UserPositionAccount discriminator: sha256("account:UserPositionAccount")[..8].
Declaration source: packages/core/src/constants.ts:212.
export declare const POSITION_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
POSITION_ACCOUNT_SIZE#
D0{byte} UserPositionAccount size.
Declaration source: packages/core/src/constants.ts:288.
export declare const POSITION_ACCOUNT_SIZE: 256;
POSITION_REFERRAL_CACHE_VERSION#
Not documented.
Declaration source: packages/core/src/constants.ts:289.
export declare const POSITION_REFERRAL_CACHE_VERSION: 1;
POSITION_REFERRAL_FLAG_BOUND#
Not documented.
Declaration source: packages/core/src/constants.ts:290.
export declare const POSITION_REFERRAL_FLAG_BOUND: 1;
POSITION_SNAPSHOT_PAGE_LIMIT#
Largest page the positions endpoint serves; complete readers request it.
Declaration source: packages/core/src/api/positionSnapshot.ts:111.
export declare const POSITION_SNAPSHOT_PAGE_LIMIT: 100;
POSITION_TERMINAL_CONTINUATION_MARKER#
Not documented.
Declaration source: packages/core/src/constants.ts:291.
export declare const POSITION_TERMINAL_CONTINUATION_MARKER: 2147483648;
positionAfterFill#
The position a fill of shares atoms leaves behind, and what kind of change
it is for the traded outcome:
- BUY into an outcome you hold none of →
open, otherwiseadd. - SELL that leaves none of the outcome →
close, otherwisereduce.
A SELL never drives a holding below zero (it is clamped), and a negative
shares is treated as zero. The other outcome is left unchanged.
Declaration source: packages/core/src/ux/position.ts:24.
export function positionAfterFill(before: PositionShares, outcome: OutcomeAsset, intent: TradeIntent, shares: bigint): { before: PositionShares; after: PositionShares; change: "open" | "add" | "reduce" | "close"; };
Parameters
before: PositionShares— Not documented. See PositionShares for its declaration and available field documentation.outcome: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.shares: bigint— Not documented.
Returns
{ before: PositionShares; after: PositionShares; change: "open" | "add" | "reduce" | "close"; }
Not documented.
Throws
Not documented.
</details> <details> <summary>POSITIONS_READ_SESSION_HEADER</summary>POSITIONS_READ_SESSION_HEADER#
Request header that carries the read-session token.
Declaration source: packages/core/src/api/readSession.ts:29.
export declare const POSITIONS_READ_SESSION_HEADER: "x-read-session";
POSITIONS_READ_SESSION_PATH#
Path of the session-issuing endpoint (sign POST over it).
Declaration source: packages/core/src/api/readSession.ts:31.
export declare const POSITIONS_READ_SESSION_PATH: "/api/v1/positions/session";
POSITIONS_READ_SESSION_SCOPE#
Only scope a positions read session carries.
Declaration source: packages/core/src/api/readSession.ts:33.
export declare const POSITIONS_READ_SESSION_SCOPE: "read:positions";
PositionShares#
Share atoms held per outcome.
Declaration source: packages/core/src/ux/position.ts:9.
export interface PositionShares {
yes: bigint;
no: bigint;
}
PositionSnapshot#
Not documented.
Declaration source: packages/core/src/api/positionSnapshot.ts:55.
export interface PositionSnapshot<T> {
readonly scope: PositionSnapshotScope;
readonly positions: readonly T[];
/** True only when every page was read under one stable server revision. */
readonly complete: boolean;
readonly incompleteReason?: PositionSnapshotIncompleteReason;
readonly revision: string | null;
readonly total: number | null;
readonly pages: number;
readonly restarts: number;
/** Client wall-clock time at which the snapshot finished (ms since epoch). */
readonly observedAt: number;
}
Field documentation
complete— True only when every page was read under one stable server revision.observedAt— Client wall-clock time at which the snapshot finished (ms since epoch).
PositionSnapshotError#
The traversal could not produce a trustworthy snapshot and must not be shown as one.
Declaration source: packages/core/src/api/positionSnapshot.ts:92.
export declare class PositionSnapshotError extends Error {
constructor(reason: "aborted" | "scope_mismatch" | "scope_changed" | "cursor_not_progressing" | "page_failed", message: string, options: { cause?: unknown; } | undefined);
readonly name: "PositionSnapshotError";
readonly reason: "aborted" | "scope_mismatch" | "scope_changed" | "cursor_not_progressing" | "page_failed";
}
Parameters
reason: "aborted" | "scope_mismatch" | "scope_changed" | "cursor_not_progressing" | "page_failed"— Not documented.message: string— Not documented.options: { cause?: unknown; } | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>PositionSnapshotIncompleteReason</summary>PositionSnapshotIncompleteReason#
Not documented.
Declaration source: packages/core/src/api/positionSnapshot.ts:47.
export type PositionSnapshotIncompleteReason =
/** Scope kept changing during traversal for every allowed restart. */
| 'snapshot_unstable'
/** More pages than the configured bound. */
| 'page_limit_exceeded'
/** Multi-page traversal from a server without a revision contract. */
| 'consistency_unverified';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PositionSnapshotPage#
One page as returned by the positions endpoint (fields used here).
Declaration source: packages/core/src/api/positionSnapshot.ts:25.
export interface PositionSnapshotPage<T> {
readonly positions: readonly T[];
readonly nextCursor?: string | null;
readonly total?: number;
/** Server traversal revision; absent on servers that predate SSW-032. */
readonly revision?: string | null;
readonly scope?: {
readonly owner?: string;
readonly programId?: string;
readonly chain?: string;
} | null;
}
Field documentation
revision— Server traversal revision; absent on servers that predate SSW-032.
PositionSnapshotScope#
Owner/program/network key a snapshot belongs to.
Declaration source: packages/core/src/api/positionSnapshot.ts:39.
export interface PositionSnapshotScope {
readonly owner: string;
/** Program the client is configured for; checked against the server scope when known. */
readonly programId?: string;
/** Client network/genesis label; carried through for cache keys. */
readonly network?: string;
}
Field documentation
programId— Program the client is configured for; checked against the server scope when known.network— Client network/genesis label; carried through for cache keys.
PositionsReadSession#
Not documented.
Declaration source: packages/core/src/api/readSession.ts:112.
export interface PositionsReadSession {
readonly owner: string;
readonly programId: string | undefined;
/**
* Run `request` with a valid token (`null` = server lacks sessions; the
* caller must authenticate the request itself). If the request fails as
* unauthorized, the session re-signs once and retries it.
*/
run<T>(request: (token: string | null) => Promise<T>): Promise<T>;
/** Drop the cached token (e.g. on wallet disconnect). */
invalidate(): void;
}
Field documentation
run— Runrequestwith a valid token (null= server lacks sessions; the caller must authenticate the request itself). If the request fails as unauthorized, the session re-signs once and retries it.invalidate— Drop the cached token (e.g. on wallet disconnect).
PositionsReadSessionGrant#
Not documented.
Declaration source: packages/core/src/api/readSession.ts:38.
export interface PositionsReadSessionGrant {
readonly token: string;
readonly owner: string;
readonly programId: string;
/** Expiry, ms since epoch. */
readonly expiresAt: number;
}
Field documentation
expiresAt— Expiry, ms since epoch.
PositionsReadSessionOptions#
Not documented.
Declaration source: packages/core/src/api/readSession.ts:92.
export interface PositionsReadSessionOptions {
readonly owner: string;
/** Program the client is configured for; the issued scope must match. */
readonly programId?: string;
/**
* Perform the ONE wallet-signed `POST` to {@link positionsReadSessionPath}
* and return the raw response body.
*/
readonly mint: () => Promise<unknown>;
/** True when an error means the server rejected the token (HTTP 401). */
readonly isUnauthorized: (error: unknown) => boolean;
/** True when an error means the server has no session support (404/503). */
readonly isUnavailable?: (error: unknown) => boolean;
readonly now?: () => number;
/** Refresh this long before expiry (default 30s). */
readonly refreshSkewMs?: number;
/** How long to sign per page after an "unavailable" answer (default 5 min). */
readonly unavailableRetryMs?: number;
}
Field documentation
programId— Program the client is configured for; the issued scope must match.mint— Perform the ONE wallet-signedPOSTto {@link positionsReadSessionPath} and return the raw response body.isUnauthorized— True when an error means the server rejected the token (HTTP 401).isUnavailable— True when an error means the server has no session support (404/503).refreshSkewMs— Refresh this long before expiry (default 30s).unavailableRetryMs— How long to sign per page after an "unavailable" answer (default 5 min).
positionsReadSessionPath#
Path (with programId binding) a client signs to mint a session.
Declaration source: packages/core/src/api/readSession.ts:47.
export function positionsReadSessionPath(programId?: string): string;
Parameters
programId: string | undefined— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>PositionsResponse</summary>PositionsResponse#
Not documented.
Declaration source: packages/core/src/api/types.ts:150.
export interface PositionsResponse {
positions: Position[];
availableBalance: number;
/**
* SSW-032: true only when every positions page was read under one stable
* server revision. Callers must not present totals as authoritative when
* false. Optional for backward compatibility with hand-built values.
*/
complete?: boolean;
/** Why the snapshot is incomplete, when `complete` is false. */
incompleteReason?: string;
/** Server traversal revision the snapshot was read under, if any. */
revision?: string | null;
}
Field documentation
complete— SSW-032: true only when every positions page was read under one stable server revision. Callers must not present totals as authoritative when false. Optional for backward compatibility with hand-built values.incompleteReason— Why the snapshot is incomplete, whencompleteis false.revision— Server traversal revision the snapshot was read under, if any.
PositionSummary#
Position summary for UI display.
Declaration source: packages/core/src/types.ts:727.
export interface PositionSummary {
readonly totalYesShares: bigint;
readonly totalNoShares: bigint;
readonly availableYesShares: bigint;
readonly availableNoShares: bigint;
readonly availableCollateral: bigint;
readonly netPnl: bigint;
readonly settled: boolean;
}
POST_ONLY_WOULD_CROSS#
The reason key a crossing PostOnly order denies with.
Exported so a caller can recognise it before deciding whether the more specific {@link POST_ONLY_WOULD_CROSS_OWN} copy applies.
Declaration source: packages/core/src/preflight/placeOrder.ts:113.
export declare const POST_ONLY_WOULD_CROSS: "preflight.postOnlyWouldCross";
POST_ONLY_WOULD_CROSS_OWN#
The same denial, told to a trader who is crossing THEIR OWN resting order.
COPY ONLY. The verdict never distinguishes the two: best_crossing_book_price
(pricing.rs:170-216) takes no taker key and compares no owner, so a
self-cross is a WouldCross on chain exactly like any other. Crediting
ownership in the GATE would make the mirror looser than the program (residual
L-4); naming it in the MESSAGE just tells the user which order to cancel.
Declaration source: packages/core/src/preflight/placeOrder.ts:124.
export declare const POST_ONLY_WOULD_CROSS_OWN: "preflight.postOnlyWouldCrossOwn";
postOnlyCrossesOwnOrder#
Would this PostOnly order cross a level the trader themselves rests on?
Same lane test the gate uses: within the order's own outcome lane, a bid
crosses asks at or below its price and an ask crosses bids at or above it.
Returns false for an empty or unread list, which keeps the generic copy —
never a claim that the liquidity is someone else's.
Declaration source: packages/core/src/preflight/placeOrder.ts:149.
export function postOnlyCrossesOwnOrder(own: readonly OwnRestingLevel[] | undefined, canonicalSide: CanonicalSide, canonicalPriceBps: number, outcome?: OutcomeAsset): boolean;
Parameters
own: readonly OwnRestingLevel[] | undefined— Not documented.canonicalSide: CanonicalSide— Not documented. See CanonicalSide for its declaration and available field documentation.canonicalPriceBps: number— Not documented.outcome: OutcomeAsset | undefined— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>PostOnlyCrossPolicy</summary>PostOnlyCrossPolicy#
Post-only cross policy byte of the place body (reject_post_only, body
offset 29). Reject (1) fails a crossing post-only order with
WouldCross; Slide (0) reprices it one tick beyond the best crossing
maker. SDK builders default to Reject.
Declaration source: packages/core/src/types.ts:156.
export enum PostOnlyCrossPolicy {
Slide = 0,
Reject = 1,
}
PostOnlyOrderInput#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:57.
export interface PostOnlyOrderInput {
outcome: OutcomeAsset;
intent: TradeIntent;
priceBps: number;
quantity: bigint;
maxAgeSeconds?: number;
selfTradeBehavior?: number;
}
PREALLOCATION_RECEIPT_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/constants.ts:239.
export declare const PREALLOCATION_RECEIPT_DISCRIMINATOR: Uint8Array<ArrayBufferLike>;
PREALLOCATION_RECEIPT_SIZE#
Not documented.
Declaration source: packages/core/src/constants.ts:272.
export declare const PREALLOCATION_RECEIPT_SIZE: 392;
PREALLOCATION_RECEIPT_VERSION#
Not documented.
Declaration source: packages/core/src/constants.ts:276.
export declare const PREALLOCATION_RECEIPT_VERSION: 1;
PreallocationReceiptAccount#
Not documented.
Declaration source: packages/core/src/types.ts:401.
export interface PreallocationReceiptAccount {
readonly discriminator: Uint8Array;
readonly version: number;
readonly bump: number;
readonly status: number;
readonly marketKind: number;
readonly legCount: number;
readonly platformId: number;
readonly templateVersion: number;
readonly market: Address;
readonly resolver: Address;
readonly creator: Address;
readonly externalRefHash: Uint8Array;
readonly questionHash: Uint8Array;
readonly closeTs: bigint;
readonly externalRef: Uint8Array;
readonly createdAt: bigint;
readonly permissionlessReclaimAt: bigint;
readonly eventRefHash: Uint8Array;
readonly eventLegIndex: number;
readonly eventLegCount: number;
/** D6{share} Local outstanding claim ceiling committed by Begin. */
readonly maxTotalShares: bigint;
}
Field documentation
maxTotalShares— D6{share} Local outstanding claim ceiling committed by Begin.
PreflightDenied#
A gate the program itself would fail.
Declaration source: packages/core/src/preflight/types.ts:731.
export interface PreflightDenied {
allowed: false;
code: SeesawErrorCode;
/** i18n KEY (e.g. `preflight.tickMisaligned`), never user-facing prose. */
reason: string;
field?: 'price' | 'quantity';
}
Field documentation
reason— i18n KEY (e.g.preflight.tickMisaligned), never user-facing prose.
PreflightOptions#
Options every verdict accepts.
Declaration source: packages/core/src/preflight/types.ts:717.
export interface PreflightOptions {
/**
* Deny with {@link UNKNOWN_STATE} on ANY unknown required input instead of
* skipping that input's gate.
*
* Pre-signature re-checks MUST pass `strict: true`. Previews must NOT: a
* preview that cannot reach signing may stay permissive, and blocking a whole
* ticket because one optional indexer field has not landed is worse UX than
* letting the program remain the authority.
*/
strict?: boolean;
}
Field documentation
strict— Deny with {@link UNKNOWN_STATE} on ANY unknown required input instead of skipping that input's gate.
Pre-signature re-checks MUST pass strict: true. Previews must NOT: a
preview that cannot reach signing may stay permissive, and blocking a whole
ticket because one optional indexer field has not landed is worse UX than
letting the program remain the authority.
PreflightOrderType#
User-facing order type.
Declaration source: packages/core/src/preflight/types.ts:640.
export type PreflightOrderType = 'limit' | 'postOnly' | 'ioc';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PreflightUnknownState#
Strict mode only: one or more required inputs were unknown, so the verdict could not be formed. The caller must block and offer a retry.
Declaration source: packages/core/src/preflight/types.ts:743.
export interface PreflightUnknownState {
allowed: false;
code: typeof UNKNOWN_STATE;
/**
* Every unknown required input, dotted and in the verdict's own check order
* (e.g. `config.tickSizeBps`, `market.bidCapacity`).
*/
missing: string[];
/** `preflight.unavailable.<field>` for the FIRST entry of {@link missing}. */
reason: string;
field?: 'price' | 'quantity';
}
Field documentation
missing— Every unknown required input, dotted and in the verdict's own check order (e.g.config.tickSizeBps,market.bidCapacity).reason—preflight.unavailable.<field>for the FIRST entry of {@link missing}.
PrefundedOrderReceipt#
Not documented.
Declaration source: packages/core/src/prefundedOrderReceipt.ts:11.
export interface PrefundedOrderReceipt {
programAddress: Address;
marketAddress: Address;
owner: Address;
/** Market-scoped, on-chain order ID. */
orderId: string;
placedAtUnix: number;
}
Field documentation
orderId— Market-scoped, on-chain order ID.
PrefundedStrategyAccounts#
Optional authority for an operation on the position owner's ledger.
Declaration source: packages/core/src/instructions.ts:378.
export interface PrefundedStrategyAccounts {
readonly strategyAccount: Address;
/** Omit for an owner-signed operation. */
readonly delegate?: Address;
}
Field documentation
delegate— Omit for an owner-signed operation.
PreparedRouteBalanceAssertion#
Not documented.
Declaration source: packages/core/src/router/prepareBalanceAssertion.ts:17.
export interface PreparedRouteBalanceAssertion {
/** Prepend these idempotent ATA creations before any trade legs. */
readonly setupInstructions: readonly Instruction[];
/** Append after all trade legs in the same transaction. */
readonly assertion: Instruction;
}
Field documentation
setupInstructions— Prepend these idempotent ATA creations before any trade legs.assertion— Append after all trade legs in the same transaction.
prepareNextSeriesAttachment#
Prepare only the next attachment. The caller re-reads the series after landing it.
Declaration source: packages/core/src/seriesCrankRpc.ts:291.
export function prepareNextSeriesAttachment(rpc: RpcDataSource, programId: Address, request: SeriesCrankReadRequest, payer: Address, options?: RpcReadConfig): Promise<{ next: import("packages/core/src/seriesCrank").PlannedSeriesAttachment | null; instruction: import("node_modules/@solana/instructions/dist/types/instruction").Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]> | null; series: Address<string>; slot: bigint; unixTimestamp: bigint; discoveryWarning: { policyVersion: number; commitmentAtoms: string; minimumDepthAtoms: string; } | null; attachments: readonly import("packages/core/src/seriesCrank").PlannedSeriesAttachment[]; skipped: readonly { readonly market: Address; readonly reason: import("packages/core/src/seriesCrank").SeriesCrankSkip; }[]; }>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.programId: Address— Not documented.request: SeriesCrankReadRequest— Not documented. See SeriesCrankReadRequest for its declaration and available field documentation.payer: Address— Not documented.options: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<{ next: import("packages/core/src/seriesCrank").PlannedSeriesAttachment | null; instruction: import("node_modules/@solana/instructions/dist/types/instruction").Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]> | null; series: Address<string>; slot: bigint; unixTimestamp: bigint; discoveryWarning: { policyVersion: number; commitmentAtoms: string; minimumDepthAtoms: string; } | null; attachments: readonly import("packages/core/src/seriesCrank").PlannedSeriesAttachment[]; skipped: readonly { readonly market: Address; readonly reason: import("packages/core/src/seriesCrank").SeriesCrankSkip; }[]; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
prepareRouteBalanceAssertion#
Prepare the exact wallet accounts required by the quoted route's final assertion.
Declaration source: packages/core/src/router/prepareBalanceAssertion.ts:25.
export function prepareRouteBalanceAssertion(quote: RpcMarketRouteQuote, payer?: Address): Promise<PreparedRouteBalanceAssertion>;
Parameters
quote: RpcMarketRouteQuote— Not documented. See RpcMarketRouteQuote for its declaration and available field documentation.payer: Address— Not documented. Default:quote.execution.strategy?.signer ?? quote.taker.
Returns
Promise<PreparedRouteBalanceAssertion>
Not documented.
Throws
Not documented.
Defaults
payer:quote.execution.strategy?.signer ?? quote.taker.
prepareTakerWithManagedReclaim#
Prepare a taker instruction sequence using an authenticated book snapshot only if simulation reports the program's bounded-reclaim error. The caller owns transaction sizing, simulation, and submission. The simulation's instruction indices must refer to the instructions supplied to it.
Declaration source: packages/core/src/managedReclaimRecovery.ts:253.
export function prepareTakerWithManagedReclaim(taker: ManagedRecoveryTaker, instructions: readonly Instruction[], simulate: TakerReclaimSimulation, observe: () => Promise<ManagedRecoveryBook>, programAddress?: Address): Promise<readonly Instruction[]>;
Parameters
taker: ManagedRecoveryTaker— Not documented. See ManagedRecoveryTaker for its declaration and available field documentation.instructions: readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]— Not documented.simulate: TakerReclaimSimulation— Not documented. See TakerReclaimSimulation for its declaration and available field documentation.observe: () => Promise<ManagedRecoveryBook>— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<readonly Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>[]>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
previewMarketFill#
Preview an immediate-or-cancel market order against one outcome's own book,
or null when nothing would fill (non-positive amount, empty side, or a
budget too small for one share atom).
BUY lifts lane.asks (cheapest first), spending the fee-inclusive budget
level by level and stopping at the guard bound or when budget/book runs
out. SELL hits lane.bids (highest first) for amountMicro share atoms,
stopping at the guard floor. Levels with a price outside 1..=9999 or no
quantity are ignored.
Declaration source: packages/core/src/ux/fillPreview.ts:180.
export function previewMarketFill(input: FillPreviewInput): FillPreview | null;
Parameters
input: FillPreviewInput— Not documented. See FillPreviewInput for its declaration and available field documentation.
Returns
FillPreview | null
Not documented.
Throws
SeesawValidationError when fee is outside the program's domain
(non-u16 cap/decay), exactly like computeFeeAmountAtPrice.
previewOrderPricing#
Preview the price an order rests and trades at after tick alignment.
Bids align down and asks align up, so alignment never gives the trader a worse price than requested.
Declaration source: packages/core/src/orderPricing.ts:31.
export function previewOrderPricing(order: OrderIntent, tickSizeBps: number): OrderPricingPreview;
Parameters
order: OrderIntent— Not documented. See OrderIntent for its declaration and available field documentation.tickSizeBps: number— Not documented.
Returns
OrderPricingPreview
Not documented.
Throws
Not documented.
</details> <details> <summary>previewPlaceOrderPricing</summary>previewPlaceOrderPricing#
Preview the tick-aligned price the program rests an order at and warn when alignment moves it. Bids align down and asks align up. Never throws.
Declaration source: packages/core/src/price.ts:154.
export function previewPlaceOrderPricing(outcome: OutcomeAsset, intent: TradeIntent, priceBps: number, tickSizeBps: number): { canonicalSide: CanonicalSide; canonicalPriceBps: number; alignedCanonicalPriceBps: number; effectivePriceBps: number; warning: string | null; };
Parameters
outcome: OutcomeAsset— - Named outcome, used only in the warning text See OutcomeAsset for its declaration and available field documentation.intent: TradeIntent— - BUY (bid) or SELL (ask) See TradeIntent for its declaration and available field documentation.priceBps: number— - Price in the named outcome's denominationtickSizeBps: number— - Tick size in bps
Returns
{ canonicalSide: CanonicalSide; canonicalPriceBps: number; alignedCanonicalPriceBps: number; effectivePriceBps: number; warning: string | null; }
Not documented.
Throws
Not documented.
</details> <details> <summary>PRICE_GUARD_PRESETS</summary>PRICE_GUARD_PRESETS#
Price-guard presets, in bps ABOVE the best price (buy) / BELOW it (sell).
Declaration source: packages/core/src/ux/fillPreview.ts:34.
export declare const PRICE_GUARD_PRESETS: { readonly best: 0; readonly plus2: 200; readonly none: null; };
PRICE_MAX_AGE_MS#
Hard max-age for a price. Past it the price is hidden (a dash), never shown as an old number. Measured from when Seesaw's proxy last fetched the row.
Declaration source: packages/core/src/tokensXyz/display.ts:13.
export declare const PRICE_MAX_AGE_MS: 120000;
PRICE_STALE_AFTER_MS#
The provider's own price timestamp older than this also hides the price.
Declaration source: packages/core/src/tokensXyz/display.ts:17.
export declare const PRICE_STALE_AFTER_MS: number;
PRICE_UPDATE_V2_DISCRIMINATOR#
sha256("account:PriceUpdateV2")[..8], equal to the program's
PYTH_PRICE_UPDATE_DISCRIMINATOR (program/src/oracle/pyth.rs).
Declaration source: packages/core/src/marketDiscovery.ts:158.
export declare const PRICE_UPDATE_V2_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
PriceAlert#
Not documented.
Declaration source: packages/core/src/api/types.ts:270.
export interface PriceAlert {
id: string;
marketAddress: string;
marketPair: string;
side: 'yes' | 'no';
condition: 'above' | 'below';
threshold: number;
enabled: boolean;
triggered: boolean;
triggeredAt: string | undefined;
createdAt: string;
}
priceToX#
Map a price in bps to an x coordinate in the internal viewBox, per the given axis mode.
Declaration source: packages/core/src/depthChart.ts:36.
export function priceToX(priceBps: number, axis: DepthProfileAxis, midBps: number): number;
Parameters
priceBps: number— Not documented.axis: DepthProfileAxis— Not documented. See DepthProfileAxis for its declaration and available field documentation.midBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>PriorityFeeConfig</summary>PriorityFeeConfig#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:9.
export interface PriorityFeeConfig {
readonly priorityFee: 'auto' | number;
readonly defaultPriorityFeeMicroLamports?: number;
readonly maxPriorityFeeMicroLamports?: number;
readonly percentile?: number;
readonly writableAccounts?: readonly string[];
}
priorityFeeLamportsFor#
D0{lamport} Total priority fee of a transaction that requests
computeUnitLimit units at microLamportsPerComputeUnit, rounded up: the
amount a transaction with a per-unit price paid for the same limit.
Declaration source: packages/core/src/v1Transaction.ts:110.
export function priorityFeeLamportsFor(microLamportsPerComputeUnit: bigint, computeUnitLimit: number): bigint;
Parameters
microLamportsPerComputeUnit: bigint— Not documented.computeUnitLimit: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>PriorityFeeSample</summary>PriorityFeeSample#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:3.
export interface PriorityFeeSample {
readonly prioritizationFee: number;
readonly slot?: number;
readonly writableAccounts?: readonly string[];
}
PriorTransactionAttemptLandedError#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:1234.
export declare class PriorTransactionAttemptLandedError extends Error {
constructor(attempts: readonly TransactionAttemptRecord[]);
readonly code: "PRIOR_TRANSACTION_ATTEMPT_LANDED";
readonly signatures: string[];
}
Parameters
attempts: readonly TransactionAttemptRecord[]— Not documented.
Throws
Not documented.
</details> <details> <summary>PROGRAM_ADDRESS</summary>PROGRAM_ADDRESS#
Program address as a Kit branded Address (base58).
Declaration source: packages/core/src/constants.ts:24.
export declare const PROGRAM_ADDRESS: Address;
PROGRAM_ID_BYTES#
Raw program ID bytes for SEEsawgSrxRsgtKRbaThZFEKrVqX3Y64hDipTWyi8F8.
Declaration source: packages/core/src/constants.ts:18.
export declare const PROGRAM_ID_BYTES: Uint8Array<ArrayBuffer>;
progressForChallengeType#
Maps a challenge type to its progress value from derived metrics.
Declaration source: packages/core/src/challenges.ts:126.
export function progressForChallengeType(type: ChallengeType, metrics: DailyChallengeMetrics): number;
Parameters
type: ChallengeType— Not documented. See ChallengeType for its declaration and available field documentation.metrics: DailyChallengeMetrics— Not documented. See DailyChallengeMetrics for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>projectSeesawBinaryEvent</summary>projectSeesawBinaryEvent#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:179.
export function projectSeesawBinaryEvent(input: ProjectSeesawBinaryEventInput): TrustlessProjectionEvent[];
Parameters
input: ProjectSeesawBinaryEventInput— Not documented. See ProjectSeesawBinaryEventInput for its declaration and available field documentation.
Returns
TrustlessProjectionEvent[]
Not documented.
Throws
Not documented.
</details> <details> <summary>projectSeesawBinaryEventBatch</summary>projectSeesawBinaryEventBatch#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:164.
export function projectSeesawBinaryEventBatch(input: ProjectSeesawBinaryEventBatchInput): TrustlessProjectionEvent[];
Parameters
input: ProjectSeesawBinaryEventBatchInput— Not documented. See ProjectSeesawBinaryEventBatchInput for its declaration and available field documentation.
Returns
TrustlessProjectionEvent[]
Not documented.
Throws
Not documented.
</details> <details> <summary>ProjectSeesawBinaryEventBatchInput</summary>ProjectSeesawBinaryEventBatchInput#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:95.
export interface ProjectSeesawBinaryEventBatchInput {
batch: BinaryRecorderBatch;
signature: string;
instructionIndex: number;
provider?: string;
}
ProjectSeesawBinaryEventInput#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:86.
export interface ProjectSeesawBinaryEventInput {
event: SeesawBinaryEvent;
header: BinaryRecorderHeader;
signature: string;
instructionIndex: number;
eventIndex: number;
provider?: string;
}
projectSplineSeatLiquidity#
Prepare authenticated market seats for the selector and outcome router. Supply market, book and Clock observations from the same slot as the seat scan. The selector applies its own landing-time staleness check, so it can explain stale exclusions. Router seats have the time check applied here.
Declaration source: packages/core/src/splineSeatLiquidity.ts:100.
export function projectSplineSeatLiquidity(seats: RpcReadResult<readonly RpcAddressedValue<SplineSeatAccount>[]>, context: SplineSeatSnapshotContext): SplineSeatLiquidity;
Parameters
seats: RpcReadResult<readonly RpcAddressedValue<{ roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: import("packages/core/src/instructions").CurveLevel[]; askLevels: import("packages/core/src/instructions").CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; }>[]>— Not documented. See RpcReadResult, ReadSourceMetadata for its declaration and available field documentation.context: SplineSeatSnapshotContext— Not documented. See SplineSeatSnapshotContext for its declaration and available field documentation.
Returns
SplineSeatLiquidity
Not documented.
Throws
Not documented.
</details> <details> <summary>ProRataAllocation</summary>ProRataAllocation#
{@link allocateSeatsProRata} result, in the input order.
Declaration source: packages/core/src/router/seatQuote.ts:241.
export interface ProRataAllocation {
readonly allocations: readonly bigint[];
/** Lots allocated `q`. */
readonly quantity: bigint;
/**
* Remainder lots whose recipient depends on the tie-break among seats with
* equal fractional parts. Moving one lot between two seats at one price moves
* at most one quote atom and one fee atom, so this bounds the tie-break's
* effect on the taker.
*/
readonly ambiguousLots: bigint;
}
Field documentation
quantity— Lots allocatedq.ambiguousLots— Remainder lots whose recipient depends on the tie-break among seats with equal fractional parts. Moving one lot between two seats at one price moves at most one quote atom and one fee atom, so this bounds the tie-break's effect on the taker.
ProRataEntry#
One seat's entry in a pro-rata step.
Declaration source: packages/core/src/router/seatQuote.ts:233.
export interface ProRataEntry {
/** Lots the seat offers at the step price (`a_i`). */
readonly availableLots: bigint;
/** Ascending tie-break key (design §5 rule 3). */
readonly tieKey: Uint8Array;
}
Field documentation
availableLots— Lots the seat offers at the step price (a_i).tieKey— Ascending tie-break key (design §5 rule 3).
PROTOCOL_VERSION#
D0{1} Protocol version. Must match Rust PROTOCOL_VERSION in program/src/constants.rs.
Declaration source: packages/core/src/constants.ts:53.
export declare const PROTOCOL_VERSION: 1;
ProtocolTreasuryConfigFacts#
The two ConfigAccount fields that choose a market's protocol destination.
Declaration source: packages/core/src/treasury.ts:149.
export interface ProtocolTreasuryConfigFacts {
readonly defaultSettlementMint: Address;
readonly treasuryRecipients: readonly Address[];
}
ProtocolTreasuryDestination#
PlaceOrder account 7 chosen by {@link resolveProtocolTreasuryDestination}
or {@link getProtocolTreasuryDestination}, together with the market mint and
index it was chosen for. The order helpers of sdk.ts accept this or the
config facts, never a bare address, so a destination resolved for one
currency or shard cannot be sent with another.
Declaration source: packages/core/src/treasury.ts:183.
export interface ProtocolTreasuryDestination {
readonly account: Address;
readonly settlementMint: Address;
readonly protocolTreasuryIndex: number;
/**
* `configured`: `config.treasuryRecipients[index]` of a default-mint market.
* `currencyShard`: the currency protocol treasury shard (`spec/IX.md` §59.2).
*/
readonly kind: 'configured' | 'currencyShard';
}
Field documentation
kind—configured:config.treasuryRecipients[index]of a default-mint market.currencyShard: the currency protocol treasury shard (spec/IX.md§59.2).
ProtocolTreasurySource#
What every order helper needs to pick account 7: a resolved
{@link ProtocolTreasuryDestination}, or the config facts (a decoded
ConfigAccount satisfies {@link ProtocolTreasuryConfigFacts}).
Declaration source: packages/core/src/treasury.ts:199.
export type ProtocolTreasurySource = ProtocolTreasuryDestination | ProtocolTreasuryConfigFacts;
Provider#
Which provider path a capability describes. Phase 7 adds no value.
Declaration source: packages/core/src/execution/capability.ts:23.
export type Provider = (typeof PROVIDER_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PROVIDER_VALUES#
Not documented.
Declaration source: packages/core/src/execution/capability.ts:21.
export declare const PROVIDER_VALUES: readonly ["bam", "harmonic", "rpc"];
ProviderClassEntry#
Not documented.
Declaration source: packages/core/src/tokensXyz/display.ts:28.
export interface ProviderClassEntry {
readonly provider: CurrencyAttributionProvider;
readonly className: string | null;
readonly valueUsd: number | null;
}
ProviderObservation#
Not documented.
Declaration source: packages/core/src/execution/delivery.ts:103.
export interface ProviderObservation {
readonly delivery: DeliveryId;
readonly signature: string;
readonly observed_at_ms: number;
readonly kind: ObservationKind;
/** True when the observation came from a local stand-in. */
readonly stand_in: boolean;
}
Field documentation
stand_in— True when the observation came from a local stand-in.
ProvisionalJournalRecord#
Provisional until task 06 merges; see the module comment.
Declaration source: packages/core/src/execution/journal.ts:16.
export interface ProvisionalJournalRecord {
/** Stream identity. */
readonly stream: StreamId;
/** Authority epoch. */
readonly authority_epoch: number;
/** Sequence. */
readonly sequence: number;
/** Source watermark. */
readonly source_watermark: number;
/** Validity bounds. */
readonly valid_from_slot: number;
readonly valid_until_slot: number;
/** Signature (base58). */
readonly signature: string;
/** Seesaw-instruction digest (encoding not defined yet). */
readonly seesaw_instruction_digest: string;
/** Wire digest (encoding not defined yet). */
readonly wire_digest: string;
/** Deliveries and destinations. */
readonly deliveries: readonly {
readonly delivery: DeliveryId;
readonly destinations: readonly string[];
}[];
/** Fee settings. */
readonly compute_unit_price_micro_lamports?: number;
readonly compute_unit_limit?: number;
/** Outcome. */
readonly outcome: PublicationState;
}
Field documentation
stream— Stream identity.authority_epoch— Authority epoch.sequence— Sequence.source_watermark— Source watermark.valid_from_slot— Validity bounds.signature— Signature (base58).seesaw_instruction_digest— Seesaw-instruction digest (encoding not defined yet).wire_digest— Wire digest (encoding not defined yet).deliveries— Deliveries and destinations.compute_unit_price_micro_lamports— Fee settings.outcome— Outcome.
PUBLICATION_PROFILE_VALUES#
Rust QuoteProfile's JSON form. The on-chain byte (0, 1, 2) is QuoteProfile in core.
Declaration source: packages/core/src/execution/stream.ts:30.
export declare const PUBLICATION_PROFILE_VALUES: readonly ["ordinary", "bounded", "same_slot"];
PUBLICATION_PROFILE_WIRE#
Wire byte of each profile (docs/design/ace/fixtures/phase1-wire.json).
Declaration source: packages/core/src/execution/stream.ts:34.
export declare const PUBLICATION_PROFILE_WIRE: Readonly<Record<"bounded" | "ordinary" | "same_slot", 0 | 1 | 2>>;
PUBLICATION_STATE_VALUES#
ACE §10.2, in lifecycle order.
Declaration source: packages/core/src/execution/lifecycle.ts:15.
export declare const PUBLICATION_STATE_VALUES: readonly ["constructed", "validated", "signed", "dispatched", "admitted", "admission_unknown", "superseded", "selected", "execution_success", "execution_failure", "execution_unknown", "confirmed", "finalized"];
PublicationHeader#
The protected-publication header every surface shares (ACE §5.1).
Declaration source: packages/core/src/execution/stream.ts:41.
export interface PublicationHeader {
readonly sequence: number;
readonly expected_authority_epoch: number;
readonly expected_market_trading_generation: number;
readonly valid_from_slot: number;
readonly valid_until_slot: number;
readonly source_observed_at_unix: number;
readonly profile: PublicationProfile;
}
PublicationProfile#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:31.
export type PublicationProfile = (typeof PUBLICATION_PROFILE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PublicationState#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:30.
export type PublicationState = (typeof PUBLICATION_STATE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
publishedInputsRpc#
An RpcDataSource that answers from a published input set (for example the
pages of GET /markets/discovery-inputs): every read returns the published
bytes and context slot. Program scans apply their filters to published accounts.
Reading an unpublished address is an error, so a rerun cannot silently fill a gap.
Direct account reads preserve their individual slots even when the original reads spanned multiple slots. A program scan reports the common slot of its results, if any.
Declaration source: packages/core/src/discoveryVerify.ts:29.
export function publishedInputsRpc(inputs: readonly DiscoveryInputAccount[], programAddress?: Address): RpcDataSource;
Parameters
inputs: readonly DiscoveryInputAccount[]— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
RpcDataSource
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
PYTH_PULL_MARKET_CREATION_ENABLED#
Pull is the sole oracle mode in the pre-launch ABI.
Declaration source: packages/core/src/constants.ts:242.
export declare const PYTH_PULL_MARKET_CREATION_ENABLED: true;
PYTH_PUSH_ORACLE_PROGRAM_ADDRESS#
Pyth push oracle that pairs with the Receiver rec2HH… the program pins.
Source: @pythnetwork/pyth-solana-receiver 0.16.0, dist/esm/address.mjs,
PRO_COMPATIBLE_PUSH_ORACLE_PROGRAM_ID (published beside
PRO_COMPATIBLE_RECEIVER_PROGRAM_ID = rec2HHDDnjLfj4kE7VyEtFA1HPGQLK33259532cRyHp;
the default pair pythWSns…/rec5EKMG… writes accounts the program rejects).
Not verified offline: that Pyth sponsors feeds under this deployment, or any
feed's heartbeat. An unsponsored feed reads as absent (feed-unobserved).
Declaration source: packages/core/src/discoveryReader.ts:62.
export declare const PYTH_PUSH_ORACLE_PROGRAM_ADDRESS: Address;
PYTH_RECEIVER_PROGRAM_ADDRESS#
Pyth Solana Receiver that owns Pull PriceUpdateV2 accounts; the program pins
the same compile-time constant (spec/ORACLE.md §2).
Declaration source: packages/core/src/marketDiscovery.ts:151.
export declare const PYTH_RECEIVER_PROGRAM_ADDRESS: Address;
PythMarketEndAction#
The next permissionless action at the observed finalized slot.
Declaration source: packages/core/src/pythLifecycle.ts:17.
export type PythMarketEndAction = 'waiting' | 'snapshot' | 'resolve' | 'expire' | 'terminal';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
PythMarketEndState#
Not documented.
Declaration source: packages/core/src/pythLifecycle.ts:19.
export interface PythMarketEndState {
readonly marketAddress: Address;
readonly market: MarketAccount;
readonly observedSlot: bigint;
readonly unixTimestamp: bigint;
readonly expiresAt: bigint;
readonly action: PythMarketEndAction;
}
QueryParameterValidationError#
Not documented.
Declaration source: packages/core/src/api/client.ts:194.
export declare class QueryParameterValidationError extends SeesawSdkError {
constructor(parameterKey: string, reason: string);
readonly parameterKey: string;
readonly reason: string;
}
Parameters
parameterKey: string— Not documented.reason: string— Not documented.
Throws
Not documented.
</details> <details> <summary>quoteAmountToShareQuantity</summary>quoteAmountToShareQuantity#
Converts exact quote-token atoms to share atoms at a bps price.
Integer division deliberately rounds down: route-prefilled quantity must never claim more shares than the exact quote amount can conservatively buy.
Declaration source: packages/core/src/price.ts:259.
export function quoteAmountToShareQuantity(quoteAmount: bigint, priceBps: number): bigint;
Parameters
quoteAmount: bigint— Not documented.priceBps: number— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>QuoteLane</summary>QuoteLane#
The outcome lane a taker trades in.
Declaration source: packages/core/src/router/seatQuote.ts:36.
export type QuoteLane = OutcomeAsset;
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
quoteMarketRoute#
Quote a route with the balances, fee policy and liquidity observed at one RPC slot.
Declaration source: packages/core/src/router/marketRoute.ts:518.
export function quoteMarketRoute(rpc: RpcDataSource, marketAddress: Address, programAddress: Address, request: MarketRouteQuoteRequest, options: MarketRouteReadOptions): Promise<RpcMarketRouteQuote>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.marketAddress: Address— Not documented.programAddress: Address— Not documented.request: MarketRouteQuoteRequest— Not documented. See MarketRouteQuoteRequest for its declaration and available field documentation.options: MarketRouteReadOptions— Not documented. See MarketRouteReadOptions for its declaration and available field documentation.
Returns
Promise<RpcMarketRouteQuote>
Not documented.
Throws
Not documented.
</details> <details> <summary>QuoteProfile</summary>QuoteProfile#
Not documented.
Declaration source: packages/core/src/splineFreshness.ts:3.
export type QuoteProfile = 0 | 1 | 2;
Field documentation
toString— Returns a string representation of an object.toFixed— Returns a string representing a number in fixed-point notation.toExponential— Returns a string containing a number represented in exponential notation.toPrecision— Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.valueOf— Returns the primitive value of the specified object.toLocaleString— Converts a number to a string by using the current or specified locale.
rankDiscovery#
Build one discovery list. The order is total and independent of input order. Rows of other mints are dropped from a one-currency list, so depth is only ever compared within one mint.
Declaration source: packages/core/src/discoveryRank.ts:220.
export function rankDiscovery<T extends DiscoveryRankRow>(rows: readonly T[], options: RankDiscoveryOptions): DiscoveryList<T>;
Parameters
rows: readonly T[]— Not documented.options: RankDiscoveryOptions— Not documented. See RankDiscoveryOptions for its declaration and available field documentation.
Returns
DiscoveryList<T>
Not documented.
Throws
Not documented.
</details> <details> <summary>RankDiscoveryOptions</summary>RankDiscoveryOptions#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:139.
export interface RankDiscoveryOptions {
/** Omit to include both kinds. */
readonly kind?: DiscoveryMarketKind;
/** A settlement mint, `'all'`, or absent for the default mint. */
readonly mint?: Address | 'all';
/** `ConfigAccount.default_settlement_mint`. */
readonly defaultMint: Address;
/** Default `depth` for one currency, `expiry` for all currencies. */
readonly sort?: DiscoverySort;
/** `eligible` (default) lists eligible rows; `any` appends ineligible rows after them. */
readonly eligible?: 'eligible' | 'any';
/** Default true: one row per duplicate key, the first in list order. */
readonly collapse?: boolean;
}
Field documentation
kind— Omit to include both kinds.mint— A settlement mint,'all', or absent for the default mint.defaultMint—ConfigAccount.default_settlement_mint.sort— Defaultdepthfor one currency,expiryfor all currencies.eligible—eligible(default) lists eligible rows;anyappends ineligible rows after them.collapse— Default true: one row per duplicate key, the first in list order.
RankedDiscoveryRow#
Not documented.
Declaration source: packages/core/src/discoveryRank.ts:154.
export type RankedDiscoveryRow<T extends DiscoveryRankRow> = T & {
/**
* Members of the list that share this row's duplicate key, this row included.
* DESIGN-QUESTION: under `eligible=any` ineligible siblings are counted too.
*/
readonly duplicateCount: number;
};
Field documentation
rankDepth—min(bid side, ask side)in share atoms;null= unknown (sorts last).maxLaneSpreadBps— Larger spread of the quotable lanes;null= a quotable lane is one-sided (sorts last).duplicateKey— From {@link duplicateKey};nullnever collapses.duplicateCount— Members of the list that share this row's duplicate key, this row included. DESIGN-QUESTION: undereligible=anyineligible siblings are counted too.
RawAddress#
A raw Solana address represented as a plain string (base58-encoded).
This type alias distinguishes API-layer address strings from Kit's branded
Address type used in on-chain instruction builders. RawAddress is used
in contexts where addresses are received from external sources (API responses,
user input, configuration) and have not yet been validated or branded.
To convert to a Kit Address, use address() from @solana/addresses
which performs base58 validation.
Declaration source: packages/core/src/types.ts:31.
export type RawAddress = string;
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
readCancelSession#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:591.
export function readCancelSession(rpc: Pick<RpcDataSource, "getAccountInfo">, market: Address, owner: Address, programAddress?: Address, config?: RpcReadConfig): Promise<{ nonce: number; strategyId: number; cutoffSequence: bigint; nextOrderId: bigint; filter: number; lane: number; groupId: number; tickLimit: number; } | null>;
Parameters
rpc: Pick<RpcDataSource, "getAccountInfo">— Not documented.market: Address— Not documented.owner: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<{ nonce: number; strategyId: number; cutoffSequence: bigint; nextOrderId: bigint; filter: number; lane: number; groupId: number; tickLimit: number; } | null>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.config:{}.
readCurrencyReferrerTreasuryIndex#
Validate a canonical currency earnings snapshot and return its bound shard.
Declaration source: packages/core/src/referral/resolver.ts:252.
export function readCurrencyReferrerTreasuryIndex(snapshot: AccountSnapshot | undefined, currencyRecord: Address, referrer: Address, program?: Address): Promise<number | null>;
Parameters
snapshot: AccountSnapshot | undefined— Not documented. See AccountSnapshot for its declaration and available field documentation.currencyRecord: Address— Not documented.referrer: Address— Not documented.program: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<number | null>
Not documented.
Throws
Not documented.
Defaults
program:PROGRAM_ADDRESS.
readDiscoveryInputs#
Read the discovery input set of §2 over RPC and identify it as one snapshot.
The whole set is re-read until every context slot is equal, up to
maxAttempts passes. If the slots still differ (or one is unreported), the
last pass is returned with consistent: false; nothing is hidden.
Declaration source: packages/core/src/discoveryReader.ts:458.
export function readDiscoveryInputs(rpc: RpcDataSource, options: DiscoveryReadOptions): Promise<DiscoveryReadResult>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.options: DiscoveryReadOptions— Not documented. See DiscoveryReadOptions for its declaration and available field documentation.
Returns
Promise<DiscoveryReadResult>
Not documented.
Throws
Not documented.
</details> <details> <summary>readLandedOrderEffects</summary>readLandedOrderEffects#
Read only observed order effects from recorder instructions in the exact landed transaction.
Declaration source: packages/core/src/landedOrderEffects.ts:41.
export function readLandedOrderEffects(result: unknown, scope: LandedOrderScope): Promise<LandedOrderEffects | null>;
Parameters
result: unknown— Not documented.scope: LandedOrderScope— Not documented. See LandedOrderScope for its declaration and available field documentation.
Returns
Promise<LandedOrderEffects | null>
Not documented.
Throws
Not documented.
</details> <details> <summary>readMakerQuotePublication</summary>readMakerQuotePublication#
Read the state, its market, and Clock from the same bank before constructing a publication.
Declaration source: packages/core/src/rpcDataSource.ts:283.
export function readMakerQuotePublication(rpc: Pick<RpcDataSource, "getMultipleAccountsInfo">, identity: { readonly market: Address; readonly owner: Address; }, program: Address, config?: RpcReadConfig): Promise<RpcReadResult<{ readonly state: MakerQuoteState; readonly slot: bigint; readonly unixTimestamp: bigint; }>>;
Parameters
rpc: Pick<RpcDataSource, "getMultipleAccountsInfo">— Not documented.identity: { readonly market: Address; readonly owner: Address; }— Not documented.program: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<{ readonly state: MakerQuoteState; readonly slot: bigint; readonly unixTimestamp: bigint; }>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readMakerQuoteState#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:261.
export function readMakerQuoteState(rpc: Pick<RpcDataSource, "getAccountInfo">, identity: { readonly market: Address; readonly owner: Address; }, program: Address, config?: RpcReadConfig): Promise<RpcReadResult<RpcAddressedValue<MakerQuoteState> | null>>;
Parameters
rpc: Pick<RpcDataSource, "getAccountInfo">— Not documented.identity: { readonly market: Address; readonly owner: Address; }— Not documented.program: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<RpcAddressedValue<MakerQuoteState> | null>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readMakerSeries#
Read and authenticate the series identified by its feed, duration, currency and maker.
Declaration source: packages/core/src/rpcDataSource.ts:449.
export function readMakerSeries(rpc: RpcDataSource, identity: MakerSeriesIdentity, programAddress: Address, config?: RpcReadConfig): Promise<RpcReadResult<MakerSeriesAccount>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.identity: MakerSeriesIdentity— Not documented. See MakerSeriesIdentity for its declaration and available field documentation.programAddress: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<{ bidLevels: import("packages/core/src/instructions").CurveLevel[]; askLevels: import("packages/core/src/instructions").CurveLevel[]; version: 1; bump: number; vaultBump: number; maker: Address; defaultQuoteAuthority: Address; feedId: Uint8Array<ArrayBuffer>; currencyRecord: Address; durationSeconds: bigint; defaultCommitAmount: bigint; maxQuoteAgeSeconds: number; templateMidBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachActive: boolean; activeSeats: number; maxConcurrentSeats: number; lifetimeSeats: bigint; eventSequence: bigint; autoAttachEnabled: boolean; acceptConfidenceGuardOff: boolean; perMarketCommitment: bigint; minSpacingSeconds: bigint; lastAutoCreatedAt: bigint; rewardCapLamports: bigint; rewardRampSeconds: number; attachMaxAgeSeconds: number; minConfidenceRatioBps: number; maxConfidenceRatioBps: number; minOracleJumpBps: number; maxOracleJumpBps: number; minTotalShares: bigint; maxTotalShares: bigint; }>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readManagedOrderReclaimInstruction#
Resolve the route from the canonical book before signing. Managed orders use batch reclaim even for one order. Ordinary orders use the caller's existing reclaim path, which can include a quote bounty and wallet ATAs.
Declaration source: packages/core/src/managedReclaimRecovery.ts:92.
export function readManagedOrderReclaimInstruction(rpc: RpcDataSource, target: { market: Address; owner: Address; caller: Address; orderId: bigint; }, programAddress?: Address): Promise<Instruction | null>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.target: { market: Address; owner: Address; caller: Address; orderId: bigint; }— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]> | null>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
readMarket#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:360.
export function readMarket(rpc: RpcDataSource, address: Address, programAddress: Address, config?: RpcReadConfig): Promise<RpcReadResult<MarketAccount>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.address: Address— Not documented.programAddress: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<MarketAccount>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readMarketRouteFeeConfig#
Read the fee policy that matches the Phase 6 router's coefficient model.
Declaration source: packages/core/src/router/marketRoute.ts:130.
export function readMarketRouteFeeConfig(rpc: RpcDataSource, programAddress: Address, config?: RpcReadConfig): Promise<{ readonly slot: bigint; readonly takerFeeCoefficientBps: number; readonly feeEpoch: number; readonly tickSizeBps: number; }>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.programAddress: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<{ readonly slot: bigint; readonly takerFeeCoefficientBps: number; readonly feeEpoch: number; readonly tickSizeBps: number; }>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readMarketTickV1#
Check the canonical account, runtime slot and the publisher chosen by the caller. This establishes neither authenticated wall time nor tick cadence; a stalled trusted clock cannot reveal elapsed time within a slot.
Declaration source: packages/core/src/marketTick.ts:106.
export function readMarketTickV1(account: MarketTickV1Account, expectedSigner: Address, currentSlot: bigint): MarketTickV1 | null;
Parameters
account: MarketTickV1Account— Not documented. See MarketTickV1Account for its declaration and available field documentation.expectedSigner: Address— Not documented.currentSlot: bigint— Not documented.
Returns
MarketTickV1 | null
Not documented.
Throws
Not documented.
</details> <details> <summary>readOrderbook</summary>readOrderbook#
Read the complete canonical book; an absent or partial account is never an empty book.
Declaration source: packages/core/src/rpcDataSource.ts:721.
export function readOrderbook(rpc: Pick<RpcDataSource, "getAccountInfo">, marketAddress: Address, programAddress: Address, config?: RpcReadConfig): Promise<RpcReadResult<OrderbookAccount>>;
Parameters
rpc: Pick<RpcDataSource, "getAccountInfo">— Not documented.marketAddress: Address— Not documented.programAddress: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<OrderbookAccount>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readOrderReclaimStrategy#
Resolve the optional capital-credit account from an authenticated resting order.
Declaration source: packages/core/src/managedReclaimRecovery.ts:26.
export function readOrderReclaimStrategy(rpc: Pick<RpcDataSource, "getAccountInfo">, order: Pick<Order, "owner" | "strategyId">, programAddress?: Address, config?: RpcReadConfig): Promise<Address | undefined>;
Parameters
rpc: Pick<RpcDataSource, "getAccountInfo">— Not documented.order: Pick<Order, "owner" | "strategyId">— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<Address | undefined>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.config:{}.
readPosition#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:425.
export function readPosition(rpc: RpcDataSource, address: Address, owner: Address, programAddress: Address, config?: RpcReadConfig): Promise<RpcReadResult<UserPositionAccount>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.address: Address— Not documented.owner: Address— Not documented.programAddress: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<UserPositionAccount>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readPrefundedOrderReceipt#
Read the unique resting order receipt from a successful single-order prefunded placement.
Declaration source: packages/core/src/prefundedOrderReceipt.ts:25.
export function readPrefundedOrderReceipt(result: unknown, signature: string, programAddress: Address): Promise<PrefundedOrderReceipt | null>;
Parameters
result: unknown— Not documented.signature: string— Not documented.programAddress: Address— Not documented.
Returns
Promise<PrefundedOrderReceipt | null>
Not documented.
Throws
Not documented.
</details> <details> <summary>readPythMarketEnd</summary>readPythMarketEnd#
Read the native market, live expiry policy and Clock in one finalized RPC batch. Fetching a new snapshot can use Hermes. Resolve uses the stored end price, and expire is eligible at the on-chain timeout boundary.
Declaration source: packages/core/src/pythLifecycle.ts:33.
export function readPythMarketEnd(rpc: Pick<RpcDataSource, "getMultipleAccountsInfo">, marketAddress: Address, programAddress?: Address): Promise<PythMarketEndState>;
Parameters
rpc: Pick<RpcDataSource, "getMultipleAccountsInfo">— Not documented.marketAddress: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<PythMarketEndState>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
readReclaimLedger#
Read the canonical finalized ledger at or after the book observation.
Declaration source: packages/core/src/managedReclaimRecovery.ts:39.
export function readReclaimLedger(rpc: Pick<RpcDataSource, "getAccountInfo">, market: Address, bookSlot: bigint | undefined, programAddress?: Address): Promise<TraderLedgerAccount | undefined>;
Parameters
rpc: Pick<RpcDataSource, "getAccountInfo">— Not documented.market: Address— Not documented.bookSlot: bigint | undefined— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<TraderLedgerAccount | undefined>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
readSeriesCrankPlan#
Plan candidate cranks from authenticated program accounts observed at one context slot.
Declaration source: packages/core/src/seriesCrankRpc.ts:134.
export function readSeriesCrankPlan(rpc: RpcDataSource, programId: Address, request: SeriesCrankReadRequest, options?: RpcReadConfig): Promise<{ series: Address<string>; slot: bigint; unixTimestamp: bigint; discoveryWarning: { policyVersion: number; commitmentAtoms: string; minimumDepthAtoms: string; } | null; attachments: readonly import("packages/core/src/seriesCrank").PlannedSeriesAttachment[]; skipped: readonly { readonly market: Address; readonly reason: import("packages/core/src/seriesCrank").SeriesCrankSkip; }[]; }>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.programId: Address— Not documented.request: SeriesCrankReadRequest— Not documented. See SeriesCrankReadRequest for its declaration and available field documentation.options: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<{ series: Address<string>; slot: bigint; unixTimestamp: bigint; discoveryWarning: { policyVersion: number; commitmentAtoms: string; minimumDepthAtoms: string; } | null; attachments: readonly import("packages/core/src/seriesCrank").PlannedSeriesAttachment[]; skipped: readonly { readonly market: Address; readonly reason: import("packages/core/src/seriesCrank").SeriesCrankSkip; }[]; }>
Not documented.
Throws
Not documented.
Defaults
options:{}.
ReadSource#
Origin labels shared by indexed, direct-RPC, and explicitly unavailable reads.
Declaration source: packages/core/src/api/types.ts:27.
export type ReadSource = 'api' | 'rpc' | 'unavailable';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ReadSourceMetadata#
Metadata that lets applications describe the freshness and authority of a read.
Declaration source: packages/core/src/api/types.ts:30.
export interface ReadSourceMetadata<TSource extends ReadSource = ReadSource> {
readonly source: TSource;
readonly slot?: bigint;
readonly commitment?: string;
}
readSplineLiquiditySnapshot#
Read selector/router liquidity from RPC alone, rejecting observations across different slots.
Declaration source: packages/core/src/splineSeatLiquidity.ts:206.
export function readSplineLiquiditySnapshot(rpc: RpcDataSource, marketAddress: Address, programAddress: Address, options: SplineLiquidityReadOptions): Promise<SplineLiquiditySnapshot>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.marketAddress: Address— Not documented.programAddress: Address— Not documented.options: SplineLiquidityReadOptions— Not documented. See SplineLiquidityReadOptions for its declaration and available field documentation.
Returns
Promise<SplineLiquiditySnapshot>
Not documented.
Throws
Not documented.
</details> <details> <summary>readSplineSeat</summary>readSplineSeat#
Read the canonical account of a particular maker on a market.
Declaration source: packages/core/src/rpcDataSource.ts:508.
export function readSplineSeat(rpc: RpcDataSource, market: Address, maker: Address, programAddress: Address, config?: RpcReadConfig): Promise<RpcReadResult<SplineSeatAccount>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.market: Address— Not documented.maker: Address— Not documented.programAddress: Address— Not documented.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<{ roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: import("packages/core/src/instructions").CurveLevel[]; askLevels: import("packages/core/src/instructions").CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; }>>
Not documented.
Throws
Not documented.
Defaults
config:{}.
readSplineSeatMarketTick#
Read tick evidence only for a same-slot route with at least one bound seat.
Declaration source: packages/core/src/splineSeatLiquidity.ts:57.
export function readSplineSeatMarketTick(rpc: RpcDataSource, seats: RpcReadResult<readonly RpcAddressedValue<SplineSeatAccount>[]>, landingSlot: bigint, config: RpcReadConfig): Promise<MarketTickV1Account | null>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.seats: RpcReadResult<readonly RpcAddressedValue<{ roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: import("packages/core/src/instructions").CurveLevel[]; askLevels: import("packages/core/src/instructions").CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; }>[]>— Not documented. See RpcReadResult, ReadSourceMetadata for its declaration and available field documentation.landingSlot: bigint— Not documented.config: RpcReadConfig— Not documented. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<MarketTickV1Account | null>
Not documented.
Throws
Not documented.
</details> <details> <summary>readStrategyAccount</summary>readStrategyAccount#
Read a strategy under its canonical owner/ID address at the requested commitment.
Declaration source: packages/core/src/strategyAccounts.ts:477.
export function readStrategyAccount(rpc: Pick<RpcDataSource, "getAccountInfo">, owner: Address, strategyId: number, programAddress?: Address, config?: RpcReadConfig): Promise<{ address: Address<string>; state: { bump: number; owner: Address<string>; strategyId: number; delegate: Address<string> | null; status: "active" | "stopped"; createdSlot: bigint; expiresAt: bigint; allowedActions: number; allowedMarkets: Address<string>[]; allowedMints: Address<string>[]; maxOrderQuoteAtoms: bigint; capitalBudgetAtoms: bigint; capitalUsedAtoms: bigint; capitalEpoch: number; maxPositionShares: bigint; maxFeeBps: number; maxSlippageBps: number; maxCoveredOrderTtlSeconds: number; withdrawDestinations: Address<string>[]; configGeneration: number; }; slot: bigint | undefined; } | null>;
Parameters
rpc: Pick<RpcDataSource, "getAccountInfo">— Not documented.owner: Address— Not documented.strategyId: number— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.config: RpcReadConfig— Not documented. Default:{}. See RpcReadConfig for its declaration and available field documentation.
Returns
Promise<{ address: Address<string>; state: { bump: number; owner: Address<string>; strategyId: number; delegate: Address<string> | null; status: "active" | "stopped"; createdSlot: bigint; expiresAt: bigint; allowedActions: number; allowedMarkets: Address<string>[]; allowedMints: Address<string>[]; maxOrderQuoteAtoms: bigint; capitalBudgetAtoms: bigint; capitalUsedAtoms: bigint; capitalEpoch: number; maxPositionShares: bigint; maxFeeBps: number; maxSlippageBps: number; maxCoveredOrderTtlSeconds: number; withdrawDestinations: Address<string>[]; configGeneration: number; }; slot: bigint | undefined; } | null>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.config:{}.
readTerminalInventory#
Estimates only; the program authorizes cleanup and every economic operation.
Declaration source: packages/core/src/terminalInventory.ts:42.
export function readTerminalInventory(fetch: (key: Address) => Promise<InventorySnapshot | null>, marketAddress: Address, wallet: Address, program: Address): Promise<TerminalInventory>;
Parameters
fetch: (key: Address) => Promise<InventorySnapshot | null>— Not documented.marketAddress: Address— Not documented.wallet: Address— Not documented.program: Address— Not documented.
Returns
Promise<TerminalInventory>
Not documented.
Throws
Not documented.
</details> <details> <summary>readTransactionPriorityFeeLamports</summary>readTransactionPriorityFeeLamports#
Read Agave v1's total priority fee. Legacy/v0 fee-price decoding stays separate.
The JSON-RPC result names the field priorityFee; @solana/web3.js 3 returns
the same value as priorityFeeLamports. Both spellings are the total in
lamports. A result carrying both with different values is malformed.
Declaration source: packages/core/src/transactionPriorityFee.ts:32.
export function readTransactionPriorityFeeLamports(input: unknown): bigint | null;
Parameters
input: unknown— Not documented.
Returns
bigint | null
Not documented.
Throws
Not documented.
</details> <details> <summary>REBALANCE_ALERT_RATIO</summary>REBALANCE_ALERT_RATIO#
D0{1} Off-chain rebalance-alert threshold (max-shard / min-shard balance ratio).
Not enforced on-chain — used by the indexer's per-shard balance dashboard to alert if the client-side index selection has degenerated.
Declaration source: packages/core/src/constants.ts:128.
export declare const REBALANCE_ALERT_RATIO: 4;
RECLAIM_CLOSE_TIMEOUT_SECONDS#
CLOSE_TIMEOUT_SECONDS — program/src/processor/close_market.rs:67.
Seven days. ReclaimExpiredOrder's terminal-forfeit branch opens at
market.resolved_at + CLOSE_TIMEOUT_SECONDS
(logic/reclaim_expired/mod.rs:178-184); CloseMarket uses the same
constant for its own grace window.
Declaration source: packages/core/src/preflight/orders.ts:81.
export declare const RECLAIM_CLOSE_TIMEOUT_SECONDS: number;
RECLAIM_EXPIRED_ORDERS_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:50.
export declare const RECLAIM_EXPIRED_ORDERS_DISCRIMINATOR: 106;
reclaimExpiredOrder#
Permissionless reclaim of an expired order. Derives orderbook, vault, maker's position PDA, escrows, mints, and trader-ledger automatically.
Declaration source: packages/core/src/sdk.ts:2069.
export function reclaimExpiredOrder(input: ReclaimExpiredOrderInput, programAddress?: Address): Promise<SdkResult<ReclaimExpiredOrderResult>>;
Parameters
input: ReclaimExpiredOrderInput— Not documented. See ReclaimExpiredOrderInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ReclaimExpiredOrderResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ReclaimExpiredOrderAccounts#
Accounts for ReclaimExpiredOrder instruction.
Declaration source: packages/core/src/instructions.ts:3739.
export interface ReclaimExpiredOrderAccounts extends BinaryRecorderTailAccounts {
market: Address;
orderbook: Address;
makerPosition: Address;
makerTokenAccount: Address;
vault: Address;
maker: Address;
caller: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
settlementMint: Address;
yesEscrow: Address;
noEscrow: Address;
makerYesAta: Address;
makerNoAta: Address;
yesMint: Address;
noMint: Address;
traderLedger: Address;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth
* markets.** `ReclaimExpiredAccounts::parse`
* (`program/src/processor/reclaim_expired.rs`) selects the legal account
* counts from the AUTHENTICATED market kind: `{16, 17}` for native,
* `{17, 18}` for external, with `market_meta` at index 16 — BEFORE the
* optional caller-bounty ATA. Omitting it on an external market makes the
* program read `callerStablecoinAta` as the meta and answer
* `InvalidAccountOwner`; supplying it on a native market is
* `InvalidInstructionData`.
*
* Callers decide from the decoded market, exactly as they do for
* {@link RedeemAccounts.marketMeta}.
*/
marketMeta?: Address;
/**
* Optional caller-bounty ATA. When undefined, no bounty is paid and the
* position-rent reclaim still proceeds.
*/
callerStablecoinAta?: Address;
/** The writable strategy PDA for returning committed capital on a covered order. */
strategy?: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets.ReclaimExpiredAccounts::parse(program/src/processor/reclaim_expired.rs) selects the legal account counts from the AUTHENTICATED market kind:{16, 17}for native,{17, 18}for external, withmarket_metaat index 16 — BEFORE the optional caller-bounty ATA. Omitting it on an external market makes the program readcallerStablecoinAtaas the meta and answerInvalidAccountOwner; supplying it on a native market isInvalidInstructionData.
Callers decide from the decoded market, exactly as they do for {@link RedeemAccounts.marketMeta}.
callerStablecoinAta— Optional caller-bounty ATA. When undefined, no bounty is paid and the position-rent reclaim still proceeds.strategy— The writable strategy PDA for returning committed capital on a covered order.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ReclaimExpiredOrderInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2006.
export interface ReclaimExpiredOrderInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
/** The maker (original order owner) — NOT the caller. */
maker: Address;
/** Maker's stablecoin token account. */
makerTokenAccount: Address;
/** Maker's YES share ATA. */
makerYesAta: Address;
/** Maker's NO share ATA. */
makerNoAta: Address;
caller: Address;
settlementMint: Address;
orderId: bigint;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth
* markets** — `ReclaimExpiredAccounts::parse`
* (`program/src/processor/reclaim_expired.rs`) picks the legal account
* counts from the authenticated market kind, with `market_meta` at index 16
* BEFORE the optional bounty ATA. Omitting it on an external market makes
* the program read the bounty ATA as the meta and answer
* `InvalidAccountOwner`.
*
* Callers decide from the decoded market: supply
* `deriveMarketMetaPda(market)` when the market is NOT native Pyth, and omit
* it otherwise.
*/
marketMeta?: Address;
/** Optional caller-bounty ATA. */
callerStablecoinAta?: Address;
/** The live strategy PDA, when reclaiming a strategy-covered order. Replaces the bounty ATA. */
strategy?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.maker— The maker (original order owner) — NOT the caller.makerTokenAccount— Maker's stablecoin token account.makerYesAta— Maker's YES share ATA.makerNoAta— Maker's NO share ATA.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets —ReclaimExpiredAccounts::parse(program/src/processor/reclaim_expired.rs) picks the legal account counts from the authenticated market kind, withmarket_metaat index 16 BEFORE the optional bounty ATA. Omitting it on an external market makes the program read the bounty ATA as the meta and answerInvalidAccountOwner.
Callers decide from the decoded market: supply
deriveMarketMetaPda(market) when the market is NOT native Pyth, and omit
it otherwise.
callerStablecoinAta— Optional caller-bounty ATA.strategy— The live strategy PDA, when reclaiming a strategy-covered order. Replaces the bounty ATA.
ReclaimExpiredOrderIntent#
Everything ReclaimExpiredOrder needs.
Declaration source: packages/core/src/preflight/types.ts:298.
export interface ReclaimExpiredOrderIntent {
nowUnix: number;
/**
* `order.timestamp + order.max_age_seconds`, unix seconds.
*
* `null` represents a malformed occupied zero stored TTL and fails closed.
* An unavailable projection is `undefined` (unknown-state verdict); live
* placement converts a zero wire request to a positive close-capped TTL.
*/
expiresAt: number | null;
/**
* `order.status() == OrderStatus::ExpiredClaimable`. A flagged slot is
* reclaimable regardless of TTL. Matching no longer writes this flag: a
* placement that touches an expired order reclaims it inline instead.
*/
expiredClaimable?: boolean;
/** `order.quantity` — a zero-quantity slot is not terminal-forfeitable. */
remaining: bigint;
/** Signer's `maker` account owns the order. Only `false` denies. */
isOwner?: boolean;
/** Order still occupies a book slot. Only `false` denies. */
orderFound?: boolean;
/**
* The order's owner signs as `maker` AND the order is a canonical ask
* (`SellYes` / `SellNo`). On a resolved market this opens the owner-signed
* terminal unwind before `resolved_at + CLOSE_TIMEOUT_SECONDS`
* (`logic/reclaim_expired::terminal_forfeit_order_with_owner_authority`).
* Omitted or `false` keeps the permissionless grace-gated behavior.
*/
ownerSignedAsk?: boolean;
/**
* Terminal-forfeit grace window. Defaults to `CLOSE_TIMEOUT_SECONDS`
* (`processor/close_market.rs:67`), which is what the program uses.
*/
closeTimeoutSeconds?: number;
}
Field documentation
expiresAt—order.timestamp + order.max_age_seconds, unix seconds.
null represents a malformed occupied zero stored TTL and fails closed.
An unavailable projection is undefined (unknown-state verdict); live
placement converts a zero wire request to a positive close-capped TTL.
expiredClaimable—order.status() == OrderStatus::ExpiredClaimable. A flagged slot is reclaimable regardless of TTL. Matching no longer writes this flag: a placement that touches an expired order reclaims it inline instead.remaining—order.quantity— a zero-quantity slot is not terminal-forfeitable.isOwner— Signer'smakeraccount owns the order. Onlyfalsedenies.orderFound— Order still occupies a book slot. Onlyfalsedenies.ownerSignedAsk— The order's owner signs asmakerAND the order is a canonical ask (SellYes/SellNo). On a resolved market this opens the owner-signed terminal unwind beforeresolved_at + CLOSE_TIMEOUT_SECONDS(logic/reclaim_expired::terminal_forfeit_order_with_owner_authority). Omitted orfalsekeeps the permissionless grace-gated behavior.closeTimeoutSeconds— Terminal-forfeit grace window. Defaults toCLOSE_TIMEOUT_SECONDS(processor/close_market.rs:67), which is what the program uses.
ReclaimExpiredOrderParams#
Parameters for ReclaimExpiredOrder instruction.
Declaration source: packages/core/src/instructions.ts:3783.
export interface ReclaimExpiredOrderParams {
orderId: bigint; // D0{id}
}
ReclaimExpiredOrderResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2045.
export interface ReclaimExpiredOrderResult {
market: Address;
orderbook: Address;
makerPosition: Address;
}
reclaimExpiredOrders#
Build a bounded, deterministic keeper sweep for expired orders.
Every returned instruction is an independent ReclaimExpiredOrder call. The
helper rejects duplicate (maker, orderId) targets and mixed market/caller
inputs so a retry cannot accidentally replay the same target or attribute a
bounty to a different caller. Callers should submit instructions one at a
time and reconcile confirmations before advancing the sweep.
Declaration source: packages/core/src/sdk.ts:2124.
export function reclaimExpiredOrders(inputs: readonly ReclaimExpiredOrderInput[], programAddress?: Address): Promise<ReclaimExpiredOrdersResult>;
Parameters
inputs: readonly ReclaimExpiredOrderInput[]— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<ReclaimExpiredOrdersResult>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
reclaimExpiredOrderVerdict#
Decide whether the program would accept this ReclaimExpiredOrder.
Two independent routes reach a successful reclaim:
- STORED ORDER VALIDATION — an occupied zero TTL fails closed before terminal or normal reclaim can release custody.
- TERMINAL FORFEIT (
logic/reclaim_expired/mod.rs) — the market has a terminal outcome AND eitherresolved_at + CLOSE_TIMEOUT_SECONDShas elapsed or the owner signs for a canonical ask (ownerSignedAsk). This branch bypasses expiry timing, not stored-order validation. - NORMAL RECLAIM (
reclaim_expired.rs:806-815) — the order is past its TTL or flaggedExpiredClaimable, AND the market is still unresolved.
Deliberately takes NO ConfigSnapshot and applies NO emergency-status gate:
the on-chain path has neither, and reclaim must stay available precisely when
a market is in trouble.
Declaration source: packages/core/src/preflight/orders.ts:368.
export function reclaimExpiredOrderVerdict(market: MarketSnapshot, intent: ReclaimExpiredOrderIntent, options?: PreflightOptions): Verdict;
Parameters
market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.intent: ReclaimExpiredOrderIntent— Not documented. See ReclaimExpiredOrderIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>reconcilePendingRedeemProgress</summary>reconcilePendingRedeemProgress#
SSW-020: reconcile the saved pending Redeem page in its ORIGINAL context, before any current-holdings plan is rebuilt or compared.
The pending page's own finalized return data decides its outcome; current
holdings are not consulted, because a page that landed is exactly what
changed them. Exact identity checks are unchanged: the result only moves
the authenticated pending entry into completed (EOF) or active
(has_more), or drops the last signature after an authenticated finalized
failure. Missing or malformed metadata leaves the journal untouched.
Declaration source: packages/core/src/resumableRedeem.ts:307.
export function reconcilePendingRedeemProgress<TSignature = string>(progress: RedeemRecoveryProgress<TSignature>, expectedProgramAddress: Address, readFinalizedReturnData: (signature: TSignature) => Promise<RedeemReturnData | undefined>, isFinalizedFailure: (error: unknown) => boolean): Promise<PendingRedeemReconciliation<TSignature>>;
Parameters
progress: RedeemRecoveryProgress<TSignature>— Not documented. See RedeemRecoveryProgress for its declaration and available field documentation.expectedProgramAddress: Address— Not documented.readFinalizedReturnData: (signature: TSignature) => Promise<RedeemReturnData | undefined>— Not documented.isFinalizedFailure: (error: unknown) => boolean— Not documented.
Returns
Promise<PendingRedeemReconciliation<TSignature>>
Not documented.
Throws
Not documented.
</details> <details> <summary>reconcileReplacementGate</summary>reconcileReplacementGate#
Reconcile every attempt blocking conflictKey before a new attempt is
built. Callers must refuse to sign while blocking is non-empty and should
surface landed (the earlier attempt executed) instead of silently
building another one.
Declaration source: packages/core/src/transactionAttempt.ts:1214.
export function reconcileReplacementGate(journal: TransactionAttemptJournal, conflictKey: string | null, rpc: TransactionAttemptReconcileRpc, options?: { readonly intentDigest?: string; }): Promise<ReplacementGateResult>;
Parameters
journal: TransactionAttemptJournal— Not documented. See TransactionAttemptJournal for its declaration and available field documentation.conflictKey: string | null— Not documented.rpc: TransactionAttemptReconcileRpc— Not documented. See TransactionAttemptReconcileRpc for its declaration and available field documentation.options: { readonly intentDigest?: string; }— Not documented. Default:{}.
Returns
Promise<ReplacementGateResult>
Not documented.
Throws
Not documented.
Defaults
options:{}.
reconcileTransactionAttempt#
Reconcile one attempt against chain status. An RPC failure is an observation failure, not chain evidence: the record is returned unchanged.
Declaration source: packages/core/src/transactionAttempt.ts:1153.
export function reconcileTransactionAttempt(journal: TransactionAttemptJournal, record: TransactionAttemptRecord, rpc: TransactionAttemptReconcileRpc): Promise<TransactionAttemptRecord>;
Parameters
journal: TransactionAttemptJournal— Not documented. See TransactionAttemptJournal for its declaration and available field documentation.record: TransactionAttemptRecord— Not documented. See TransactionAttemptRecord for its declaration and available field documentation.rpc: TransactionAttemptReconcileRpc— Not documented. See TransactionAttemptReconcileRpc for its declaration and available field documentation.
Returns
Promise<TransactionAttemptRecord>
Not documented.
Throws
Not documented.
</details> <details> <summary>RECORD_CONFIDENTIAL_TERMINAL_TAG</summary>RECORD_CONFIDENTIAL_TERMINAL_TAG#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:27.
export declare const RECORD_CONFIDENTIAL_TERMINAL_TAG: 108;
RecordConfidentialTerminalData#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:405.
export type RecordConfidentialTerminalData =
| { branch: 1; definition: ConfidentialNativeDefinition }
| { branch: 2 };
RecordedTransaction#
One recorded transaction: the input of the design §3 recorded-order replay.
Declaration source: packages/core/src/execution/standins.ts:91.
export interface RecordedTransaction {
readonly window: number;
readonly order: number;
readonly slot: number;
readonly unix_timestamp: number;
readonly ingress: Ingress;
readonly signature: string;
readonly wire_hex: string;
readonly decision: Decision;
/** `null` when not executed (superseded or rejected). */
readonly executed_ok: boolean | null;
readonly error: string | null;
}
Field documentation
executed_ok—nullwhen not executed (superseded or rejected).
recordFromIndexer#
Record one market from the indexer plus RPC through the inclusive cutoff when supplied.
Rejects an eventSequence gap with
RecordingSequenceGapError, and any disagreement between the indexer listing and the chain
(slot, block position, an indexed event the transaction does not carry, an indexed event in
a failed transaction) with RecordingSourceError.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:143.
export function recordFromIndexer(apiBase: string, rpc: ReplayRpc, market: Address, opts: IndexerRecordingOptions): Promise<Recording>;
Parameters
apiBase: string— Not documented.rpc: ReplayRpc— Not documented. See ReplayRpc for its declaration and available field documentation.market: Address— Not documented.opts: IndexerRecordingOptions— Not documented. See IndexerRecordingOptions for its declaration and available field documentation.
Returns
Promise<Recording>
Not documented.
Throws
Not documented.
</details> <details> <summary>recordFromRpc</summary>recordFromRpc#
Record one market from plain RPC. History is every transaction after the checkpoint slot on
the market or an attached spline that has a Seesaw instruction, through the inclusive cutoff
when supplied. Failed transactions are kept with success: false and no events. Rejects an
eventSequence gap of the market or of any attached spline with RecordingSequenceGapError.
Declaration source: packages/core/src/replay/recordFromRpc.ts:602.
export function recordFromRpc(rpc: ReplayRpc, market: Address, opts: RecordingOptions): Promise<Recording>;
Parameters
rpc: ReplayRpc— Not documented. See ReplayRpc for its declaration and available field documentation.market: Address— Not documented.opts: RecordingOptions— Not documented. See RecordingOptions for its declaration and available field documentation.
Returns
Promise<Recording>
Not documented.
Throws
Not documented.
</details> <details> <summary>Recording</summary>Recording#
Not documented.
Declaration source: packages/core/src/replay/recordingSchema.ts:159.
export interface Recording {
readonly schemaVersion: typeof RECORDING_SCHEMA_VERSION;
/** Program commit of the deployment. Supplied by the caller, never guessed. */
readonly programCommit: string;
/** `wire` of `spec/launch/version-policy.json` at `programCommit`. Supplied by the caller. */
readonly wireDigest: string;
/** Base58 market address. */
readonly market: string;
readonly checkpoint: RecordingCheckpoint;
readonly history: readonly RecordingTransaction[];
}
Field documentation
programCommit— Program commit of the deployment. Supplied by the caller, never guessed.wireDigest—wireofspec/launch/version-policy.jsonatprogramCommit. Supplied by the caller.market— Base58 market address.
RECORDING_SCHEMA_VERSION#
Replay recording, schema version 1 (docs/internal/trader-tooling/design.md §1.2).
One JSON document for one market: the deployment identity, an account checkpoint at slot S,
and the chain-ordered history after S. The JSON Schema lives in
packages/replay/schema/recording.v1.json; these types use the same field names.
Reviewer-accepted choices (task 02): the top-level market field; byte strings are base64,
addresses are base58, u64 sequences (eventSequence) are decimal strings, and slots,
transaction indexes and block times are JSON numbers; checkpoint roles are market, book,
ledger, config, settlementMint, marketMeta for external markets, sourceState for signed-source
markets, nativePolicy for native Pyth markets, spline:<address>,
makerQuoteState:<address>, position:<address>, and strategy:<address>.
The authoritative event wire is the data of the recorder (LOG, 0xFF) instructions in
instructions, which a consumer decodes with the program's own schema. events[].data is a
decoded convenience.
Declaration source: packages/core/src/replay/recordingSchema.ts:21.
export declare const RECORDING_SCHEMA_VERSION: 1;
RecordingAccountRole#
Account roles in a checkpoint. Variable account sets are keyed by address.
Declaration source: packages/core/src/replay/recordingSchema.ts:24.
export type RecordingAccountRole =
| 'market'
| 'marketMeta'
| 'nativePolicy'
| 'sourceState'
| 'book'
| 'ledger'
| 'config'
| 'settlementMint'
| `spline:${string}`
| `makerQuoteState:${string}`
| `position:${string}`
| `strategy:${string}`;
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RecordingCheckpoint#
Not documented.
Declaration source: packages/core/src/replay/recordingSchema.ts:38.
export interface RecordingCheckpoint {
/** Slot `S` shared by all checkpoint account reads. */
readonly slot: number;
/** `MarketAccount.event_sequence` at `S`: the next market batch carries this plus one. */
readonly eventSequence: string;
/** The capture verified the market's full set of unsettled positions. */
readonly completeUnsettledPositions?: boolean;
/**
* Raw account bytes (base64) by role. The `event_sequence` of each attached spline is read
* from its bytes; the next batch of that spline carries it plus one.
*/
readonly accounts: Readonly<Record<Exclude<RecordingAccountRole, 'settlementMint'>, string> & {
/** Settlement mint bytes, absent in recordings made before mint capture. */
settlementMint?: string;
}>;
/** Checkpoints of other markets sharing this checkpoint slot. */
readonly relatedMarkets?: Readonly<Record<string, Omit<RecordingCheckpoint, 'relatedMarkets'>>>;
}
Field documentation
slot— SlotSshared by all checkpoint account reads.eventSequence—MarketAccount.event_sequenceatS: the next market batch carries this plus one.completeUnsettledPositions— The capture verified the market's full set of unsettled positions.accounts— Raw account bytes (base64) by role. Theevent_sequenceof each attached spline is read from its bytes; the next batch of that spline carries it plus one.relatedMarkets— Checkpoints of other markets sharing this checkpoint slot.
RecordingCheckpointOptions#
Not documented.
Declaration source: packages/core/src/replay/checkpoint.ts:62.
export interface RecordingCheckpointOptions {
readonly programAddress?: Address;
readonly commitment?: ReplayCommitment;
/** Additional legacy spline or current seat addresses. Useful with RPCs without seat scans. */
readonly splines?: readonly Address[];
/** Strategy PDAs to capture at the same slot as the market and trader ledger. */
readonly strategyAccounts?: readonly Address[];
/** Other markets whose state must be captured at the same slot. */
readonly relatedMarkets?: readonly Address[];
}
Field documentation
splines— Additional legacy spline or current seat addresses. Useful with RPCs without seat scans.strategyAccounts— Strategy PDAs to capture at the same slot as the market and trader ledger.relatedMarkets— Other markets whose state must be captured at the same slot.
RecordingError#
Typed failures of the replay recording sources. A recording is never silently partial.
Declaration source: packages/core/src/replay/errors.ts:4.
export declare class RecordingError extends Error {
constructor(message: string | undefined);
constructor(message: string | undefined, options: ErrorOptions | undefined);
readonly name: string;
}
Parameters
message: string | undefined— Not documented.message: string | undefined— Not documented.options: ErrorOptions | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>RecordingEvent</summary>RecordingEvent#
Not documented.
Declaration source: packages/core/src/replay/recordingSchema.ts:121.
export interface RecordingEvent {
readonly signature: string;
/**
* Seesaw execution ordinal of the recorder instruction that carries the event, which is also
* that instruction's position in the transaction's `instructions`.
*/
readonly instructionIndex: number;
readonly batchIndex: number;
/** Position of the event inside its batch. */
readonly eventIndex: number;
/** Base58 batch subject: the market or a spline attached to it. */
readonly subject: string;
/** Batch header sequence of `subject`; every event of one batch carries the same value. */
readonly eventSequence: string;
readonly tag: number;
/** Decoded fields (convenience); u64 and wider values are decimal strings. */
readonly data: Readonly<Record<string, unknown>>;
}
Field documentation
instructionIndex— Seesaw execution ordinal of the recorder instruction that carries the event, which is also that instruction's position in the transaction'sinstructions.eventIndex— Position of the event inside its batch.subject— Base58 batch subject: the market or a spline attached to it.eventSequence— Batch header sequence ofsubject; every event of one batch carries the same value.data— Decoded fields (convenience); u64 and wider values are decimal strings.
RecordingExternalInputs#
Inputs held in accounts the checkpoint does not carry (ExternalInputs in
packages/replay/src/recording.rs). Facts about the instruction's environment, never fill
results.
Declaration source: packages/core/src/replay/recordingSchema.ts:62.
export interface RecordingExternalInputs {
/** Maker signer privilege for a top-level reclaim, when the message header is available. */
readonly reclaimMakerSigned?: boolean;
/** Classic SPL Token share CPI emitted by reclaim or force cancellation. */
readonly reclaimShareCpi?: {
readonly programId: string;
readonly accounts: readonly string[];
readonly data: string;
};
/** Runtime account image immediately before this instruction executes. */
readonly marketTick?: RecordingMarketTick;
/** Base64 image of the maker series immediately before a seat attachment. */
readonly makerSeries?: string;
/** Successful series changes in chain order, beginning with series creation. */
readonly makerSeriesHistory?: readonly {
readonly data: string;
readonly accounts: readonly string[];
readonly marketCreatedAt?: number;
}[];
/** Whether the taker position's cached referral route was active. */
readonly referralRouteActive?: boolean;
/** Base64 image of the immutable referral account supplied to a placement. */
readonly referralBinding?: string;
/** The authenticated builder pair of a placement. */
readonly builder?: {
/** Builder address (base58). */
readonly builder: string;
/** `BuilderApprovalAccount.max_builder_bps` of the approval. */
readonly maxBuilderBps: number;
};
}
Field documentation
reclaimMakerSigned— Maker signer privilege for a top-level reclaim, when the message header is available.reclaimShareCpi— Classic SPL Token share CPI emitted by reclaim or force cancellation.marketTick— Runtime account image immediately before this instruction executes.makerSeries— Base64 image of the maker series immediately before a seat attachment.makerSeriesHistory— Successful series changes in chain order, beginning with series creation.referralRouteActive— Whether the taker position's cached referral route was active.referralBinding— Base64 image of the immutable referral account supplied to a placement.builder— The authenticated builder pair of a placement.
RecordingInstruction#
Not documented.
Declaration source: packages/core/src/replay/recordingSchema.ts:102.
export interface RecordingInstruction {
/** Base58 program id; always the Seesaw program. */
readonly programId: string;
/** Base64 instruction data. For a recorder instruction this is the event wire. */
readonly data: string;
/** Base58 account keys in instruction order. */
readonly accounts: readonly string[];
/** True for a recorder (LOG, `0xFF`) self-CPI. */
readonly isLog: boolean;
/** Index of the outer Solana instruction that is, or contains, this instruction. */
readonly topLevelInstructionIndex: number;
/** Position in the outer instruction's inner list; null for a top-level instruction. */
readonly innerInstructionIndex: number | null;
/** Base64 return data from a final top-level managed replacement or redemption. */
readonly returnData?: string;
/** Optional evidence from outside the checkpoint. */
readonly externalInputs?: RecordingExternalInputs;
}
Field documentation
programId— Base58 program id; always the Seesaw program.data— Base64 instruction data. For a recorder instruction this is the event wire.accounts— Base58 account keys in instruction order.isLog— True for a recorder (LOG,0xFF) self-CPI.topLevelInstructionIndex— Index of the outer Solana instruction that is, or contains, this instruction.innerInstructionIndex— Position in the outer instruction's inner list; null for a top-level instruction.returnData— Base64 return data from a final top-level managed replacement or redemption.externalInputs— Optional evidence from outside the checkpoint.
RecordingLimitError#
The history is longer than the caller's bound; nothing is truncated.
Declaration source: packages/core/src/replay/errors.ts:36.
export declare class RecordingLimitError extends RecordingError {
constructor(limit: number);
readonly name: "RecordingLimitError";
readonly limit: number;
}
Parameters
limit: number— Not documented.
Throws
Not documented.
</details> <details> <summary>RecordingMarketTick</summary>RecordingMarketTick#
Not documented.
Declaration source: packages/core/src/replay/recordingSchema.ts:94.
export interface RecordingMarketTick {
/** Base58 account owner. */
readonly owner: string;
readonly writable: boolean;
/** Base64 account bytes, including an empty image for an uninitialized account. */
readonly data: string;
}
Field documentation
owner— Base58 account owner.data— Base64 account bytes, including an empty image for an uninitialized account.
RecordingOptions#
Not documented.
Declaration source: packages/core/src/replay/recordFromRpc.ts:64.
export interface RecordingOptions extends RecordingCheckpointOptions {
/** Program commit of the deployment. Required; never guessed. */
readonly programCommit: string;
/** `wire` digest of `spec/launch/version-policy.json` at `programCommit`. Required. */
readonly wireDigest: string;
/** Start from this earlier checkpoint instead of taking a new one. */
readonly checkpoint?: RecordingCheckpoint;
/** Inclusive last history slot. Requires an existing checkpoint at or before this slot. */
readonly throughSlot?: number;
/** Upper bound on history transactions; exceeding it throws `RecordingLimitError`. */
readonly maxTransactions?: number;
/**
* Highest transaction version the RPC may return. Defaults to the repo's
* `MAX_SUPPORTED_TRANSACTION_VERSION` (1: Seesaw sends v1 transactions).
*/
readonly maxSupportedTransactionVersion?: number;
/** Read the exact pre-instruction Market Tick image from a historical source. */
readonly readMarketTickAtInstruction?: (cursor: {
readonly signature: string;
readonly slot: number;
readonly transactionIndex: number;
readonly topLevelInstructionIndex: number;
readonly innerInstructionIndex: number | null;
}) => Promise<RecordingMarketTick | undefined>;
}
Field documentation
programCommit— Program commit of the deployment. Required; never guessed.wireDigest—wiredigest ofspec/launch/version-policy.jsonatprogramCommit. Required.checkpoint— Start from this earlier checkpoint instead of taking a new one.throughSlot— Inclusive last history slot. Requires an existing checkpoint at or before this slot.maxTransactions— Upper bound on history transactions; exceeding it throwsRecordingLimitError.maxSupportedTransactionVersion— Highest transaction version the RPC may return. Defaults to the repo'sMAX_SUPPORTED_TRANSACTION_VERSION(1: Seesaw sends v1 transactions).readMarketTickAtInstruction— Read the exact pre-instruction Market Tick image from a historical source.splines— Additional legacy spline or current seat addresses. Useful with RPCs without seat scans.strategyAccounts— Strategy PDAs to capture at the same slot as the market and trader ledger.relatedMarkets— Other markets whose state must be captured at the same slot.
RecordingSequenceGapError#
The history does not carry the contiguous batch sequence that follows the checkpoint
(docs/internal/EVENT_RECONSTRUCTION_AUDIT.md: consumers must reject a sequence gap).
Declaration source: packages/core/src/replay/errors.ts:12.
export declare class RecordingSequenceGapError extends RecordingError {
constructor(expected: bigint, found: bigint, signature: string);
readonly name: "RecordingSequenceGapError";
readonly expected: bigint;
readonly found: bigint;
readonly signature: string;
}
Parameters
expected: bigint— Not documented.found: bigint— Not documented.signature: string— Not documented.
Throws
Not documented.
</details> <details> <summary>RecordingSourceError</summary>RecordingSourceError#
A source returned data that is missing, malformed, or inconsistent with another source.
Declaration source: packages/core/src/replay/errors.ts:31.
export declare class RecordingSourceError extends RecordingError {
constructor(message: string | undefined);
constructor(message: string | undefined, options: ErrorOptions | undefined);
readonly name: "RecordingSourceError";
}
Parameters
message: string | undefined— Not documented.message: string | undefined— Not documented.options: ErrorOptions | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>RecordingTransaction</summary>RecordingTransaction#
Not documented.
Declaration source: packages/core/src/replay/recordingSchema.ts:140.
export interface RecordingTransaction {
readonly signature: string;
readonly slot: number;
/** Zero-based position of the transaction in its block. */
readonly transactionIndex: number;
readonly blockTime: number | null;
/** False for a transaction that landed with an error; its events are empty. */
readonly success: boolean;
/** Error text of a failed transaction, when the source records it. */
readonly error?: string;
/**
* Every Seesaw instruction, recorder self-CPIs included, in execution order. The array index
* is the ordinal that `events[].instructionIndex` uses.
*/
readonly instructions: readonly RecordingInstruction[];
/** Recorder events of the market and its attached splines, in chain order. */
readonly events: readonly RecordingEvent[];
}
Field documentation
transactionIndex— Zero-based position of the transaction in its block.success— False for a transaction that landed with an error; its events are empty.error— Error text of a failed transaction, when the source records it.instructions— Every Seesaw instruction, recorder self-CPIs included, in execution order. The array index is the ordinal thatevents[].instructionIndexuses.events— Recorder events of the market and its attached splines, in chain order.
recordRpcFailure#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:111.
export function recordRpcFailure(endpoint: RpcEndpointHealth, options: EndpointFailureOptions): RpcEndpointHealth;
Parameters
endpoint: RpcEndpointHealth— Not documented. See RpcEndpointHealth for its declaration and available field documentation.options: EndpointFailureOptions— Not documented. See EndpointFailureOptions for its declaration and available field documentation.
Returns
RpcEndpointHealth
Not documented.
Throws
Not documented.
</details> <details> <summary>recordRpcSuccess</summary>recordRpcSuccess#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:97.
export function recordRpcSuccess(endpoint: RpcEndpointHealth, options: EndpointSuccessOptions): RpcEndpointHealth;
Parameters
endpoint: RpcEndpointHealth— Not documented. See RpcEndpointHealth for its declaration and available field documentation.options: EndpointSuccessOptions— Not documented. See EndpointSuccessOptions for its declaration and available field documentation.
Returns
RpcEndpointHealth
Not documented.
Throws
Not documented.
</details> <details> <summary>RecordSignedAttemptInput</summary>RecordSignedAttemptInput#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:797.
export interface RecordSignedAttemptInput {
readonly identity?: SignedTransactionIdentity;
/** Required when `identity` is absent (opaque sign-and-send capability). */
readonly capability?: 'signed_bytes' | 'opaque_sign_and_send';
readonly conflictKey: string | null;
readonly operation: string;
readonly intentDigest?: string;
readonly lastValidBlockHeight: number | null;
readonly signedWire?: Uint8Array;
readonly messageMatchesReviewed?: boolean;
readonly groupId?: string;
readonly groupIndex?: number;
readonly exposure?: Readonly<Record<string, string>>;
/**
* Signatures the user explicitly acknowledged as unresolved before choosing
* a NEW exposure. Each receives a durable acknowledgement observation.
*/
readonly acknowledgedUnresolved?: readonly string[];
}
Field documentation
capability— Required whenidentityis absent (opaque sign-and-send capability).acknowledgedUnresolved— Signatures the user explicitly acknowledged as unresolved before choosing a NEW exposure. Each receives a durable acknowledgement observation.
RecoveredVaultRecord#
A recovered record whose plaintext buffer is transferred to the vault.
Declaration source: packages/core/src/confidential/vault/vault.ts:34.
export interface RecoveredVaultRecord {
readonly kind: VaultRecordKind;
readonly id: string;
readonly plaintext: Uint8Array;
}
recoverSpline#
Recover an unresolved maker seat, returning its remaining commitment to the series and materializing its internal inventory to the maker's initialized share accounts. The program independently verifies every derived PDA and token account, so callers cannot redirect recovery by choosing alternate accounts.
Declaration source: packages/core/src/sdk.ts:3715.
export function recoverSpline(input: RecoverSplineInput, programAddress?: Address): Promise<SdkResult<{ splineVault: Address; marketVault: Address; yesMint: Address; noMint: Address; }>>;
Parameters
input: RecoverSplineInput— Not documented. See RecoverSplineInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ splineVault: Address; marketVault: Address; yesMint: Address; noMint: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
RecoverSplineAccounts#
Accounts for maker-authorized recovery of an unresolved attached seat.
The instruction returns the remaining committed collateral to splineVault,
materializes any internal YES/NO inventory into the maker accounts, and
detaches the seat. Both maker share accounts must already be initialized
SPL Token accounts for the canonical market mints.
Declaration source: packages/core/src/instructions.ts:4834.
export interface RecoverSplineAccounts extends BinaryRecorderTailAccounts {
creator: Address;
spline: Address;
series: Address;
splineVault: Address;
market: Address;
marketVault: Address;
yesMint: Address;
noMint: Address;
creatorYesTokenAccount: Address;
creatorNoTokenAccount: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
/** The spline vault's (and market's) settlement mint, for `TransferChecked`. */
settlementMint: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.settlementMint— The spline vault's (and market's) settlement mint, forTransferChecked.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
RecoverSplineInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3696.
export interface RecoverSplineInput {
creator: Address;
spline: Address;
series: Address;
market: Address;
creatorYesTokenAccount: Address;
creatorNoTokenAccount: Address;
/** The market's settlement mint (the spline vault's mint). */
settlementMint: Address;
/** The market's quote token program; classic SPL Token when omitted. */
tokenProgram?: Address;
}
Field documentation
settlementMint— The market's settlement mint (the spline vault's mint).tokenProgram— The market's quote token program; classic SPL Token when omitted.
RECOVERY_STATE_VALUES#
Design §5.8: separate journal records; priority_restored closes them.
Declaration source: packages/core/src/execution/lifecycle.ts:33.
export declare const RECOVERY_STATE_VALUES: readonly ["rotated_on_chain", "provider_enrollment_recovery_needed", "priority_unavailable", "priority_restored"];
RecoveryState#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:39.
export type RecoveryState = (typeof RECOVERY_STATE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
redeem#
Build Redeem instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1166.
export function redeem(input: RedeemInput, programAddress?: Address): Promise<SdkResult<RedeemResult>>;
Parameters
input: RedeemInput— Not documented. See RedeemInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<RedeemResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
RedeemAccounts#
Accounts for Redeem instruction.
Declaration source: packages/core/src/instructions.ts:2153.
export interface RedeemAccounts extends BinaryRecorderTailAccounts {
market: Address;
yesMint: Address;
noMint: Address;
userYesAta: Address;
userNoAta: Address;
userStablecoinAta: Address;
vault: Address;
user: Address;
tokenProgram: Address;
/** Share (YES/NO) token program: always classic SPL Token. Defaults to it. */
shareTokenProgram?: Address;
settlementMint: Address;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth markets.**
*
* `program/src/processor/redeem.rs` documents it as account index 10 — immediately after
* `settlement_mint` and before the optional position mirror — and
* `load_redeem_market_meta` returns `NotEnoughAccountKeys` when a non-native market omits
* it and `InvalidInstructionData` when a native market supplies it. Derive with
* `deriveMarketMetaPda(market)`.
*/
marketMeta?: Address;
userPosition?: Address;
orderbook?: Address;
traderLedger?: Address;
}
Field documentation
shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets.
program/src/processor/redeem.rs documents it as account index 10 — immediately after
settlement_mint and before the optional position mirror — and
load_redeem_market_meta returns NotEnoughAccountKeys when a non-native market omits
it and InvalidInstructionData when a native market supplies it. Derive with
deriveMarketMetaPda(market).
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
RedeemInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1125.
export interface RedeemInput {
/** Burn wallet tokens only. A positive amount is required. */
walletOnly?: boolean;
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userYesAta: Address;
userNoAta: Address;
userStablecoinAta: Address;
settlementMint: Address;
amount: bigint;
tokenType: number; // 0 = YES, 1 = NO (matches Rust RedeemTokenType)
orderbook?: Address;
/**
* MarketMeta PDA. **Required for external markets, rejected for native Pyth
* markets** — `load_redeem_market_meta` in `program/src/processor/redeem.rs`
* returns `NotEnoughAccountKeys` when a non-native market omits it and
* `InvalidInstructionData` when a native market supplies it.
*
* Callers decide from the decoded market: supply
* `deriveMarketMetaPda(market)` when the market is NOT native Pyth, and omit
* it otherwise. Without this the external-market redeem/claim path cannot be
* built at all.
*/
marketMeta?: Address;
}
Field documentation
walletOnly— Burn wallet tokens only. A positive amount is required.settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.marketMeta— MarketMeta PDA. Required for external markets, rejected for native Pyth markets —load_redeem_market_metainprogram/src/processor/redeem.rsreturnsNotEnoughAccountKeyswhen a non-native market omits it andInvalidInstructionDatawhen a native market supplies it.
Callers decide from the decoded market: supply
deriveMarketMetaPda(market) when the market is NOT native Pyth, and omit
it otherwise. Without this the external-market redeem/claim path cannot be
built at all.
RedeemParams#
Parameters for Redeem instruction.
Declaration source: packages/core/src/instructions.ts:2182.
export interface RedeemParams {
/** D6{share} Side-specific share quantity; zero selects full mirrored-position cleanup. */
amount: bigint;
tokenType: number; // D0{1}; 0 = YES, 1 = NO (matches Rust RedeemTokenType)
}
Field documentation
amount— D6{share} Side-specific share quantity; zero selects full mirrored-position cleanup.
RedeemProgress#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:14.
export interface RedeemProgress {
readonly processed: number;
readonly hasMore: boolean;
}
RedeemRecoveryProgress#
Durable Redeem recovery progress shared by the web and mobile journals.
Declaration source: packages/core/src/resumableRedeem.ts:211.
export interface RedeemRecoveryProgress<TSignature = string> {
readonly completed: CompletedRedeemInstruction<TSignature>[];
readonly active?: PendingRedeemInstruction<TSignature>;
readonly pending?: PendingRedeemInstruction<TSignature>;
}
RedeemResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1157.
export interface RedeemResult {
market: Address;
position: Address;
vault: Address;
}
RedeemReturnData#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:9.
export interface RedeemReturnData {
readonly programAddress: Address;
readonly data: Uint8Array;
}
RedeemSendResult#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:19.
export interface RedeemSendResult<TSignature = string> {
readonly signature: TSignature;
/** Return data read from finalized transaction metadata. */
readonly returnData?: RedeemReturnData;
}
Field documentation
returnData— Return data read from finalized transaction metadata.
ReduceDispatchInput#
Not documented.
Declaration source: packages/core/src/orderFunding.ts:222.
export interface ReduceDispatchInput {
/** The market's quote token program (`marketSettlementTokenProgram`); classic when omitted. */
settlementTokenProgram?: Address;
marketAddress: Address;
user: Address;
userTokenAccount: Address;
settlementMint: Address;
userYesAta: Address;
userNoAta: Address;
/** The order's stored `original_side` - determines route eligibility. */
storedSide: StoredOrderSide;
fundingSource: FundingSource;
params: ReduceOrderParams;
}
Field documentation
settlementTokenProgram— The market's quote token program (marketSettlementTokenProgram); classic when omitted.storedSide— The order's storedoriginal_side- determines route eligibility.
ReduceOnlyExitOrder#
The order terms the instruction is encoded from.
Declaration source: packages/core/src/reviewedIntent.ts:676.
export interface ReduceOnlyExitOrder {
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly orderType: OrderType;
readonly quantity: bigint;
readonly fundingSource: ReviewedFundingSource;
}
reduceOrder#
Not documented.
Declaration source: packages/core/src/sdk.ts:2790.
export function reduceOrder(input: ReduceOrderInput, programAddress?: Address): Promise<SdkResult<CancelFamilyResult & { config: Address; }>>;
Parameters
input: ReduceOrderInput— Not documented. See ReduceOrderInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelFamilyResult & { config: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ReduceOrderInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2786.
export interface ReduceOrderInput extends CancelFamilyAccountsInput {
params: ReduceOrderParams;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.
ReduceOrderIntent#
Everything ReduceOrder needs.
NOTE priceBps: the residual-notional gate values the remainder at the
order's own price — the price its owner pays or receives per share in the
order's named outcome (calculate_resting_notional,
logic/place_order_processor/resting.rs). Pass that price exactly as the
order was placed and as the open-orders API serves it; it is never
complemented, for either outcome.
Declaration source: packages/core/src/preflight/types.ts:271.
export interface ReduceOrderIntent {
/** `order.quantity` — outstanding quantity, share atoms. */
remaining: bigint;
/** `args.reduce_qty` — how much of `remaining` to remove. */
reduceQty: bigint;
/** The resting order's price in its named outcome's own price space, bps. */
priceBps: number;
/**
* `order.original_quantity`. Omitted skips the book-invariant guard
* (`reduce_order.rs:377-378`), which no honest book state can trip.
*/
originalQuantity?: bigint;
/** Signer owns the order. Only an explicit `false` denies in preview; strict requires it. */
isOwner?: boolean;
/** Order still occupies a book slot. `false` denies in preview; strict requires it. */
orderFound?: boolean;
}
Field documentation
remaining—order.quantity— outstanding quantity, share atoms.reduceQty—args.reduce_qty— how much ofremainingto remove.priceBps— The resting order's price in its named outcome's own price space, bps.originalQuantity—order.original_quantity. Omitted skips the book-invariant guard (reduce_order.rs:377-378), which no honest book state can trip.isOwner— Signer owns the order. Only an explicitfalsedenies in preview; strict requires it.orderFound— Order still occupies a book slot.falsedenies in preview; strict requires it.
ReduceOrderParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:3536.
export interface ReduceOrderParams {
orderId: bigint; // D0{id}
reduceQty: bigint; // D6{share}
}
reduceOrderVerdict#
Decide whether the program would accept this ReduceOrder.
NOTE the full-reduce degradation: reduce_order.rs:198-215 routes any
reduce_qty >= live_qty straight into CancelOrder instead of rejecting it.
So a full reduce is evaluated against the CANCEL gates and the residual-
notional floor is skipped entirely — mirroring that here keeps a UI from
showing a RestingNotionalTooSmall warning on a transaction that would
actually succeed as a cancel. The reduce_qty >= quantity -> InvalidState
branch at reduce_order.rs:374-375 is therefore unreachable from the BPF
entry point and is NOT mirrored.
Declaration source: packages/core/src/preflight/orders.ts:231.
export function reduceOrderVerdict(config: ConfigSnapshot, market: MarketSnapshot, intent: ReduceOrderIntent, options?: PreflightOptions): Verdict;
Parameters
config: ConfigSnapshot— Not documented. See ConfigSnapshot for its declaration and available field documentation.market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.intent: ReduceOrderIntent— Not documented. See ReduceOrderIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>reduceOrderWithFreeFunds</summary>reduceOrderWithFreeFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:2870.
export function reduceOrderWithFreeFunds(input: ReduceOrderWithFreeFundsInput, programAddress?: Address): Promise<SdkResult<CancelFamilyWithFreeFundsResult & { config: Address; }>>;
Parameters
input: ReduceOrderWithFreeFundsInput— Not documented. See ReduceOrderWithFreeFundsInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<CancelFamilyWithFreeFundsResult & { config: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ReduceOrderWithFreeFundsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2866.
export interface ReduceOrderWithFreeFundsInput extends CancelFamilyWithFreeFundsAccountsInput {
params: ReduceOrderParams;
}
reduceTransactionLanding#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:227.
export function reduceTransactionLanding(state: TransactionLandingState, event: TransactionLandingEvent): TransactionLandingStep;
Parameters
state: TransactionLandingState— Not documented. See TransactionLandingState for its declaration and available field documentation.event: TransactionLandingEvent— Not documented. See TransactionLandingEvent for its declaration and available field documentation.
Returns
TransactionLandingStep
Not documented.
Throws
Not documented.
</details> <details> <summary>referenceKalshiCapitalMetadata</summary>referenceKalshiCapitalMetadata#
Not documented.
Declaration source: packages/core/src/sources/kalshiCapitalMetadata.ts:68.
export function referenceKalshiCapitalMetadata(descriptor: Readonly<Record<string, unknown>>): KalshiCapitalMetadata | null;
Parameters
descriptor: Readonly<Record<string, unknown>>— Not documented.
Returns
KalshiCapitalMetadata | null
Not documented.
Throws
Not documented.
</details> <details> <summary>REFERRAL_ACCOUNT_DISCRIMINATOR</summary>REFERRAL_ACCOUNT_DISCRIMINATOR#
ReferralAccount discriminator (v2).
Declaration source: packages/core/src/constants.ts:222.
export declare const REFERRAL_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
REFERRAL_ACCOUNT_SIZE#
D0{byte} ReferralAccount size (v2).
Declaration source: packages/core/src/constants.ts:312.
export declare const REFERRAL_ACCOUNT_SIZE: 104;
REFERRAL_BINDING_SLOTS#
Number of trailing read-only accounts the referral binding consumes.
Declaration source: packages/core/src/widget/referral.ts:25.
export declare const REFERRAL_BINDING_SLOTS: 1;
REFERRAL_DURATION_SECONDS#
D0{s} Referral lifetime (v2, exactly 365 * 86,400 seconds).
Declaration source: packages/core/src/constants.ts:379.
export declare const REFERRAL_DURATION_SECONDS: bigint;
REFERRAL_HANDLE_PATTERN#
A referral handle, as apps/web/proxy.ts accepts in ?ref= and /referral/<ref>.
Declaration source: packages/core/src/widget/embed.ts:26.
export declare const REFERRAL_HANDLE_PATTERN: RegExp;
REFERRAL_WALLET_PATTERN#
A base58 wallet address, as apps/web/proxy.ts accepts in ?ref=.
Declaration source: packages/core/src/widget/embed.ts:24.
export declare const REFERRAL_WALLET_PATTERN: RegExp;
ReferralBindingAccounts#
Not documented.
Declaration source: packages/core/src/widget/referral.ts:27.
export interface ReferralBindingAccounts {
/** PDA `["seesaw", "referral", taker]` — read-only. */
takerReferralAccount: Address;
}
Field documentation
takerReferralAccount— PDA["seesaw", "referral", taker]— read-only.
ReferralHandle#
Not documented.
Declaration source: packages/core/src/api/social.ts:109.
export type ReferralHandle = z.infer<typeof handleSchema>;
ReferralIndexerSnapshot#
Not documented.
Declaration source: packages/core/src/referral/types.ts:48.
export interface ReferralIndexerSnapshot {
referrer: Address;
/** Unix-ms */
expiresAt: number;
/** Referrer's immutable `CurrencyReferrerEarningsAccount.treasury_index`, if indexed. */
referrerTreasuryIndex?: number;
}
Field documentation
expiresAt— Unix-msreferrerTreasuryIndex— Referrer's immutableCurrencyReferrerEarningsAccount.treasury_index, if indexed.
ReferralLeaderboardParams#
Not documented.
Declaration source: packages/core/src/client.ts:70.
export interface ReferralLeaderboardParams {
limit?: number;
}
ReferralLinkOptions#
Not documented.
Declaration source: packages/core/src/widget/embed.ts:61.
export interface ReferralLinkOptions {
/** Land on this market's page instead of the referral page. */
marketId?: string;
}
Field documentation
marketId— Land on this market's page instead of the referral page.
referrerAccruesFees#
Not documented.
Declaration source: packages/core/src/fee.ts:437.
export function referrerAccruesFees(resolution: Pick<ReferrerResolution, "address" | "source" | "eligibleForTriple" | "expiresAt"> | null, nowMs?: number): boolean;
Parameters
resolution: Pick<ReferrerResolution, "source" | "address" | "eligibleForTriple" | "expiresAt"> | null— Not documented.nowMs: number— Not documented. Default:Date.now().
Returns
boolean
Not documented.
Throws
Not documented.
Defaults
nowMs:Date.now().
ReferrerResolution#
Not documented.
Declaration source: packages/core/src/referral/types.ts:20.
export interface ReferrerResolution {
/** Currency record used to establish earnings eligibility, when known. */
currencyRecord?: Address;
/** The referrer's wallet address, or null if no referrer is found. */
address: Address | null;
/** Where this resolution came from. */
source: ReferrerSource;
/** True iff a `ReferralAccount` exists on-chain for the user. */
isLocked: boolean;
/** Unix-ms expiry of the on-chain `ReferralAccount`. Only set when `isLocked === true`. */
expiresAt?: number;
/**
* True iff the referrer's `CurrencyReferrerEarningsAccount` exists on-chain and the
* resolver can safely attach the place_order referral triple. Pending
* referrers may be eligible before they are locked so the first-trade lock
* bundle can include SetReferrer and the order in one transaction. Protocol
* fallback never implies a taker ReferralAccount exists, so it is not safe to
* attach a place_order referral triple for source === 'protocol'.
*/
eligibleForTriple: boolean;
/**
* The immutable shard index stored on the referrer's
* `CurrencyReferrerEarningsAccount.treasury_index`. Present when
* `eligibleForTriple === true` and the resolver could determine the shard.
*/
referrerTreasuryIndex?: number;
}
Field documentation
currencyRecord— Currency record used to establish earnings eligibility, when known.address— The referrer's wallet address, or null if no referrer is found.source— Where this resolution came from.isLocked— True iff aReferralAccountexists on-chain for the user.expiresAt— Unix-ms expiry of the on-chainReferralAccount. Only set whenisLocked === true.eligibleForTriple— True iff the referrer'sCurrencyReferrerEarningsAccountexists on-chain and the resolver can safely attach the place_order referral triple. Pending referrers may be eligible before they are locked so the first-trade lock bundle can include SetReferrer and the order in one transaction. Protocol fallback never implies a taker ReferralAccount exists, so it is not safe to attach a place_order referral triple for source === 'protocol'.referrerTreasuryIndex— The immutable shard index stored on the referrer'sCurrencyReferrerEarningsAccount.treasury_index. Present wheneligibleForTriple === trueand the resolver could determine the shard.
ReferrerResolutionError#
Not documented.
Declaration source: packages/core/src/referral/resolver.ts:17.
export declare class ReferrerResolutionError extends Error {
constructor(source: ReferrerResolutionErrorSource, message: string, cause: unknown);
readonly source: ReferrerResolutionErrorSource;
}
Parameters
source: ReferrerResolutionErrorSource— Not documented.message: string— Not documented.cause: unknown— Not documented.
Throws
Not documented.
</details> <details> <summary>ReferrerSource</summary>ReferrerSource#
Not documented.
Declaration source: packages/core/src/referral/types.ts:18.
export type ReferrerSource = 'indexer' | 'rpc' | 'pending' | 'protocol' | 'none';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
refinePostOnlyReason#
Swap the generic crossing copy for the self-cross copy when the crossed liquidity is the trader's own. Any other reason passes through untouched.
Declaration source: packages/core/src/preflight/placeOrder.ts:169.
export function refinePostOnlyReason(reason: string, own: readonly OwnRestingLevel[] | undefined, canonicalSide: CanonicalSide, canonicalPriceBps: number, outcome?: OutcomeAsset): string;
Parameters
reason: string— Not documented.own: readonly OwnRestingLevel[] | undefined— Not documented.canonicalSide: CanonicalSide— Not documented. See CanonicalSide for its declaration and available field documentation.canonicalPriceBps: number— Not documented.outcome: OutcomeAsset | undefined— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>RegisterCurrencyAccounts</summary>RegisterCurrencyAccounts#
Accounts for permissionless registration of a currency identity.
Declaration source: packages/core/src/instructions.ts:2489.
export interface RegisterCurrencyAccounts extends BinaryRecorderTailAccounts {
payer: Address;
config: Address;
mint: Address;
record: Address;
freezeException?: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
registerPushToken#
Register an Expo push token (ExponentPushToken[...] or ExpoPushToken[...]).
Declaration source: packages/core/src/api/walletServices.ts:317.
export function registerPushToken(client: ApiClient, signer: WalletMessageSigner, input: { token: string; platform: "ios" | "android"; }, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<z.infer<typeof pushTokenSchema>>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.input: { token: string; platform: "ios" | "android"; }— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; platform: "ios" | "android"; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>REGISTRY_STALE_AFTER_MS</summary>REGISTRY_STALE_AFTER_MS#
Registry data older than this is shown with a stale note.
Declaration source: packages/core/src/tokensXyz/display.ts:19.
export declare const REGISTRY_STALE_AFTER_MS: number;
RegistryRow#
Not documented.
Declaration source: packages/core/src/tokensXyz/upstream.ts:151.
export interface RegistryRow {
readonly mint: string;
readonly symbol: string | null;
readonly name: string | null;
readonly logoUri: string | null;
readonly hasTokenPage: boolean;
readonly registry: CurrencyRegistryClass;
}
remainingAllocationInvocations#
Number of idempotent allocation invocations still needed to grow an account
from observedLength to targetSize (each grows by at most
MAX_PERMITTED_DATA_INCREASE; the first creates min(target, 10,240)).
Declaration source: packages/core/src/instructions.ts:1229.
export function remainingAllocationInvocations(targetSize: number, observedLength: number): number;
Parameters
targetSize: number— D0{byte}observedLength: number— D0{byte} authenticated current data length (0 = absent)
Returns
number
D0{count}
Throws
Not documented.
</details> <details> <summary>removeFromWatchlist</summary>removeFromWatchlist#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:98.
export function removeFromWatchlist(client: ApiClient, signer: WalletMessageSigner, marketAddress: string, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<void>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.marketAddress: string— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>RENT_ACCOUNT_STORAGE_OVERHEAD_BYTES</summary>RENT_ACCOUNT_STORAGE_OVERHEAD_BYTES#
D0{byte} Runtime per-account storage overhead priced on top of the data length.
Declaration source: packages/core/src/constants.ts:505.
export declare const RENT_ACCOUNT_STORAGE_OVERHEAD_BYTES: 128;
RENT_CALIBRATION_PROBE_SIZE_BYTES#
D0{byte} Account size probed when calibrating. Zero prices the bare per-account overhead, which is the smallest possible probe and needs no knowledge of any Seesaw layout.
Declaration source: packages/core/src/constants.ts:515.
export declare const RENT_CALIBRATION_PROBE_SIZE_BYTES: 0;
RENT_EXEMPTION_YEARS#
D0{year} Years of rent a rent-exempt balance must cover.
Declaration source: packages/core/src/constants.ts:508.
export declare const RENT_EXEMPTION_YEARS: 2;
rentExemptLamports#
Solana rent-exempt minimum (lamports) for an account holding sizeBytes of
data, scaled from the calibration probe rather than from any assumed rate.
Exact for the runtime's affine rent formula, and correct at whatever rate the
cluster is running.
Declaration source: packages/core/src/constants.ts:588.
export function rentExemptLamports(sizeBytes: number, rate: RentRate): number;
Parameters
sizeBytes: number— D0{byte} Account data length.rate: RentRate— Cluster-calibrated rate fromcalibrateRentRate. See RentRate for its declaration and available field documentation.
Returns
number
D0{lamport} Rent-exempt minimum, rounded up so the account is never underfunded.
Throws
Not documented.
</details> <details> <summary>RentExemptMinimumFetcher</summary>RentExemptMinimumFetcher#
Fetches a cluster's rent-exempt minimum for an account of sizeBytes.
Implemented by the web RPC proxy, the mobile Connection, or any RPC client;
returns null when the cluster is unreachable.
Declaration source: packages/core/src/constants.ts:538.
export type RentExemptMinimumFetcher = (sizeBytes: number) => Promise<number | null>;
RentRate#
A rent rate measured against a live cluster. Construct one only with
calibrateRentRate; the source brand is checked by every consumer so a
hand-written literal cannot silently reintroduce a hardcoded rate.
Declaration source: packages/core/src/constants.ts:522.
export interface RentRate {
/** D0{lamport/byte/year} Rate implied by the probe. Display/reporting only. */
readonly lamportsPerByteYear: number;
/** D0{byte} Account size that was probed. */
readonly probeSizeBytes: number;
/** D0{lamport} Rent-exempt minimum the cluster reported for `probeSizeBytes`. */
readonly probeLamports: number;
/** Provenance brand. Only cluster-derived rates are accepted. */
readonly source: 'cluster';
}
Field documentation
lamportsPerByteYear— D0{lamport/byte/year} Rate implied by the probe. Display/reporting only.probeSizeBytes— D0{byte} Account size that was probed.probeLamports— D0{lamport} Rent-exempt minimum the cluster reported forprobeSizeBytes.source— Provenance brand. Only cluster-derived rates are accepted.
REPLACE_MAKER_QUOTES_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:39.
export declare const REPLACE_MAKER_QUOTES_DISCRIMINATOR: 100;
ReplaceMakerQuotesParams#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:66.
export interface ReplaceMakerQuotesParams {
readonly sequence: bigint;
readonly expectedAuthorityEpoch: number;
readonly expectedMarketTradingGeneration: number;
readonly validFromSlot: bigint;
readonly validUntilSlot: bigint;
readonly sourceObservedAtUnix: bigint;
readonly profile: QuoteProfile;
readonly quotes: readonly ManagedQuoteEntry[];
}
ReplacementGateResult#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:1201.
export interface ReplacementGateResult {
/** Attempts that still block a new attempt for the conflict key. */
readonly blocking: TransactionAttemptRecord[];
/** Previously blocking attempts that reconciliation showed landed successfully. */
readonly landed: TransactionAttemptRecord[];
}
Field documentation
blocking— Attempts that still block a new attempt for the conflict key.landed— Previously blocking attempts that reconciliation showed landed successfully.
ReplayCommitment#
Not documented.
Declaration source: packages/core/src/replay/rpc.ts:11.
export type ReplayCommitment = 'confirmed' | 'finalized';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ReplayFetch#
Not documented.
Declaration source: packages/core/src/replay/recordFromIndexer.ts:77.
export type ReplayFetch = (url: string) => Promise<{
readonly ok: boolean;
readonly status: number;
json(): Promise<unknown>;
}>;
ReplayRpc#
Not documented.
Declaration source: packages/core/src/replay/rpc.ts:66.
export interface ReplayRpc {
/** Address discovery only. The checkpoint re-reads the accounts in its atomic snapshot. */
getProgramAccounts?(
program: Address,
config: {
readonly encoding: 'base64';
readonly commitment: ReplayCommitment;
readonly withContext: true;
readonly minContextSlot: bigint;
readonly dataSlice: { readonly offset: number; readonly length: number };
readonly filters: readonly (
| { readonly dataSize: bigint }
| { readonly memcmp: { readonly offset: bigint; readonly bytes: string; readonly encoding: 'base58' } }
)[];
}
): Promise<{
readonly context: { readonly slot: bigint | number };
readonly value: readonly { readonly pubkey: Address; readonly account?: ReplayRpcAccount }[];
}>;
getMultipleAccountsInfo(
addresses: readonly Address[],
config: {
readonly encoding: 'base64';
readonly commitment: ReplayCommitment;
readonly minContextSlot?: bigint;
}
): Promise<{
readonly context: { readonly slot: bigint | number };
readonly value: readonly (ReplayRpcAccount | null)[];
}>;
/** Newest first, as the RPC returns them. */
getSignaturesForAddress(
address: Address,
config: {
readonly before?: string;
readonly limit: number;
readonly commitment: ReplayCommitment;
}
): Promise<readonly ReplaySignatureInfo[]>;
getTransaction(
signature: string,
config: {
readonly encoding: 'json';
readonly maxSupportedTransactionVersion: number;
readonly commitment: ReplayCommitment;
}
): Promise<ReplayRpcTransaction | null>;
getBlock(
slot: bigint,
config: {
readonly transactionDetails: 'signatures';
readonly rewards: false;
readonly maxSupportedTransactionVersion: number;
readonly commitment: ReplayCommitment;
}
): Promise<{ readonly signatures: readonly string[] } | null>;
}
Field documentation
getProgramAccounts— Address discovery only. The checkpoint re-reads the accounts in its atomic snapshot.getSignaturesForAddress— Newest first, as the RPC returns them.
ReplayRpcAccount#
Not documented.
Declaration source: packages/core/src/replay/rpc.ts:13.
export interface ReplayRpcAccount {
/** `[base64, 'base64']`. */
readonly data: readonly [string, string];
readonly owner: string;
}
Field documentation
data—[base64, 'base64'].
replayRpcFromKit#
Adapt a @solana/kit RPC (createSolanaRpc). The kit returns the JSON-RPC shapes above with
bigint numbers, so the adapter only calls send(); getMultipleAccountsInfo maps to the
JSON-RPC method getMultipleAccounts.
Declaration source: packages/core/src/replay/rpc.ts:140.
export function replayRpcFromKit(rpc: KitLikeRpc): ReplayRpc;
Parameters
rpc: KitLikeRpc— Not documented. See KitLikeRpc for its declaration and available field documentation.
Returns
ReplayRpc
Not documented.
Throws
Not documented.
</details> <details> <summary>ReplayRpcInstruction</summary>ReplayRpcInstruction#
One compiled instruction as JSON-encoded getTransaction returns it.
Declaration source: packages/core/src/replay/rpc.ts:27.
export interface ReplayRpcInstruction {
readonly programIdIndex: number;
readonly accounts: readonly number[];
/** Base58 instruction data. */
readonly data: string;
/** Invocation depth, when RPC records it for an inner instruction. */
readonly stackHeight?: number | bigint | null;
}
Field documentation
data— Base58 instruction data.stackHeight— Invocation depth, when RPC records it for an inner instruction.
ReplayRpcTransaction#
The subset of a JSON-encoded getTransaction result the sources use.
Declaration source: packages/core/src/replay/rpc.ts:37.
export interface ReplayRpcTransaction {
readonly slot: bigint | number;
readonly blockTime: bigint | number | null;
readonly meta: {
readonly err: unknown;
readonly returnData?: {
readonly programId: string;
readonly data: readonly [string, string];
} | null;
readonly innerInstructions?:
| readonly {
readonly index: number;
readonly instructions: readonly ReplayRpcInstruction[];
}[]
| null;
readonly loadedAddresses?: {
readonly writable: readonly string[];
readonly readonly: readonly string[];
} | null;
} | null;
readonly transaction: {
readonly message: {
readonly header?: { readonly numRequiredSignatures: number | bigint };
readonly accountKeys: readonly string[];
readonly instructions: readonly ReplayRpcInstruction[];
};
};
}
ReplaySignatureInfo#
Not documented.
Declaration source: packages/core/src/replay/rpc.ts:19.
export interface ReplaySignatureInfo {
readonly signature: string;
readonly slot: bigint | number;
readonly err: unknown;
readonly blockTime?: bigint | number | null;
}
RequestDeduplicationConfig#
Not documented.
Declaration source: packages/core/src/api/client.ts:82.
export interface RequestDeduplicationConfig {
/** Enable request deduplication (default: true) */
enabled?: boolean;
/** TTL for cached in-flight requests in ms (default: 100) */
ttlMs?: number;
}
Field documentation
enabled— Enable request deduplication (default: true)ttlMs— TTL for cached in-flight requests in ms (default: 100)
RESET_STRATEGY_CAPITAL_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:57.
export declare const RESET_STRATEGY_CAPITAL_ROUTE: 90;
resetDefaultClient#
Reset the default API client singleton. Useful for testing and SSR scenarios where the client state should not persist between requests or test cases.
Declaration source: packages/core/src/api/client.ts:1176.
export function resetDefaultClient(): void;
Parameters
No callable parameters.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>resetPythFeedPairs</summary>resetPythFeedPairs#
Reset Pyth feed ID pairs to the built-in defaults.
Declaration source: packages/core/src/api/markets.ts:206.
export function resetPythFeedPairs(): void;
Parameters
No callable parameters.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>ResilientDataSource</summary>ResilientDataSource#
Not documented.
Declaration source: packages/core/src/resilientData.ts:196.
export interface ResilientDataSource {
getMarket(
marketAddress: Address,
options?: { readonly signal?: AbortSignal }
): Promise<ResilientReadResult<IndexedApiMarket, MarketAccount>>;
getMarketDetail(
marketAddress: Address,
options?: { readonly signal?: AbortSignal }
): Promise<ResilientReadResult<IndexedApiMarketDetail, MarketAccount>>;
getPositions(
owner: Address,
options?: { readonly signal?: AbortSignal }
): Promise<
ResilientReadResult<ApiPositionsValue, readonly RpcAddressedValue<UserPositionAccount>[]>
>;
getOpenOrders(
owner: Address,
options?: { readonly signal?: AbortSignal }
): Promise<ResilientReadResult<readonly PendingOrder[], readonly RpcOwnerOrder[]>>;
}
ResilientReadPolicy#
Not documented.
Declaration source: packages/core/src/resilientData.ts:143.
export interface ResilientReadPolicy {
readonly programAddress: Address;
/** Required bound for owner-scoped position and order scans. */
readonly scanLimit: number;
readonly commitment?: string;
}
Field documentation
scanLimit— Required bound for owner-scoped position and order scans.
ResilientReadResult#
Not documented.
Declaration source: packages/core/src/resilientData.ts:191.
export type ResilientReadResult<TApi, TRpc> =
| ApiReadResult<TApi>
| RpcReadResult<TRpc>
| UnavailableReadResult;
resolveCancelRoute#
Decides which cancel/reduce account surface to use. Downgrades to
'wallet' for ask-side orders even when fundingSource is freeFunds,
since the on-chain free-funds surface cannot represent share refunds
(see the module doc comment above).
Declaration source: packages/core/src/orderFunding.ts:155.
export function resolveCancelRoute(fundingSource: FundingSource, storedSide: StoredOrderSide): CancelRoute;
Parameters
fundingSource: FundingSource— Not documented. See FundingSource for its declaration and available field documentation.storedSide: StoredOrderSide— Not documented. See StoredOrderSide for its declaration and available field documentation.
Returns
CancelRoute
Not documented.
Throws
Not documented.
</details> <details> <summary>resolveCreatableMarketTimingFromClock</summary>resolveCreatableMarketTimingFromClock#
Not documented.
Declaration source: packages/core/src/market.ts:266.
export function resolveCreatableMarketTimingFromClock(fetchAccountData: (address: Address) => Promise<Uint8Array | null>, durationSeconds: number | bigint, marketId: bigint): Promise<CreateMarketTiming>;
Parameters
fetchAccountData: (address: Address) => Promise<Uint8Array | null>— Not documented.durationSeconds: number | bigint— Not documented.marketId: bigint— Not documented.
Returns
Promise<CreateMarketTiming>
Not documented.
Throws
Not documented.
</details> <details> <summary>resolveCreateMarketCurrencyAccounts</summary>resolveCreateMarketCurrencyAccounts#
Resolve the currency record and, for freeze-enabled mints, the freeze exception from the settlement mint's account owner and data.
Declaration source: packages/core/src/currencyAccounts.ts:57.
export function resolveCreateMarketCurrencyAccounts(mint: Address, tokenProgram: Address, mintData: Uint8Array, programAddress?: Address): Promise<CreateMarketCurrencyAccounts>;
Parameters
mint: Address— - The settlement mint address.tokenProgram: Address— - The mint account's owner (the settlement token program).mintData: Uint8Array<ArrayBufferLike>— - The raw mint account data, read at the caller's commitment.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<CreateMarketCurrencyAccounts>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
resolveDateRange#
Resolve a preset to an inclusive [fromMs, toMs] range.
30d: the last 30 days up tonowMs.ytd: from 1 January 00:00 UTC ofnowMs's UTC year up tonowMs.all:[0, Number.MAX_SAFE_INTEGER]— everything, including rows with no timestamp in {@link filterByDateRange}.custom:customas given (swapped if reversed); withoutcustomit falls back toall.
Declaration source: packages/core/src/ux/history.ts:23.
export function resolveDateRange(preset: DateRangePreset, nowMs: number, custom?: { fromMs: number; toMs: number; }): { fromMs: number; toMs: number; };
Parameters
preset: DateRangePreset— Not documented. See DateRangePreset for its declaration and available field documentation.nowMs: number— Not documented.custom: { fromMs: number; toMs: number; } | undefined— Not documented.
Returns
{ fromMs: number; toMs: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>resolveMarket</summary>resolveMarket#
Build ResolveMarket instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:637.
export function resolveMarket(input: ResolveMarketInput, programAddress?: Address): Promise<SdkResult<ResolveMarketResult>>;
Parameters
input: ResolveMarketInput— Not documented. See ResolveMarketInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<ResolveMarketResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
ResolveMarketAccounts#
Accounts for ResolveMarket instruction.
Declaration source: packages/core/src/instructions.ts:1496.
export interface ResolveMarketAccounts extends BinaryRecorderTailAccounts {
market: Address;
assetState: Address;
caller: Address;
config: Address;
vault: Address;
creatorTokenAccount: Address;
settlementMint: Address;
tokenProgram: Address;
/** Immutable native resolution policy PDA. */
nativePolicy: Address;
}
Field documentation
nativePolicy— Immutable native resolution policy PDA.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
ResolveMarketInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:611.
export interface ResolveMarketInput {
/**
* The market's quote (settlement) token program (`spec/IX.md` §60.1): classic SPL Token
* (the default) or Token-2022, from `marketSettlementTokenProgram(market)` or the
* currency record. YES/NO share accounts always stay on classic SPL Token.
*/
settlementTokenProgram?: Address;
marketId: bigint;
pythFeedId: Uint8Array;
durationSeconds: bigint;
creator: Address;
caller: Address;
creatorTokenAccount: Address;
settlementMint: Address;
/** Optional native resolution policy PDA override. Auto-derived when omitted. */
nativePolicy?: Address;
}
Field documentation
settlementTokenProgram— The market's quote (settlement) token program (spec/IX.md§60.1): classic SPL Token (the default) or Token-2022, frommarketSettlementTokenProgram(market)or the currency record. YES/NO share accounts always stay on classic SPL Token.nativePolicy— Optional native resolution policy PDA override. Auto-derived when omitted.
ResolveMarketResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:629.
export interface ResolveMarketResult {
market: Address;
vault: Address;
}
resolveNativeTransport#
Not documented.
Declaration source: packages/core/src/transactionPlan.ts:85.
export function resolveNativeTransport(transport: NativeTransactionTransport | undefined, defaultFeePayer: Address): ResolvedTransport;
Parameters
transport: NativeTransactionTransport | undefined— Not documented. See NativeTransactionTransport for its declaration and available field documentation.defaultFeePayer: Address— Not documented.
Returns
ResolvedTransport
Not documented.
Throws
Not documented.
</details> <details> <summary>resolveOpenMarketCurrencyAccounts</summary>resolveOpenMarketCurrencyAccounts#
Resolve the two currency accounts of an external-market open. Both opens
bind currency_record and freeze_exception at fixed positions after the
settlement mint (program/src/processor/reclaim_external/open.rs,
native_open.rs); the exception is read only when the mint has a freeze
authority, so the canonical PDA is sent whether or not it exists.
Declaration source: packages/core/src/currencyAccounts.ts:88.
export function resolveOpenMarketCurrencyAccounts(mint: Address, tokenProgram: Address, programAddress?: Address): Promise<OpenMarketCurrencyAccounts>;
Parameters
mint: Address— Not documented.tokenProgram: Address— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<OpenMarketCurrencyAccounts>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
resolveProtocolTreasuryDestination#
Choose PlaceOrder account 7 (spec/IX.md §59.1, §59.5) from decoded
state only.
A market in config.defaultSettlementMint uses
config.treasuryRecipients[protocolTreasuryIndex]. A market in any other
registered currency uses that currency's protocol treasury shard
["seesaw", "ccy_protocol_treasury", tokenProgram, mint, [index]]. The
program authenticates account 7 either way; this keeps clients from
sending a default-mint recipient for another currency.
Declaration source: packages/core/src/treasury.ts:223.
export function resolveProtocolTreasuryDestination(input: { readonly config: ProtocolTreasuryConfigFacts; readonly settlementMint: Address; readonly protocolTreasuryIndex: number; readonly tokenProgram?: Address; readonly programAddress?: Address; }): Promise<ProtocolTreasuryDestination>;
Parameters
input: { readonly config: ProtocolTreasuryConfigFacts; readonly settlementMint: Address; readonly protocolTreasuryIndex: number; readonly tokenProgram?: Address; readonly programAddress?: Address; }— Not documented.
Returns
Promise<ProtocolTreasuryDestination>
Not documented.
Throws
Not documented.
</details> <details> <summary>resolveReferralHandle</summary>resolveReferralHandle#
Resolve a handle to its wallet, or a wallet to its handle (public).
Declaration source: packages/core/src/api/social.ts:112.
export function resolveReferralHandle(client: ApiClient, query: string, options?: { signal?: AbortSignal; }): Promise<ReferralHandle>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.query: string— Not documented.options: { signal?: AbortSignal; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; wallet: string; handle: string; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>resolveReferrer</summary>resolveReferrer#
Not documented.
Declaration source: packages/core/src/referral/resolver.ts:30.
export function resolveReferrer(opts: ResolveReferrerOptions): Promise<ReferrerResolution>;
Parameters
opts: ResolveReferrerOptions— Not documented. See ResolveReferrerOptions for its declaration and available field documentation.
Returns
Promise<ReferrerResolution>
Not documented.
Throws
Not documented.
</details> <details> <summary>ResolveReferrerIndexerClient</summary>ResolveReferrerIndexerClient#
Not documented.
Declaration source: packages/core/src/referral/types.ts:56.
export interface ResolveReferrerIndexerClient {
getReferral(wallet: Address): Promise<ReferralIndexerSnapshot | null>;
}
ResolveReferrerOptions#
Not documented.
Declaration source: packages/core/src/referral/types.ts:76.
export interface ResolveReferrerOptions {
wallet: Address;
/** Currency of the prospective trade; without it, eligibility is unknown. */
currencyRecord?: Address;
indexerClient?: ResolveReferrerIndexerClient;
rpcClient?: ResolveReferrerRpcClient;
/** Pre-lock candidate (cookie / AsyncStorage / CLI flag). */
pendingReferrer?: Address | null;
/** Protocol fallback candidate used after indexed/RPC and pending referrers. */
protocolReferrer?: Address | null;
/** Program ID override (defaults to PROGRAM_ADDRESS). */
programAddress?: Address;
/** Unix seconds used for inclusive on-chain expiry comparisons. */
nowUnixSec?: number;
}
Field documentation
currencyRecord— Currency of the prospective trade; without it, eligibility is unknown.pendingReferrer— Pre-lock candidate (cookie / AsyncStorage / CLI flag).protocolReferrer— Protocol fallback candidate used after indexed/RPC and pending referrers.programAddress— Program ID override (defaults to PROGRAM_ADDRESS).nowUnixSec— Unix seconds used for inclusive on-chain expiry comparisons.
ResolveReferrerRpcClient#
Not documented.
Declaration source: packages/core/src/referral/types.ts:67.
export interface ResolveReferrerRpcClient {
/**
* Fetches multiple accounts in a single round-trip. Returns one
* `AccountSnapshot` per requested address, with `data === null` when
* the account is uninitialised.
*/
getMultipleAccounts(addresses: readonly Address[]): Promise<AccountSnapshot[]>;
}
Field documentation
getMultipleAccounts— Fetches multiple accounts in a single round-trip. Returns oneAccountSnapshotper requested address, withdata === nullwhen the account is uninitialised.
RESPONSIBLE_TRADING_MAX_COOL_OFF_HOURS#
Not documented.
Declaration source: packages/core/src/api/compliance.ts:97.
export declare const RESPONSIBLE_TRADING_MAX_COOL_OFF_HOURS: number;
RESPONSIBLE_TRADING_MIN_COOL_OFF_HOURS#
The indexer's cool-off bounds: at least 24 hours, at most a year.
Declaration source: packages/core/src/api/compliance.ts:96.
export declare const RESPONSIBLE_TRADING_MIN_COOL_OFF_HOURS: 24;
ResponsibleTradingState#
Not documented.
Declaration source: packages/core/src/api/compliance.ts:93.
export type ResponsibleTradingState = z.infer<typeof responsibleTradingSchema>;
Field documentation
dailyDepositLimit— Base units of the settlement currency, as a decimal string, or null for none.
ResumableRedeemError#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:57.
export declare class ResumableRedeemError<TSignature = string> extends Error {
constructor(message: string, signatures: TSignature[], outcomeUnknown?: boolean);
readonly signatures: TSignature[];
readonly outcomeUnknown: boolean;
}
Parameters
message: string— Not documented.signatures: TSignature[]— Not documented.outcomeUnknown: boolean— Not documented. Default:false.
Throws
Not documented.
Defaults
outcomeUnknown:false.
ResumableRedeemResult#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:25.
export interface ResumableRedeemResult<TSignature = string> {
readonly signatures: TSignature[];
readonly iterations: number;
}
ResumableRedeemSequenceError#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:68.
export declare class ResumableRedeemSequenceError<TSignature = string> extends ResumableRedeemError<TSignature> {
constructor(message: string, signatures: TSignature[], completed: CompletedRedeemInstruction<TSignature>[], active: PendingRedeemInstruction<TSignature> | undefined, pending: PendingRedeemInstruction<TSignature> | undefined);
readonly completed: CompletedRedeemInstruction<TSignature>[];
readonly active?: PendingRedeemInstruction<TSignature> | undefined;
readonly pending?: PendingRedeemInstruction<TSignature> | undefined;
}
Parameters
message: string— Not documented.signatures: TSignature[]— Not documented.completed: CompletedRedeemInstruction<TSignature>[]— Not documented.active: PendingRedeemInstruction<TSignature> | undefined— Not documented. See PendingRedeemInstruction for its declaration and available field documentation.pending: PendingRedeemInstruction<TSignature> | undefined— Not documented. See PendingRedeemInstruction for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>ResumableRedeemSequencePlan</summary>ResumableRedeemSequencePlan#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:50.
export interface ResumableRedeemSequencePlan {
/** Global index of instructions[0] within the authenticated original plan. */
readonly instructionIndexOffset: number;
/** Complete original instruction identities, including the completed prefix. */
readonly intendedInstructionIdentities: readonly string[];
}
Field documentation
instructionIndexOffset— Global index of instructions[0] within the authenticated original plan.intendedInstructionIdentities— Complete original instruction identities, including the completed prefix.
ResumableRedeemSequenceResult#
Not documented.
Declaration source: packages/core/src/resumableRedeem.ts:44.
export interface ResumableRedeemSequenceResult<TSignature = string> {
readonly completed: CompletedRedeemInstruction<TSignature>[];
readonly signatures: TSignature[];
readonly iterations: number;
}
RESUME_STRATEGY_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:55.
export declare const RESUME_STRATEGY_ROUTE: 88;
RetryOptions#
Not documented.
Declaration source: packages/core/src/api/client.ts:49.
export interface RetryOptions {
maxRetries?: number;
baseDelayMs?: number;
maxDelayMs?: number;
useJitter?: boolean;
onRetry?: (attempt: number, error: Error, nextDelayMs: number) => void;
isRetryable?: (error: Error) => boolean;
}
REVIEWED_ORDER_DEFAULT_TTL_SECONDS#
Default lifetime of a review, in seconds of program Clock.
Declaration source: packages/core/src/reviewedIntent.ts:61.
export declare const REVIEWED_ORDER_DEFAULT_TTL_SECONDS: 120;
REVIEWED_ORDER_INTENT_VERSION#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:58.
export declare const REVIEWED_ORDER_INTENT_VERSION: 2;
REVIEWED_ROUNDING_SLACK_ATOMS#
Per-fill rounding headroom for the BUY debit bound: two atoms (collateral
floor + fee ceiling) for each of the at most MAX_MATCH_LIMIT (12) book
fills, MAX_CURVE_LEVELS_PER_SIDE (16) spline levels and the resting
remainder, rounded up.
Declaration source: packages/core/src/reviewedIntent.ts:69.
export declare const REVIEWED_ROUNDING_SLACK_ATOMS: 64n;
REVIEWED_SELL_TOLERANCE_BPS#
Relative tolerance on the SELL net-output floor so a small partial fill's
fixed rounding atoms cannot trip the proportional bound. 50 bps of the
reviewed net. A partial whose executed notional is below roughly
(2 × fills + 1) / 0.5% atoms (≈ 600 atoms for one fill) can still be
refused; that refusal is atomic and moves no funds.
Declaration source: packages/core/src/reviewedIntent.ts:78.
export declare const REVIEWED_SELL_TOLERANCE_BPS: 50n;
ReviewedCompleteSetMerge#
The frozen terms the user reviewed. There is no deadline field because the instruction carries none and its payout is a fixed 1:1; the signing gate instead re-reads the market and holdings and refuses if any reviewed portion is no longer backed.
Declaration source: packages/core/src/completeSetMerge.ts:176.
export interface ReviewedCompleteSetMerge {
readonly kind: 'mergeCompleteSet';
readonly scope: ReviewedCompleteSetMergeScope;
readonly plan: CompleteSetMergePlan;
/** Settlement atoms the vault pays: always equal to `plan.quantity`. */
readonly collateralOut: bigint;
readonly reviewedAtMs: number;
}
Field documentation
collateralOut— Settlement atoms the vault pays: always equal toplan.quantity.
ReviewedCompleteSetMergeRejection#
Not documented.
Declaration source: packages/core/src/completeSetMerge.ts:206.
export type ReviewedCompleteSetMergeRejection =
| 'scope-changed'
| CompleteSetMergeIneligibleReason
| 'holdings-changed';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ReviewedCompleteSetMergeScope#
Who and where a reviewed merge was approved for.
Declaration source: packages/core/src/completeSetMerge.ts:164.
export interface ReviewedCompleteSetMergeScope {
readonly wallet: string;
readonly programId: string;
readonly market: string;
}
ReviewedCompleteSetMergeVerdict#
Not documented.
Declaration source: packages/core/src/completeSetMerge.ts:211.
export type ReviewedCompleteSetMergeVerdict =
| { readonly ok: true }
| { readonly ok: false; readonly reason: ReviewedCompleteSetMergeRejection };
ReviewedFeePolicy#
The fee policy the user reviewed, read from ConfigAccount.
Declaration source: packages/core/src/reviewedIntent.ts:108.
export interface ReviewedFeePolicy {
/** `ConfigAccount.fee_epoch`; rotates on every authorized fee update. Never `0`. */
readonly epoch: number;
readonly capBps: number;
readonly decayRateBps: number;
}
Field documentation
epoch—ConfigAccount.fee_epoch; rotates on every authorized fee update. Never0.
ReviewedFundingSource#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:85.
export type ReviewedFundingSource = 'wallet' | 'freeFunds';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
reviewedIntentDigest#
Stable hex SHA-256 of the reviewed intent.
Recorded with every signed attempt so review, encoded message and recovery all name the same authorized action. Two intents differing in any consent-bearing field have different digests.
Declaration source: packages/core/src/reviewedIntent.ts:558.
export function reviewedIntentDigest(intent: ReviewedOrderIntent): string;
Parameters
intent: ReviewedOrderIntent— Not documented. See ReviewedOrderIntent for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>ReviewedIntentError</summary>ReviewedIntentError#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:221.
export declare class ReviewedIntentError extends Error {
constructor(message: string);
}
Parameters
message: string— Not documented.
Throws
Not documented.
</details> <details> <summary>ReviewedIntentObservation</summary>ReviewedIntentObservation#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:739.
export interface ReviewedIntentObservation {
/** Scope the client is in NOW (connected wallet, configured cluster/program, open market). */
readonly scope: ReviewedOrderScope | null;
/** Fee policy freshly read from `ConfigAccount`, or `null` when unreadable. */
readonly fee: ReviewedFeePolicy | null;
/** Program-Clock seconds now, or `null` when unknown. */
readonly nowUnix: number | null;
/** Freshly evaluated voluntary-control state. */
readonly voluntaryControl: VoluntaryControlObservation;
readonly nowMs: number;
/** The funding preference currently selected, when the surface still shows one. */
readonly fundingSource?: ReviewedFundingSource;
/** The referral decision the caller is about to encode. */
readonly referral?: ReviewedReferralDecision;
/** Defaults to `placeOrder`; shortcuts pass `quickTrade`. */
readonly action?: VoluntaryControlAction;
/**
* Freshly read share holdings. Only consulted under an active cool-off, to
* permit a reduce-only exit ({@link isReduceOnlyExit}); absent = blocked.
*/
readonly heldShares?: HeldOutcomeShares | null;
}
Field documentation
scope— Scope the client is in NOW (connected wallet, configured cluster/program, open market).fee— Fee policy freshly read fromConfigAccount, ornullwhen unreadable.nowUnix— Program-Clock seconds now, ornullwhen unknown.voluntaryControl— Freshly evaluated voluntary-control state.fundingSource— The funding preference currently selected, when the surface still shows one.referral— The referral decision the caller is about to encode.action— Defaults toplaceOrder; shortcuts passquickTrade.heldShares— Freshly read share holdings. Only consulted under an active cool-off, to permit a reduce-only exit ({@link isReduceOnlyExit}); absent = blocked.
ReviewedIntentRejection#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:729.
export type ReviewedIntentRejection =
| 'scope-changed'
| 'review-expired'
| 'clock-unavailable'
| 'fee-policy-unavailable'
| 'fee-policy-changed'
| 'cool-off-active'
| 'funding-changed'
| 'referral-changed';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ReviewedIntentVerdict#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:762.
export type ReviewedIntentVerdict =
| { readonly ok: true; readonly digest: string }
| { readonly ok: false; readonly reason: ReviewedIntentRejection; readonly detail: string };
ReviewedOrderDraft#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:189.
export interface ReviewedOrderDraft {
readonly scope: ReviewedOrderScope;
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly orderType: OrderType;
readonly priceBps: number;
readonly quantity: bigint;
/** IOC worst price. Ignored for rest-capable orders, which carry the sentinel. */
readonly worstPriceBps?: number;
/** IOC minimum fill. Ignored (`0n`) for rest-capable orders. */
readonly minFillQuantity?: bigint;
/** Defaults to `0` (protocol default). */
readonly matchLimit?: number;
/** Defaults to `1` (CancelProvide). */
readonly selfTradeBehavior?: number;
/** Defaults to `0`. Must be `0` for IOC: the program rejects resting terms on IOC. */
readonly maxRestingAgeSeconds?: number;
/** Defaults to `1` (reject a crossing PostOnly). */
readonly rejectPostOnlyWouldCross?: number;
/** Exactly 16 bytes; defaults to all zero (absent). */
readonly clientOrderId?: Uint8Array;
/** Defaults to `0n`. Must be `0n` for IOC. */
readonly restingExpiresAt?: bigint;
readonly fundingSource: ReviewedFundingSource;
readonly strategy?: ReviewedStrategyOrder;
readonly referral: ReviewedReferralDecision;
readonly fee: ReviewedFeePolicy;
/** Program-Clock seconds (chain time, or host time adjusted by a measured offset). */
readonly nowUnix: number;
readonly ttlSeconds?: number;
}
Field documentation
worstPriceBps— IOC worst price. Ignored for rest-capable orders, which carry the sentinel.minFillQuantity— IOC minimum fill. Ignored (0n) for rest-capable orders.matchLimit— Defaults to0(protocol default).selfTradeBehavior— Defaults to1(CancelProvide).maxRestingAgeSeconds— Defaults to0. Must be0for IOC: the program rejects resting terms on IOC.rejectPostOnlyWouldCross— Defaults to1(reject a crossing PostOnly).clientOrderId— Exactly 16 bytes; defaults to all zero (absent).restingExpiresAt— Defaults to0n. Must be0nfor IOC.nowUnix— Program-Clock seconds (chain time, or host time adjusted by a measured offset).
ReviewedOrderEconomics#
Exact, unit-distinct economics of the reviewed order. All values are atoms.
shareQuantity is SHARE atoms; every other field is QUOTE (settlement
token) atoms. They share six decimals and must never be substituted.
Declaration source: packages/core/src/reviewedIntent.ts:137.
export interface ReviewedOrderEconomics {
readonly shareQuantity: bigint;
/** `calculateCollateral(limitPrice, shareQuantity)` — the quote notional at the limit. */
readonly quoteNotional: bigint;
/** Exact one-fill protocol trade fee at the limit price. Excludes SOL network fees and rent. */
readonly tradeFeeAtLimit: bigint;
/** BUY: notional + fee (what a full fill at the limit debits). SELL: `0`. */
readonly totalDebitAtLimit: bigint;
/** SELL: notional − fee (what a full fill at the limit nets). BUY: `0`. */
readonly netProceedsAtLimit: bigint;
/** Encoded `max_quote_input`; `u64::MAX` when not applicable. */
readonly maxQuoteInput: bigint;
/** Encoded `min_quote_output`; `0` when not applicable. */
readonly minQuoteOutput: bigint;
}
Field documentation
quoteNotional—calculateCollateral(limitPrice, shareQuantity)— the quote notional at the limit.tradeFeeAtLimit— Exact one-fill protocol trade fee at the limit price. Excludes SOL network fees and rent.totalDebitAtLimit— BUY: notional + fee (what a full fill at the limit debits). SELL:0.netProceedsAtLimit— SELL: notional − fee (what a full fill at the limit nets). BUY:0.maxQuoteInput— Encodedmax_quote_input;u64::MAXwhen not applicable.minQuoteOutput— Encodedmin_quote_output;0when not applicable.
ReviewedOrderIntent#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:153.
export interface ReviewedOrderIntent {
readonly version: typeof REVIEWED_ORDER_INTENT_VERSION;
readonly kind: 'placeOrder';
readonly scope: ReviewedOrderScope;
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly orderType: OrderType;
/** Limit price in the named outcome's own bps. */
readonly priceBps: number;
/** Encoded worst price: the IOC bound, or the intent's disable sentinel. */
readonly worstPriceBps: number;
/** IOC atomic minimum fill, share atoms; `0n` for rest-capable orders. */
readonly minFillQuantity: bigint;
/** Encoded `match_limit`, `0..=12`; `0` selects the protocol default. */
readonly matchLimit: number;
/** Encoded `self_trade`: `0` Abort, `1` CancelProvide, `2` DecrementTake. */
readonly selfTradeBehavior: number;
/** Encoded `max_resting_age` seconds; `0` rests until the market closes. Always `0` for IOC. */
readonly maxRestingAgeSeconds: number;
/** Encoded `reject_post_only`: `1` rejects a crossing PostOnly, `0` slides it. */
readonly rejectPostOnlyWouldCross: number;
/** Encoded `client_order_id` as 32 lowercase hex characters; all zero means absent. */
readonly clientOrderIdHex: string;
/** Encoded `resting_expires_at`, program-Clock seconds; `0` means none. Always `0` for IOC. */
readonly restingExpiresAt: bigint;
readonly fundingSource: ReviewedFundingSource;
readonly strategy?: ReviewedStrategyOrder;
readonly referral: ReviewedReferralDecision;
readonly fee: ReviewedFeePolicy;
readonly economics: ReviewedOrderEconomics;
/** Program-Clock seconds when the review was formed. */
readonly reviewedAtUnix: number;
/** Execution deadline, program-Clock seconds; `now >= deadline` rejects. */
readonly executionValidUntil: bigint;
}
Field documentation
priceBps— Limit price in the named outcome's own bps.worstPriceBps— Encoded worst price: the IOC bound, or the intent's disable sentinel.minFillQuantity— IOC atomic minimum fill, share atoms;0nfor rest-capable orders.matchLimit— Encodedmatch_limit,0..=12;0selects the protocol default.selfTradeBehavior— Encodedself_trade:0Abort,1CancelProvide,2DecrementTake.maxRestingAgeSeconds— Encodedmax_resting_ageseconds;0rests until the market closes. Always0for IOC.rejectPostOnlyWouldCross— Encodedreject_post_only:1rejects a crossing PostOnly,0slides it.clientOrderIdHex— Encodedclient_order_idas 32 lowercase hex characters; all zero means absent.restingExpiresAt— Encodedresting_expires_at, program-Clock seconds;0means none. Always0for IOC.reviewedAtUnix— Program-Clock seconds when the review was formed.executionValidUntil— Execution deadline, program-Clock seconds;now >= deadlinerejects.
ReviewedOrderScope#
The scope a review is valid for. Any change requires a new review.
Declaration source: packages/core/src/reviewedIntent.ts:96.
export interface ReviewedOrderScope {
/** Signer (base58). */
readonly wallet: string;
/** Cluster identity the client is configured for (e.g. `mainnet-beta`, or a genesis hash). */
readonly cluster: string;
/** Program id (base58). */
readonly programId: string;
/** Market account (base58). */
readonly market: string;
}
Field documentation
wallet— Signer (base58).cluster— Cluster identity the client is configured for (e.g.mainnet-beta, or a genesis hash).programId— Program id (base58).market— Market account (base58).
ReviewedReferralDecision#
The referral decision is part of the consent.
none: no binding is attached and no enrollment is offered.existing: an already-established on-chain binding is attached as thetakerReferralAccount(never a new recipient).enroll: the user explicitly accepted a first-touch, permanent binding toreferrer(SetReferrer bundled before the order).declined: the user explicitly declined the pendingreferrer.
Declaration source: packages/core/src/reviewedIntent.ts:125.
export type ReviewedReferralDecision =
| { readonly kind: 'none' }
| { readonly kind: 'existing'; readonly referrer: string | null; readonly bindingAccount: string }
| { readonly kind: 'position-cache'; readonly referrer: string; readonly expiresAt: bigint }
| { readonly kind: 'enroll'; readonly referrer: string }
| { readonly kind: 'declined'; readonly referrer: string };
ReviewedStrategyOrder#
Prefunded strategy and order group selected for this review.
Declaration source: packages/core/src/reviewedIntent.ts:88.
export interface ReviewedStrategyOrder {
readonly id: number;
readonly group: number;
/** Position owner. Omit when the review's wallet is the owner. */
readonly owner?: string;
}
Field documentation
owner— Position owner. Omit when the review's wallet is the owner.
RevokeBuilderAccounts#
Accounts for RevokeBuilder (0x4B).
Declaration source: packages/core/src/builder.ts:169.
export interface RevokeBuilderAccounts extends BinaryRecorderTailAccounts {
builderApproval: Address;
/** The approving trader; signs and receives the approval's rent. */
trader: Address;
}
Field documentation
trader— The approving trader; signs and receives the approval's rent.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
RISK_MAX_AGE_MS#
Hard max-age for a risk score, measured the same way.
Declaration source: packages/core/src/tokensXyz/display.ts:15.
export declare const RISK_MAX_AGE_MS: number;
RIVER_ORDER_STATUSES#
Not documented.
Declaration source: packages/core/src/riverClient.ts:344.
export declare const RIVER_ORDER_STATUSES: readonly RiverOrderStatus[];
RiverCancelResult#
Not documented.
Declaration source: packages/core/src/riverClient.ts:452.
export interface RiverCancelResult {
/** Only an order the gateway has seen cancelled is listed here. */
cancelled_river_order_ids: string[];
failed_cancelled_reasons: Record<string, string>;
pending_cancel_river_order_ids: string[];
cancellations: Record<string, RiverJsonObject>;
}
Field documentation
cancelled_river_order_ids— Only an order the gateway has seen cancelled is listed here.
RiverComplexOrder#
Not documented.
Declaration source: packages/core/src/riverClient.ts:89.
export interface RiverComplexOrder {
complex_order_id: string;
complex_order_type: RiverOrderKind;
complex_order_subtype: string | null;
subaccount_id: string;
river_id: number;
status: string;
created_at?: string;
updated_at?: string;
conditional_order?: {
parent_river_order_id: string | null;
parent_complex_order_id: string | null;
conditional_order_type: ConditionalOrder['conditional_order_type'];
stop_order_price: number;
trigger_stop_order_price: number | null;
trigger_order_type: ConditionalOrder['trigger_order']['order_type'];
trigger_order_qty: number;
trigger_order_limit_price: number | null;
trigger_order_buy_flag: boolean;
trigger_river_order_id: string | null;
trigger_complex_order_id: string | null;
} | null;
iceberg_order?:
| (FilledOrder & {
displayed_qty: number;
limit_price: number;
post_only: boolean;
cancel_order_on_pause: boolean;
})
| null;
peg_order?:
| (FilledOrder & {
min_price: number | null;
max_price: number | null;
post_only: boolean;
peg_min_stay_time_s: number;
max_qty_level: number | null;
})
| null;
smart_taker_order?: (FilledOrder & { limit_price: number; min_qty: number }) | null;
}
RiverComplexOrderFilter#
Not documented.
Declaration source: packages/core/src/riverClient.ts:131.
export interface RiverComplexOrderFilter {
river_id?: number;
complex_order_type?: RiverOrderKind;
status?: string;
limit?: number;
offset?: number;
}
RiverComplexOrderRequest#
Not documented.
Declaration source: packages/core/src/riverClient.ts:52.
export type RiverComplexOrderRequest = (
| { conditional_order_params: ConditionalOrder }
| {
iceberg_order_params: AdvancedOrder & {
displayed_qty: RiverDecimal;
limit_price: RiverDecimal;
post_only?: boolean | null;
cancel_order_on_pause?: boolean | null;
reload_delay_s?: number | null;
};
}
| {
peg_order_params: AdvancedOrder & {
min_price?: RiverDecimal | null;
max_price?: RiverDecimal | null;
max_qty_level?: RiverDecimal | null;
post_only?: boolean | null;
peg_min_stay_time_s?: number | null;
};
}
| {
smart_taker_order_params: AdvancedOrder & {
limit_price: RiverDecimal;
min_qty: RiverDecimal;
};
}
) & { river_id: number };
RiverConnectionOptions#
The connection of a River client: the gateway origin and a registered River request key.
Declaration source: packages/core/src/riverClient.ts:204.
export interface RiverConnectionOptions {
origin: string;
keyId: string;
subaccountId: string;
/** Return a raw or base64 Ed25519 signature from the registered River request signer. */
sign: (canonicalRequest: Uint8Array) => Uint8Array | string | Promise<Uint8Array | string>;
fetch?: RiverRequestFetch;
/** Defaults to the platform WebSocket. The constructor must reject upgrade redirects. */
webSocket?: new (url: string) => RiverWebSocket;
/** Maximum UTF-16 code units per frame and across queued frames. Defaults to 8 Mi. */
streamFrameLimit?: number;
}
Field documentation
sign— Return a raw or base64 Ed25519 signature from the registered River request signer.webSocket— Defaults to the platform WebSocket. The constructor must reject upgrade redirects.streamFrameLimit— Maximum UTF-16 code units per frame and across queued frames. Defaults to 8 Mi.
RiverFeeScheduleLookup#
Not documented.
Declaration source: packages/core/src/riverClient.ts:505.
export interface RiverFeeScheduleLookup {
schedules: RiverJsonObject[];
missing_river_ids: number[];
}
RiverFillQuery#
Not documented.
Declaration source: packages/core/src/riverClient.ts:488.
export interface RiverFillQuery {
river_id?: number;
/** ISO timestamps; start must not be after end. */
start_time?: string;
end_time?: string;
limit?: number;
offset?: number;
}
Field documentation
start_time— ISO timestamps; start must not be after end.
RiverGatewayClient#
Not documented.
Declaration source: packages/core/src/riverClient.ts:820.
export type RiverGatewayClient = ReturnType<typeof createRiverGatewayClient>;
Field documentation
streamOrderbooks— Subscribe to up to 100 signed market books. Break iteration or abort to close the socket.streamOrders— Listen for private orders. Save the cursor only after processing its message. To resume, start a new stream with that cursor. RESYNC_REQUIRED needs an explicit resync.createOrder— Place a simple order.clientRequestId(a UUID) makes a retry idempotent.cancelOrder— Request a cancel; HTTP 202 means accepted, and only a seen cancel is reported cancelled.retryCancel— Re-arm a failed or expired cancel.resubmitOrder— Resubmit a placement whose signed attempt expired without landing.portfolio— The verified native portfolio; amounts in millionths arrive as decimal strings.feeSchedules— River fee schedules. This gateway has none, so every id is reported missing.nativeFeeSchedules— Native Seesaw fee schedules of the listed markets.quoteNativeFee— Quote the native taker fee of a fill (the only side the gateway quotes).
RiverJsonObject#
A JSON object of the gateway whose fields this client passes through unchanged.
Declaration source: packages/core/src/riverClient.ts:331.
export type RiverJsonObject = Record<string, unknown>;
RiverMarketSearch#
Not documented.
Declaration source: packages/core/src/riverClient.ts:467.
export interface RiverMarketSearch {
q?: string;
status?: 'active' | 'closed' | 'all';
limit?: number;
offset?: number;
}
RiverNativeFeeQuote#
Not documented.
Declaration source: packages/core/src/riverClient.ts:497.
export interface RiverNativeFeeQuote {
river_id: number;
/** Share quantity in millionths, a decimal string of a u64 greater than zero. */
quantity_d6: string | bigint;
/** 1 through 9999. */
price_bps: number;
}
Field documentation
quantity_d6— Share quantity in millionths, a decimal string of a u64 greater than zero.price_bps— 1 through 9999.
RiverOrder#
A simple order as the gateway reports it (services/river-gateway/src/orders.ts response).
Declaration source: packages/core/src/riverClient.ts:423.
export interface RiverOrder {
river_order_id: string;
order_type: RiverOrderType;
time_in_force: RiverTimeInForce;
qty: number;
price: number | null;
buy_flag: boolean;
post_only: boolean;
status: RiverOrderStatus;
river_id: number;
subaccount_id: string;
created_at: string;
updated_at: string;
traded_qty: number | null;
average_price: number | null;
fees_paid: number | null;
reject_reason: string | null;
expiry_ts_utc: string | null;
/** Native execution diagnostics: stage, signatures, cancellation state. */
seesaw_execution: RiverJsonObject;
}
Field documentation
seesaw_execution— Native execution diagnostics: stage, signatures, cancellation state.
RiverOrderbookResponse#
The order book answers HTTP 200 with pending or not_found when it has no fresh book.
Declaration source: packages/core/src/riverClient.ts:475.
export interface RiverOrderbookResponse {
status: 'ok' | 'pending' | 'not_found';
orderbook: RiverJsonObject | null;
message?: string | null;
}
RiverOrderbookStreamMessage#
Not documented.
Declaration source: packages/core/src/riverStreams.ts:15.
export type RiverOrderbookStreamMessage =
| Connected
| BookData
| { type: 'error'; message: string; river_id?: number };
RiverOrderFilter#
Not documented.
Declaration source: packages/core/src/riverClient.ts:445.
export interface RiverOrderFilter {
river_id?: number;
status?: RiverOrderStatus;
limit?: number;
offset?: number;
}
RiverOrderRecoveryResult#
The result of cancel-retry or resubmit; not_eligible arrives with HTTP 409.
Declaration source: packages/core/src/riverClient.ts:461.
export interface RiverOrderRecoveryResult {
result: string;
reason?: string;
order: RiverOrder;
}
RiverOrderRequest#
A simple order (POST /v1/orders). The client adds the configured subaccount_id; the
gateway validates the rest against the market's price and size grid.
Declaration source: packages/core/src/riverClient.ts:358.
export interface RiverOrderRequest {
river_id: number;
order_type: RiverOrderType;
time_in_force: RiverTimeInForce;
qty: RiverDecimal;
/** Required for LIMIT, refused for MARKET. */
price?: RiverDecimal | null;
buy_flag: boolean;
/** LIMIT GTC or GTD only. */
post_only?: boolean;
/** Required for GTD: a UTC ISO timestamp in the future. */
expiry_ts_utc?: string;
}
Field documentation
price— Required for LIMIT, refused for MARKET.post_only— LIMIT GTC or GTD only.expiry_ts_utc— Required for GTD: a UTC ISO timestamp in the future.
RiverOrderStatus#
Not documented.
Declaration source: packages/core/src/riverClient.ts:335.
export type RiverOrderStatus =
| 'PENDING_SUBMISSION'
| 'PROCESSING'
| 'RESTING'
| 'EXECUTED'
| 'PARTIALLY_FILLED'
| 'CANCELLED'
| 'REJECTED';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RiverOrderStreamMessage#
Not documented.
Declaration source: packages/core/src/riverStreams.ts:19.
export type RiverOrderStreamMessage =
| Connected
| { type: 'heartbeat' | 'pong'; ts: number }
| { type: 'snapshot'; cursor: string; orders: JsonObject[] }
| (JsonObject & { type: 'update'; cursor: string; id: string });
RiverOrderType#
Not documented.
Declaration source: packages/core/src/riverClient.ts:333.
export type RiverOrderType = 'LIMIT' | 'MARKET';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RiverPriceQuery#
Not documented.
Declaration source: packages/core/src/riverClient.ts:481.
export interface RiverPriceQuery {
type?: 'candlesticks' | 'history';
interval?: '1d' | '1w' | '1m' | 'max';
/** 1 through 120. */
fidelity?: number;
}
Field documentation
fidelity— 1 through 120.
RiverRequestError#
Not documented.
Declaration source: packages/core/src/riverClient.ts:181.
export declare class RiverRequestError extends Error {
constructor(status: number, detail: unknown);
readonly status: number;
readonly detail: unknown;
}
Parameters
status: number— Not documented.detail: unknown— Not documented.
Throws
Not documented.
</details> <details> <summary>RiverRequestFetch</summary>RiverRequestFetch#
Not documented.
Declaration source: packages/core/src/riverClient.ts:191.
export type RiverRequestFetch = (
url: URL,
init: {
method: 'GET' | 'POST' | 'DELETE';
redirect: 'error';
credentials: 'omit';
headers: Record<string, string>;
signal?: AbortSignal;
body?: string;
}
) => Promise<Pick<Response, 'ok' | 'status' | 'json'>>;
RiverStream#
A River stream. return() and throw() also settle a read that is still waiting.
Declaration source: packages/core/src/riverStreams.ts:261.
export type RiverStream<T> = {
next(): Promise<IteratorResult<T, void>>;
return(value?: void): Promise<IteratorResult<T, void>>;
throw(reason?: unknown): Promise<IteratorResult<T, void>>;
[Symbol.asyncIterator](): RiverStream<T>;
};
RiverStreamError#
Not documented.
Declaration source: packages/core/src/riverStreams.ts:25.
export declare class RiverStreamError extends Error {
constructor(code: string, cursor: string | undefined, earliestCursor: string | undefined, closeCode: number | undefined);
readonly code: string;
readonly cursor?: string | undefined;
readonly earliestCursor?: string | undefined;
/**
* The WebSocket close code, when the gateway or the transport closed the stream.
*/
readonly closeCode?: number | undefined;
}
Parameters
code: string— Not documented.cursor: string | undefined— Not documented.earliestCursor: string | undefined— Not documented.closeCode: number | undefined— The WebSocket close code, when the gateway or the transport closed the stream.
Throws
Not documented.
</details> <details> <summary>RiverTimeInForce</summary>RiverTimeInForce#
Not documented.
Declaration source: packages/core/src/riverClient.ts:334.
export type RiverTimeInForce = 'FOK' | 'GTC' | 'GTD' | 'IOC';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RiverWebSocket#
Not documented.
Declaration source: packages/core/src/riverStreams.ts:3.
export type RiverWebSocket = Pick<
WebSocket,
'addEventListener' | 'removeEventListener' | 'close' | 'send' | 'readyState'
>;
Field documentation
close— Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
addEventListener— Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
removeEventListener— Removes the event listener in target's event listener list with the same type, callback, and options.
send— Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
readyState— Returns the state of the WebSocket object's connection. It can have the values described below.
RollupCurrencyReferralFeesAccounts#
Currency-bound rollup accounts; positions must be in ascending address-byte order.
Declaration source: packages/core/src/instructions.ts:2832.
export interface RollupCurrencyReferralFeesAccounts extends RollupReferralFeesAccounts {
currencyRecord: Address;
}
Field documentation
marketMeta— Required for external markets, including unresolved markets; omit for native Pyth markets. It follows the position list and precedes the recorder tail. Resolved external markets use its authenticated payout vector; unresolved markets retain the worst-side economic reserve.
load_resolved_external_numerators
(program/src/processor/shared/settlement.rs) owns the shape contract:
a native market must NOT send it.
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
RollupReferralFeesAccounts#
Base accounts shared by RollupCurrencyReferralFees.
Declaration source: packages/core/src/instructions.ts:2809.
export interface RollupReferralFeesAccounts extends BinaryRecorderTailAccounts {
market: Address;
vault: Address;
referrerEarningsAccount: Address;
referrerTreasuryShard: Address;
settlementMint: Address;
tokenProgram: Address;
caller: Address;
positions: readonly Address[];
/**
* Required for external markets, including unresolved markets; omit for
* native Pyth markets. It follows the position list and precedes the
* recorder tail. Resolved external markets use its authenticated payout
* vector; unresolved markets retain the worst-side economic reserve.
*
* `load_resolved_external_numerators`
* (`program/src/processor/shared/settlement.rs`) owns the shape contract:
* a native market must NOT send it.
*/
marketMeta?: Address;
}
Field documentation
marketMeta— Required for external markets, including unresolved markets; omit for native Pyth markets. It follows the position list and precedes the recorder tail. Resolved external markets use its authenticated payout vector; unresolved markets retain the worst-side economic reserve.
load_resolved_external_numerators
(program/src/processor/shared/settlement.rs) owns the shape contract:
a native market must NOT send it.
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
RollupReferralFeesParams#
Parameters for RollupCurrencyReferralFees instruction.
Declaration source: packages/core/src/instructions.ts:2878.
export interface RollupReferralFeesParams {
/** D0{position_count} Exact following-position account cardinality. */
positionCount: number;
}
Field documentation
positionCount— D0{position_count} Exact following-position account cardinality.
rotateSplineQuoteAuthority#
Not documented.
Declaration source: packages/core/src/sdk.ts:3542.
export function rotateSplineQuoteAuthority(input: RotateSplineQuoteAuthorityInput, programAddress?: Address): Promise<SdkResult<{ spline: Address; }>>;
Parameters
input: RotateSplineQuoteAuthorityInput— Not documented. See RotateSplineQuoteAuthorityInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ spline: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
RotateSplineQuoteAuthorityInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3537.
export interface RotateSplineQuoteAuthorityInput extends RotateSplineQuoteAuthorityParams {
creator: Address;
spline: Address;
}
RotateSplineQuoteAuthorityParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:4713.
export interface RotateSplineQuoteAuthorityParams {
newQuoteAuthority: Address;
sessionExpirySlot: bigint;
expectedAuthorityEpoch: number;
}
ROUND_LENGTHS#
Round-length buckets, shortest first.
Declaration source: packages/core/src/ux/rounds.ts:17.
export declare const ROUND_LENGTHS: readonly { key: RoundLengthKey; ms: number; }[];
roundAskPrice#
Round an ask price UP to the nearest tick.
Returns 10_000 as an explicit invalid-price sentinel when rounding would land at or above the exclusive P_MAX bound. Callers that submit orders must reject that sentinel, matching the on-chain program.
Declaration source: packages/core/src/price.ts:84.
export function roundAskPrice(priceBps: number, tickSize: number): number;
Parameters
priceBps: number— Not documented.tickSize: number— Not documented.
Returns
number
Not documented.
Throws
{Error} if tickSize is negative.
</details> <details> <summary>roundBidPrice</summary>roundBidPrice#
Round a bid price DOWN to the nearest tick.
Declaration source: packages/core/src/price.ts:65.
export function roundBidPrice(priceBps: number, tickSize: number): number;
Parameters
priceBps: number— Not documented.tickSize: number— Not documented.
Returns
number
Not documented.
Throws
{Error} if tickSize is negative.
</details> <details> <summary>RoundGridCell</summary>RoundGridCell#
One grid cell: the round ending soonest plus every other open round in it.
Declaration source: packages/core/src/ux/rounds.ts:81.
export interface RoundGridCell<T> {
primary: T;
/** The rest of the cell, soonest ending first (the "+N" badge). */
others: T[];
}
Field documentation
others— The rest of the cell, soonest ending first (the "+N" badge).
RoundGridInput#
The fields the grid helpers read from a market.
Declaration source: packages/core/src/ux/rounds.ts:70.
export interface RoundGridInput {
id: string;
/** Asset label, grouped exactly as given (e.g. `SOL`). */
asset: string;
startMs: number;
endMs: number;
/** Settlement mint; a next round is only proposed in the same known mint. */
settlementMint?: string | null;
}
Field documentation
asset— Asset label, grouped exactly as given (e.g.SOL).settlementMint— Settlement mint; a next round is only proposed in the same known mint.
roundLengthKey#
The bucket nearest to durationMs, or null when no bucket is within ±10%
of the duration (or the duration is not a positive finite number).
Declaration source: packages/core/src/ux/rounds.ts:32.
export function roundLengthKey(durationMs: number): RoundLengthKey | null;
Parameters
durationMs: number— Not documented.
Returns
RoundLengthKey | null
Not documented.
Throws
Not documented.
</details> <details> <summary>RoundLengthKey</summary>RoundLengthKey#
The five round lengths the grid shows, shortest first.
Declaration source: packages/core/src/ux/rounds.ts:11.
export type RoundLengthKey = '5m' | '15m' | '1h' | '4h' | '1d';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
roundProgress#
How far a round has run.
fraction is the elapsed share in [0, 1] (0 before the start, 1 at or
after the end), remainingMs the time left (never negative) and ended
whether nowMs has reached endMs.
Declaration source: packages/core/src/ux/rounds.ts:51.
export function roundProgress(startMs: number, endMs: number, nowMs: number): { fraction: number; remainingMs: number; ended: boolean; };
Parameters
startMs: number— Not documented.endMs: number— Not documented.nowMs: number— Not documented.
Returns
{ fraction: number; remainingMs: number; ended: boolean; }
Not documented.
Throws
Not documented.
</details> <details> <summary>ROUTE_DEFAULT_EXECUTION_TTL_SECONDS</summary>ROUTE_DEFAULT_EXECUTION_TTL_SECONDS#
Default deadline budget includes the review and wallet prompt.
Declaration source: packages/core/src/router/buildAtomicMarketRoute.ts:43.
export declare const ROUTE_DEFAULT_EXECUTION_TTL_SECONDS: bigint;
ROUTE_MIN_EXECUTION_TTL_SECONDS#
Minimum time remaining on the IOC deadline when PlaceOrder executes.
Declaration source: packages/core/src/router/buildAtomicMarketRoute.ts:41.
export declare const ROUTE_MIN_EXECUTION_TTL_SECONDS: 60n;
RouteAssertLeg#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:206.
export interface RouteAssertLeg {
readonly kind: 'assertBalances';
readonly bounds: AssertBalancesBounds;
/** The 53-byte body after the release instruction tag. */
readonly payload: Uint8Array;
}
Field documentation
payload— The 53-byte body after the release instruction tag.
RouteBalances#
The owner's balances at the snapshot (for absolute AssertBalances bounds).
Declaration source: packages/core/src/router/routePlan.ts:95.
export interface RouteBalances {
readonly walletYes: bigint;
readonly walletNo: bigint;
readonly walletQuote: bigint;
readonly ledgerYes: bigint;
readonly ledgerNo: bigint;
readonly ledgerFreeQuote: bigint;
}
routeCapHeadroom#
max_total_shares − max(economic YES, economic NO), 0 when the cap is 0 or full.
Declaration source: packages/core/src/router/routePlan.ts:292.
export function routeCapHeadroom(snapshot: Pick<RouterMarketSnapshot, "maxTotalShares" | "economicYesClaims" | "economicNoClaims">): bigint;
Parameters
snapshot: Pick<RouterMarketSnapshot, "maxTotalShares" | "economicYesClaims" | "economicNoClaims">— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>RouteDepositLeg</summary>RouteDepositLeg#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:201.
export interface RouteDepositLeg {
readonly kind: 'depositFunds';
readonly quantity: bigint;
}
RouteFundingMode#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:104.
export type RouteFundingMode = 'wallet' | 'freeFunds';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RouteLeg#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:213.
export type RouteLeg =
| RoutePlaceOrderLeg
| RouteMintLeg
| RouteMergeLeg
| RouteDepositLeg
| RouteAssertLeg;
RouteMergeLeg#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:196.
export interface RouteMergeLeg {
readonly kind: 'mergeCompleteSet';
readonly plan: CompleteSetMergePlan;
}
RouteMintLeg#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:191.
export interface RouteMintLeg {
readonly kind: 'mintShares';
readonly quantity: bigint;
}
RoutePathKind#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:105.
export type RoutePathKind = 'direct' | 'completeSet' | 'split';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RoutePlaceOrderLeg#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:169.
export interface RoutePlaceOrderLeg {
readonly kind: 'placeOrder';
/** `wallet` = `PlaceOrder`; `freeFunds` = `SwapWithFreeFunds`. */
readonly funding: RouteFundingMode;
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly quantity: bigint;
readonly orderType: OrderType.ImmediateOrCancel;
readonly limitPriceBps: number;
readonly worstPriceBps: number;
readonly minFill: bigint;
/** Buy: guarded spend (`u64::MAX` for a sell). */
readonly maxQuoteInput: bigint;
/** Sell: guarded net proceeds (`0` for a buy). */
readonly minQuoteOutput: bigint;
readonly matchLimit: number;
readonly selfTrade: SelfTradeBehavior.CancelProvide | SelfTradeBehavior.Abort;
/** Seats to supply (ascending address bytes). */
readonly seats: readonly Address[];
readonly estimate: TakerFillEstimate;
}
Field documentation
funding—wallet=PlaceOrder;freeFunds=SwapWithFreeFunds.maxQuoteInput— Buy: guarded spend (u64::MAXfor a sell).minQuoteOutput— Sell: guarded net proceeds (0for a buy).seats— Seats to supply (ascending address bytes).
RoutePlan#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:220.
export interface RoutePlan {
readonly kind: RoutePathKind;
readonly completeSetKind: CompleteSetPathKind | null;
readonly fundingMode: RouteFundingMode;
readonly directQuantity: bigint;
readonly completeSetQuantity: bigint;
readonly legs: readonly RouteLeg[];
/** Buy: estimated quote spent. Sell: estimated quote received. */
readonly estimatedNetQuote: bigint;
/** Buy: most the guards let the path spend. Sell: least they let it receive (may be negative). */
readonly worstNetQuote: bigint;
readonly totalFee: bigint;
/** Peak pairs minted before any merge. */
readonly pairsMinted: bigint;
readonly capHeadroom: bigint;
/** `null` without a cost model. */
readonly accounts: number | null;
readonly computeUnits: number | null;
readonly rentLamports: bigint;
readonly assertBalances: AssertBalancesBounds;
}
Field documentation
estimatedNetQuote— Buy: estimated quote spent. Sell: estimated quote received.worstNetQuote— Buy: most the guards let the path spend. Sell: least they let it receive (may be negative).pairsMinted— Peak pairs minted before any merge.accounts—nullwithout a cost model.
RouteQuote#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:257.
export interface RouteQuote {
/** The cheapest admissible plan, or `null`. */
readonly best: RoutePlan | null;
/** Every admissible plan, best first. */
readonly candidates: readonly RoutePlan[];
readonly rejected: readonly RouteRejection[];
}
Field documentation
best— The cheapest admissible plan, ornull.candidates— Every admissible plan, best first.
ROUTER_MAX_MATCH_LIMIT#
MAX_MATCH_LIMIT in program/src/constants.rs; match_limit = 0 selects it.
Declaration source: packages/core/src/router/takerFill.ts:73.
export declare const ROUTER_MAX_MATCH_LIMIT: 12;
routerBookFromLevels#
Book input from aggregated lane levels, one order per level. Exact for a
buy; for a sell, calculate_collateral_release rounds per resting order, so
a level holding several orders can differ by up to orders − 1 atoms. Prefer
order-granular input when the decoded book is at hand.
Declaration source: packages/core/src/router/takerFill.ts:504.
export function routerBookFromLevels(levels: readonly { readonly price: number; readonly quantity: bigint; }[]): RouterBookOrder[];
Parameters
levels: readonly { readonly price: number; readonly quantity: bigint; }[]— Not documented.
Returns
RouterBookOrder[]
Not documented.
Throws
Not documented.
</details> <details> <summary>RouterBookOrder</summary>RouterBookOrder#
One resting book order on the taker's opposing side of its own lane, in
matching order (best price first, FIFO within a price). Prices are the
lane's own prices (spec/ORDERBOOK.md §2.3a).
Declaration source: packages/core/src/router/takerFill.ts:80.
export interface RouterBookOrder {
readonly priceBps: number;
/** Current resting quantity in share atoms. */
readonly quantity: bigint;
/** Order owner; the taker's own order is self-trade-cancelled, not filled. */
readonly owner?: Address;
/** Expired / claimable: reclaimed inline, costs one iteration, never fills. */
readonly reclaimable?: boolean;
}
Field documentation
quantity— Current resting quantity in share atoms.owner— Order owner; the taker's own order is self-trade-cancelled, not filled.reclaimable— Expired / claimable: reclaimed inline, costs one iteration, never fills.
routerBooksFromOrderbook#
Split the canonical book without changing FIFO priority or merging separate fills.
Declaration source: packages/core/src/router/marketRoute.ts:95.
export function routerBooksFromOrderbook(orderbook: OrderbookAccount, landingUnix: bigint, landingSlot?: bigint): RouterMarketSnapshot["books"];
Parameters
orderbook: OrderbookAccount— Not documented. See OrderbookAccount for its declaration and available field documentation.landingUnix: bigint— Not documented.landingSlot: bigint | undefined— Not documented.
Returns
{ readonly yes: import("packages/core/src/index").RouterLaneBook; readonly no: import("packages/core/src/index").RouterLaneBook; }
Not documented.
Throws
Not documented.
</details> <details> <summary>RouterBudget</summary>RouterBudget#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:133.
export interface RouterBudget {
readonly maxAccounts?: number;
readonly maxComputeUnits?: number;
}
RouterCostModel#
Accounts and compute units per leg, from measurement (program/cu-benches).
Accounts are the unique accounts a leg adds to the transaction beyond those
already present; seats are counted once per transaction.
Declaration source: packages/core/src/router/routePlan.ts:115.
export interface RouterCostModel {
readonly placeOrderAccounts: number;
readonly placeOrderComputeUnits: number;
readonly seatAccounts: number;
/** Per supplied seat per `PlaceOrder` leg, filled or not. */
readonly seatComputeUnits: number;
/** Per estimated fill. */
readonly fillComputeUnits: number;
readonly mintSharesAccounts: number;
readonly mintSharesComputeUnits: number;
readonly mergeAccounts: number;
readonly mergeComputeUnits: number;
/** Compute for returning a prefunded merge's wallet payout to its ledger. */
readonly depositFundsComputeUnits?: number;
readonly assertBalancesAccounts: number;
readonly assertBalancesComputeUnits: number;
}
Field documentation
seatComputeUnits— Per supplied seat perPlaceOrderleg, filled or not.fillComputeUnits— Per estimated fill.depositFundsComputeUnits— Compute for returning a prefunded merge's wallet payout to its ledger.
RouteRejection#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:250.
export interface RouteRejection {
readonly kind: RoutePathKind;
readonly directQuantity: bigint;
readonly completeSetQuantity: bigint;
readonly reason: RouteRejectReason;
}
RouteRejectReason#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:242.
export type RouteRejectReason =
| 'notFilled'
| 'capExceeded'
| 'insufficientBalance'
| 'accountBudget'
| 'computeBudget'
| 'strategyFeeLimit';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RouteRequest#
Not documented.
Declaration source: packages/core/src/router/routePlan.ts:138.
export interface RouteRequest {
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly quantity: bigint;
readonly fundingMode: RouteFundingMode;
/** Acting as a phase 5 strategy delegate (free funds only). */
readonly delegate?: boolean;
/** A verified strategy scope. A merge requires its separate action permission. */
readonly strategyScope?: { readonly mergeAllowed: boolean };
readonly taker: Address;
readonly balances: RouteBalances;
/** Required for free-funds paths (the `AssertBalances` ledger seat hint). */
readonly ledgerSeatIndex?: number;
/** Worst-price tolerance per leg, in bps of price. Default 0. */
readonly priceToleranceBps?: number;
/** Quote-bound tolerance per leg, in bps of the leg's net quote. Default 0. */
readonly quoteToleranceBps?: number;
/** Per-leg `match_limit`, `1..=12`. Default 12. */
readonly matchLimit?: number;
/** Split grid: candidates `d = q · i / splitSteps`. Default 4; `1` disables splits. */
readonly splitSteps?: number;
readonly route?: RouteSelection;
readonly costModel?: RouterCostModel;
readonly budget?: RouterBudget;
/** Phase 5 strategy `max_fee_bps`, when the path runs under a strategy. */
readonly strategyMaxFeeBps?: number;
/** Wallet token accounts that do not exist yet (rent the path would pay). */
readonly missingWalletTokenAccounts?: { readonly yes?: boolean; readonly no?: boolean };
readonly tokenAccountRentLamports?: bigint;
}
Field documentation
delegate— Acting as a phase 5 strategy delegate (free funds only).strategyScope— A verified strategy scope. A merge requires its separate action permission.ledgerSeatIndex— Required for free-funds paths (theAssertBalancesledger seat hint).priceToleranceBps— Worst-price tolerance per leg, in bps of price. Default 0.quoteToleranceBps— Quote-bound tolerance per leg, in bps of the leg's net quote. Default 0.matchLimit— Per-legmatch_limit,1..=12. Default 12.splitSteps— Split grid: candidatesd = q · i / splitSteps. Default 4;1disables splits.strategyMaxFeeBps— Phase 5 strategymax_fee_bps, when the path runs under a strategy.missingWalletTokenAccounts— Wallet token accounts that do not exist yet (rent the path would pay).
RouterLaneBook#
One lane's two book sides, each in matching order.
Declaration source: packages/core/src/router/routePlan.ts:70.
export interface RouterLaneBook {
/** Resting buyers, best (highest) first. */
readonly bids: readonly RouterBookOrder[];
/** Resting sellers, best (lowest) first. */
readonly asks: readonly RouterBookOrder[];
}
Field documentation
bids— Resting buyers, best (highest) first.asks— Resting sellers, best (lowest) first.
RouterMarketSnapshot#
One market's state, from one snapshot.
Declaration source: packages/core/src/router/routePlan.ts:78.
export interface RouterMarketSnapshot {
/** Market PDA; with `eventSequence`, feeds the §5 tie-break key. */
readonly market?: Address;
readonly eventSequence?: bigint;
readonly books: { readonly yes: RouterLaneBook; readonly no: RouterLaneBook };
/** The seats the selector chose to supply (design §12). */
readonly seats: readonly SeatQuoteState[];
/** `ConfigAccount.taker_fee_coefficient_bps`. */
readonly takerFeeCoefficientBps: number;
/** Governed order tick. Offline snapshots default to one basis point. */
readonly tickSizeBps?: number;
readonly maxTotalShares: bigint;
readonly economicYesClaims: bigint;
readonly economicNoClaims: bigint;
}
Field documentation
market— Market PDA; witheventSequence, feeds the §5 tie-break key.seats— The seats the selector chose to supply (design §12).takerFeeCoefficientBps—ConfigAccount.taker_fee_coefficient_bps.tickSizeBps— Governed order tick. Offline snapshots default to one basis point.
RouteSelection#
CLI --route auto|direct|complete-set.
Declaration source: packages/core/src/router/routePlan.ts:108.
export type RouteSelection = 'auto' | 'direct' | 'completeSet';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
routeSplitGrid#
Split grid: distinct direct quantities q · i / steps, i = steps … 0.
Declaration source: packages/core/src/router/routePlan.ts:304.
export function routeSplitGrid(quantity: bigint, steps: number): bigint[];
Parameters
quantity: bigint— Not documented.steps: number— Not documented.
Returns
bigint[]
Not documented.
Throws
Not documented.
</details> <details> <summary>RpcAccountInfo</summary>RpcAccountInfo#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:52.
export interface RpcAccountInfo {
readonly data: Uint8Array;
readonly owner: Address;
readonly lamports?: bigint;
}
RpcAccountInfoResponse#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:58.
export interface RpcAccountInfoResponse {
readonly value: RpcAccountInfo | null;
readonly context?: RpcResponseContext;
}
RpcAddressedValue#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:113.
export interface RpcAddressedValue<T> {
readonly address: Address;
readonly value: T;
}
RpcDataSource#
Minimal account RPC dependency. Adapters must return decoded bytes, not
base64/base58 transport tuples, and must honor getProgramAccounts.limit.
Declaration source: packages/core/src/rpcDataSource.ts:97.
export interface RpcDataSource {
getAccountInfo(address: Address, config?: RpcReadConfig): Promise<RpcAccountInfoResponse>;
getProgramAccounts(
programAddress: Address,
config: RpcProgramAccountsConfig
): Promise<RpcProgramAccountsResponse>;
getMultipleAccountsInfo?(
addresses: readonly Address[],
config?: RpcReadConfig
): Promise<RpcMultipleAccountsResponse>;
}
RpcDataSourceError#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:136.
export declare class RpcDataSourceError extends Error {
constructor(operation: RpcDataSourceOperation, address: Address, cause: unknown);
readonly name: "RpcDataSourceError";
readonly cause: unknown;
readonly operation: RpcDataSourceOperation;
readonly address: Address;
}
Parameters
operation: RpcDataSourceOperation— Not documented. See RpcDataSourceOperation for its declaration and available field documentation.address: Address— Not documented.cause: unknown— Not documented.
Throws
Not documented.
</details> <details> <summary>RpcDataSourceOperation</summary>RpcDataSourceOperation#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:124.
export type RpcDataSourceOperation =
| 'readMarket'
| 'readOrderbook'
| 'readPosition'
| 'readMakerSeries'
| 'readMakerQuoteState'
| 'readMakerQuotePublication'
| 'readSplineSeat'
| 'scanSplineSeatsByMarket'
| 'scanPositionsByOwner'
| 'scanOrdersByOwner';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
RpcEndpointHealth#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:55.
export interface RpcEndpointHealth {
readonly url: string;
readonly successes: number;
readonly failures: number;
readonly lastLatencyMs: number | null;
readonly cooldownUntilMs: number | null;
readonly lastUpdatedMs: number | null;
}
RpcMarketRouteQuote#
Not documented.
Declaration source: packages/core/src/router/marketRoute.ts:499.
export interface RpcMarketRouteQuote extends MarketRouteQuote {
readonly programAddress: Address;
readonly taker: Address;
/** Pass to every order leg as the expected fee epoch when composing a transaction. */
readonly feeEpoch: number;
readonly tickSizeBps: number;
readonly wallet: MarketRouteWallet;
readonly ledger: MarketRouteLedger | null;
readonly execution: {
readonly treasury: ProtocolTreasuryDestination;
readonly referral: Address | null;
readonly landingUnix: bigint;
readonly strategyBound: boolean;
readonly strategy?: MarketRouteStrategy;
readonly tickBoundSeats: readonly Address[];
};
}
Field documentation
feeEpoch— Pass to every order leg as the expected fee epoch when composing a transaction.best— The cheapest admissible plan, ornull.candidates— Every admissible plan, best first.
RpcMultipleAccountsResponse#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:88.
export interface RpcMultipleAccountsResponse {
readonly value: readonly (RpcAccountInfo | null)[];
readonly context?: RpcResponseContext;
}
RpcOwnerOrder#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:118.
export interface RpcOwnerOrder {
readonly marketAddress: Address;
readonly orderbookAddress: Address;
readonly value: Order;
}
RpcProgramAccount#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:63.
export interface RpcProgramAccount {
readonly address: Address;
readonly account: RpcAccountInfo;
}
RpcProgramAccountFilter#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:68.
export type RpcProgramAccountFilter =
| { readonly dataSize: number }
| {
readonly memcmp: {
readonly offset: number;
readonly bytes: Address | Uint8Array;
};
};
RpcProgramAccountsConfig#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:77.
export interface RpcProgramAccountsConfig extends RpcReadConfig {
/** Required client-side bound that the adapter must also enforce. */
readonly limit: number;
readonly filters: readonly RpcProgramAccountFilter[];
}
Field documentation
limit— Required client-side bound that the adapter must also enforce.
RpcProgramAccountsResponse#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:83.
export interface RpcProgramAccountsResponse {
readonly value: readonly RpcProgramAccount[];
readonly context?: RpcResponseContext;
}
RpcReadConfig#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:43.
export interface RpcReadConfig {
readonly commitment?: string;
}
RpcReadResult#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:109.
export type RpcReadResult<T> = {
readonly value: T;
} & ReadSourceMetadata<'rpc'>;
RpcResponseContext#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:47.
export interface RpcResponseContext {
readonly slot?: bigint;
readonly commitment?: string;
}
RpcScanConfig#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:151.
export interface RpcScanConfig extends RpcReadConfig {
readonly limit: number;
}
runOwnerCancellation#
Submit bounded owner cancellation pages. For restart recovery, read the seat with readCancelSession and pass its active nonce in a continue operation. The submitter supplies a confirmed receipt and owns signing and retry policy.
Declaration source: packages/core/src/resumableCancellation.ts:77.
export function runOwnerCancellation<Receipt extends { readonly returnData?: CancellationReturnData; }>(input: { readonly market: Address; readonly owner: Address; readonly operation: OwnerCancellation; readonly oneStep?: boolean; }, submit: (instruction: Instruction) => Promise<Receipt>, program?: Address): Promise<{ progress: { owner: Address<string>; strategyId: number; nonce: number; operation: number; filter: number; lane: number; groupId: number; tickLimit: number; cutoffSequence: bigint; examined: number; cancelled: number; nextOrderId: bigint; complete: boolean; }; receipt: Receipt; cancelledOrderCount: number; transactionCount: number; }>;
Parameters
input: { readonly market: Address; readonly owner: Address; readonly operation: OwnerCancellation; readonly oneStep?: boolean; }— Not documented.submit: (instruction: Instruction) => Promise<Receipt>— Not documented.program: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<{ progress: { owner: Address<string>; strategyId: number; nonce: number; operation: number; filter: number; lane: number; groupId: number; tickLimit: number; cutoffSequence: bigint; examined: number; cancelled: number; nextOrderId: bigint; complete: boolean; }; receipt: Receipt; cancelledOrderCount: number; transactionCount: number; }>
Not documented.
Throws
Not documented.
Defaults
program:PROGRAM_ADDRESS.
safeBigIntToNumber#
Safely converts a BigInt to a Number with overflow protection.
Declaration source: packages/core/src/utils/bigint.ts:51.
export function safeBigIntToNumber(value: bigint, fallback?: number): number;
Parameters
value: bigint— - The BigInt value to convertfallback: number | undefined— - Optional fallback value if overflow occurs (if not provided, throws an error)
Returns
number
The converted Number value
Throws
{BigIntOverflowError} If the value overflows and no fallback is provided
</details> <details> <summary>scanOrdersByOwner</summary>scanOrdersByOwner#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:741.
export function scanOrdersByOwner(rpc: RpcDataSource, owner: Address, programAddress: Address, config: RpcScanConfig): Promise<RpcReadResult<readonly RpcOwnerOrder[]>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.owner: Address— Not documented.programAddress: Address— Not documented.config: RpcScanConfig— Not documented. See RpcScanConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<readonly RpcOwnerOrder[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>scanPositionsByOwner</summary>scanPositionsByOwner#
Not documented.
Declaration source: packages/core/src/rpcDataSource.ts:614.
export function scanPositionsByOwner(rpc: RpcDataSource, owner: Address, programAddress: Address, config: RpcScanConfig): Promise<RpcReadResult<readonly RpcAddressedValue<UserPositionAccount>[]>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.owner: Address— Not documented.programAddress: Address— Not documented.config: RpcScanConfig— Not documented. See RpcScanConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<readonly RpcAddressedValue<UserPositionAccount>[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>scanSplineSeatsByMarket</summary>scanSplineSeatsByMarket#
Read a bounded market-wide seat set from one RPC response, including dormant and settled seats.
Declaration source: packages/core/src/rpcDataSource.ts:527.
export function scanSplineSeatsByMarket(rpc: RpcDataSource, market: Address, programAddress: Address, config: RpcScanConfig): Promise<RpcReadResult<readonly RpcAddressedValue<SplineSeatAccount>[]>>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.market: Address— Not documented.programAddress: Address— Not documented.config: RpcScanConfig— Not documented. See RpcScanConfig for its declaration and available field documentation.
Returns
Promise<RpcReadResult<readonly RpcAddressedValue<{ roundingIdentity: Uint8Array<ArrayBuffer>; roundingBidLots: bigint; roundingAskLots: bigint; roundingBidQuote: bigint; roundingAskQuote: bigint; roundingBidFee: bigint; roundingAskFee: bigint; bidRoundingLane: number; askRoundingLane: number; tickSigner: Address; tickValidSlot: bigint; tickFirstTimestampNs: bigint; tickFromSequence: bigint; tickUntilSequence: bigint; bidLevels: import("packages/core/src/instructions").CurveLevel[]; askLevels: import("packages/core/src/instructions").CurveLevel[]; version: 1; bump: number; maker: Address; quoteAuthority: Address; market: Address; series: Address; sequence: bigint; midPriceBps: number; quoteProfile: number; publishedByDelegate: boolean; active: boolean; attachmentStatus: number; dormant: boolean; maxQuoteAgeSeconds: number; lastUpdateUnix: bigint; eligibilityAnchor: bigint; anchorMidBps: number; midJumpResetBps: number; maxBidOffsetBps: number; maxAskOffsetBps: number; attachedAt: bigint; committedCollateral: bigint; yesInventory: bigint; noInventory: bigint; consumedBidLots: bigint; consumedAskLots: bigint; eventSequence: bigint; generation: number; authorityEpoch: number; tradingGeneration: number; floorMissCount: number; floorWindowIndex: bigint; floorLastSampleUnix: bigint; validUntilSlot: bigint; installSlot: bigint; sessionExpirySlot: bigint; settleBountyLamports: bigint; }>[]>>
Not documented.
Throws
Not documented.
</details> <details> <summary>ScenarioExposureOptions</summary>ScenarioExposureOptions#
Not documented.
Declaration source: packages/core/src/analytics/scenario.ts:28.
export interface ScenarioExposureOptions {
/** Settlement mint decimals of this currency group. Required: never assumed. */
settlementDecimals: number;
/** Enumerate every assignment while `2^markets <= maxScenarios`. Default 64. */
maxScenarios?: number;
}
Field documentation
settlementDecimals— Settlement mint decimals of this currency group. Required: never assumed.maxScenarios— Enumerate every assignment while2^markets <= maxScenarios. Default 64.
ScenarioExposureView#
Not documented.
Declaration source: packages/core/src/analytics/scenario.ts:58.
export interface ScenarioExposureView {
settlementDecimals: number;
markets: ScenarioMarketExposure[];
/** `2^markets.length` (a bigint: it is not capped). */
totalScenarioCount: bigint;
maxScenarios: number;
/** `true` when every assignment is listed in `scenarios`. */
enumerated: boolean;
/** Every assignment, worst P&L first; empty when not enumerated or no markets. */
scenarios: PortfolioScenario[];
/** Best and worst assignment; always present when at least one market is held. */
best: PortfolioScenario | null;
worst: PortfolioScenario | null;
}
Field documentation
totalScenarioCount—2^markets.length(a bigint: it is not capped).enumerated—truewhen every assignment is listed inscenarios.scenarios— Every assignment, worst P&L first; empty when not enumerated or no markets.best— Best and worst assignment; always present when at least one market is held.
ScenarioMarketExposure#
Not documented.
Declaration source: packages/core/src/analytics/scenario.ts:35.
export interface ScenarioMarketExposure {
marketAddress: string;
assetLabel: string;
/** Current mark value of the held shares, in settlement atoms. */
currentValueAtoms: bigint;
payoutIfYesAtoms: bigint;
payoutIfNoAtoms: bigint;
/** `payoutIfYes - currentValue`: the change from the mark if YES. */
pnlIfYesAtoms: bigint;
pnlIfNoAtoms: bigint;
/** The outcome with the larger P&L (YES on a tie) and its P&L. */
bestOutcome: ScenarioOutcome;
bestPnlAtoms: bigint;
worstOutcome: ScenarioOutcome;
worstPnlAtoms: bigint;
}
Field documentation
currentValueAtoms— Current mark value of the held shares, in settlement atoms.pnlIfYesAtoms—payoutIfYes - currentValue: the change from the mark if YES.bestOutcome— The outcome with the larger P&L (YES on a tie) and its P&L.
ScenarioOutcome#
Not documented.
Declaration source: packages/core/src/analytics/scenario.ts:21.
export type ScenarioOutcome = 'yes' | 'no';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
scoreMarketMatch#
How well a market matches a query; 0 = no match. Higher is better.
Every token must match the asset or the title, and a typed round length must equal the market's. Per token: asset exact 100, asset prefix 60, a title word exact 40, title word prefix 25, title substring 10; a matching length adds 20. An empty query (no tokens, no length) scores 0 — callers show their default list instead.
Declaration source: packages/core/src/ux/search.ts:113.
export function scoreMarketMatch(query: string, market: { asset: string; title: string; lengthKey: RoundLengthKey | null; }): number;
Parameters
query: string— Not documented.market: { asset: string; title: string; lengthKey: RoundLengthKey | null; }— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>ScreenedSettlementMint</summary>ScreenedSettlementMint#
Not documented.
Declaration source: packages/core/src/currency/admission.ts:68.
export interface ScreenedSettlementMint {
standard: SettlementTokenStandard;
tokenProgram: string;
decimals: number;
hasFreezeAuthority: boolean;
/** Admitted extension types present on the mint, ascending. */
extensions: number[];
}
Field documentation
extensions— Admitted extension types present on the mint, ascending.
screenSettlementMint#
Screen a mint account (owner and data) against the program's settlement-mint rules.
Declaration source: packages/core/src/currency/admission.ts:134.
export function screenSettlementMint(owner: string | null | undefined, data: Uint8Array): ScreenedSettlementMint;
Parameters
owner: string | null | undefined— Not documented.data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
ScreenedSettlementMint
Not documented.
Throws
Not documented.
</details> <details> <summary>SDK_PACKAGE_VERSION</summary>SDK_PACKAGE_VERSION#
Published SDK package version. Must match packages/core/package.json.
Declaration source: packages/core/src/constants.ts:56.
export declare const SDK_PACKAGE_VERSION: "0.1.0-rc.1";
SdkResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:290.
export interface SdkResult<T> {
instruction: Instruction;
accounts: T;
}
SEAT_CONFIG_ACCOUNT_SIZE#
D0{byte} ConfigAccount size with the governed 40-byte spline seat tail.
Declaration source: packages/core/src/constants.ts:267.
export declare const SEAT_CONFIG_ACCOUNT_SIZE: 616;
SEAT_UNKNOWN_EPOCH_FEE_SLACK_ATOMS#
Per seat fill on a side whose epoch is unknown: the fill's fee may differ by up to two atoms (one from the quote difference, one from the fee ceiling).
Declaration source: packages/core/src/router/seatQuote.ts:99.
export declare const SEAT_UNKNOWN_EPOCH_FEE_SLACK_ATOMS: 2n;
SEAT_UNKNOWN_EPOCH_QUOTE_SLACK_ATOMS#
Per seat fill on a side whose epoch is unknown: the fill's quote may differ from the fresh-epoch estimate by one atom (cumulative rounding on one level).
Declaration source: packages/core/src/router/seatQuote.ts:94.
export declare const SEAT_UNKNOWN_EPOCH_QUOTE_SLACK_ATOMS: 1n;
SeatAttachment#
Not documented.
Declaration source: packages/core/src/seatInstructions.ts:305.
export interface SeatAttachment {
readonly payer: Address;
readonly market: Address;
readonly series: MakerSeriesIdentity;
readonly settlementMint: Address;
readonly settlementTokenProgram: Address;
/** Omit to attach permissionlessly using the series subscription. */
readonly manualCommitment?: bigint;
}
Field documentation
manualCommitment— Omit to attach permissionlessly using the series subscription.
seatAvailableLots#
Remaining lots on a seat side: the last level's end minus the consumed counter.
Declaration source: packages/core/src/router/seatQuote.ts:127.
export function seatAvailableLots(seat: SeatQuoteState, side: SeatSide): bigint;
Parameters
seat: SeatQuoteState— Not documented. See SeatQuoteState for its declaration and available field documentation.side: SeatSide— Not documented. See SeatSide for its declaration and available field documentation.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>SeatCandidate</summary>SeatCandidate#
A spline seat the taker could supply. Plain data, read from RPC or the indexer.
executable is the caller's evaluation of the PlaceOrder loader rule at the current slot
(active flag, is_quote_live for the profile and slot window, trading generation equal to the
market's). Quote age is checked here, against the landing time.
Declaration source: packages/core/src/makerSelectorEstimator.ts:58.
export interface SeatCandidate {
/** Seat PDA address (base58). Ordering uses code-unit comparison of this text. */
readonly seat: string;
readonly maker: string;
readonly attachmentStatus: MakerSelectorAttachmentStatus;
readonly dormant: boolean;
readonly executable: boolean;
/** Seat midpoint in YES bps. */
readonly midPriceBps: number;
readonly bidLevels: readonly MakerSelectorCurveLevel[];
readonly askLevels: readonly MakerSelectorCurveLevel[];
readonly consumedBidLots: bigint;
readonly consumedAskLots: bigint;
/** Remaining capacity of the bid side in share atoms (commitment-funded), beyond the curve. */
readonly availableBidLots: bigint;
/** Remaining capacity of the ask side in share atoms (commitment-funded), beyond the curve. */
readonly availableAskLots: bigint;
/** Unix seconds of the last midpoint publication. */
readonly lastUpdateUnix: bigint;
/** `0` means staleness off; the program rejects `0` for spline seats (§3.1). */
readonly maxQuoteAgeSeconds: number;
}
Field documentation
seat— Seat PDA address (base58). Ordering uses code-unit comparison of this text.midPriceBps— Seat midpoint in YES bps.availableBidLots— Remaining capacity of the bid side in share atoms (commitment-funded), beyond the curve.availableAskLots— Remaining capacity of the ask side in share atoms (commitment-funded), beyond the curve.lastUpdateUnix— Unix seconds of the last midpoint publication.maxQuoteAgeSeconds—0means staleness off; the program rejects0for spline seats (§3.1).
seatCumulativeAmounts#
Cumulative taker quote and fee of the first epochLots lots of an epoch that
began at absolute curve position epochStartLots (mirrors
cumulative_spline_quote / cumulative_spline_fee, with the §6.5 fee).
Each overlapped level rounds its own notional once; the fee is charged on
that rounded notional at the level's lane price.
Declaration source: packages/core/src/router/seatQuote.ts:196.
export function seatCumulativeAmounts(levels: readonly SeatCurveLevel[], midPriceBps: number, side: SeatSide, lane: QuoteLane, rounding: NotionalRounding, epochStartLots: bigint, epochLots: bigint, coefficientBps: number, tickSizeBps?: number): SeatCumulativeAmounts;
Parameters
levels: readonly SeatCurveLevel[]— Not documented.midPriceBps: number— Not documented.side: SeatSide— Not documented. See SeatSide for its declaration and available field documentation.lane: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.rounding: NotionalRounding— Not documented. See NotionalRounding for its declaration and available field documentation.epochStartLots: bigint— Not documented.epochLots: bigint— Not documented.coefficientBps: number— Not documented.tickSizeBps: number— Not documented. Default:1.
Returns
SeatCumulativeAmounts
Not documented.
Throws
Not documented.
Defaults
tickSizeBps:1.
SeatCumulativeAmounts#
Cumulative quote and fee of an epoch prefix.
Declaration source: packages/core/src/router/seatQuote.ts:184.
export interface SeatCumulativeAmounts {
readonly quote: bigint;
readonly fee: bigint;
}
SeatCurveLevel#
One compiled curve level (CurveLevel): offset from the mid, cumulative end in lots.
Declaration source: packages/core/src/router/seatQuote.ts:42.
export interface SeatCurveLevel {
/** Offset from the seat mid in bps; bid prices are `mid − offset`, ask prices `mid + offset`. */
readonly priceOffsetBps: number;
/** Cumulative end of the level in share atoms (lots), strictly increasing. */
readonly endQuantityLots: bigint;
}
Field documentation
priceOffsetBps— Offset from the seat mid in bps; bid prices aremid − offset, ask pricesmid + offset.endQuantityLots— Cumulative end of the level in share atoms (lots), strictly increasing.
seatLanePriceBps#
A YES price presented in lane: itself for YES, 10000 − p for NO.
Declaration source: packages/core/src/router/seatQuote.ts:108.
export function seatLanePriceBps(yesPriceBps: number, lane: QuoteLane): number;
Parameters
yesPriceBps: number— Not documented.lane: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>SeatLevelQuote</summary>SeatLevelQuote#
The current level of a seat side, presented in a lane.
Declaration source: packages/core/src/router/seatQuote.ts:135.
export interface SeatLevelQuote {
/** Price in the taker's lane. */
readonly lanePriceBps: number;
/** Lots left in the current level. */
readonly availableLots: bigint;
readonly levelIndex: number;
}
Field documentation
lanePriceBps— Price in the taker's lane.availableLots— Lots left in the current level.
SeatOperationalParams#
Governed liquidity floor, seat capacity, and attachment crank settings.
Declaration source: packages/core/src/types.ts:190.
export interface SeatOperationalParams {
readonly seatMinBandDepth: bigint;
readonly seatSettleBountyLamports: bigint;
readonly seatFloorSampleSeconds: number;
readonly seatFloorWindowSeconds: number;
readonly seatAttachMaxAgeCeilingSeconds: number;
readonly seatBandBps: number;
readonly seatFloorMaxMisses: number;
readonly maxActiveSeatsPerMarket: number;
readonly seatCrankMinSpacingBps: number;
}
SeatQuoteState#
The quote state of one spline seat (design §2.3), as the router needs it.
executable is the PlaceOrder loader's decision for this seat at the
snapshot (attached, not dormant, active, not stale, is_quote_live in the
current slot, trading generation equal to the market's). A non-executable
seat is treated as absent, as the program skips it.
rounding is optional because its correctness depends on the seat's
rounding identity, which binds config values the decoder may not have. When a
side is absent the estimator assumes a fresh epoch and widens its slack
(see {@link SEAT_UNKNOWN_EPOCH_QUOTE_SLACK_ATOMS}).
Declaration source: packages/core/src/router/seatQuote.ts:71.
export interface SeatQuoteState {
/** Seat PDA `["seesaw", "spline_seat", market, maker]`. */
readonly address: Address;
/** Seat maker; a seat whose maker is the taker is skipped (self-trade). */
readonly maker: Address;
/** YES mid price in bps. */
readonly midPriceBps: number;
readonly bidLevels: readonly SeatCurveLevel[];
readonly askLevels: readonly SeatCurveLevel[];
/** Lifetime consumed lots per side (capacity fence). */
readonly consumedBidLots: bigint;
readonly consumedAskLots: bigint;
readonly executable: boolean;
readonly rounding?: {
readonly bid?: SeatSideRounding;
readonly ask?: SeatSideRounding;
};
}
Field documentation
address— Seat PDA["seesaw", "spline_seat", market, maker].maker— Seat maker; a seat whose maker is the taker is skipped (self-trade).midPriceBps— YES mid price in bps.consumedBidLots— Lifetime consumed lots per side (capacity fence).
SeatSide#
A seat curve side, in YES price space.
Declaration source: packages/core/src/router/seatQuote.ts:39.
export type SeatSide = 'bid' | 'ask';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
seatSideForTaker#
The seat side a taker consumes (design §6.1).
Declaration source: packages/core/src/router/seatQuote.ts:102.
export function seatSideForTaker(outcome: QuoteLane, intent: TradeIntent): SeatSide;
Parameters
outcome: OutcomeAsset— Not documented. See OutcomeAsset for its declaration and available field documentation.intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.
Returns
SeatSide
Not documented.
Throws
Not documented.
</details> <details> <summary>SeatSideRounding</summary>SeatSideRounding#
One side's rounding epoch (design §6.4): the lots consumed inside the current
epoch and the lane that owns it. epochLots = 0 is a fresh epoch.
Declaration source: packages/core/src/router/seatQuote.ts:53.
export interface SeatSideRounding {
readonly epochLots: bigint;
readonly lane: QuoteLane;
}
SeatTieBreakInput#
The program's tie-break input (see seatTieKey).
Declaration source: packages/core/src/router/takerFill.ts:91.
export interface SeatTieBreakInput {
readonly market: Address;
readonly eventSequence: bigint;
}
seatTieKey#
Design §5 tie-break key
sha256("seesaw:seat-tie:v1" ‖ market ‖ event_sequence ‖ seat).
The program encodes the starting event sequence as a little-endian u64.
Another instruction can advance it before execution, so the estimator
includes {@link ProRataAllocation.ambiguousLots} slack.
Declaration source: packages/core/src/router/seatQuote.ts:319.
export function seatTieKey(market: Address, eventSequence: bigint, seat: Address): Uint8Array;
Parameters
market: Address— Not documented.eventSequence: bigint— Not documented.seat: Address— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>SEED_ASSET</summary>SEED_ASSET#
PDA seed: "asset".
Declaration source: packages/core/src/constants.ts:155.
export declare const SEED_ASSET: Uint8Array<ArrayBufferLike>;
SEED_BUILDER_APPROVAL#
PDA seed literal: ["seesaw", "builder_approval", trader, builder].
Declaration source: packages/core/src/builder.ts:31.
export declare const SEED_BUILDER_APPROVAL: Uint8Array<ArrayBufferLike>;
SEED_CONFIG#
PDA seed: "config".
Declaration source: packages/core/src/constants.ts:140.
export declare const SEED_CONFIG: Uint8Array<ArrayBufferLike>;
SEED_ESCROW_NO#
PDA seed for NO escrow account: "escrow_no"
Declaration source: packages/core/src/constants.ts:167.
export declare const SEED_ESCROW_NO: Uint8Array<ArrayBufferLike>;
SEED_ESCROW_YES#
PDA seed for YES escrow account: "escrow_yes"
Declaration source: packages/core/src/constants.ts:164.
export declare const SEED_ESCROW_YES: Uint8Array<ArrayBufferLike>;
SEED_EXTERNAL_PREALLOCATION#
Creator-funded external preallocation receipt namespace.
Declaration source: packages/core/src/constants.ts:188.
export declare const SEED_EXTERNAL_PREALLOCATION: Uint8Array<ArrayBufferLike>;
SEED_LOG_AUTHORITY#
PDA seed for the binary-event recorder log authority: "log"
Declaration source: packages/core/src/constants.ts:173.
export declare const SEED_LOG_AUTHORITY: Uint8Array<ArrayBufferLike>;
SEED_MARKET#
PDA seed: "market".
Declaration source: packages/core/src/constants.ts:143.
export declare const SEED_MARKET: Uint8Array<ArrayBufferLike>;
SEED_MARKET_EXT#
Resolver-scoped external market namespace.
Declaration source: packages/core/src/constants.ts:184.
export declare const SEED_MARKET_EXT: Uint8Array<ArrayBufferLike>;
SEED_MARKET_META#
External market metadata sidecar namespace.
Declaration source: packages/core/src/constants.ts:186.
export declare const SEED_MARKET_META: Uint8Array<ArrayBufferLike>;
SEED_NATIVE_RESOLUTION_POLICY#
Immutable native resolution policy namespace: ["seesaw", "native-resolution-policy", market].
Declaration source: packages/core/src/constants.ts:190.
export declare const SEED_NATIVE_RESOLUTION_POLICY: Uint8Array<ArrayBufferLike>;
SEED_NO_MINT#
PDA seed for NO token mint: "no_mint"
Declaration source: packages/core/src/constants.ts:161.
export declare const SEED_NO_MINT: Uint8Array<ArrayBufferLike>;
SEED_ORDERBOOK#
PDA seed: "orderbook".
Declaration source: packages/core/src/constants.ts:146.
export declare const SEED_ORDERBOOK: Uint8Array<ArrayBufferLike>;
SEED_POSITION#
PDA seed: "position".
Declaration source: packages/core/src/constants.ts:152.
export declare const SEED_POSITION: Uint8Array<ArrayBufferLike>;
SEED_REFERRAL#
PDA seed for per-referee referral account: "referral"
Declaration source: packages/core/src/constants.ts:177.
export declare const SEED_REFERRAL: Uint8Array<ArrayBufferLike>;
SEED_SEESAW#
PDA seed prefix: "seesaw".
Declaration source: packages/core/src/constants.ts:137.
export declare const SEED_SEESAW: Uint8Array<ArrayBufferLike>;
SEED_SPLINE#
Maker spline PDA namespace.
Declaration source: packages/core/src/constants.ts:179.
export declare const SEED_SPLINE: Uint8Array<ArrayBufferLike>;
SEED_SPLINE_VAULT#
Spline-owned settlement-token vault namespace.
Declaration source: packages/core/src/constants.ts:181.
export declare const SEED_SPLINE_VAULT: Uint8Array<ArrayBufferLike>;
SEED_TRADER_LEDGER#
PDA seed for the per-market trader ledger: "trader_ledger"
Declaration source: packages/core/src/constants.ts:170.
export declare const SEED_TRADER_LEDGER: Uint8Array<ArrayBufferLike>;
SEED_VAULT#
PDA seed: "vault".
Declaration source: packages/core/src/constants.ts:149.
export declare const SEED_VAULT: Uint8Array<ArrayBufferLike>;
SEED_YES_MINT#
PDA seed for YES token mint: "yes_mint"
Declaration source: packages/core/src/constants.ts:158.
export declare const SEED_YES_MINT: Uint8Array<ArrayBufferLike>;
SEESAW_EVENT_LOG_PREFIX#
Not documented.
Declaration source: packages/core/src/events.ts:22.
export declare const SEESAW_EVENT_LOG_PREFIX: "SEESAW_EVENT:";
SEESAW_TX_V1_ENV#
Environment variable that opts a process into v1 transactions pre-activation.
Declaration source: packages/core/src/instructions.ts:233.
export declare const SEESAW_TX_V1_ENV: "SEESAW_TX_V1";
SeesawApiRoutes#
Not documented.
Declaration source: packages/core/src/client.ts:74.
export interface SeesawApiRoutes {
raw: ApiClient;
markets: {
list: <T = unknown>(params?: ListMarketsParams) => Promise<T>;
current: <T = unknown>() => Promise<T>;
get: <T = unknown>(marketId: string | bigint | number) => Promise<T>;
};
orders: {
list: <T = unknown>(params?: ListOrdersParams) => Promise<T>;
listForOwner: ApiClient['listOwnerOrders'];
cancel: <T = unknown>(orderId: string | bigint | number) => Promise<T>;
};
positions: {
list: <T = unknown>(params?: ListPositionsParams) => Promise<T>;
};
fees: {
getConfig: <T = unknown>() => Promise<T>;
};
referrals: {
getForReferee: <T = unknown>(address: string) => Promise<T>;
getReferrerEarnings: <T = unknown>(address: string) => Promise<T>;
diagnostics: <T = unknown>() => Promise<T>;
leaderboard: <T = unknown>(params?: ReferralLeaderboardParams) => Promise<T>;
};
wallet: {
analytics: <T = unknown>(address: string) => Promise<T>;
strategyActivity: ApiClient['listStrategyActivity'];
strategies: ApiClient['listOwnerStrategies'];
};
}
SeesawBinaryEvent#
Not documented.
Declaration source: packages/core/src/events.ts:49.
export interface SeesawBinaryEvent {
tag: number;
name: string;
fields: Record<string, boolean | number | bigint | string | string[] | number[]>;
}
SeesawClient#
Not documented.
Declaration source: packages/core/src/client.ts:135.
export interface SeesawClient {
api: SeesawApiRoutes;
ixs: typeof ixs;
pdas: typeof pdas;
streams: SeesawStreams;
referral: SeesawReferralNamespace;
creator: SeesawCreatorNamespace;
/** Present only when `resilientData` was configured. */
data?: ResilientDataSource;
}
Field documentation
data— Present only whenresilientDatawas configured.
SeesawClientConfig#
Not documented.
Declaration source: packages/core/src/client.ts:40.
export interface SeesawClientConfig extends ApiClientConfig {
apiUrl?: string;
wsUrl?: string;
WebSocket?: WebSocketConstructor;
/** Opt-in API-to-RPC read facade configuration. Transaction builders do not depend on it. */
resilientData?: {
rpc: RpcDataSource;
policy: ResilientReadPolicy;
};
}
Field documentation
resilientData— Opt-in API-to-RPC read facade configuration. Transaction builders do not depend on it.
SeesawCreatorNamespace#
Not documented.
Declaration source: packages/core/src/client.ts:119.
export interface SeesawCreatorNamespace {
/**
* List all markets created by `wallet`, with claimableNow derived from
* on-chain market state and accumulated fees.
*/
listMarkets(wallet: Address): Promise<CreatorMarketEntry[]>;
/**
* Plan a chunked sequence of ClaimCreatorFees transactions for the
* given creator-market entries. Caller supplies the per-entry
* ix builder; this helper does pure data partitioning + chunking.
*
* Plan C will add claim(wallet, marketId) for the single-market case.
*/
claimAll(entries: readonly CreatorMarketEntry[], opts: ClaimAllOptions): Promise<ClaimAllPlan>;
}
Field documentation
listMarkets— List all markets created bywallet, with claimableNow derived from on-chain market state and accumulated fees.claimAll— Plan a chunked sequence of ClaimCreatorFees transactions for the given creator-market entries. Caller supplies the per-entry ix builder; this helper does pure data partitioning + chunking.
Plan C will add claim(wallet, marketId) for the single-market case.
</details> <details> <summary>SeesawError</summary>SeesawError#
Parsed Seesaw error.
Declaration source: packages/core/src/errors.ts:33.
export interface SeesawError {
readonly code: number;
readonly name: string;
readonly message: string;
}
SeesawErrorCode#
Seesaw protocol error codes, keyed by SeesawError variant name.
Any Seesaw protocol error code.
Declaration source: packages/core/src/errors.ts:21.
export declare const SeesawErrorCode: { readonly MarketExists: 4097; readonly InvalidState: 4098; readonly TradingNotStarted: 4099; readonly TradingEnded: 4100; readonly AlreadyResolved: 4101; readonly MarketNotResolved: 4102; readonly TooEarly: 4103; readonly EpochNotStarted: 4104; readonly EpochNotEnded: 4105; readonly NotOwner: 4106; readonly PositionsRemaining: 4107; readonly MarketCloseTimeout: 4108; readonly InvalidCreator: 4109; readonly VaultNotEmpty: 4110; readonly InvalidDuration: 4111; readonly InvalidConfidenceRatio: 4112; readonly InvalidStateTransition: 4113; readonly LedgerBalancesRemaining: 4114; readonly OracleMismatch: 8193; readonly StaleOracle: 8194; readonly InvalidPrice: 8195; readonly ConfidenceTooWide: 8196; readonly FeedIdMismatch: 8197; readonly InvalidOracleData: 8198; readonly OraclePriceJumpTooLarge: 8199; readonly InvalidQuantity: 12289; readonly OrderbookFull: 12290; readonly OrderNotFound: 12291; readonly WouldCross: 12292; readonly PriceTooLow: 12293; readonly PriceTooHigh: 12294; readonly SlippageExceeded: 12295; readonly InsufficientFill: 12296; readonly NoFillForIoc: 12297; readonly SelfTradeAbort: 12298; readonly PostOnlyModeActive: 12299; readonly OrderNotExpired: 12300; readonly InsufficientBalance: 12301; readonly MaxTotalSharesExceeded: 12302; readonly AuthorityClaimNotEligible: 12303; readonly InsufficientFreeBalance: 12304; readonly MinRestingNotionalNotMet: 12305; readonly OrderPriceOutOfBand: 12306; readonly TraderLedgerFull: 12307; readonly OrderbookNotEmpty: 12308; readonly TraderLedgerNotAllocated: 12309; readonly TraderLedgerOversized: 12310; readonly OrderbookTreeCorruption: 12311; readonly InternalInvariantViolated: 12312; readonly BookConsistencyInvariantViolated: 12313; readonly CrossedBookInvariantViolated: 12314; readonly UnsupportedAccountVersion: 12315; readonly PositionMarketMismatch: 12316; readonly PositionAlreadySettled: 12317; readonly ResidualShareLocks: 12318; readonly NothingToForceClose: 12319; readonly InvalidOrderTypeForInstruction: 12320; readonly MathOverflow: 16385; readonly InvalidAccountType: 20481; readonly InvalidAccountOwner: 20482; readonly InvalidPDA: 20483; readonly AlreadyInitialized: 20484; readonly InsolvencyDetected: 20485; readonly UnauthorizedInitializer: 20486; readonly DuplicateAccount: 20487; readonly FailedToSerializeEvent: 20488; readonly FailedToFlushBuffer: 20489; readonly InvalidRecorderPayloadLength: 20490; readonly InvalidRecorderVersion: 20491; readonly InvalidRecorderAuthorityKind: 20492; readonly InvalidRecorderEventCount: 20493; readonly ProtocolPaused: 24577; readonly CannotExpire: 28673; readonly InvalidRedemption: 28674; readonly InvalidMint: 28675; readonly SolvencyInvariantViolated: 28676; readonly InvalidSettlementMintDecimals: 28677; readonly CollateralMirrorInconsistent: 28678; readonly InvalidFeeCurve: 32769; readonly InvalidFeeSplit: 32770; readonly ReferrerAlreadySet: 32771; readonly SelfReferralForbidden: 32772; readonly ReferrerTreasuryMismatch: 32773; readonly AccumulatedAmountZero: 32774; readonly FeeConfigRateLimit: 32775; readonly TreasuryIndexOutOfRange: 32776; readonly TreasuryRecipientMismatch: 32777; readonly InvalidTreasuryRecipient: 32778; readonly DuplicateTreasuryRecipient: 32779; readonly TreasuryUpdateRateLimit: 32780; readonly OperationalParamsRateLimit: 32781; readonly MicrostructureRateLimit: 32782; readonly ReferralCacheMismatch: 32783; readonly InvalidReferralRollupBatch: 32784; readonly ReferralFeesPending: 32785; readonly ReferralLiabilityMismatch: 32786; readonly InvalidSplineConfig: 32787; readonly InstructionNotYetEnabled: 32788; readonly InvalidSplineShape: 32789; readonly UnauthorizedSplineMaker: 32790; readonly StaleSequence: 32791; readonly InvalidMidPrice: 32792; readonly InvalidSplineSeries: 32793; readonly InsufficientSplineCommitment: 32794; readonly SplineGenerationMismatch: 32795; readonly InvalidSplineQuoteOrigin: 32796; readonly MissingSplineAccounts: 32797; readonly MakerRebateShareTooHigh: 32798; readonly MakerRebateRestBoundTooHigh: 32799; readonly SeatsStillAttached: 32800; readonly OrderIdExhausted: 32801; readonly RestingNotionalTooSmall: 32802; readonly SplineCommitmentUnderflow: 32803; readonly InvalidSequenceAnchor: 32804; readonly AuthorityEpochMismatch: 32805; readonly QuoteSessionExpired: 32806; readonly InvalidQuoteValidityWindow: 32807; readonly SplineReaderWritable: 32808; readonly QuoteProfileDowngrade: 32809; readonly SelfBuilderForbidden: 32810; readonly BuilderApprovalMismatch: 32811; readonly BuilderApprovalExpired: 32812; readonly BuilderApprovalNotYetActive: 32813; readonly BuilderTokenAccountMismatch: 32814; readonly InvalidBuilderShare: 32815; readonly ClientOrderIdNotFound: 32816; readonly CancelSessionMismatch: 32817; readonly CancelSessionActive: 32818; readonly SeatBelowLiquidityFloor: 32819; readonly SeatStalenessOff: 32820; readonly SeatCapReached: 32821; readonly SeatMissTooSoon: 32822; readonly SeatMissesBelowThreshold: 32823; readonly SeatMeetsFloor: 32824; readonly DuplicateSeat: 32825; readonly SeatSeriesMismatch: 32826; readonly SubscriptionDisabled: 32827; readonly SubscriptionSpacing: 32828; readonly SubscriptionMarketTooOld: 32829; readonly SubscriptionMarketParamsRejected: 32830; readonly SubscriptionExternalMarket: 32831; readonly SubscriptionConcurrencyReached: 32832; readonly SeriesLamportBudgetInsufficient: 32833; readonly BalanceBoundViolated: 32834; readonly OrderbookNeedsReclaim: 32835; readonly ManagedOrderUseBatchReclaim: 32836; readonly NoPendingAuthority: 36865; readonly UnauthorizedClaim: 36866; readonly EmergencyDelayNotElapsed: 36867; readonly UnauthorizedPauser: 36868; readonly WrongResolver: 40961; readonly UnsupportedMarketKind: 40962; readonly MarketHalted: 40963; readonly ExternalMarketInvalid: 40964; readonly InvalidPayoutNumerators: 40965; readonly MarketMetaMismatch: 40966; readonly PreallocationReceiptMismatch: 40967; readonly PreallocationReceiptNotActive: 40968; readonly PreallocationReclaimTooEarly: 40969; readonly PreallocationTargetMismatch: 40970; readonly PreallocationDataNotZero: 40971; readonly PreallocationMarketExists: 40972; readonly ExternalCloseTimeOutOfRange: 40973; readonly ExternalExpiryDeadlineOverflow: 40974; readonly EconomicAccountVersionMismatch: 40975; readonly EconomicDeltaOverflow: 40976; readonly NativeResolutionPolicyMismatch: 40977; readonly NativeResolutionReasonInvalid: 40978; readonly SourceClaimBindingMismatch: 49153; readonly SourceInvalidTransition: 49154; readonly SourceImmutableBindingMismatch: 49155; readonly SourceInvalidDefinition: 49156; readonly SourceManualResolutionForbidden: 49157; readonly SourceWindowNotAdmitted: 49158; readonly SourceReviewNotElapsed: 49159; readonly SourceProfileDisabled: 49160; readonly SourceUnsupportedProfile: 49161; readonly SourceStateRevisionChanged: 49162; readonly SourcePolicyNotEffective: 49163; readonly SourceWitnessCountMismatch: 49164; readonly SourceMarketKindUnsupported: 49165; readonly SourceCaptureWindowInvalid: 49166; readonly SourceCaptureStale: 49167; readonly SourceCaptureFromFuture: 49168; readonly WitnessSlotNotAdmitted: 49169; readonly WitnessSlotRevoked: 49170; readonly WitnessEpochMismatch: 49171; readonly WitnessSignatureInvalid: 49172; readonly SourceFactOutOfRange: 49173; readonly SourceOperationRedundant: 49174; readonly SourceDefinitionPackageMismatch: 49175; readonly StrategyMarketNotAllowed: 53249; readonly StrategyCurrencyNotAllowed: 53250; readonly StrategyOrderCapitalExceeded: 53251; readonly StrategyCapitalBudgetExceeded: 53252; readonly StrategyInventoryExceeded: 53253; readonly StrategyFeeExceeded: 53254; readonly StrategySlippageExceeded: 53255; readonly StrategyExpired: 53256; readonly StrategyActionNotAllowed: 53257; readonly StrategyStopped: 53258; readonly StrategyDelegateMismatch: 53259; readonly StrategyNotYetActive: 53260; readonly StrategyDestinationNotAllowed: 53261; readonly StrategyLeaseTooShort: 53262; readonly StrategyAccountMismatch: 53263; readonly InvalidStrategyConfig: 53264; readonly ConfidentialAccountMismatch: 57345; readonly ConfidentialInstanceNonceInvalid: 57346; readonly ConfidentialProfileInactive: 57347; readonly ConfidentialPolicyInvalid: 57348; readonly ConfidentialCreationProofUnavailable: 57349; readonly ConfidentialAdapterNotAdmitted: 57350; readonly ConfidentialTerminalAlreadyRecorded: 57351; readonly ConfidentialTerminalWindowOpen: 57352; readonly ConfidentialTerminalEvidenceRejected: 57353; };
SeesawOnChainError#
Wraps a parsed on-chain program error ({@link SeesawError}).
Declaration source: packages/core/src/errors.ts:250.
export declare class SeesawOnChainError extends SeesawSdkError {
constructor(onChain: SeesawError);
readonly onChain: SeesawError;
}
Parameters
onChain: SeesawError— Not documented. See SeesawError for its declaration and available field documentation.
Throws
Not documented.
</details> <details> <summary>SeesawReferralNamespace</summary>SeesawReferralNamespace#
Not documented.
Declaration source: packages/core/src/client.ts:105.
export interface SeesawReferralNamespace {
/**
* Resolve "who is this user's referrer right now?" via the strict
* indexer → rpc → pending → none precedence. Returns a typed
* ReferrerResolution; never throws on transient failures.
*
* Plan C will add lock(), claim(), and getEarnings() on this namespace.
*/
resolve(
wallet: Address,
opts?: Pick<ResolveReferrerOptions, 'pendingReferrer' | 'rpcClient' | 'programAddress'>
): Promise<ReferrerResolution>;
}
Field documentation
resolve— Resolve "who is this user's referrer right now?" via the strict indexer → rpc → pending → none precedence. Returns a typed ReferrerResolution; never throws on transient failures.
Plan C will add lock(), claim(), and getEarnings() on this namespace.
</details> <details> <summary>SeesawSdkError</summary>SeesawSdkError#
Base class for every error thrown by the Seesaw client SDK. Enables
instanceof branching and a stable string code discriminant. Message text
is preserved from the previous plain-Error throws, so existing consumers
that string-match on .message keep working while gaining typed handling.
Declaration source: packages/core/src/errors.ts:211.
export declare class SeesawSdkError extends Error {
constructor(message: string, code: string, options: { cause?: unknown; } | undefined);
readonly code: string;
}
Parameters
message: string— Not documented.code: string— Not documented.options: { cause?: unknown; } | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>SeesawStreams</summary>SeesawStreams#
Not documented.
Declaration source: packages/core/src/streams.ts:57.
export interface SeesawStreams {
market: <T = Record<string, unknown>>(
marketId: string,
onUpdate: (update: SeesawStreamUpdate<T>) => void
) => SeesawStreamSubscription;
orderbook: <T = Record<string, unknown>>(
marketId: string,
onUpdate: (update: SeesawStreamUpdate<T>) => void
) => SeesawStreamSubscription;
positions: <T = Record<string, unknown>>(
wallet: string,
auth: WebSocketAuthPayload,
onUpdate: (update: SeesawStreamUpdate<T>) => void
) => SeesawStreamSubscription;
}
SeesawStreamsConfig#
Not documented.
Declaration source: packages/core/src/streams.ts:26.
export interface SeesawStreamsConfig {
wsUrl?: string;
WebSocket?: WebSocketConstructor;
reconnect?: boolean;
reconnectBaseDelayMs?: number;
reconnectMaxDelayMs?: number;
/**
* SSW-033: called on every socket session start (initial and each
* reconnect). The stream has no resume-from-sequence contract, so after a
* reconnect the consumer must refetch an authoritative snapshot of the scope
* before treating subsequent updates as current.
*/
onSession?: (event: SeesawStreamSessionEvent) => void;
/** SSW-033: server acknowledgement or channel-scoped rejection of the subscription. */
onSubscriptionState?: (event: SeesawStreamSubscriptionStateEvent) => void;
}
Field documentation
onSession— SSW-033: called on every socket session start (initial and each reconnect). The stream has no resume-from-sequence contract, so after a reconnect the consumer must refetch an authoritative snapshot of the scope before treating subsequent updates as current.onSubscriptionState— SSW-033: server acknowledgement or channel-scoped rejection of the subscription.
SeesawStreamSessionEvent#
Not documented.
Declaration source: packages/core/src/streams.ts:43.
export interface SeesawStreamSessionEvent {
channel: string;
/** 1 for the first session, incremented on each reconnect. */
generation: number;
reconnect: boolean;
}
Field documentation
generation— 1 for the first session, incremented on each reconnect.
SeesawStreamSubscription#
Not documented.
Declaration source: packages/core/src/streams.ts:20.
export interface SeesawStreamSubscription {
channel: string;
unsubscribe: () => void;
close: () => void;
}
SeesawStreamSubscriptionStateEvent#
Not documented.
Declaration source: packages/core/src/streams.ts:50.
export interface SeesawStreamSubscriptionStateEvent {
channel: string;
generation: number;
state: 'subscribed' | 'rejected';
message?: string;
}
SeesawStreamUpdate#
Not documented.
Declaration source: packages/core/src/streams.ts:13.
export interface SeesawStreamUpdate<T = Record<string, unknown>> {
type: 'update';
channel: string;
data: T;
timestamp: number;
}
SeesawTextEvent#
Not documented.
Declaration source: packages/core/src/events.ts:30.
export interface SeesawTextEvent {
name: string;
fields: Record<string, string>;
raw: string;
}
SeesawValidationError#
Client-side validation failure (bad input before any network/chain call).
Declaration source: packages/core/src/errors.ts:226.
export declare class SeesawValidationError extends SeesawSdkError {
constructor(message: string, options: { cause?: unknown; } | undefined);
}
Parameters
message: string— Not documented.options: { cause?: unknown; } | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>selectFullLedgerIdleSeat</summary>selectFullLedgerIdleSeat#
Select a reclaim candidate from a full ledger. The RPC reader must authenticate its PDA.
Declaration source: packages/core/src/seatInstructions.ts:275.
export function selectFullLedgerIdleSeat(data: Uint8Array, cursor?: number): { market: Address; bump: number; slotIndex: number; seat: import("packages/core/src/index").TraderLedgerSlot; } | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.cursor: number— Not documented. Default:0.
Returns
{ market: Address; bump: number; slotIndex: number; seat: import("packages/core/src/index").TraderLedgerSlot; } | null
Not documented.
Throws
Not documented.
Defaults
cursor:0.
selectMakers#
Chooses the seats to supply with one taker order (design §12). Pure and deterministic: the
result does not depend on the order of input.seats.
Declaration source: packages/core/src/makerSelector.ts:279.
export function selectMakers(input: MakerSelectorInput, estimator?: MakerSelectorFillEstimator): MakerSelection;
Parameters
input: MakerSelectorInput— Not documented. See MakerSelectorInput for its declaration and available field documentation.estimator: MakerSelectorFillEstimator— Not documented. Default:makerSelectorReferenceEstimator. See MakerSelectorFillEstimator for its declaration and available field documentation.
Returns
MakerSelection
Not documented.
Throws
Not documented.
Defaults
estimator:makerSelectorReferenceEstimator.
selectMakersByMidpoint#
The midpoint-sort baseline of the §12 exit test. Takes the seats an indexer lists as active
(attached and not dormant, first copy of a duplicate key), sorts them by midpoint in the lane's
favorable direction (BuyYes and SellNo ascending, SellYes and BuyNo descending; ties by
seat key), keeps the first seatCap, then drops the last while the compute budget is exceeded.
It applies no executability, freshness, self-trade, depth or limit filter.
Declaration source: packages/core/src/makerSelector.ts:357.
export function selectMakersByMidpoint(input: MakerSelectorInput, estimator?: MakerSelectorFillEstimator): MakerSelection;
Parameters
input: MakerSelectorInput— Not documented. See MakerSelectorInput for its declaration and available field documentation.estimator: MakerSelectorFillEstimator— Not documented. Default:makerSelectorReferenceEstimator. See MakerSelectorFillEstimator for its declaration and available field documentation.
Returns
MakerSelection
Not documented.
Throws
Not documented.
Defaults
estimator:makerSelectorReferenceEstimator.
selectMarketMakers#
Rank seats against a book, Clock, and fee epoch read from the same program snapshot.
Declaration source: packages/core/src/selectMarketMakers.ts:41.
export function selectMarketMakers(rpc: RpcDataSource, marketAddress: Address, programAddress: Address, intent: MakerSelectorIntent, options: MarketMakerSelectionOptions): Promise<MarketMakerSelection>;
Parameters
rpc: RpcDataSource— Not documented. See RpcDataSource for its declaration and available field documentation.marketAddress: Address— Not documented.programAddress: Address— Not documented.intent: MakerSelectorIntent— Not documented. See MakerSelectorIntent for its declaration and available field documentation.options: MarketMakerSelectionOptions— Not documented. See MarketMakerSelectionOptions for its declaration and available field documentation.
Returns
Promise<MarketMakerSelection>
Not documented.
Throws
Not documented.
</details> <details> <summary>selectOrderBuilder</summary>selectOrderBuilder#
Selects which packages/core order-placement builder to call for a given
funding source + order type. All three builders share the identical
PlaceOrderInput shape, so the caller can swap the function reference
without changing the call site's argument object.
walletalways routes throughplaceOrder(0x0C).freeFunds+ImmediateOrCancelroutes throughswapWithFreeFunds(0x0E) - the swap variant forces IOC semantics on-chain regardless of theorderTypepassed in its params.freeFunds+ any resting order type (Limit/PostOnly) routes throughplaceLimitOrderWithFreeFunds(0x0E), which rejects IOC.
Declaration source: packages/core/src/orderFunding.ts:111.
export function selectOrderBuilder(fundingSource: FundingSource, orderType: OrderType): (input: import("packages/core/src/sdk").PlaceOrderInput, programAddress?: Address) => Promise<SdkResult<import("packages/core/src/sdk").PlaceOrderResult>>;
Parameters
fundingSource: FundingSource— Not documented. See FundingSource for its declaration and available field documentation.orderType: OrderType— Not documented. See OrderType for its declaration and available field documentation.
Returns
(input: import("packages/core/src/sdk").PlaceOrderInput, programAddress?: Address) => Promise<SdkResult<import("packages/core/src/sdk").PlaceOrderResult>>
Not documented.
Throws
Not documented.
</details> <details> <summary>selectPriorityFeeMicroLamports</summary>selectPriorityFeeMicroLamports#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:17.
export function selectPriorityFeeMicroLamports(samples: readonly PriorityFeeSample[], config: PriorityFeeConfig): number;
Parameters
samples: readonly PriorityFeeSample[]— Not documented.config: PriorityFeeConfig— Not documented. See PriorityFeeConfig for its declaration and available field documentation.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>selectQuoteLadderBuilder</summary>selectQuoteLadderBuilder#
Selects the quote-ladder builder (task A4b amendment, ported to mobile in
A4c). Both placeMultiplePostOnlyOrders (0x0C) and its WithFreeFunds
twin (0x0F) accept the identical PlaceMultiplePostOnlyInput shape,
so - same pattern as selectOrderBuilder - the caller only swaps the
function reference.
Declaration source: packages/core/src/orderFunding.ts:125.
export function selectQuoteLadderBuilder(fundingSource: FundingSource): (input: import("packages/core/src/sdk").PlaceMultiplePostOnlyInput, programAddress?: Address) => Promise<SdkResult<import("packages/core/src/sdk").PlaceFamilyResult>>;
Parameters
fundingSource: FundingSource— Not documented. See FundingSource for its declaration and available field documentation.
Returns
(input: import("packages/core/src/sdk").PlaceMultiplePostOnlyInput, programAddress?: Address) => Promise<SdkResult<import("packages/core/src/sdk").PlaceFamilyResult>>
Not documented.
Throws
Not documented.
</details> <details> <summary>selectRpcEndpoint</summary>selectRpcEndpoint#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:85.
export function selectRpcEndpoint(endpoints: readonly RpcEndpointHealth[], nowMs: number): RpcEndpointHealth | null;
Parameters
endpoints: readonly RpcEndpointHealth[]— Not documented.nowMs: number— Not documented.
Returns
RpcEndpointHealth | null
Not documented.
Throws
Not documented.
</details> <details> <summary>selectStopLossNonceSlot</summary>selectStopLossNonceSlot#
Choose the nonce account for a new stop. An existing account is reused only
when no open stop holds it and its CURRENT nonce was never signed for an
earlier stop (otherwise an old, still-valid sell would share the nonce);
failing that, the first slot with no account is created. null: all slots
are taken (advance or close one first).
Declaration source: packages/core/src/stopLoss/nonce.ts:213.
export function selectStopLossNonceSlot(input: { owner: Address; accounts: ReadonlyArray<Uint8Array | null>; records: ReadonlyArray<{ nonceAccount: string; nonceValue: string; status: string; }>; }): { slot: number; nonceAccount: Address; reuse: DecodedStopLossNonceAccount | null; } | null;
Parameters
input: { owner: Address; accounts: ReadonlyArray<Uint8Array | null>; records: ReadonlyArray<{ nonceAccount: string; nonceValue: string; status: string; }>; }— Not documented.
Returns
{ slot: number; nonceAccount: Address; reuse: DecodedStopLossNonceAccount | null; } | null
Not documented.
Throws
Not documented.
</details> <details> <summary>SelfTradeBehavior</summary>SelfTradeBehavior#
Self-trade policy byte of the place body (PlaceOrderArgs::self_trade,
body offset 24). Mirrors SelfTradeBehavior in program/src/instruction.rs:
Abort rejects the whole placement on the first self-match,
CancelProvide cancels the self-crossed resting order and keeps matching,
DecrementTake reduces both sides by the overlap without a fill. SDK
builders default to CancelProvide.
Declaration source: packages/core/src/types.ts:144.
export enum SelfTradeBehavior {
Abort = 0,
CancelProvide = 1,
DecrementTake = 2,
}
sendResumableRedeem#
Submit one already-built Redeem instruction until its finalized return data
reports EOF. sendFinalized must read return data from finalized transaction
metadata; simulation data is not accepted by this contract.
Declaration source: packages/core/src/resumableRedeem.ts:376.
export function sendResumableRedeem<TInstruction, TSignature = string>(instruction: TInstruction, expectedProgramAddress: Address, sendFinalized: (instruction: TInstruction) => Promise<RedeemSendResult<TSignature>>, maxCalls?: number): Promise<ResumableRedeemResult<TSignature>>;
Parameters
instruction: TInstruction— Not documented.expectedProgramAddress: Address— Not documented.sendFinalized: (instruction: TInstruction) => Promise<RedeemSendResult<TSignature>>— Not documented.maxCalls: number— Not documented. Default:MAX_RESUMABLE_REDEEM_CALLS.
Returns
Promise<ResumableRedeemResult<TSignature>>
Not documented.
Throws
Not documented.
Defaults
maxCalls:MAX_RESUMABLE_REDEEM_CALLS.
sendResumableRedeemSequence#
Run multiple logical Redeem instructions without combining them into one transaction. Completed sides are durable and may be supplied on a retry so an already-finalized side is never submitted again.
Declaration source: packages/core/src/resumableRedeem.ts:436.
export function sendResumableRedeemSequence<TInstruction, TSignature = string>(instructions: readonly TInstruction[], expectedProgramAddress: Address, sendFinalized: (instruction: TInstruction) => Promise<RedeemSendResult<TSignature>>, resume?: readonly CompletedRedeemInstruction<TSignature>[], suffixPlan?: ResumableRedeemSequencePlan): Promise<ResumableRedeemSequenceResult<TSignature>>;
Parameters
instructions: readonly TInstruction[]— Not documented.expectedProgramAddress: Address— Not documented.sendFinalized: (instruction: TInstruction) => Promise<RedeemSendResult<TSignature>>— Not documented.resume: readonly CompletedRedeemInstruction<TSignature>[]— Not documented. Default:[].suffixPlan: ResumableRedeemSequencePlan | undefined— Not documented. See ResumableRedeemSequencePlan for its declaration and available field documentation.
Returns
Promise<ResumableRedeemSequenceResult<TSignature>>
Not documented.
Throws
Not documented.
Defaults
resume:[].
SentimentData#
Not documented.
Declaration source: packages/core/src/api/types.ts:287.
export interface SentimentData {
bullishPercent: number;
bearishPercent: number;
marketCount: number;
trend: 'increasing' | 'decreasing' | 'stable';
averageYesPrice: number;
averageNoPrice: number;
mostBullish: { pair: string; yesPrice: number } | null;
mostBearish: { pair: string; noPrice: number } | null;
}
SentimentDataSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:233.
export declare const SentimentDataSchema: z.ZodObject<{ bullishPercent: z.ZodNumber; bearishPercent: z.ZodNumber; marketCount: z.ZodNumber; trend: z.ZodEnum<{ increasing: "increasing"; decreasing: "decreasing"; stable: "stable"; }>; averageYesPrice: z.ZodNumber; averageNoPrice: z.ZodNumber; mostBullish: z.ZodNullable<z.ZodObject<{ pair: z.ZodString; yesPrice: z.ZodNumber; }, z.core.$loose>>; mostBearish: z.ZodNullable<z.ZodObject<{ pair: z.ZodString; noPrice: z.ZodNumber; }, z.core.$loose>>; }, z.core.$loose>;
SEQUENCE_COUNTER_BITS#
Not documented.
Declaration source: packages/core/src/splineFreshness.ts:4.
export declare const SEQUENCE_COUNTER_BITS: 20;
SerializedExternalPayout#
JSON/persistence representation: all arithmetic values are decimal strings.
Declaration source: packages/core/src/externalPayout.ts:23.
export interface SerializedExternalPayout {
readonly numeratorYes: string;
readonly numeratorNo: string;
readonly denominator: string;
readonly partitionRule: PartitionRule;
readonly origin: PayoutOrigin;
readonly sourceResultCode: SourceResultCode | null;
/** Lowercase hex of the supplied, unauthenticated 32-byte hash. */
readonly sourceFactHash: string;
}
Field documentation
sourceFactHash— Lowercase hex of the supplied, unauthenticated 32-byte hash.
serializeExternalPayout#
Validates candidate shape and exports lossless JSON data, never JS numbers.
Declaration source: packages/core/src/externalPayout.ts:156.
export function serializeExternalPayout(payout: ExternalPayout): SerializedExternalPayout;
Parameters
payout: ExternalPayout— Not documented. See ExternalPayout for its declaration and available field documentation.
Returns
SerializedExternalPayout
Not documented.
Throws
Not documented.
</details> <details> <summary>SERIES_CRANK_MAX_MARKETS</summary>SERIES_CRANK_MAX_MARKETS#
Not documented.
Declaration source: packages/core/src/seriesCrankRpc.ts:38.
export declare const SERIES_CRANK_MAX_MARKETS: 32;
SeriesCrankMarket#
Not documented.
Declaration source: packages/core/src/seriesCrank.ts:24.
export interface SeriesCrankMarket {
readonly address: Address;
readonly state: Pick<
MarketAccount,
| 'resolverAuthority'
| 'durationSeconds'
| 'pythFeedId'
| 'legCount'
| 'halted'
| 'emergencyStatus'
| 'outcome'
| 'startPrice'
| 'tStart'
| 'tEnd'
| 'createdAt'
| 'maxConfidenceRatioBps'
| 'maxOracleJumpBps'
| 'maxTotalShares'
>;
readonly currencyRecord: Address;
readonly activeSeatCount: number;
/** The canonical seat PDA is missing or an empty System account. */
readonly seatCanBeCreated: boolean;
readonly seatLamports: bigint;
}
Field documentation
seatCanBeCreated— The canonical seat PDA is missing or an empty System account.
SeriesCrankPolicy#
Not documented.
Declaration source: packages/core/src/seriesCrank.ts:11.
export interface SeriesCrankPolicy {
readonly paused: boolean;
readonly attachEnabled: boolean;
readonly midJumpResetBps: number;
readonly minimumCommitment: bigint;
readonly minimumDepthPerSide: bigint;
readonly depthBandBps: number;
readonly spacingFloorBps: number;
readonly maxMarketAgeSeconds: number;
readonly maxActiveSeatsPerMarket: number;
readonly settleBountyLamports: bigint;
}
SeriesCrankReadRequest#
Not documented.
Declaration source: packages/core/src/seriesCrankRpc.ts:42.
export interface SeriesCrankReadRequest {
readonly series: MakerSeriesIdentity;
readonly markets: readonly Address[];
readonly settlementMint: Address;
readonly settlementTokenProgram: Address;
readonly seriesRentLamports: bigint;
readonly seatRentLamports: bigint;
}
seriesCrankReward#
Match the program's floor-rounded reward at the snapshot Clock time.
Declaration source: packages/core/src/seriesCrank.ts:94.
export function seriesCrankReward(age: bigint, rampSeconds: number, cap: bigint): bigint;
Parameters
age: bigint— Not documented.rampSeconds: number— Not documented.cap: bigint— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>SeriesCrankSkip</summary>SeriesCrankSkip#
Not documented.
Declaration source: packages/core/src/seriesCrank.ts:61.
export type SeriesCrankSkip =
| 'subscriptionDisabled'
| 'policyChanged'
| 'templateBelowFloor'
| 'foreignSeries'
| 'marketNotTrading'
| 'marketAge'
| 'marketParameters'
| 'seatUnavailable'
| 'concurrency'
| 'spacing'
| 'quoteBudget'
| 'lamportBudget';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
SeriesCrankSnapshot#
Not documented.
Declaration source: packages/core/src/seriesCrank.ts:50.
export interface SeriesCrankSnapshot {
readonly nowUnix: bigint;
readonly series: MakerSeriesAccount;
readonly policy: SeriesCrankPolicy;
readonly markets: readonly SeriesCrankMarket[];
readonly seriesVaultFreeQuote: bigint;
/** Spendable lamports above the series account's rent-exempt minimum. */
readonly seriesLamportBudget: bigint;
readonly seatRentLamports: bigint;
}
Field documentation
seriesLamportBudget— Spendable lamports above the series account's rent-exempt minimum.
seriesKey#
Series key, lowercase hex of 73 bytes. Native keys use the feed and duration. Mirror keys use the source reference hash and platform. Both include the currency record.
Declaration source: packages/core/src/discoveryRank.ts:92.
export function seriesKey(market: DiscoverySeriesInput): string | null;
Parameters
market: DiscoverySeriesInput— Not documented. See DiscoverySeriesInput for its declaration and available field documentation.
Returns
string | null
Not documented.
Throws
Not documented.
</details> <details> <summary>SeriesSubscriptionPolicy</summary>SeriesSubscriptionPolicy#
Not documented.
Declaration source: packages/core/src/seatInstructions.ts:32.
export interface SeriesSubscriptionPolicy {
readonly autoAttachEnabled: boolean;
readonly acceptConfidenceGuardOff: boolean;
readonly maxConcurrentSeats: number;
/** Quote token base units committed to each attached seat. */
readonly perMarketCommitment: bigint;
readonly minSpacingSeconds: bigint;
readonly rewardCapLamports: bigint;
readonly rewardRampSeconds: number;
readonly attachMaxAgeSeconds: number;
readonly templateMidBps: number;
readonly minConfidenceRatioBps: number;
readonly maxConfidenceRatioBps: number;
readonly minOracleJumpBps: number;
readonly maxOracleJumpBps: number;
readonly minTotalShares: bigint;
readonly maxTotalShares: bigint;
}
Field documentation
perMarketCommitment— Quote token base units committed to each attached seat.
SET_MAKER_QUOTE_AUTHORITY_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:40.
export declare const SET_MAKER_QUOTE_AUTHORITY_DISCRIMINATOR: 101;
setApiClient#
Not documented.
Declaration source: packages/core/src/api/client.ts:1166.
export function setApiClient(client: ApiClient): void;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>setApiModuleLogger</summary>setApiModuleLogger#
Set a custom logger for
Declaration source: packages/core/src/api/logger.ts:52.
export function setApiModuleLogger(logger: ApiModuleLogger | null | undefined): void;
Parameters
logger: ApiModuleLogger | null | undefined— - An object withwarnanderrormethods. Passnullorundefinedto reset to the default logger. See ApiModuleLogger for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>SetCurrencyFreezeExceptionAccounts</summary>SetCurrencyFreezeExceptionAccounts#
Accounts for the currency freeze-exception governance instruction.
Declaration source: packages/core/src/instructions.ts:2454.
export interface SetCurrencyFreezeExceptionAccounts extends BinaryRecorderTailAccounts {
authority: Address;
config: Address;
mint: Address;
exception: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
SetMakerQuoteAuthorityParams#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:94.
export interface SetMakerQuoteAuthorityParams extends InitializeMakerQuoteStateParams {
readonly authority: Address;
readonly sessionExpirySlot: bigint;
readonly expectedAuthorityEpoch: number;
}
Field documentation
limits— Limits in the order BuyYes, SellYes, BuyNo, SellNo.
setMarketEmergencyStatus#
Not documented.
Declaration source: packages/core/src/sdk.ts:2486.
export function setMarketEmergencyStatus(input: SetMarketEmergencyStatusInput, programAddress?: Address): Promise<SdkResult<SetMarketEmergencyStatusResult>>;
Parameters
input: SetMarketEmergencyStatusInput— Not documented. See SetMarketEmergencyStatusInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<SetMarketEmergencyStatusResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
SetMarketEmergencyStatusAccounts#
Accounts for SetMarketEmergencyStatus instruction.
Declaration source: packages/core/src/instructions.ts:4112.
export interface SetMarketEmergencyStatusAccounts extends BinaryRecorderTailAccounts {
config: Address;
market: Address;
authority: Address;
vault: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
SetMarketEmergencyStatusInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2471.
export interface SetMarketEmergencyStatusInput {
marketAddress: Address;
authority: Address;
/** 0=None, 1=PostOnly, 2=Paused, 3=ForceCancelOnly. */
status: number;
/** Operator-visible audit-trail tag. Padded/truncated to exactly 32 bytes. */
reason: Uint8Array;
}
Field documentation
status— 0=None, 1=PostOnly, 2=Paused, 3=ForceCancelOnly.reason— Operator-visible audit-trail tag. Padded/truncated to exactly 32 bytes.
SetMarketEmergencyStatusParams#
Parameters for SetMarketEmergencyStatus instruction.
Declaration source: packages/core/src/instructions.ts:4120.
export interface SetMarketEmergencyStatusParams {
/** 0=None, 1=PostOnly, 2=Paused, 3=ForceCancelOnly. */
status: number; // D0{1}; emergency-state representation.
/** Operator-visible audit-trail tag. Padded/truncated to exactly 32 bytes. */
reason: Uint8Array;
}
Field documentation
status— 0=None, 1=PostOnly, 2=Paused, 3=ForceCancelOnly.reason— Operator-visible audit-trail tag. Padded/truncated to exactly 32 bytes.
SetMarketEmergencyStatusResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2480.
export interface SetMarketEmergencyStatusResult {
market: Address;
config: Address;
vault: Address;
}
setPauser#
Build SetPauser instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1365.
export function setPauser(input: SetPauserInput, programAddress?: Address): Promise<SdkResult<SetPauserResult>>;
Parameters
input: SetPauserInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<SetPauserResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
setReferrer#
Not documented.
Declaration source: packages/core/src/sdk.ts:1509.
export function setReferrer(input: SetReferrerInput, programAddress?: Address): Promise<SdkResult<{ referralAccount: Address; referrerEarningsAccount: Address; }>>;
Parameters
input: SetReferrerInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ referralAccount: Address; referrerEarningsAccount: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
SetReferrerAccounts#
Accounts for SetReferrer.
Declaration source: packages/core/src/instructions.ts:3276.
export interface SetReferrerAccounts extends BinaryRecorderTailAccounts {
referralAccount: Address;
referee: Address;
referrer: Address;
referrerEarningsAccount: Address;
systemProgram: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
settleAndCloseSpline#
Settle the seat and return its rent to the series in one atomic transaction.
Declaration source: packages/core/src/sdk.ts:3682.
export function settleAndCloseSpline(input: SettleSplineInput, programAddress?: Address): Promise<{ instructions: readonly [Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>, Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>]; accounts: Omit<AttachedSplineResult, "config">; }>;
Parameters
input: SettleSplineInput— Not documented. See SettleSplineInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<{ instructions: readonly [Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>, Instruction<string, readonly (import("node_modules/@solana/instructions/dist/types/accounts").AccountLookupMeta<string, string> | import("node_modules/@solana/instructions/dist/types/accounts").AccountMeta<string>)[]>]; accounts: Omit<AttachedSplineResult, "config">; }>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
SettlementOutcomeKind#
Discriminant for how a market's settlement should render. 'unresolved'
covers markets that have not reached a terminal outcome yet (a None/null
outcome) - callers should not render a settlement print in that case.
Declaration source: packages/core/src/market.ts:392.
export type SettlementOutcomeKind = 'up' | 'down' | 'expired' | 'unresolved';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
SettlementSummary#
Not documented.
Declaration source: packages/core/src/market.ts:409.
export interface SettlementSummary {
/** Which branch the UI should render. */
outcome: SettlementOutcomeKind;
/** Real-valued window-open price, or null if unavailable. */
startPrice: number | null;
/**
* Real-valued settlement (closing) price. Always null for `'expired'` and
* `'unresolved'` markets - an expired market never captured a closing
* print (see `set_expired` in `market.rs`), so any stray value the API
* forwards for that case is intentionally discarded.
*/
endPrice: number | null;
/**
* Signed percent change from start to end (`(end - start) / start * 100`).
* Null when either price is unavailable, the market is expired/unresolved,
* or `startPrice` is exactly zero (division guard).
*/
deltaPct: number | null;
}
Field documentation
outcome— Which branch the UI should render.startPrice— Real-valued window-open price, or null if unavailable.endPrice— Real-valued settlement (closing) price. Always null for'expired'and'unresolved'markets - an expired market never captured a closing print (seeset_expiredinmarket.rs), so any stray value the API forwards for that case is intentionally discarded.deltaPct— Signed percent change from start to end ((end - start) / start * 100). Null when either price is unavailable, the market is expired/unresolved, orstartPriceis exactly zero (division guard).
SettlementSummaryInput#
Raw settlement fields exactly as served by the market-detail API (see
marketDetailFormattedMarketServerSchema in @seesaw/api-contracts):
mantissa strings plus their independent Pyth exponents. Start and end are
decoded separately since nothing guarantees the same exponent was used for
both snapshots.
Declaration source: packages/core/src/market.ts:401.
export interface SettlementSummaryInput {
outcome: number | null;
startPrice: string | null;
startPriceExpo: number | null;
endPrice: string | null;
endPriceExpo: number | null;
}
settlementTokenProgramForStandard#
The quote (settlement) token program of a market: MarketAccount.settlementTokenStandard
0 is classic SPL Token, 1 is Token-2022 (spec/IX.md §60.1). Every route's token_program
slot and every quote-account ATA of the market use it; YES/NO share accounts stay on
classic SPL Token.
Declaration source: packages/core/src/currencyAccounts.ts:108.
export function settlementTokenProgramForStandard(standard: number): Address;
Parameters
standard: number— Not documented.
Returns
Address
Not documented.
Throws
{SeesawValidationError} For any other standard.
</details> <details> <summary>SettlementTokenStandard</summary>SettlementTokenStandard#
Not documented.
Declaration source: packages/core/src/currency/admission.ts:66.
export type SettlementTokenStandard = 'spl-token' | 'token-2022';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
settleSpline#
Not documented.
Declaration source: packages/core/src/sdk.ts:3649.
export function settleSpline(input: SettleSplineInput, programAddress?: Address): Promise<SdkResult<Omit<AttachedSplineResult, "config">>>;
Parameters
input: SettleSplineInput— Not documented. See SettleSplineInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<Omit<AttachedSplineResult, "config">>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
SettleSplineAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4789.
export interface SettleSplineAccounts extends BinaryRecorderTailAccounts {
caller: Address;
spline: Address;
series: Address;
splineVault: Address;
market: Address;
marketVault: Address;
tokenProgram: Address;
/** The spline vault's (and market's) settlement mint, for `TransferChecked`. */
settlementMint: Address;
/** Required for externally resolved markets; placed before the recorder tail. */
marketMeta?: Address;
}
Field documentation
settlementMint— The spline vault's (and market's) settlement mint, forTransferChecked.marketMeta— Required for externally resolved markets; placed before the recorder tail.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
SettleSplineInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3636.
export interface SettleSplineInput {
caller: Address;
market: Address;
/** Defaults to the market creator. A permissionless caller can settle any maker's seat. */
maker?: Address;
marketState: Pick<
MarketAccount,
'pythFeedId' | 'durationSeconds' | 'creator' | 'settlementMint' | 'settlementTokenStandard'
>;
marketMeta?: Address;
tokenProgram?: Address;
}
Field documentation
maker— Defaults to the market creator. A permissionless caller can settle any maker's seat.
SharedMarketInfo#
Market info for display purposes.
Declaration source: packages/core/src/types-common.ts:55.
export interface MarketInfo {
marketId: bigint;
feedId: Uint8Array;
durationSeconds: bigint;
tStart: bigint;
tEnd: bigint;
startPrice: bigint;
endPrice: bigint;
outcome: number;
totalYesShares: bigint;
totalNoShares: bigint;
/** Opaque, frozen value decoded from account offset 152. */
frozenTotalCollateral: bigint;
totalVolume: bigint;
totalTrades: number;
totalPositions: number;
settledPositions: number;
}
Field documentation
frozenTotalCollateral— Opaque, frozen value decoded from account offset 152.
SharedOrderbookLevel#
Orderbook level for display.
Declaration source: packages/core/src/types-common.ts:87.
export interface OrderbookLevel {
price: number;
quantity: bigint;
orderCount: number;
}
SharedPositionSummary#
Position summary.
Declaration source: packages/core/src/types-common.ts:75.
export interface PositionSummary {
yesShares: bigint;
noShares: bigint;
lockedYesShares: bigint;
lockedNoShares: bigint;
collateralDeposited: bigint;
collateralLocked: bigint;
payout: bigint;
settled: boolean;
}
ShareSnapshotKind#
Not documented.
Declaration source: packages/core/src/api/social.ts:156.
export type ShareSnapshotKind = 'open' | 'settled' | 'summary';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
shouldAskAdvisoryConfirm#
Decides whether to interrupt: true only for a flagged currency not yet acknowledged.
Declaration source: packages/core/src/tokensXyz/advisory.ts:37.
export function shouldAskAdvisoryConfirm(row: CurrencyMetadata | null | undefined, acknowledgements: AdvisoryAcknowledgements): row is CurrencyMetadata;
Parameters
row: CurrencyMetadata | null | undefined— Not documented. See CurrencyMetadata for its declaration and available field documentation.acknowledgements: { has: (row: CurrencyMetadata) => boolean; add: (row: CurrencyMetadata) => void; }— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>SideKey</summary>SideKey#
A user-facing side: up = YES outcome, down = NO outcome.
Declaration source: packages/core/src/ux/sides.ts:14.
export type SideKey = 'up' | 'down';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
sideNaming#
yesno for external/event markets, updown for native price markets.
isExternal: true always wins. Otherwise a kind naming an event-style
source (external, event, mirror, sports, polymarket, kalshi, optic odds,
reference) means yesno. Anything else — including a missing kind — is a
native price round and reads Up / Down.
Declaration source: packages/core/src/ux/sides.ts:43.
export function sideNaming(market: { isExternal?: boolean; kind?: string | null; }): SideNaming;
Parameters
market: { isExternal?: boolean; kind?: string | null; }— Not documented.
Returns
SideNaming
Not documented.
Throws
Not documented.
</details> <details> <summary>SideNaming</summary>SideNaming#
Which pair of words a market's sides are shown with.
Declaration source: packages/core/src/ux/sides.ts:17.
export type SideNaming = 'updown' | 'yesno';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
sideToOutcome#
up → YES, down → NO.
Declaration source: packages/core/src/ux/sides.ts:25.
export function sideToOutcome(side: SideKey): OutcomeAsset;
Parameters
side: SideKey— Not documented. See SideKey for its declaration and available field documentation.
Returns
OutcomeAsset
Not documented.
Throws
Not documented.
</details> <details> <summary>SignatureStatusObservation</summary>SignatureStatusObservation#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:1088.
export interface SignatureStatusObservation {
readonly err?: unknown;
readonly confirmationStatus?: string | null;
readonly slot?: number | bigint | null;
}
SignedTransactionIdentity#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:52.
export interface SignedTransactionIdentity {
/** Base58 fee-payer signature: the transaction id every RPC indexes by. */
readonly signature: string;
readonly feePayer: string;
/** Recent blockhash (or durable nonce value) bound into the message. */
readonly lifetimeToken: string;
readonly version: SignedTransactionVersion;
readonly requiredSignatures: number;
/** Signers whose slot is still empty. A partially signed wire cannot land. */
readonly missingSigners: readonly string[];
readonly messageBytes: Uint8Array;
}
Field documentation
signature— Base58 fee-payer signature: the transaction id every RPC indexes by.lifetimeToken— Recent blockhash (or durable nonce value) bound into the message.missingSigners— Signers whose slot is still empty. A partially signed wire cannot land.
SignedTransactionVersion#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:50.
export type SignedTransactionVersion = 'legacy' | 0 | 1;
Field documentation
toString— Returns a string representation of an object. Returns a string representation of a string.valueOf— Returns the primitive value of the specified object.toLocaleString— Converts a number to a string by using the current or specified locale. Returns a date converted to a string using the current locale.
signedWireMatchesUnsignedMessage#
Whether the wallet signed exactly the message it was handed. A mismatch is recorded on the attempt (wallets may legitimately add instructions); the identity is always derived from the bytes that will actually be sent.
Declaration source: packages/core/src/transactionAttempt.ts:157.
export function signedWireMatchesUnsignedMessage(unsignedWire: Uint8Array, signedWire: Uint8Array): boolean;
Parameters
unsignedWire: Uint8Array<ArrayBufferLike>— Not documented.signedWire: Uint8Array<ArrayBufferLike>— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>SimplifiedOrderbookLevel</summary>SimplifiedOrderbookLevel#
Not documented.
Declaration source: packages/core/src/api/types.ts:96.
export interface SimplifiedOrderbookLevel {
price: number;
quantity: bigint;
}
simulateTakerFill#
Like {@link estimateTakerFill}, on a caller-owned working state that it
updates in place (the seats of params.seats must be the seats of state).
Declaration source: packages/core/src/router/takerFill.ts:260.
export function simulateTakerFill(params: TakerFillParams, state: TakerFillWorkingState): TakerFillEstimate;
Parameters
params: TakerFillParams— Not documented. See TakerFillParams for its declaration and available field documentation.state: TakerFillWorkingState— Not documented. See TakerFillWorkingState for its declaration and available field documentation.
Returns
TakerFillEstimate
Not documented.
Throws
Not documented.
</details> <details> <summary>sizeToY</summary>sizeToY#
Map a cumulative size to a y coordinate; maxSize is the shared vertical scale.
Declaration source: packages/core/src/depthChart.ts:48.
export function sizeToY(size: bigint, maxSize: bigint, height: number): number;
Parameters
size: bigint— Not documented.maxSize: bigint— Not documented.height: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>sleep</summary>sleep#
Not documented.
Declaration source: packages/core/src/api/client.ts:514.
export function sleep(ms: number): Promise<void>;
Parameters
ms: number— Not documented.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>snapshotEnd</summary>snapshotEnd#
Build SnapshotEnd instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:574.
export function snapshotEnd(input: SnapshotInput, programAddress?: Address): Promise<SdkResult<SnapshotResult>>;
Parameters
input: SnapshotInput— Not documented. See SnapshotInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<SnapshotResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
SnapshotEndAccounts#
Accounts for SnapshotEnd instruction.
Declaration source: packages/core/src/instructions.ts:1457.
export interface SnapshotEndAccounts extends BinaryRecorderTailAccounts {
market: Address;
priceUpdate: Address;
caller: Address;
config: Address;
vault: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
SnapshotInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:556.
export interface SnapshotInput {
marketId: bigint;
pythFeedId: Uint8Array;
durationSeconds: bigint;
creator: Address;
/** Registered currency record PDA of the market's settlement currency. */
currencyRecord: Address;
priceUpdate: Address;
caller: Address;
}
Field documentation
currencyRecord— Registered currency record PDA of the market's settlement currency.
SnapshotResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:567.
export interface SnapshotResult {
market: Address;
}
SOLANA_GENESIS_HASHES#
Solana genesis hashes used for RPC cluster validation.
Declaration source: packages/core/src/constants.ts:99.
export declare const SOLANA_GENESIS_HASHES: { readonly 'mainnet-beta': "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"; readonly devnet: "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"; readonly testnet: "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY"; };
SOLANA_MAX_TRANSACTION_SIZE#
Maximum serialized size of a legacy or v0 Solana transaction, in bytes. Each instruction contributes: 1 (program ID index) + 1 (accounts length) + N (account indices) + 2 (data length) + M (instruction data bytes). Callers building multi-instruction transactions should verify the final serialized size before signing.
NOTE: this is NOT the universal cap any more. SIMD-0385 introduces the v1
transaction format (feature gate enable_tx_v1) whose cap is 4,096 bytes.
Use {@link maxTransactionSize} where the format is a runtime choice.
Declaration source: packages/core/src/instructions.ts:219.
export declare const SOLANA_MAX_TRANSACTION_SIZE: 1232;
SOLANA_NETWORK_BY_GENESIS_HASH#
Reverse lookup for getGenesisHash RPC responses.
Declaration source: packages/core/src/constants.ts:108.
export declare const SOLANA_NETWORK_BY_GENESIS_HASH: Record<string, "mainnet-beta" | "devnet" | "testnet">;
SOLANA_TX_V1_FEATURE_GATE#
Agave feature-gate pubkey for enable_tx_v1 (SIMD-0385).
Declaration source: packages/core/src/instructions.ts:230.
export declare const SOLANA_TX_V1_FEATURE_GATE: "txv1aq4pp281K9um3tnPgkfX8UqtFT6wcVW3hNezGLL";
SOLANA_V1_MAX_TRANSACTION_SIZE#
Maximum serialized size of a SIMD-0385 v1 transaction, in bytes.
v1 is a distinct wire layout (fixed-width instruction headers, inline address
array, resource config in the header mask, signatures at the tail) and has
no address lookup tables. It is gated by enable_tx_v1.
Declaration source: packages/core/src/instructions.ts:227.
export declare const SOLANA_V1_MAX_TRANSACTION_SIZE: 4096;
SolanaGenesisCluster#
Not documented.
Declaration source: packages/core/src/constants.ts:105.
export type SolanaGenesisCluster = keyof typeof SOLANA_GENESIS_HASHES;
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
solanaRpcDataSource#
Adapt a Kit RPC client (createSolanaRpc(url)) to the core RpcDataSource.
Data is read as base64; memcmp bytes are sent as base58.
Declaration source: packages/core/src/solanaRpcDataSource.ts:63.
export function solanaRpcDataSource(rpc: Rpc<SolanaRpcDataSourceApi>, options?: SolanaRpcDataSourceOptions): RpcDataSource;
Parameters
rpc: Rpc<SolanaRpcDataSourceApi>— Not documented.options: SolanaRpcDataSourceOptions— Not documented. Default:{}. See SolanaRpcDataSourceOptions for its declaration and available field documentation.
Returns
RpcDataSource
Not documented.
Throws
Not documented.
Defaults
options:{}.
SolanaRpcDataSourceApi#
The three account reads the adapter uses.
Declaration source: packages/core/src/solanaRpcDataSource.ts:26.
export type SolanaRpcDataSourceApi = GetAccountInfoApi &
GetMultipleAccountsApi &
GetProgramAccountsApi;
Field documentation
getAccountInfo— Fetches information associated with the account at the given address.
If the account has data, it will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label base64} Fetches information associated with the account at the given address.
If the account has data, it will first be compressed using ZStandard and the result will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label base64-zstd-compressed} Fetches information associated with the account at the given address.
If the account has data, the server will attempt to process it using a parser specific to the account's owning program. If successful, the parsed data will be returned in the response as JSON. Otherwise, the raw account data will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label parsed} Fetches information associated with the account at the given address.
If the account has data, it will be returned in the response as a tuple whose first element is a base58-encoded string. If the account contains more than 129 bytes of data, this method will raise an error.
{@label base58} Fetches information associated with the account at the given address.
If the account has data, it will be returned in the response as a base58-encoded string. If the account contains more than 129 bytes of data, this method will raise an error.
{@label base58-legacy}
getMultipleAccounts— Fetches information associated with the accounts at the given addresses.
If the accounts have data, it will be returned in the response as a tuple whose first element is a base64-encoded string. Fetches information associated with the accounts at the given addresses.
If the accounts have data, it will first be compressed using ZStandard and the result will be returned in the response as a tuple whose first element is a base64-encoded string. Fetches information associated with the accounts at the given addresses.
If the accounts have data, the server will attempt to process it using a parser specific to each account's owning program. If successful, the parsed data will be returned in the response as JSON. Otherwise, the raw account data will be returned in the response as a tuple whose first element is a base64-encoded string. Fetches information associated with the accounts at the given addresses.
If the accounts have data, it will be returned in the response as a tuple whose first element is a base58-encoded string. If any account contains more than 129 bytes of data, this method will raise an error. Fetches information associated with the accounts at the given addresses.
If the accounts have data, it will be returned in the response as a base58-encoded string. If any account contains more than 129 bytes of data, this method will raise an error.
getProgramAccounts— Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label base64-withcontext} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label base64} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will first be compressed using ZStandard and the result will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label base64-zstd-compressed-withcontext} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will first be compressed using ZStandard and the result will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label base64-zstd-compressed} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, the server will attempt to process it using a parser specific to the owning program. If successful, the parsed data will be returned in the response as JSON. Otherwise, the raw account data will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label parsed-withcontext} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, the server will attempt to process it using a parser specific to the owning program. If successful, the parsed data will be returned in the response as JSON. Otherwise, the raw account data will be returned in the response as a tuple whose first element is a base64-encoded string.
{@label parsed} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will be returned in the response as a tuple whose first element is a base58-encoded string. If any account contains more than 129 bytes of data, this method will raise an error.
{@label base58-withcontext} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will be returned in the response as a tuple whose first element is a base58-encoded string. If any account contains more than 129 bytes of data, this method will raise an error.
{@label base58} Fetches information associated with all accounts owned by the program at the given address.
If the accounts have data, it will be returned in the response as a base58-encoded string. If any account contains more than 129 bytes of data, this method will raise an error.
{@label base58-legacy-withcontext}
</details> <details> <summary>SolanaRpcDataSourceOptions</summary>SolanaRpcDataSourceOptions#
Not documented.
Declaration source: packages/core/src/solanaRpcDataSource.ts:30.
export interface SolanaRpcDataSourceOptions {
/** Used when a call names no commitment. Default `confirmed`. */
readonly commitment?: Commitment;
/** Include rent balances for consumers that need them. */
readonly includeLamports?: boolean;
readonly abortSignal?: AbortSignal;
}
Field documentation
commitment— Used when a call names no commitment. Defaultconfirmed.includeLamports— Include rent balances for consumers that need them.
SolanaTransactionVersion#
Not documented.
Declaration source: packages/core/src/instructions.ts:235.
export type SolanaTransactionVersion = 'legacy' | 'v0' | 'v1';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
sourceResult#
Not documented.
Declaration source: packages/core/src/sourceResult/index.ts:8.
export declare const sourceResult: typeof import("packages/core/src/sourceResult/index");
SourceResultCode#
Not documented.
Declaration source: packages/core/src/externalPayout.ts:10.
export type SourceResultCode = 'Yes' | 'No' | 'Scalar';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
SPL_TOKEN_PROGRAM_IDS#
Classic SPL Token and Token-2022 program ids. Both share the 82-byte mint base.
Declaration source: packages/core/src/currency/mint.ts:19.
export declare const SPL_TOKEN_PROGRAM_IDS: readonly string[];
SPLINE_ACCOUNT_DISCRIMINATOR#
SplineAccount discriminator: literal SPLINE\0\0.
Declaration source: packages/core/src/constants.ts:232.
export declare const SPLINE_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
SPLINE_ACCOUNT_SIZE#
D0{byte} Fixed maker spline account size.
Declaration source: packages/core/src/constants.ts:294.
export declare const SPLINE_ACCOUNT_SIZE: 896;
SPLINE_ACCOUNT_VERSION#
D0{id} Current fixed-layout spline account version.
Declaration source: packages/core/src/constants.ts:296.
export declare const SPLINE_ACCOUNT_VERSION: 2;
SPLINE_SEAT_ACCOUNT_SIZE#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:718.
export declare const SPLINE_SEAT_ACCOUNT_SIZE: 968;
SPLINE_SEAT_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:722.
export declare const SPLINE_SEAT_DISCRIMINATOR: Uint8Array<ArrayBufferLike>;
SPLINE_SEAT_MARKET_OFFSET#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:719.
export declare const SPLINE_SEAT_MARKET_OFFSET: 80;
SplineAccount#
Fixed-layout maker spline state account.
Declaration source: packages/core/src/types.ts:427.
export interface SplineAccount {
readonly quoteProfile: QuoteProfile;
readonly publishedByDelegate: boolean;
readonly authorityEpoch: number;
readonly validUntilSlot: bigint;
readonly installSlot: bigint;
readonly sessionExpirySlot: bigint;
readonly tradingGeneration?: number;
readonly discriminator: Uint8Array;
readonly version: number;
readonly bump: number;
readonly bidLevelCount: number;
readonly askLevelCount: number;
/**
* D0{1} Canonical bump of the spline's vault PDA, carved from the header
* reserve at offset 12. Zero means "not stored" (an account created before
* the carve); readers fall back to the canonical-bump search in that case.
*/
readonly vaultBump: number;
readonly creator: Address;
readonly quoteAuthority: Address;
readonly feedId: Uint8Array;
readonly durationSeconds: bigint;
readonly market: Address;
readonly marketId: bigint;
readonly sequence: bigint;
readonly midPriceBps: number;
readonly flags: number;
/** 0 = unbound, 1 = attached, 2 = settled with retained market identity. */
readonly attachmentStatus: 0 | 1 | 2;
readonly maxQuoteAgeSeconds: number;
readonly lastUpdateUnix: bigint;
readonly eligibilityAnchor: bigint;
readonly anchorMidBps: number;
readonly midJumpResetBps: number;
readonly maxBidOffsetBps: number;
readonly maxAskOffsetBps: number;
readonly attachedAt: bigint;
readonly committedCollateral: bigint;
readonly yesInventory: bigint;
readonly noInventory: bigint;
readonly defaultCommitAmount: bigint;
readonly consumedBidLots: bigint;
readonly consumedAskLots: bigint;
readonly eventSequence: bigint;
readonly generation: number;
readonly bidLevels: readonly CurveLevel[];
readonly askLevels: readonly CurveLevel[];
readonly roundingIdentity: Uint8Array;
readonly roundingBidLots: bigint;
readonly roundingAskLots: bigint;
readonly roundingBidQuote: bigint;
readonly roundingAskQuote: bigint;
readonly roundingBidFee: bigint;
readonly roundingAskFee: bigint;
}
Field documentation
vaultBump— D0{1} Canonical bump of the spline's vault PDA, carved from the header reserve at offset 12. Zero means "not stored" (an account created before the carve); readers fall back to the canonical-bump search in that case.attachmentStatus— 0 = unbound, 1 = attached, 2 = settled with retained market identity.
SplineCurveLevelSnapshot#
One compiled level of a maker spline's curve, exactly as
decodeSplineAccount serves it (CurveLevel,
program/src/logic/spline/shape.rs).
Levels are ordered by strictly increasing endQuantityLots AND strictly
increasing priceOffsetBps, which the decoder validates, so the FIRST level
whose cumulative endpoint is still above the consumed counter is also the
best executable price on that side.
Declaration source: packages/core/src/preflight/types.ts:64.
export interface SplineCurveLevelSnapshot {
/** Cumulative lots up to and including this level, share atoms. */
endQuantityLots: bigint;
/**
* Distance from `midPriceBps`. SUBTRACTED on the bid side, ADDED on the ask
* side (`SplineSnapshot::peek_level`, `logic/spline/snapshot.rs:211-215`).
*/
priceOffsetBps: number;
}
Field documentation
endQuantityLots— Cumulative lots up to and including this level, share atoms.priceOffsetBps— Distance frommidPriceBps. SUBTRACTED on the bid side, ADDED on the ask side (SplineSnapshot::peek_level,logic/spline/snapshot.rs:211-215).
SplineFairValueInput#
The fields of a SplineQuoteSnapshot this reference reads.
Declaration source: packages/core/src/analytics/bookAnalytics.ts:37.
export interface SplineFairValueInput {
active: boolean;
midPriceBps: number;
/** `0` disables the staleness gate, as on chain. */
maxQuoteAgeSeconds: number;
lastUpdateUnix: number;
}
Field documentation
maxQuoteAgeSeconds—0disables the staleness gate, as on chain.
SplineLiquidityReadOptions#
Not documented.
Declaration source: packages/core/src/splineSeatLiquidity.ts:189.
export interface SplineLiquidityReadOptions extends RpcScanConfig {
/** Estimated slots and seconds from the observed Clock to transaction landing. */
readonly landingDelaySlots: bigint;
readonly landingDelaySeconds: bigint;
}
Field documentation
landingDelaySlots— Estimated slots and seconds from the observed Clock to transaction landing.
SplineLiquiditySnapshot#
Not documented.
Declaration source: packages/core/src/splineSeatLiquidity.ts:195.
export interface SplineLiquiditySnapshot extends SplineSeatLiquidity {
readonly marketAddress: Address;
readonly market: MarketAccount;
readonly orderbook: OrderbookAccount;
readonly slot: bigint;
readonly unixTimestamp: bigint;
readonly landingSlot: bigint;
readonly landingUnix: bigint;
}
SplineQuoteSnapshot#
The market's canonical creator-owned maker spline, as PlaceOrder sees it.
Source of truth: the SplineAccount the instruction requires in its trailing
tail when the market's spline feature bit is set
(parse_place_order_runtime_tail, place_order/trailing_layout.rs:120-158),
projected into a SplineSnapshot by load_place_order_spline_inputs
(validation/loaders.rs:41-104).
The fields are the RAW account facts rather than a pre-computed quote: the program decides activeness, staleness and the level walk itself, and doing the same here keeps the decision in one place instead of smearing it over every adapter.
Declaration source: packages/core/src/preflight/types.ts:88.
export interface SplineQuoteSnapshot {
quoteProfile: QuoteProfile;
installSlot: bigint;
validUntilSlot: bigint;
/**
* `spline.creator` — the program's `snapshot.maker`. A taker whose own key
* equals it is SKIPPED (`best_spline_quote_peek`,
* `logic/place_order_processor/spline_integration.rs:150-181`), so a maker's
* own PostOnly order never crosses their own curve.
*/
maker: string;
/**
* `spline.is_active()` (`flags & FLAG_ACTIVE`). An inactive spline produces
* NO snapshot at all (`loaders.rs:81`), so its curve cannot be crossed.
*/
active: boolean;
/**
* `spline.max_quote_age_seconds`. `0` DISABLES the staleness gate; otherwise
* a quote older than this produces no snapshot (`loaders.rs:77-81`).
*/
maxQuoteAgeSeconds: number;
/** `spline.last_update_unix`, the anchor the staleness gate measures from. */
lastUpdateUnix: number;
/** `spline.mid_price_bps`, the canonical-frame centre of both curves. */
midPriceBps: number;
/**
* The COMPILED bid curve, truncated to `bidLevelCount`. `decodeSplineAccount`
* returns a fixed 16-entry array plus the count; pass only the live prefix.
*/
bidLevels: readonly SplineCurveLevelSnapshot[];
/** The compiled ask curve, truncated to `askLevelCount`. */
askLevels: readonly SplineCurveLevelSnapshot[];
/** `spline.consumed_bid_lots` — lots already taken off the bid curve. */
consumedBidLots: bigint;
/** `spline.consumed_ask_lots` — lots already taken off the ask curve. */
consumedAskLots: bigint;
}
Field documentation
maker—spline.creator— the program'ssnapshot.maker. A taker whose own key equals it is SKIPPED (best_spline_quote_peek,logic/place_order_processor/spline_integration.rs:150-181), so a maker's own PostOnly order never crosses their own curve.active—spline.is_active()(flags & FLAG_ACTIVE). An inactive spline produces NO snapshot at all (loaders.rs:81), so its curve cannot be crossed.maxQuoteAgeSeconds—spline.max_quote_age_seconds.0DISABLES the staleness gate; otherwise a quote older than this produces no snapshot (loaders.rs:77-81).lastUpdateUnix—spline.last_update_unix, the anchor the staleness gate measures from.midPriceBps—spline.mid_price_bps, the canonical-frame centre of both curves.bidLevels— The COMPILED bid curve, truncated tobidLevelCount.decodeSplineAccountreturns a fixed 16-entry array plus the count; pass only the live prefix.askLevels— The compiled ask curve, truncated toaskLevelCount.consumedBidLots—spline.consumed_bid_lots— lots already taken off the bid curve.consumedAskLots—spline.consumed_ask_lots— lots already taken off the ask curve.
SplineSeatAccount#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:984.
export type SplineSeatAccount = ReturnType<typeof decodeSplineSeatAccount>;
SplineSeatLiquidity#
Not documented.
Declaration source: packages/core/src/splineSeatLiquidity.ts:42.
export interface SplineSeatLiquidity {
readonly makerCandidates: readonly SeatCandidate[];
readonly routerSeats: readonly SeatQuoteState[];
readonly tickBoundSeats: readonly Address[];
}
SplineSeatSnapshotContext#
Not documented.
Declaration source: packages/core/src/splineSeatLiquidity.ts:30.
export interface SplineSeatSnapshotContext {
readonly market: Address;
/** Context slot shared with the market, book and Clock snapshot. */
readonly slot: bigint;
readonly tradingGeneration: number;
readonly attachedSeatCount?: number;
/** Expected landing slot and Unix time used to screen quote validity. */
readonly landingSlot: bigint;
readonly landingUnix: bigint;
readonly marketTick?: MarketTickV1Account | null;
}
Field documentation
slot— Context slot shared with the market, book and Clock snapshot.landingSlot— Expected landing slot and Unix time used to screen quote validity.
SplineVaultAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4884.
export interface SplineVaultAccounts extends BinaryRecorderTailAccounts {
creator: Address;
spline: Address;
splineVault: Address;
creatorTokenAccount: Address;
config: Address;
tokenProgram: Address;
/** The spline vault's settlement mint, for `TransferChecked`. */
settlementMint: Address;
}
Field documentation
settlementMint— The spline vault's settlement mint, forTransferChecked.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
SplineVaultAmountInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3753.
export interface SplineVaultAmountInput extends SplineAddressInput {
creatorTokenAccount: Address;
amount: bigint;
/** The spline vault's settlement mint. */
settlementMint: Address;
/** The spline vault's token program (its mint's owner); classic SPL Token when omitted. */
tokenProgram?: Address;
}
Field documentation
settlementMint— The spline vault's settlement mint.tokenProgram— The spline vault's token program (its mint's owner); classic SPL Token when omitted.
SplineVaultAmountParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:4880.
export interface SplineVaultAmountParams {
amount: bigint; // D6{stablecoin}
}
SponsoredFeedAccount#
The sponsored price-feed account read for E4: absent, or its owner and data.
Declaration source: packages/core/src/marketDiscovery.ts:145.
export type SponsoredFeedAccount = { readonly owner: Address; readonly data: Uint8Array } | null;
STANDIN_DISCLAIMER#
Required wording on every stand-in report and registry row (design §6.5).
Declaration source: packages/core/src/execution/capability.ts:58.
export declare const STANDIN_DISCLAIMER: "stand-in; not provider qualification";
StandinRecording#
Rust ace-standins Recording (renamed: core already exports a replay Recording).
Declaration source: packages/core/src/execution/standins.ts:106.
export interface StandinRecording {
readonly disclaimer: string;
readonly policy: string;
readonly switches: Switches;
readonly transactions: readonly RecordedTransaction[];
}
STATIC_MAX_BPS_FOR_BAND#
Not documented.
Declaration source: packages/core/src/computeBand.ts:12.
export declare const STATIC_MAX_BPS_FOR_BAND: 9900;
STATIC_MIN_BPS_FOR_BAND#
Not documented.
Declaration source: packages/core/src/computeBand.ts:11.
export declare const STATIC_MIN_BPS_FOR_BAND: 100;
STOP_LOSS_ASSOCIATED_TOKEN_PROGRAM#
Not documented.
Declaration source: packages/core/src/stopLoss/transaction.ts:59.
export declare const STOP_LOSS_ASSOCIATED_TOKEN_PROGRAM: Address;
STOP_LOSS_CENT_BPS#
One cent, in bps. Inputs are whole cents.
Declaration source: packages/core/src/stopLoss/trigger.ts:21.
export declare const STOP_LOSS_CENT_BPS: 100;
STOP_LOSS_COMPUTE_BUDGET_PROGRAM#
Not documented.
Declaration source: packages/core/src/stopLoss/transaction.ts:57.
export declare const STOP_LOSS_COMPUTE_BUDGET_PROGRAM: Address;
STOP_LOSS_COMPUTE_UNIT_LIMIT#
Not documented.
Declaration source: packages/core/src/stopLoss/compile.ts:29.
export declare const STOP_LOSS_COMPUTE_UNIT_LIMIT: 400000;
STOP_LOSS_DEFAULT_AUTH_DOMAIN#
Default domain the keeper binds its auth messages to.
Declaration source: packages/core/src/stopLoss/api.ts:50.
export declare const STOP_LOSS_DEFAULT_AUTH_DOMAIN: "stops.seesaw.markets";
STOP_LOSS_DEFAULT_COMPUTE_UNIT_PRICE#
Default priority fee a stop carries (µlamports/CU); paid by the owner only if it lands.
Declaration source: packages/core/src/stopLoss/compile.ts:28.
export declare const STOP_LOSS_DEFAULT_COMPUTE_UNIT_PRICE: 50000n;
STOP_LOSS_MAX_COMPUTE_UNIT_PRICE#
Upper bound on the priority fee a stored stop may carry (µlamports per CU).
Declaration source: packages/core/src/stopLoss/transaction.ts:62.
export declare const STOP_LOSS_MAX_COMPUTE_UNIT_PRICE: 2000000n;
STOP_LOSS_MAX_NONCE_SLOTS#
At most this many nonce accounts (and so concurrently active stops) per owner.
Declaration source: packages/core/src/stopLoss/nonce.ts:34.
export declare const STOP_LOSS_MAX_NONCE_SLOTS: 16;
STOP_LOSS_MAX_PRICE_BPS#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:19.
export declare const STOP_LOSS_MAX_PRICE_BPS: 9999;
STOP_LOSS_MIN_FILL_ATOMS#
IOC atomic minimum fill. It must be non-zero: with min_fill = 0 an IOC that
finds no executable bid succeeds with nothing filled, which would consume the
durable nonce and silently kill the stop. With 1 such an attempt is
rejected by the program (InsufficientFill) and the keeper's simulation
refuses to send it.
Declaration source: packages/core/src/stopLoss/trigger.ts:29.
export declare const STOP_LOSS_MIN_FILL_ATOMS: 1n;
STOP_LOSS_MIN_PRICE_BPS#
Lowest and highest tradable price in an outcome's own space.
Declaration source: packages/core/src/stopLoss/trigger.ts:18.
export declare const STOP_LOSS_MIN_PRICE_BPS: 1;
STOP_LOSS_MIN_REMAINING_MS#
A stop cannot be created this close to the end of the round.
Declaration source: packages/core/src/stopLoss/trigger.ts:31.
export declare const STOP_LOSS_MIN_REMAINING_MS: 60000;
STOP_LOSS_NONCE_ACCOUNT_LENGTH#
D0{byte} Size of a System nonce account.
Declaration source: packages/core/src/stopLoss/nonce.ts:30.
export declare const STOP_LOSS_NONCE_ACCOUNT_LENGTH: 80;
STOP_LOSS_NONCE_SEED_PREFIX#
Seed prefix of a stop's nonce account; the slot index follows.
Declaration source: packages/core/src/stopLoss/nonce.ts:32.
export declare const STOP_LOSS_NONCE_SEED_PREFIX: "seesaw-stop-";
STOP_LOSS_OPEN_STATUSES#
Not documented.
Declaration source: packages/core/src/stopLoss/api.ts:12.
export declare const STOP_LOSS_OPEN_STATUSES: readonly StopLossStatus[];
STOP_LOSS_RECENT_BLOCKHASHES_SYSVAR#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:25.
export declare const STOP_LOSS_RECENT_BLOCKHASHES_SYSVAR: Address;
STOP_LOSS_RENT_SYSVAR#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:27.
export declare const STOP_LOSS_RENT_SYSVAR: Address;
STOP_LOSS_SELF_TRADE_BEHAVIOR#
Self-trade behaviour byte the stop encodes: CancelProvide, the SDK default.
Declaration source: packages/core/src/stopLoss/trigger.ts:33.
export declare const STOP_LOSS_SELF_TRADE_BEHAVIOR: 1;
STOP_LOSS_SESSION_ACTION#
Signed-message action that opens an API session.
Declaration source: packages/core/src/stopLoss/api.ts:48.
export declare const STOP_LOSS_SESSION_ACTION: "POST /v1/session";
STOP_LOSS_SYSTEM_INSTRUCTION_TAGS#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:199.
export declare const STOP_LOSS_SYSTEM_INSTRUCTION_TAGS: Readonly<{ createAccountWithSeed: 3; advanceNonceAccount: 4; withdrawNonceAccount: 5; initializeNonceAccount: 6; }>;
STOP_STRATEGY_ROUTE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:54.
export declare const STOP_STRATEGY_ROUTE: 87;
stopLossAddressBytes#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:45.
export function stopLossAddressBytes(value: Address | string): Uint8Array;
Parameters
value: string | Address— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
Not documented.
</details> <details> <summary>stopLossAddressFromBytes</summary>stopLossAddressFromBytes#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:49.
export function stopLossAddressFromBytes(bytes: Uint8Array): Address;
Parameters
bytes: Uint8Array<ArrayBufferLike>— Not documented.
Returns
Address
Not documented.
Throws
Not documented.
</details> <details> <summary>stopLossBpsToCents</summary>stopLossBpsToCents#
bps → cents (may be fractional for off-cent ticks).
Declaration source: packages/core/src/stopLoss/trigger.ts:197.
export function stopLossBpsToCents(bps: number): number;
Parameters
bps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>stopLossCentsToBps</summary>stopLossCentsToBps#
Whole cents → bps.
Declaration source: packages/core/src/stopLoss/trigger.ts:192.
export function stopLossCentsToBps(cents: number): number;
Parameters
cents: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>StopLossInput</summary>StopLossInput#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:87.
export interface StopLossInput {
readonly triggerBps: number;
readonly floorBps: number;
readonly quantity: bigint;
/** Shares of this outcome the owner holds, when known. */
readonly heldQuantity?: bigint | null;
/** The outcome's current best bid, when known. */
readonly currentBidBps?: number | null;
readonly nowMs: number;
readonly marketEndMs: number;
}
Field documentation
heldQuantity— Shares of this outcome the owner holds, when known.currentBidBps— The outcome's current best bid, when known.
StopLossInputError#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:78.
export type StopLossInputError =
| 'triggerRange'
| 'floorRange'
| 'floorAboveTrigger'
| 'quantity'
| 'exceedsHoldings'
| 'wouldTriggerNow'
| 'roundEnding';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
StopLossKeeperClient#
Not documented.
Declaration source: packages/core/src/stopLoss/client.ts:175.
export type StopLossKeeperClient = ReturnType<typeof createStopLossKeeperClient>;
Field documentation
openSession— Open a session: the wallet signs one JSON message bound to the keeper's domain, a fresh nonce of at least 32 characters and the current time.createStop— Register an owner-signed stop sell (base64 wire). The keeper validates it again.cancelStop— Forget a stop at the keeper. Close its nonce on chain first; see the module comment.
StopLossKeeperError#
Not documented.
Declaration source: packages/core/src/stopLoss/client.ts:24.
export declare class StopLossKeeperError extends Error {
constructor(status: number, code: string, detail: string | undefined);
readonly status: number;
/**
* The keeper's stable error code, e.g. `nonce-in-use` or `market-not-trading`.
*/
readonly code: string;
readonly detail?: string | undefined;
}
Parameters
status: number— Not documented.code: string— The keeper's stable error code, e.g.nonce-in-useormarket-not-trading.detail: string | undefined— Not documented.
Throws
Not documented.
</details> <details> <summary>StopLossKeeperFetch</summary>StopLossKeeperFetch#
Not documented.
Declaration source: packages/core/src/stopLoss/client.ts:40.
export type StopLossKeeperFetch = (
url: URL,
init: {
method: 'GET' | 'POST' | 'DELETE';
redirect: 'error';
credentials: 'omit';
headers: Record<string, string>;
body?: string;
signal?: AbortSignal;
}
) => Promise<Pick<Response, 'ok' | 'status' | 'json'>>;
StopLossKeeperRecord#
A stop as the keeper returns it: the public record plus the nonce value it was signed on.
Declaration source: packages/core/src/stopLoss/client.ts:22.
export type StopLossKeeperRecord = StopLossRecord & { readonly nonceValue: string };
Field documentation
quantity— Share atoms, decimal string.signature— The sell's signature once submitted.
stopLossMessageMatchesUnsigned#
Check that the wallet signed the complete reviewed message byte for byte.
Declaration source: packages/core/src/stopLoss/compile.ts:85.
export function stopLossMessageMatchesUnsigned(unsigned: Uint8Array, signed: ParsedStopLossTransaction): boolean;
Parameters
unsigned: Uint8Array<ArrayBufferLike>— Not documented.signed: ParsedStopLossTransaction— Not documented. See ParsedStopLossTransaction for its declaration and available field documentation.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>stopLossNonceSeed</summary>stopLossNonceSeed#
Not documented.
Declaration source: packages/core/src/stopLoss/nonce.ts:76.
export function stopLossNonceSeed(slot: number): string;
Parameters
slot: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>StopLossOrderInput</summary>StopLossOrderInput#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:154.
export interface StopLossOrderInput {
readonly outcome: OutcomeAsset;
readonly quantity: bigint;
readonly floorBps: number;
/** The market's `t_end`, unix seconds. The signed sell is dead after it. */
readonly marketEndUnixSeconds: bigint;
readonly treasuryIndex: number;
}
Field documentation
marketEndUnixSeconds— The market'st_end, unix seconds. The signed sell is dead after it.
stopLossOrderParams#
The exact PlaceOrder parameters a stop signs: IOC SELL of quantity at a
limit (and worst acceptable price) of the floor, minimum fill 1 atom, valid
until the end of the round, nothing left resting.
Declaration source: packages/core/src/stopLoss/trigger.ts:168.
export function stopLossOrderParams(input: StopLossOrderInput): PlaceOrderParams;
Parameters
input: StopLossOrderInput— Not documented. See StopLossOrderInput for its declaration and available field documentation.
Returns
PlaceOrderParams
Not documented.
Throws
Not documented.
</details> <details> <summary>StopLossRecord</summary>StopLossRecord#
Not documented.
Declaration source: packages/core/src/stopLoss/api.ts:14.
export interface StopLossRecord {
readonly id: string;
readonly owner: string;
readonly market: string;
readonly outcome: OutcomeAsset;
/** Share atoms, decimal string. */
readonly quantity: string;
readonly triggerBps: number;
readonly floorBps: number;
readonly nonceAccount: string;
readonly status: StopLossStatus;
readonly createdAtMs: number;
readonly updatedAtMs: number;
readonly marketEndsAtMs: number;
readonly lastBidBps: number | null;
readonly lastState: StopLossTriggerState | null;
/** The sell's signature once submitted. */
readonly signature: string | null;
readonly error: string | null;
}
Field documentation
quantity— Share atoms, decimal string.signature— The sell's signature once submitted.
StopLossSessionResponse#
Not documented.
Declaration source: packages/core/src/stopLoss/api.ts:42.
export interface StopLossSessionResponse {
readonly token: string;
readonly expiresAtMs: number;
}
StopLossStatus#
Not documented.
Declaration source: packages/core/src/stopLoss/api.ts:10.
export type StopLossStatus = 'active' | 'submitted' | 'filled' | 'cancelled' | 'expired' | 'failed';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
stopLossSystemInstructionTag#
Parse the tag of a System instruction, or null when the data is too short.
Declaration source: packages/core/src/stopLoss/nonce.ts:194.
export function stopLossSystemInstructionTag(data: Uint8Array): number | null;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>StopLossTransactionError</summary>StopLossTransactionError#
Not documented.
Declaration source: packages/core/src/stopLoss/transaction.ts:79.
export declare class StopLossTransactionError extends Error {
constructor(code: StopLossTransactionErrorCode, message: string);
readonly code: StopLossTransactionErrorCode;
}
Parameters
code: StopLossTransactionErrorCode— Not documented. See StopLossTransactionErrorCode for its declaration and available field documentation.message: string— Not documented.
Throws
Not documented.
</details> <details> <summary>StopLossTransactionErrorCode</summary>StopLossTransactionErrorCode#
Not documented.
Declaration source: packages/core/src/stopLoss/transaction.ts:66.
export type StopLossTransactionErrorCode =
| 'malformed'
| 'version'
| 'lookupTables'
| 'signers'
| 'signature'
| 'nonce'
| 'instructions'
| 'computeBudget'
| 'program'
| 'order'
| 'accounts';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
StopLossTransactionExpectation#
Not documented.
Declaration source: packages/core/src/stopLoss/transaction.ts:326.
export interface StopLossTransactionExpectation {
readonly programAddress: Address;
/** The market as read from chain (never from the client). */
readonly market: {
readonly address: Address;
readonly settlementMint: Address;
/** `MarketAccount.settlementTokenStandard` (0 classic, 1 Token-2022); classic when omitted. */
readonly settlementTokenStandard?: number;
readonly yesMint: Address;
readonly noMint: Address;
readonly tEnd: bigint;
};
/** Legacy creator seat accepted for older wires, when the market enables it. */
readonly creatorSpline: Address | null;
readonly owner?: Address;
readonly outcome?: OutcomeAsset;
readonly quantity?: bigint;
readonly floorBps?: number;
/**
* Ed25519 verification of the owner signature over the message. Injected so
* the module stays usable where WebCrypto Ed25519 is missing (React Native);
* a server MUST pass one.
*/
readonly verifySignature?: (
publicKey: Uint8Array,
signature: Uint8Array,
message: Uint8Array
) => Promise<boolean> | boolean;
}
Field documentation
market— The market as read from chain (never from the client).creatorSpline— Legacy creator seat accepted for older wires, when the market enables it.verifySignature— Ed25519 verification of the owner signature over the message. Injected so the module stays usable where WebCrypto Ed25519 is missing (React Native); a server MUST pass one.
StopLossTriggerEvaluation#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:46.
export interface StopLossTriggerEvaluation {
/**
* - `noBids`: nobody is bidding, so there is no price and nothing to sell into.
* - `waiting`: the best bid is above the trigger.
* - `triggered`: the best bid is at or below the trigger and at or above the
* floor — the sell can execute now.
* - `gapped`: the best bid fell straight through the floor; the sell would
* fill nothing, so the stop keeps waiting for a bid back inside the band.
*/
readonly state: StopLossTriggerState;
readonly bestBidBps: number | null;
/** Share atoms bid at or above the floor, capped at the stop's quantity. */
readonly fillableQuantity: bigint;
}
Field documentation
state— -noBids: nobody is bidding, so there is no price and nothing to sell into.waiting: the best bid is above the trigger.triggered: the best bid is at or below the trigger and at or above the floor — the sell can execute now.gapped: the best bid fell straight through the floor; the sell would fill nothing, so the stop keeps waiting for a bid back inside the band.fillableQuantity— Share atoms bid at or above the floor, capped at the stop's quantity.
StopLossTriggerInput#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:37.
export interface StopLossTriggerInput {
readonly triggerBps: number;
readonly floorBps: number;
/** Share atoms the stop sells. */
readonly quantity: bigint;
/** The stopped outcome's own lane (bids best-first, outcome bps). */
readonly lane: OutcomeLaneBook;
}
Field documentation
quantity— Share atoms the stop sells.lane— The stopped outcome's own lane (bids best-first, outcome bps).
StopLossTriggerState#
Not documented.
Declaration source: packages/core/src/stopLoss/trigger.ts:35.
export type StopLossTriggerState = 'noBids' | 'waiting' | 'triggered' | 'gapped';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
StoredOrderSide#
Stored custody side inside Order.original_side, generated from
program/src/state/orderbook.rs::OrderSide via the ABI manifest.
Zero is the empty-slot sentinel. Names describe economics: Buy* sides are
canonical bids that lock quote and receive the named outcome; Sell* sides
are canonical asks that escrow the named outcome and receive quote.
Declaration source: packages/core/src/types.ts:77.
export declare const StoredOrderSide: { readonly BuyYes: 1; readonly SellYes: 2; readonly BuyNo: 3; readonly SellNo: 4; };
storedOrderSideLabel#
Not documented.
Declaration source: packages/core/src/types.ts:114.
export function storedOrderSideLabel(value: number): string;
Parameters
value: number— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>STRATEGY_ACCOUNT_SIZE</summary>STRATEGY_ACCOUNT_SIZE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:48.
export declare const STRATEGY_ACCOUNT_SIZE: 640;
STRATEGY_ACTIONS#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:60.
export declare const STRATEGY_ACTIONS: { readonly place: number; readonly cancel: number; readonly reduce: number; readonly merge: number; readonly withdrawQuote: number; };
STRATEGY_ACTIVITY_TYPES#
Not documented.
Declaration source: packages/core/src/api/strategyActivity.ts:4.
export declare const STRATEGY_ACTIVITY_TYPES: readonly ["configure_strategy", "stop_strategy", "resume_strategy", "close_strategy", "reset_strategy_capital", "cancel_order_by_client_id", "cancel_owner_orders", "strategy_cancel_order_ids", "strategy_reduce_order", "strategy_merge_complete_set", "strategy_withdraw_quote"];
STRATEGY_ID_NONE#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:49.
export declare const STRATEGY_ID_NONE: 65535;
StrategyAccount#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:337.
export type StrategyAccount = ReturnType<typeof decodeStrategyAccount>;
StrategyActivityItem#
Not documented.
Declaration source: packages/core/src/api/strategyActivity.ts:48.
export type StrategyActivityItem = z.infer<typeof strategyActivityItemSchema>;
strategyActivityItemSchema#
Not documented.
Declaration source: packages/core/src/api/strategyActivity.ts:21.
export declare const strategyActivityItemSchema: z.ZodObject<{ type: z.ZodEnum<{ configure_strategy: "configure_strategy"; stop_strategy: "stop_strategy"; resume_strategy: "resume_strategy"; close_strategy: "close_strategy"; reset_strategy_capital: "reset_strategy_capital"; cancel_order_by_client_id: "cancel_order_by_client_id"; cancel_owner_orders: "cancel_owner_orders"; strategy_cancel_order_ids: "strategy_cancel_order_ids"; strategy_reduce_order: "strategy_reduce_order"; strategy_merge_complete_set: "strategy_merge_complete_set"; strategy_withdraw_quote: "strategy_withdraw_quote"; }>; strategyAddress: z.ZodString; owner: z.ZodString; signer: z.ZodString; marketAddress: z.ZodNullable<z.ZodString>; slot: z.ZodString; signature: z.ZodString; instructionIndex: z.ZodNumber; strategyId: z.ZodOptional<z.ZodNumber>; orderIds: z.ZodOptional<z.ZodArray<z.ZodString>>; clientOrderId: z.ZodOptional<z.ZodString>; quantity: z.ZodOptional<z.ZodString>; requestedQuantity: z.ZodOptional<z.ZodString>; destination: z.ZodOptional<z.ZodString>; capitalUsedAtoms: z.ZodOptional<z.ZodString>; }, z.core.$strip>;
StrategyActivityQuery#
Filters for a page of activity recorded for the signing wallet.
Declaration source: packages/core/src/api/strategyActivity.ts:52.
export interface StrategyActivityQuery {
limit?: number;
strategy?: string;
cursor?: string;
}
StrategyActivityResponse#
Not documented.
Declaration source: packages/core/src/api/strategyActivity.ts:49.
export type StrategyActivityResponse = z.infer<typeof strategyActivityResponseSchema>;
strategyActivityResponseSchema#
Not documented.
Declaration source: packages/core/src/api/strategyActivity.ts:42.
export declare const strategyActivityResponseSchema: z.ZodObject<{ items: z.ZodArray<z.ZodObject<{ type: z.ZodEnum<{ configure_strategy: "configure_strategy"; stop_strategy: "stop_strategy"; resume_strategy: "resume_strategy"; close_strategy: "close_strategy"; reset_strategy_capital: "reset_strategy_capital"; cancel_order_by_client_id: "cancel_order_by_client_id"; cancel_owner_orders: "cancel_owner_orders"; strategy_cancel_order_ids: "strategy_cancel_order_ids"; strategy_reduce_order: "strategy_reduce_order"; strategy_merge_complete_set: "strategy_merge_complete_set"; strategy_withdraw_quote: "strategy_withdraw_quote"; }>; strategyAddress: z.ZodString; owner: z.ZodString; signer: z.ZodString; marketAddress: z.ZodNullable<z.ZodString>; slot: z.ZodString; signature: z.ZodString; instructionIndex: z.ZodNumber; strategyId: z.ZodOptional<z.ZodNumber>; orderIds: z.ZodOptional<z.ZodArray<z.ZodString>>; clientOrderId: z.ZodOptional<z.ZodString>; quantity: z.ZodOptional<z.ZodString>; requestedQuantity: z.ZodOptional<z.ZodString>; destination: z.ZodOptional<z.ZodString>; capitalUsedAtoms: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; nextCursor: z.ZodNullable<z.ZodString>; completeness: z.ZodLiteral<"recorded_events_only">; }, z.core.$strip>;
StrategyCancelOperation#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:497.
export type StrategyCancelOperation =
| {
readonly kind: 'order';
readonly orderId: bigint;
readonly maxExamined?: number;
readonly maxRemoved?: number;
}
| { readonly kind: 'all'; readonly maxExamined?: number; readonly maxRemoved: number }
| {
readonly kind: 'group';
readonly groupId: number;
readonly maxExamined?: number;
readonly maxRemoved: number;
}
| {
readonly kind: 'lane';
readonly outcome: 0 | 1;
readonly intent: 0 | 1;
readonly tickLimit: number;
readonly maxExamined?: number;
readonly maxRemoved: number;
}
| {
readonly kind: 'continue';
readonly nonce: number;
readonly maxExamined?: number;
readonly maxRemoved: number;
}
| { readonly kind: 'abort'; readonly nonce: number };
StrategyLedgerOperation#
Not documented.
Declaration source: packages/core/src/strategyAccounts.ts:339.
export type StrategyLedgerOperation =
| { readonly kind: 'reduce'; readonly orderId: bigint; readonly quantity: bigint }
| { readonly kind: 'cancel-ids'; readonly orderIds: bigint[] }
| { readonly kind: 'merge'; readonly quantity: bigint }
| { readonly kind: 'withdrawQuote'; readonly quantity: bigint; readonly destination?: Address };
StrategyPlacementAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:464.
export interface StrategyPlacementAccounts extends FreeFundsPlaceOrderAccounts {
/** Required counted seat tail, including an explicit empty list. */
splineSeats: readonly Address[];
/** Canonical strategy PDA for `user`, who remains the position owner. */
strategyAccount: Address;
/** Omit for the owner-signed strategy form. */
delegate?: Address;
/** Required for strategy placement on an external market. */
marketMeta?: Address;
}
Field documentation
splineSeats— Required counted seat tail, including an explicit empty list.strategyAccount— Canonical strategy PDA foruser, who remains the position owner.delegate— Omit for the owner-signed strategy form.marketMeta— Required for strategy placement on an external market.__freeFunds— Compile-time route marker; never serialized as an account.includeMarketTick— Supply the canonical read-only tick immediately after the counted seats.shareTokenProgram— Share (YES/NO) token program: always classic SPL Token. Defaults to it.creatorSpline— Single-seat shorthand for callers with a known creator seat.takerReferralAccount— Optional canonical referral binding, followed by the recorder tail.builderApproval— Optional builder pair; see {@link TakerBuilderPair}. Taker orders only.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
StreakData#
Not documented.
Declaration source: packages/core/src/api/types.ts:221.
export interface StreakData {
currentWinStreak: number;
longestWinStreak: number;
currentDayStreak: number;
longestDayStreak: number;
lastTradeDate: string | null;
lastWinDate: string | null;
totalTrades: number;
totalWins: number;
}
StreakDataSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:201.
export declare const StreakDataSchema: z.ZodObject<{ currentWinStreak: z.ZodNumber; longestWinStreak: z.ZodNumber; currentDayStreak: z.ZodNumber; longestDayStreak: z.ZodNumber; lastTradeDate: z.ZodNullable<z.ZodString>; lastWinDate: z.ZodNullable<z.ZodString>; totalTrades: z.ZodNumber; totalWins: z.ZodNumber; }, z.core.$loose>;
STREAM_CONDITION_VALUES#
Distinct reported stream states (design §5.7), never merged into one "failed".
Declaration source: packages/core/src/execution/lifecycle.ts:42.
export declare const STREAM_CONDITION_VALUES: readonly ["healthy", "provider_unavailable", "not_enrolled", "poisoned_stream", "fee_cap_reached", "suspended"];
STREAM_ID_KINDS#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:21.
export declare const STREAM_ID_KINDS: readonly ["spline_mid", "spline_seat", "managed_quotes"];
StreamCondition#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:50.
export type StreamCondition = (typeof STREAM_CONDITION_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
StreamId#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:24.
export type StreamId =
| { readonly kind: 'spline_mid'; readonly spline: string }
| { readonly kind: 'spline_seat'; readonly market: string; readonly maker: string }
| { readonly kind: 'managed_quotes'; readonly market: string; readonly owner: string };
StreamIdKind#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:22.
export type StreamIdKind = (typeof STREAM_ID_KINDS)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
streamMakerSurface#
Not documented.
Declaration source: packages/core/src/execution/stream.ts:51.
export function streamMakerSurface(stream: StreamId): MakerSurface;
Parameters
stream: StreamId— Not documented. See StreamId for its declaration and available field documentation.
Returns
"spline_seat" | "managed_book_quotes"
Not documented.
Throws
Not documented.
</details> <details> <summary>sumByCurrency</summary>sumByCurrency#
Sums amounts per mint; never across mints.
Returns one entry per distinct mint in first-seen order. Sums are exact bigint arithmetic (no float conversion, no width limit), so negative amounts such as PnL are supported. A row with an empty mint has no currency identity and is rejected rather than silently summed.
Declaration source: packages/core/src/currency/totals.ts:17.
export function sumByCurrency(rows: Iterable<CurrencyAmountRow>): ReadonlyMap<string, bigint>;
Parameters
rows: Iterable<CurrencyAmountRow>— Not documented.
Returns
ReadonlyMap<string, bigint>
Not documented.
Throws
Not documented.
</details> <details> <summary>SUPPORTED_CONFIG_ACCOUNT_VERSION</summary>SUPPORTED_CONFIG_ACCOUNT_VERSION#
D0{id} ConfigAccount schema version this SDK can safely decode and transact against. Stale SDKs must fail before building transactions after an on-chain config-version bump.
Declaration source: packages/core/src/constants.ts:63.
export declare const SUPPORTED_CONFIG_ACCOUNT_VERSION: 1;
SUPPORTED_MARKET_ACCOUNT_LAYOUT_VERSIONS#
D0{id} The only MarketAccount layout version accepted by current decoders.
Declaration source: packages/core/src/constants.ts:285.
export declare const SUPPORTED_MARKET_ACCOUNT_LAYOUT_VERSIONS: readonly [2];
swapWithFreeFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:3091.
export function swapWithFreeFunds(input: PlaceOrderInput, programAddress?: Address): Promise<SdkResult<PlaceOrderResult>>;
Parameters
input: PlaceOrderInput— Not documented. See PlaceOrderInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<PlaceOrderResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
Switches#
One switch per open provider question (design §6.5).
Declaration source: packages/core/src/execution/standins.ts:49.
export interface Switches {
readonly writer_authorization: WriterAuthorization;
readonly coalescing_mode: CoalescingMode;
readonly high_water_on_failure: HighWaterOnFailure;
readonly high_water_reset: HighWaterReset;
readonly fee_payer_participates: FeePayerParticipates;
readonly unused_writable_keys: UnusedWritableKeys;
/** Lamports per CU; the stand-in converts to micro-lamports. */
readonly fee_floor_lamports_per_cu: number;
readonly payload_lengths: PayloadLengths;
/** `null` when there is no local fallback (serialized as `null`, never omitted). */
readonly local_fallback_at_ms: number | null;
readonly window_ms: number;
}
Field documentation
fee_floor_lamports_per_cu— Lamports per CU; the stand-in converts to micro-lamports.local_fallback_at_ms—nullwhen there is no local fallback (serialized asnull, never omitted).
symbolPartToDurationSeconds#
Not documented.
Declaration source: packages/core/src/instruments.ts:130.
export function symbolPartToDurationSeconds(part: string): bigint;
Parameters
part: string— Not documented.
Returns
bigint
Not documented.
Throws
Not documented.
</details> <details> <summary>takeProfitOrderParams</summary>takeProfitOrderParams#
Order parameters for a take-profit: SELL shares of outcome as a
PostOnly limit at priceBps (the outcome's own price, never complemented).
PostOnly means it only ever rests: if the price would cross the book right
now the program rejects it (WouldCross) rather than selling at market, so
callers should offer a price above the outcome's best bid.
Declaration source: packages/core/src/ux/takeProfit.ts:21.
export function takeProfitOrderParams(input: { outcome: OutcomeAsset; shares: bigint; priceBps: number; }): { outcome: OutcomeAsset; intent: "SELL"; orderType: OrderType.PostOnly; rejectPostOnlyWouldCross: 1; priceBps: number; quantity: bigint; };
Parameters
input: { outcome: OutcomeAsset; shares: bigint; priceBps: number; }— Not documented.
Returns
{ outcome: OutcomeAsset; intent: "SELL"; orderType: OrderType.PostOnly; rejectPostOnlyWouldCross: 1; priceBps: number; quantity: bigint; }
Not documented.
Throws
SeesawValidationError when priceBps is not an integer in
1..=9999 or shares is not positive.
TAKER_FEE_COEFFICIENT_MAX_BPS#
Largest admitted taker_fee_coefficient_bps (fee never exceeds notional).
Declaration source: packages/core/src/router/takerFee.ts:37.
export declare const TAKER_FEE_COEFFICIENT_MAX_BPS: 10000;
TakerBuilderInput#
Optional taker builder (builder-fee spec section 4.4): the approved builder
wallet and a settlement-mint token account it owns. The approval PDA is
derived from (user, builder). Taker orders only; post-only placement rejects it.
Declaration source: packages/core/src/sdk.ts:147.
export interface TakerBuilderInput {
builder: Address;
tokenAccount: Address;
}
TakerBuilderPair#
Optional taker builder pair (builder-fee spec section 4.4). The program
reads it after the optional referral binding and before the recorder tail:
[builder_approval (r), builder_token_account (w)]. The approval is the
trader-signed BuilderApproval PDA; the token account is any settlement-mint
account owned by the approved builder. A payload field never names a
builder (FR-10). PostOnly orders and post-only batches reject the pair (FR-15).
Declaration source: packages/core/src/instructions.ts:637.
export interface TakerBuilderPair {
/** `deriveBuilderApprovalPda(user, builder)`. */
builderApproval?: Address;
/** Settlement-mint token account owned by the approved builder. */
builderTokenAccount?: Address;
}
Field documentation
builderApproval—deriveBuilderApprovalPda(user, builder).builderTokenAccount— Settlement-mint token account owned by the approved builder.
takeRecordingCheckpoint#
Read the market, settlement mint, book, ledger, config, attached splines, quote states, and positions
at the same slot S.
Discovery finds account addresses. The final read authenticates those accounts and verifies the counts of attached seats, quote states, and unsettled positions.
Declaration source: packages/core/src/replay/checkpoint.ts:139.
export function takeRecordingCheckpoint(rpc: ReplayRpc, market: Address, opts?: RecordingCheckpointOptions): Promise<RecordingCheckpoint>;
Parameters
rpc: ReplayRpc— Not documented. See ReplayRpc for its declaration and available field documentation.market: Address— Not documented.opts: RecordingCheckpointOptions— Not documented. Default:{}. See RecordingCheckpointOptions for its declaration and available field documentation.
Returns
Promise<RecordingCheckpoint>
Not documented.
Throws
Not documented.
Defaults
opts:{}.
takerFeeCoefficientOf#
The live taker_fee_coefficient_bps of a decoded config, or null for a
legacy capped-curve config whose cap and decay differ (no coefficient exists).
Declaration source: packages/core/src/fee.ts:249.
export function takerFeeCoefficientOf(config: { readonly feePolicy?: VersionedFeePolicy; readonly feeCapBps: number; readonly decayRateBps: number; }): number | null;
Parameters
config: { readonly feePolicy?: VersionedFeePolicy; readonly feeCapBps: number; readonly decayRateBps: number; }— Not documented.
Returns
number | null
Not documented.
Throws
Not documented.
</details> <details> <summary>takerFeeFromLots</summary>takerFeeFromLots#
Fee of a lots-atom fill at priceBps, from its rounded notional.
Declaration source: packages/core/src/router/takerFee.ts:124.
export function takerFeeFromLots(lots: bigint, priceBps: number, coefficientBps: number, rounding: NotionalRounding): TakerFeeFromLots;
Parameters
lots: bigint— Not documented.priceBps: number— Not documented.coefficientBps: number— Not documented.rounding: NotionalRounding— Not documented. See NotionalRounding for its declaration and available field documentation.
Returns
TakerFeeFromLots
Not documented.
Throws
Not documented.
</details> <details> <summary>TakerFeeFromLots</summary>TakerFeeFromLots#
{@link takerFeeFromLots} result.
Declaration source: packages/core/src/router/takerFee.ts:111.
export interface TakerFeeFromLots {
/** The rounded lane notional the fee is charged on. */
readonly notional: bigint;
/** The normative fee, `computeTakerFee(notional, p, k)`. */
readonly fee: bigint;
/**
* Brief 04a's lot form, `ceil(L · k · p · (10000 − p) / 10000³)`. Informational:
* it differs from `fee` by at most one atom and is never charged.
*/
readonly lotFormFee: bigint;
}
Field documentation
notional— The rounded lane notional the fee is charged on.fee— The normative fee,computeTakerFee(notional, p, k).lotFormFee— Brief 04a's lot form,ceil(L · k · p · (10000 − p) / 10000³). Informational: it differs fromfeeby at most one atom and is never charged.
takerFeeNumerator#
Exact numerator notional · k · (10000 − p) of one fill's fee, or null
outside the program domain (price not in 1..=9999, coefficient not in
0..=10000, notional outside u64).
Declaration source: packages/core/src/router/takerFee.ts:64.
export function takerFeeNumerator(notional: bigint, priceBps: number, coefficientBps: number): bigint | null;
Parameters
notional: bigint— Not documented.priceBps: number— Not documented.coefficientBps: number— Not documented.
Returns
bigint | null
Not documented.
Throws
Not documented.
</details> <details> <summary>takerFeeRateBps</summary>takerFeeRateBps#
Truncated DISPLAY rate k × (10_000 − p) / 10_000; never use it to charge.
Declaration source: packages/core/src/fee.ts:275.
export function takerFeeRateBps(priceBps: number, coefficientBps: number): number;
Parameters
priceBps: number— Not documented.coefficientBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details> <details> <summary>takerFeeWithinStrategyLimit</summary>takerFeeWithinStrategyLimit#
Phase 5's strategy per-fill fee limit (spec: max_fee_bps): a fill passes
when fee ≤ ceil(max_fee_bps · notional / 10000) + 1.
Declaration source: packages/core/src/router/takerFee.ts:143.
export function takerFeeWithinStrategyLimit(fee: bigint, notional: bigint, maxFeeBps: number): boolean;
Parameters
fee: bigint— Not documented.notional: bigint— Not documented.maxFeeBps: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>TakerFill</summary>TakerFill#
One estimated fill.
Declaration source: packages/core/src/router/takerFill.ts:121.
export interface TakerFill {
readonly source: 'book' | 'seat';
/** Seat address for a seat fill. */
readonly seat?: Address;
/** Index into `book` for a book fill. */
readonly bookIndex?: number;
/** Fill price in the taker's lane. */
readonly priceBps: number;
readonly lots: bigint;
/** Rounded lane notional (payment for a buy, gross proceeds for a sell). */
readonly quote: bigint;
readonly fee: bigint;
}
Field documentation
seat— Seat address for a seat fill.bookIndex— Index intobookfor a book fill.priceBps— Fill price in the taker's lane.quote— Rounded lane notional (payment for a buy, gross proceeds for a sell).
TakerFillEstimate#
{@link estimateTakerFill} result.
Declaration source: packages/core/src/router/takerFill.ts:143.
export interface TakerFillEstimate {
readonly filled: bigint;
readonly remaining: bigint;
/** Σ fill notional (payment for a buy, gross proceeds for a sell). */
readonly grossQuote: bigint;
readonly fee: bigint;
/** Buy: `gross + fee` spent. Sell: `gross − fee` received. */
readonly netQuote: bigint;
/** Pairs minted by seat buy fills (`BuyYes`, `BuyNo`); consumes `max_total_shares`. */
readonly pairsMinted: bigint;
readonly fills: readonly TakerFill[];
/** Match iterations used. */
readonly iterations: number;
readonly stop: TakerFillStop;
/** Last (worst) fill price in the lane; `0` when nothing filled. */
readonly worstPriceBps: number;
/** Bound on how far the true `grossQuote` can be from the estimate, against the taker. */
readonly quoteSlackAtoms: bigint;
/** Bound on how far the true `fee` can be above the estimate. */
readonly feeSlackAtoms: bigint;
/** Remainder lots whose seat depends on the tie-break (each ≤ 1 quote and 1 fee atom). */
readonly tieAmbiguousLots: bigint;
/** Seats that joined matching (executable, not the taker's), ascending address bytes. */
readonly eligibleSeats: readonly Address[];
}
Field documentation
grossQuote— Σ fill notional (payment for a buy, gross proceeds for a sell).netQuote— Buy:gross + feespent. Sell:gross − feereceived.pairsMinted— Pairs minted by seat buy fills (BuyYes,BuyNo); consumesmax_total_shares.iterations— Match iterations used.worstPriceBps— Last (worst) fill price in the lane;0when nothing filled.quoteSlackAtoms— Bound on how far the truegrossQuotecan be from the estimate, against the taker.feeSlackAtoms— Bound on how far the truefeecan be above the estimate.tieAmbiguousLots— Remainder lots whose seat depends on the tie-break (each ≤ 1 quote and 1 fee atom).eligibleSeats— Seats that joined matching (executable, not the taker's), ascending address bytes.
TakerFillParams#
Inputs for {@link estimateTakerFill}.
Declaration source: packages/core/src/router/takerFill.ts:97.
export interface TakerFillParams {
readonly outcome: OutcomeAsset;
readonly intent: TradeIntent;
readonly quantity: bigint;
/** Limit price in the taker's own lane, `1..=9999`. */
readonly limitPriceBps: number;
/** Governed tick from the observed config. Offline snapshots default to one basis point. */
readonly tickSizeBps?: number;
/** Optional IOC bound in the taker's own lane; sentinel `0` (buy) / `10000` (sell) disables. */
readonly worstPriceBps?: number;
/** `1..=12`; default 12. */
readonly matchLimit?: number;
/** The lane's opposing book side, in matching order. */
readonly book: readonly RouterBookOrder[];
/** Supplied seats (any order; duplicates reject). */
readonly seats: readonly SeatQuoteState[];
readonly takerFeeCoefficientBps: number;
readonly taker?: Address;
/** Scoped routing leaves all of the owner's live orders in place. */
readonly abortOnSelfTrade?: boolean;
readonly tieBreak?: SeatTieBreakInput;
}
Field documentation
limitPriceBps— Limit price in the taker's own lane,1..=9999.tickSizeBps— Governed tick from the observed config. Offline snapshots default to one basis point.worstPriceBps— Optional IOC bound in the taker's own lane; sentinel0(buy) /10000(sell) disables.matchLimit—1..=12; default 12.book— The lane's opposing book side, in matching order.seats— Supplied seats (any order; duplicates reject).abortOnSelfTrade— Scoped routing leaves all of the owner's live orders in place.
TakerFillStop#
Why the walk ended: filled; priceLimit (the book head is beyond the
bound); noLiquidity (no book order and no seat level within the bound);
matchBudget (the next book candidate or pro-rata step does not fit).
Declaration source: packages/core/src/router/takerFill.ts:140.
export type TakerFillStop = 'filled' | 'priceLimit' | 'noLiquidity' | 'matchBudget' | 'selfTrade';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TakerFillWorkingState#
Mutable market state threaded through the legs of one transaction: seat side counters and epochs, and how much of each book order is left. Two legs of a split path draw on the same seat counters, so the router simulates them in order on one working state instead of summing independent estimates.
Declaration source: packages/core/src/router/takerFill.ts:189.
export interface TakerFillWorkingState {
readonly seats: ReadonlyMap<string, WorkingSeat>;
/** Remaining quantity per book order, keyed by `"<lane>:<side>:<index>"`. */
readonly bookRemaining: Map<string, bigint>;
}
Field documentation
bookRemaining— Remaining quantity per book order, keyed by"<lane>:<side>:<index>".
TakerReclaimSimulation#
Not documented.
Declaration source: packages/core/src/managedReclaimRecovery.ts:229.
export type TakerReclaimSimulation = (
instructions: readonly Instruction[]
) => Promise<{ readonly err: unknown | null }>;
TerminalInventory#
Not documented.
Declaration source: packages/core/src/terminalInventory.ts:29.
export interface TerminalInventory {
readonly program: Address;
readonly market: Address;
readonly wallet: Address;
readonly payout: ExternalPayout;
readonly ledgerFree: TerminalInventoryBucket | null;
readonly ledgerLocked: TerminalInventoryBucket | null;
readonly spline: TerminalInventoryBucket | null;
}
TerminalInventoryBucket#
Not documented.
Declaration source: packages/core/src/terminalInventory.ts:22.
export interface TerminalInventoryBucket {
readonly yes: bigint;
readonly no: bigint;
readonly quote: bigint;
/** Settlement atoms for these shares only; excludes quote and other buckets. */
readonly estimate: bigint;
}
Field documentation
estimate— Settlement atoms for these shares only; excludes quote and other buckets.
ToBeatColor#
Which market-outcome color a "TO BEAT" stat should render in.
Declaration source: packages/core/src/display.ts:257.
export type ToBeatColor = 'yes' | 'no';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
ToBeatStat#
Not documented.
Declaration source: packages/core/src/display.ts:259.
export interface ToBeatStat {
/** Signed ratio, e.g. `0.0017` for +0.17%. Null when unavailable. */
ratio: number | null;
/** `formatSignedPercent(ratio * 100)` - e.g. `"+0.17%"`, or `"—"` when unavailable. */
formatted: string;
/**
* `'yes'` when `ratio >= 0` (including an exact tie - the protocol's
* equality-settles-UP rule means "flat" still favors UP), `'no'` when
* `ratio < 0`, `null` when unavailable.
*/
color: ToBeatColor | null;
}
Field documentation
ratio— Signed ratio, e.g.0.0017for +0.17%. Null when unavailable.formatted—formatSignedPercent(ratio * 100)- e.g."+0.17%", or"—"when unavailable.color—'yes'whenratio >= 0(including an exact tie - the protocol's equality-settles-UP rule means "flat" still favors UP),'no'whenratio < 0,nullwhen unavailable.
toCanonical#
The lane side and price an order rests at. A BUY is a bid and a SELL is an ask in its own outcome lane; the price stays in that outcome's denomination.
Declaration source: packages/core/src/price.ts:135.
export function toCanonical(intent: TradeIntent, priceBps: number): { canonicalSide: CanonicalSide; canonicalPriceBps: number; };
Parameters
intent: TradeIntent— Not documented. See TradeIntent for its declaration and available field documentation.priceBps: number— Not documented.
Returns
{ canonicalSide: CanonicalSide; canonicalPriceBps: number; }
Not documented.
Throws
Not documented.
</details> <details> <summary>toCsv</summary>toCsv#
RFC 4180 CSV: comma-separated fields, CRLF between records, fields with a
comma, quote, line break or edge whitespace quoted with "" escaping;
null/undefined → empty field. Text starting with =, +, -, @, tab
or CR is prefixed with ' so spreadsheets do not run it as a formula
(numeric text like -12.5 is left as is). No trailing line break; add a
BOM yourself if Excel needs one.
Declaration source: packages/core/src/ux/history.ts:91.
export function toCsv(header: string[], rows: Array<Array<string | number | bigint | null | undefined>>): string;
Parameters
header: string[]— Not documented.rows: (string | number | bigint | null | undefined)[][]— Not documented.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>toError</summary>toError#
Bridge: convert a parsed {@link SeesawError} into a throwable error.
Declaration source: packages/core/src/errors.ts:260.
export function toError(parsed: SeesawError): SeesawOnChainError;
Parameters
parsed: SeesawError— Not documented. See SeesawError for its declaration and available field documentation.
Returns
SeesawOnChainError
Not documented.
Throws
Not documented.
</details> <details> <summary>TOKEN_2022_PROGRAM</summary>TOKEN_2022_PROGRAM#
Not documented.
Declaration source: packages/core/src/currency/admission.ts:26.
export declare const TOKEN_2022_PROGRAM: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
tokenPageUrl#
Not documented.
Declaration source: packages/core/src/tokensXyz/normalize.ts:22.
export function tokenPageUrl(assetId: string | null, mint: string): string | null;
Parameters
assetId: string | null— Not documented.mint: string— Not documented.
Returns
string | null
Not documented.
Throws
Not documented.
</details> <details> <summary>TOKENS_XYZ_DEFAULT_BASE_URL</summary>TOKENS_XYZ_DEFAULT_BASE_URL#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:29.
export declare const TOKENS_XYZ_DEFAULT_BASE_URL: "https://api.tokens.xyz";
TOKENS_XYZ_SNAPSHOTS_MAX#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:32.
export declare const TOKENS_XYZ_SNAPSHOTS_MAX: 250;
TOKENS_XYZ_VARIANTS_MAX#
tokens.xyz caps: 50 keys per GET /v2/variants, 250 per v1 snapshot batch.
Declaration source: packages/core/src/tokensXyz/client.ts:31.
export declare const TOKENS_XYZ_VARIANTS_MAX: 50;
TokensXyzUpstreamClient#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:62.
export interface TokensXyzUpstreamClient {
/** `GET /v2/variants?keys=solana:<mint>,...` (<= 50). */
variants(mints: readonly string[]): Promise<ReturnType<typeof parseVariantsBatch>>;
/** `POST /v1/assets/market-snapshots` (<= 250). */
marketSnapshots(
mints: readonly string[]
): Promise<ReadonlyMap<string, UpstreamMarketFacts | null>>;
/** `GET /v1/assets/risk-summary?mint=`. `null` for an unregistered mint or unusable body. */
riskSummary(mint: string): Promise<CurrencyRisk | null>;
/** `GET /v2/registry?limit=5000`: the whole registry in one page. */
registry(): Promise<ParsedRegistry>;
}
Field documentation
variants—GET /v2/variants?keys=solana:<mint>,...(<= 50).marketSnapshots—POST /v1/assets/market-snapshots(<= 250).riskSummary—GET /v1/assets/risk-summary?mint=.nullfor an unregistered mint or unusable body.registry—GET /v2/registry?limit=5000: the whole registry in one page.
TokensXyzUpstreamError#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:36.
export declare class TokensXyzUpstreamError extends Error {
constructor(status: number, tag: string | null, code: string | null);
readonly name: "TokensXyzUpstreamError";
readonly status: number;
readonly tag: string | null;
readonly code: string | null;
/**
* 429 and 5xx (and transport failure, status 0) are worth another try later; 4xx are not.
*/
retryable: boolean;
rateLimited: boolean;
}
Parameters
status: number— Not documented.tag: string | null— Not documented.code: string | null— Not documented.
Throws
Not documented.
</details> <details> <summary>TokensXyzUpstreamOptions</summary>TokensXyzUpstreamOptions#
Not documented.
Declaration source: packages/core/src/tokensXyz/client.ts:54.
export interface TokensXyzUpstreamOptions {
/** Server-side secret. Never construct this client in a web or mobile bundle. */
readonly apiKey: string;
readonly baseUrl?: string;
readonly fetch?: typeof fetch;
readonly timeoutMs?: number;
}
Field documentation
apiKey— Server-side secret. Never construct this client in a web or mobile bundle.
TokenType#
Token type for redemption/withdrawal. Mirrors RedeemTokenType in instruction.rs.
Declaration source: packages/core/src/types.ts:168.
export enum TokenType {
Yes = 0,
No = 1,
}
TopUpCloserRewardsAccounts#
Accounts for TopUpCloserRewards instruction.
Declaration source: packages/core/src/instructions.ts:2730.
export interface TopUpCloserRewardsAccounts extends BinaryRecorderTailAccounts {
market: Address;
payer: Address;
config: Address;
systemProgram: Address;
vault: Address;
/** Required for external markets; omitted for native Pyth markets. */
marketMeta?: Address;
}
Field documentation
marketMeta— Required for external markets; omitted for native Pyth markets.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
TopUpExternalProgressReserveAccounts#
Accounts for permissionless restoration of an external progress reserve.
Deliberately NOT a BinaryRecorderTailAccounts: the processor destructures
exactly five accounts, including the authenticated settlement vault, and
never splits a recorder tail. Extra accounts make the instruction fail.
program/tests/account_count_coverage.rs pins accepted_counts: &[5], and
the Rust and Python SDKs offer no tail here for the same reason.
Declaration source: packages/core/src/instructions.ts:2778.
export interface TopUpExternalProgressReserveAccounts {
market: Address;
marketMeta: Address;
payer: Address;
systemProgram: Address;
vault: Address;
}
TopUpSeatCommitment#
Not documented.
Declaration source: packages/core/src/seatInstructions.ts:173.
export interface TopUpSeatCommitment {
readonly maker: Address;
readonly market: Address;
readonly series: Address;
readonly settlementMint: Address;
readonly settlementTokenProgram: Address;
/** Quote token base units to move from the series vault into the market vault. */
readonly amount: bigint;
}
Field documentation
amount— Quote token base units to move from the series vault into the market vault.
toSplineQuoteSnapshot#
Project a decoded SplineAccount onto the verdict's spline input.
The one place the fixed 16-entry level arrays are truncated to their live
prefix, so no adapter has to remember that bidLevels is padded. Everything
else is a rename: activeness, staleness and the level walk stay in
{@link placeOrderVerdict}, where the program keeps them too.
Declaration source: packages/core/src/preflight/placeOrder.ts:190.
export function toSplineQuoteSnapshot(spline: SplineAccount): SplineQuoteSnapshot;
Parameters
spline: SplineAccount— Not documented. See SplineAccount for its declaration and available field documentation.
Returns
SplineQuoteSnapshot
Not documented.
Throws
Not documented.
</details> <details> <summary>Trade</summary>Trade#
Not documented.
Declaration source: packages/core/src/api/types.ts:195.
export interface Trade {
id: string;
marketAddress: string;
marketPair: string;
side: ApiOrderSide;
price: number;
quantity: bigint;
value: number;
outcome?: TradeOutcome;
pnl?: number;
pnlPercent?: number;
signature: string;
timestamp: string;
}
TradeFilter#
Not documented.
Declaration source: packages/core/src/api/types.ts:210.
export interface TradeFilter {
outcome?: TradeOutcome | 'all';
side?: 'buy' | 'sell' | 'all';
dateFrom?: string;
dateTo?: string;
}
TradeIntent#
Public trade intent. Encoded on the wire as BUY=0, SELL=1.
Declaration source: packages/core/src/types.ts:59.
export type TradeIntent = 'BUY' | 'SELL';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TradeOutcome#
Not documented.
Declaration source: packages/core/src/api/types.ts:193.
export type TradeOutcome = 'win' | 'loss' | 'pending';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TradeOutcomeSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:159.
export declare const TradeOutcomeSchema: z.ZodEnum<{ pending: "pending"; win: "win"; loss: "loss"; }>;
TRADER_LEDGER_ACCOUNT_DISCRIMINATOR#
TraderLedgerAccount discriminator: sha256("account:TraderLedgerAccount")[..8].
Declaration source: packages/core/src/constants.ts:227.
export declare const TRADER_LEDGER_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
TRADER_LEDGER_ACCOUNT_SIZE#
D0{byte} Exact trader-ledger account length: header, two bitmaps, MARKET_SEATS seats.
Declaration source: packages/core/src/constants.ts:352.
export declare const TRADER_LEDGER_ACCOUNT_SIZE: number;
TRADER_LEDGER_BITMAP_SIZE#
D0{byte} Each of the two hierarchical seat bitmaps (free, idle).
Declaration source: packages/core/src/constants.ts:325.
export declare const TRADER_LEDGER_BITMAP_SIZE: 1064;
TRADER_LEDGER_HEADER_SIZE#
D0{byte} Trader-ledger header size.
Declaration source: packages/core/src/constants.ts:315.
export declare const TRADER_LEDGER_HEADER_SIZE: 64;
TRADER_LEDGER_NIL#
D0{index} Owner-tree "no seat" link.
Declaration source: packages/core/src/constants.ts:331.
export declare const TRADER_LEDGER_NIL: 65535;
TRADER_LEDGER_SEATS_OFFSET#
D0{byte} Offset of seat 0: header plus both bitmaps.
Declaration source: packages/core/src/constants.ts:328.
export declare const TRADER_LEDGER_SEATS_OFFSET: number;
TRADER_LEDGER_SLOT_SIZE#
D0{byte/entry} Trader-ledger seat size: trader, six u64 buckets, occupied, generation, owner-tree links, order-list ends, counters, strategy epoch, cancellation session.
Declaration source: packages/core/src/constants.ts:322.
export declare const TRADER_LEDGER_SLOT_SIZE: 144;
TraderLedgerAccount#
Decoded TraderLedgerAccount: 64-byte header, free and idle seat bitmaps
(1,064 bytes each), then MARKET_SEATS fixed 144-byte seats.
Declaration source: packages/core/src/generated/program/accounts.ts:1898.
export interface TraderLedgerAccount {
discriminator: Uint8Array;
market: Address;
capacity: number;
/** Owner-tree root seat; `0xffff` when no seat is occupied. */
ownerRoot: number;
occupiedCount: number;
bump: number;
version: number;
slots: TraderLedgerSlot[];
}
Field documentation
ownerRoot— Owner-tree root seat;0xffffwhen no seat is occupied.
TraderLedgerSlot#
One occupied-or-free seat in a trader ledger. u64 balances are bigint.
Declaration source: packages/core/src/generated/program/accounts.ts:1877.
export interface TraderLedgerSlot {
trader: Address;
quoteFree: bigint;
yesFree: bigint;
noFree: bigint;
quoteLocked: bigint;
yesLocked: bigint;
noLocked: bigint;
occupied: boolean;
/** Increments on every allocation of the seat; survives clearing. */
seatGeneration: number;
unsettledOrderCount: number;
restingBuyYes: bigint;
restingBuyNo: bigint;
strategyEpoch: number;
}
Field documentation
seatGeneration— Increments on every allocation of the seat; survives clearing.
TradeSchema#
Not documented.
Declaration source: packages/core/src/api/schemas.ts:161.
export declare const TradeSchema: z.ZodObject<{ id: z.ZodString; marketAddress: z.ZodString; marketPair: z.ZodString; side: z.ZodEnum<{ buy_yes: "buy_yes"; sell_yes: "sell_yes"; buy_no: "buy_no"; sell_no: "sell_no"; }>; price: z.ZodNumber; quantity: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; value: z.ZodNumber; outcome: z.ZodOptional<z.ZodEnum<{ pending: "pending"; win: "win"; loss: "loss"; }>>; pnl: z.ZodOptional<z.ZodNumber>; pnlPercent: z.ZodOptional<z.ZodNumber>; signature: z.ZodString; timestamp: z.ZodString; }, z.core.$loose>;
TradeStats#
Not documented.
Declaration source: packages/core/src/api/orders.ts:202.
export interface TradeStats {
totalTrades: number;
wins: number;
losses: number;
pending: number;
winRate: number;
totalPnl: number;
averagePnl: number;
bestTrade: Trade | null;
worstTrade: Trade | null;
}
TRANSACTION_ATTEMPT_JOURNAL_VERSION#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:40.
export declare const TRANSACTION_ATTEMPT_JOURNAL_VERSION: 1;
TRANSACTION_ATTEMPT_STORAGE_PREFIX#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:41.
export declare const TRANSACTION_ATTEMPT_STORAGE_PREFIX: "seesaw:tx-attempts:v1:";
TransactionAttemptJournal#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:826.
export declare class TransactionAttemptJournal {
constructor(storage: TransactionAttemptStorage, scope: TransactionAttemptScope, options?: { readonly now?: () => number; readonly maxTerminalAttempts?: number; });
readonly scope: TransactionAttemptScope;
load: () => Promise<TransactionAttemptJournalDocument>;
attempts: () => Promise<readonly TransactionAttemptRecord[]>;
find: (signature: string) => Promise<TransactionAttemptRecord | undefined>;
blockingAttempts: (conflictKey: string | null, intentDigest?: string) => Promise<TransactionAttemptRecord[]>;
unresolvedAttempts: () => Promise<TransactionAttemptRecord[]>;
/**
* Durably record a signed attempt BEFORE dispatch. Throws
* {@link UnresolvedTransactionAttemptError} when another attempt for the
* same conflict key is unresolved (the fencing check runs inside the atomic
* update, so two tabs cannot both win), and
* {@link TransactionAttemptPersistenceError} when storage fails.
*/
recordSigned: (input: RecordSignedAttemptInput) => Promise<TransactionAttemptRecord>;
/**
* Append an observation. Unknown attempts are ignored (returns undefined) so
* a stale worker cannot resurrect an attempt pruned by retention.
*/
observe: (attemptIdOrSignature: string, observation: Omit<TransactionAttemptObservation, "id" | "atMs"> & { readonly atMs?: number; }) => Promise<TransactionAttemptRecord | undefined>;
/**
* Bind a signature returned by an opaque sign-and-send adapter to its intent record.
*/
bindOpaqueSignature: (attemptId: string, signature: string) => Promise<TransactionAttemptRecord | undefined>;
acknowledgeUnresolved: (signature: string, detail?: string) => Promise<void>;
}
Parameters
storage: TransactionAttemptStorage— Not documented. See TransactionAttemptStorage for its declaration and available field documentation.scope: TransactionAttemptScope— Not documented. See TransactionAttemptScope for its declaration and available field documentation.options: { readonly now?: () => number; readonly maxTerminalAttempts?: number; }— Not documented. Default:{}.
Throws
Not documented.
Defaults
options:{}.
TransactionAttemptJournalCorruptError#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:624.
export declare class TransactionAttemptJournalCorruptError extends Error {
constructor(message: string);
readonly code: "TRANSACTION_ATTEMPT_JOURNAL_CORRUPT";
}
Parameters
message: string— Not documented.
Throws
Not documented.
</details> <details> <summary>TransactionAttemptJournalDocument</summary>TransactionAttemptJournalDocument#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:481.
export interface TransactionAttemptJournalDocument {
readonly version: typeof TRANSACTION_ATTEMPT_JOURNAL_VERSION;
readonly scope: TransactionAttemptScope;
readonly generation: number;
readonly nextSequence: number;
readonly attempts: readonly TransactionAttemptRecord[];
}
TransactionAttemptObservation#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:430.
export interface TransactionAttemptObservation {
readonly id: string;
readonly kind: TransactionAttemptObservationKind;
readonly atMs: number;
readonly slot?: number;
readonly blockHeight?: number;
readonly detail?: string;
}
TransactionAttemptObservationKind#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:398.
export type TransactionAttemptObservationKind =
/** Transport was about to receive the bytes (written BEFORE the network call). */
| 'dispatch'
/** Transport returned the (locally matching) signature. */
| 'transport_ack'
/** Transport definitively refused before broadcast (preflight/auth rejection). */
| 'transport_rejected'
/** Transport failed in a way that may have forwarded the bytes. */
| 'transport_ambiguous'
/** The local process proved it never invoked the transport for these bytes. */
| 'not_dispatched'
| 'chain_processed'
| 'chain_confirmed_success'
| 'chain_finalized_success'
/**
* Errored status below finalized commitment (processed or confirmed). Provisional:
* never retires the attempt, alone or combined with any later absence.
*/
| 'chain_failed_confirmed'
/** Errored status at finalized commitment: the only failure that retires an attempt. */
| 'chain_failed_finalized'
/** A status lookup ran and saw nothing (recent or history). Not proof of absence. */
| 'status_absent'
/** Block height passed lastValidBlockHeight with no status. Still not proof. */
| 'blockhash_expired_no_status'
/** A confirmation read or finalized-metadata read could not settle the outcome. */
| 'confirmation_unknown'
/** Fee/accounting work failed AFTER chain success; the economic result stands. */
| 'accounting_error'
/** The user explicitly released the replacement barrier for a NEW exposure. */
| 'user_acknowledged_unresolved';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TransactionAttemptPersistenceError#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:784.
export declare class TransactionAttemptPersistenceError extends Error {
constructor(cause: unknown);
readonly code: "TRANSACTION_ATTEMPT_NOT_DURABLE";
}
Parameters
cause: unknown— Not documented.
Throws
Not documented.
</details> <details> <summary>TransactionAttemptReconcileRpc</summary>TransactionAttemptReconcileRpc#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:1141.
export interface TransactionAttemptReconcileRpc {
/** Status with `searchTransactionHistory: true`; null when nothing is known. */
getSignatureStatus(signature: string): Promise<SignatureStatusObservation | null>;
getBlockHeight(): Promise<number>;
/** Optional same-wire rebroadcast; identical bytes cannot duplicate the effect. */
rebroadcast?(signedWireBase64: string): Promise<void>;
}
Field documentation
getSignatureStatus— Status withsearchTransactionHistory: true; null when nothing is known.rebroadcast— Optional same-wire rebroadcast; identical bytes cannot duplicate the effect.
TransactionAttemptRecord#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:452.
export interface TransactionAttemptRecord {
readonly attemptId: string;
/** Null only for opaque sign-and-send adapters whose identity was never returned. */
readonly signature: string | null;
readonly conflictKey: string | null;
readonly operation: string;
/** Reviewed-intent digest, when the caller has one. Distinct from the attempt identity. */
readonly intentDigest?: string;
/** Monotonic per-journal sequence. */
readonly sequence: number;
/** Sequence of the journal generation that recorded this attempt (fencing token). */
readonly ownerGeneration: number;
readonly createdAtMs: number;
readonly lifetimeToken: string | null;
readonly lastValidBlockHeight: number | null;
/** Exact signed bytes (base64) so a recovery can rebroadcast without re-signing. */
readonly signedWireBase64?: string;
readonly feePayer?: string;
readonly version?: SignedTransactionVersion;
readonly messageMatchesReviewed?: boolean;
/** Group/batch identity and member index for multi-leg actions. */
readonly groupId?: string;
readonly groupIndex?: number;
/** Conservative exposure description (e.g. max quote atoms) supplied by the caller. */
readonly exposure?: Readonly<Record<string, string>>;
readonly capability: 'signed_bytes' | 'opaque_sign_and_send';
readonly observations: readonly TransactionAttemptObservation[];
}
Field documentation
signature— Null only for opaque sign-and-send adapters whose identity was never returned.intentDigest— Reviewed-intent digest, when the caller has one. Distinct from the attempt identity.sequence— Monotonic per-journal sequence.ownerGeneration— Sequence of the journal generation that recorded this attempt (fencing token).signedWireBase64— Exact signed bytes (base64) so a recovery can rebroadcast without re-signing.groupId— Group/batch identity and member index for multi-leg actions.exposure— Conservative exposure description (e.g. max quote atoms) supplied by the caller.
TransactionAttemptScope#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:391.
export interface TransactionAttemptScope {
/** Cluster genesis hash or configured network name. */
readonly cluster: string;
readonly programId: string;
readonly wallet: string;
}
Field documentation
cluster— Cluster genesis hash or configured network name.
TransactionAttemptState#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:439.
export type TransactionAttemptState =
| 'signed'
| 'dispatching'
| 'acknowledged'
| 'rejected'
| 'not_dispatched'
| 'confirmed'
| 'finalized'
| 'failed'
| 'unresolved'
| 'expired_unresolved'
| 'acknowledged_unresolved';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TransactionAttemptStorage#
Storage adapter. update must be atomic per key with respect to every other
writer the runtime can host (Web Locks across tabs on the web, an in-process
mutex in React Native). A thrown update means the attempt was NOT made
durable; callers must not dispatch.
Declaration source: packages/core/src/transactionAttempt.ts:747.
export interface TransactionAttemptStorage {
read(key: string): Promise<string | null>;
update(key: string, mutate: (current: string | null) => string): Promise<void>;
}
transactionAttemptStorageKey#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:752.
export function transactionAttemptStorageKey(scope: TransactionAttemptScope): string;
Parameters
scope: TransactionAttemptScope— Not documented. See TransactionAttemptScope for its declaration and available field documentation.
Returns
string
Not documented.
Throws
Not documented.
</details> <details> <summary>TransactionAttemptWireError</summary>TransactionAttemptWireError#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:65.
export declare class TransactionAttemptWireError extends Error {
constructor(message: string);
readonly code: "TRANSACTION_ATTEMPT_WIRE_INVALID";
}
Parameters
message: string— Not documented.
Throws
Not documented.
</details> <details> <summary>TransactionLandingAction</summary>TransactionLandingAction#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:156.
export type TransactionLandingAction =
| 'build'
| 'sign'
| 'submit'
| 'rebroadcast'
| 'refreshBlockhash'
| 'confirm'
| 'surfaceUnknown'
| 'fail'
| 'none';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TransactionLandingEvent#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:179.
export type TransactionLandingEvent =
| { readonly type: 'start'; readonly lastValidBlockHeight?: number | null }
| { readonly type: 'built'; readonly lastValidBlockHeight: number }
| { readonly type: 'signed'; readonly signature?: string | null }
| { readonly type: 'submitted'; readonly signature: string }
| { readonly type: 'confirmed'; readonly slot: number; readonly signature?: string | null }
| { readonly type: 'finalized'; readonly slot: number; readonly signature?: string | null }
| { readonly type: 'error'; readonly error: unknown; readonly submissionPossible?: boolean }
| { readonly type: 'blockhashExpired'; readonly currentBlockHeight?: number | null }
/**
* Reconcile an ambiguous signature before allowing a fresh logical retry.
* `absent` is only valid after the caller has checked finalized signature
* status and authoritative order/event state. It deliberately does not
* perform that I/O itself.
*/
| {
readonly type: 'reconciled';
readonly outcome: 'confirmed' | 'finalized' | 'absent';
readonly slot?: number;
readonly signature?: string | null;
};
TransactionLandingOptions#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:201.
export interface TransactionLandingOptions {
readonly maxRetries?: number;
readonly idempotent?: boolean;
}
TransactionLandingState#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:167.
export interface TransactionLandingState {
readonly status: TransactionLandingStatus;
readonly attempts: number;
readonly maxRetries: number;
readonly idempotent: boolean;
readonly possibleSubmission: boolean;
readonly signature: string | null;
readonly slot: number | null;
readonly lastValidBlockHeight: number | null;
readonly lastError: string | null;
}
TransactionLandingStatus#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:146.
export type TransactionLandingStatus =
| 'building'
| 'signing'
| 'submitting'
| 'rebroadcasting'
| 'confirmed'
| 'finalized'
| 'unknown'
| 'failed';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TransactionLandingStep#
Not documented.
Declaration source: packages/core/src/transactionLanding.ts:206.
export interface TransactionLandingStep {
readonly state: TransactionLandingState;
readonly action: TransactionLandingAction;
}
transactionWireSizeLimit#
Wire cap that applies to an already-serialized transaction, read from its own
version byte. Prefer this over {@link maxTransactionSize} when validating a
compiled wire: a v0 wire is capped at 1,232 bytes even on a cluster where
enable_tx_v1 is active.
Declaration source: packages/core/src/instructions.ts:304.
export function transactionWireSizeLimit(wire: Uint8Array): number;
Parameters
wire: Uint8Array<ArrayBufferLike>— Not documented.
Returns
number
D0{byte/transaction} Inclusive wire cap.
Throws
Not documented.
</details> <details> <summary>transactionWireVersion</summary>transactionWireVersion#
Resolve the wire cap for a transaction format.
Until enable_tx_v1 is active on the target cluster, callers must keep
emitting v0 wires; SEESAW_TX_V1=1 opts a process into v1 for the
devnet/testnet clusters where the gate activates first. Pass version
explicitly to bypass the environment entirely (browsers have no process,
so they always resolve to the legacy cap).
Declaration source: packages/core/src/instructions.ts:275.
export function transactionWireVersion(wire: Uint8Array): SolanaTransactionVersion;
Parameters
wire: Uint8Array<ArrayBufferLike>— Not documented.
Returns
SolanaTransactionVersion
D0{byte/transaction} Inclusive wire cap.
Throws
Not documented.
</details> <details> <summary>TREASURY_UPDATE_RATE_LIMIT_SECONDS</summary>TREASURY_UPDATE_RATE_LIMIT_SECONDS#
TREASURY_UPDATE_RATE_LIMIT_SECONDS — program/src/constants.rs:303.
Declaration source: packages/core/src/preflight/governance.ts:59.
export declare const TREASURY_UPDATE_RATE_LIMIT_SECONDS: 3600;
TrustlessProjectionCursor#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:46.
export interface TrustlessProjectionCursor {
slot: bigint;
signature: string;
instructionIndex: number;
batchIndex: number;
eventIndex: number;
}
TrustlessProjectionEntity#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:69.
export interface TrustlessProjectionEntity {
type: TrustlessProjectionEntityType;
id?: string;
}
TrustlessProjectionEntityType#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:28.
export type TrustlessProjectionEntityType =
| 'order'
| 'fill'
| 'position'
| 'balance'
| 'settlement'
| 'market'
| 'claim';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TrustlessProjectionEvent#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:74.
export interface TrustlessProjectionEvent {
id: string;
kind: TrustlessProjectionEventKind;
rawEventName: string;
cursor: TrustlessProjectionCursor;
source: TrustlessProjectionSource;
entity: TrustlessProjectionEntity;
marketAddress?: string;
walletAddress?: string;
data: Record<string, TrustlessProjectionValue>;
}
TrustlessProjectionEventKind#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:14.
export type TrustlessProjectionEventKind =
| 'order.opened'
| 'order.cancelled'
| 'order.reduced'
| 'order.evicted'
| 'order.reclaimed'
| 'fill.created'
| 'position.updated'
| 'balance.updated'
| 'settlement.available'
| 'settlement.claimed'
| 'market.expired'
| 'claim.created';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
TrustlessProjectionSource#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:62.
export interface TrustlessProjectionSource extends TrustlessProjectionCursor {
provider?: string;
eventSequence?: bigint;
unixTimestamp?: bigint;
rawEventTag: number;
}
TrustlessProjectionValue#
Not documented.
Declaration source: packages/core/src/eventProjection.ts:37.
export type TrustlessProjectionValue =
| string
| number
| bigint
| boolean
| null
| readonly string[]
| readonly number[];
u64ToSeed#
Convert a bigint (u64) to little-endian Uint8Array(8) seed bytes. This is the canonical implementation used by all PDA seed conversions.
Declaration source: packages/core/src/pda.ts:57.
export function u64ToSeed(value: bigint): Uint8Array;
Parameters
value: bigint— Not documented.
Returns
Uint8Array<ArrayBufferLike>
Not documented.
Throws
{SeesawValidationError} If value is outside the unsigned 64-bit range.
</details> <details> <summary>UNAVAILABLE_LIQUIDITY_SOURCE</summary>UNAVAILABLE_LIQUIDITY_SOURCE#
A source for a market whose provider state is missing from the snapshot.
Declaration source: packages/core/src/marketDiscovery.ts:270.
export declare const UNAVAILABLE_LIQUIDITY_SOURCE: LiquiditySource;
UnavailableReadResult#
Not documented.
Declaration source: packages/core/src/resilientData.ts:181.
export interface UnavailableReadResult {
readonly value: null;
readonly source: 'unavailable';
readonly reason: string;
/** The typed Task 2 error, retained for operation and endpoint diagnostics. */
readonly error: RpcDataSourceError;
/** The API failure which caused the direct-RPC attempt. */
readonly apiError: unknown;
}
Field documentation
error— The typed Task 2 error, retained for operation and endpoint diagnostics.apiError— The API failure which caused the direct-RPC attempt.
UNKNOWN_STATE#
The code a verdict carries when a required input could not be read.
Deliberately NOT a SeesawErrorCode: the program never returns this. It says
"the client could not decide", which at the signing step must block.
Declaration source: packages/core/src/preflight/types.ts:714.
export declare const UNKNOWN_STATE: "UNKNOWN_STATE";
unknownCurrencyMetadata#
The honest empty row: nothing known, nothing implied.
Declaration source: packages/core/src/tokensXyz/normalize.ts:73.
export function unknownCurrencyMetadata(mint: string, nowMs: number): CurrencyMetadata;
Parameters
mint: string— Not documented.nowMs: number— Not documented.
Returns
CurrencyMetadata
Not documented.
Throws
Not documented.
</details> <details> <summary>unpause</summary>unpause#
Build Unpause instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1337.
export function unpause(input: UnpauseInput, programAddress?: Address): Promise<SdkResult<UnpauseResult>>;
Parameters
input: UnpauseInput— Not documented. See UnpauseInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UnpauseResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UnpauseAccounts#
Accounts for Unpause instruction.
Declaration source: packages/core/src/instructions.ts:2389.
export interface UnpauseAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UnpauseInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1326.
export interface UnpauseInput {
authority: Address;
}
UnpauseResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1330.
export interface UnpauseResult {
config: Address;
}
unregisterPushToken#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:336.
export function unregisterPushToken(client: ApiClient, signer: WalletMessageSigner, token: string, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<void>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.token: string— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>UnresolvedTransactionAttemptError</summary>UnresolvedTransactionAttemptError#
Not documented.
Declaration source: packages/core/src/transactionAttempt.ts:756.
export declare class UnresolvedTransactionAttemptError extends Error {
constructor(conflictKey: string, attempts: TransactionAttemptRecord[]);
readonly code: "UNRESOLVED_TRANSACTION_ATTEMPT";
readonly signatures: string[];
readonly attempts: TransactionAttemptRecord[];
readonly conflictKey: string;
}
Parameters
conflictKey: string— Not documented.attempts: TransactionAttemptRecord[]— Not documented.
Throws
Not documented.
</details> <details> <summary>UnsupportedConfigAccountVersionError</summary>UnsupportedConfigAccountVersionError#
Not documented.
Declaration source: packages/core/src/generated/program/accounts.ts:178.
export declare class UnsupportedConfigAccountVersionError extends Error {
constructor(actualVersion: number);
readonly expectedVersion: number;
readonly actualVersion: number;
readonly sdkVersion: string;
}
Parameters
actualVersion: number— Not documented.
Throws
Not documented.
</details> <details> <summary>UnsupportedHostedConditionalOrderError</summary>UnsupportedHostedConditionalOrderError#
Not documented.
Declaration source: packages/core/src/advancedOrders.ts:18.
export declare class UnsupportedHostedConditionalOrderError extends SeesawValidationError {
constructor(kind: string);
}
Parameters
kind: string— Not documented.
Throws
Not documented.
</details> <details> <summary>UNUSED_WRITABLE_KEYS_VALUES</summary>UNUSED_WRITABLE_KEYS_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:42.
export declare const UNUSED_WRITABLE_KEYS_VALUES: readonly ["counted", "ignored", "rejected"];
UnusedWritableKeys#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:43.
export type UnusedWritableKeys = (typeof UNUSED_WRITABLE_KEYS_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
updateAuthority#
Step 1 of two-step authority rotation. Pass the all-zero address as
newAuthority to cancel a pending rotation.
Declaration source: packages/core/src/sdk.ts:1961.
export function updateAuthority(input: UpdateAuthorityInput, programAddress?: Address): Promise<SdkResult<UpdateAuthorityResult>>;
Parameters
input: UpdateAuthorityInput— Not documented. See UpdateAuthorityInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UpdateAuthorityResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateAuthorityAccounts#
Accounts for UpdateAuthority instruction.
Declaration source: packages/core/src/instructions.ts:3667.
export interface UpdateAuthorityAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateAuthorityInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1948.
export interface UpdateAuthorityInput {
authority: Address;
newAuthority: Address;
}
UpdateAuthorityParams#
Parameters for UpdateAuthority instruction.
Declaration source: packages/core/src/instructions.ts:3673.
export interface UpdateAuthorityParams {
/** Successor pubkey. Pass the all-zero address to cancel a pending rotation. */
newAuthority: Address;
}
Field documentation
newAuthority— Successor pubkey. Pass the all-zero address to cancel a pending rotation.
UpdateAuthorityResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1953.
export interface UpdateAuthorityResult {
config: Address;
}
updateFeeConfig#
Not documented.
Declaration source: packages/core/src/sdk.ts:1488.
export function updateFeeConfig(input: UpdateFeeConfigInput, programAddress?: Address): Promise<SdkResult<{ config: Address; }>>;
Parameters
input: UpdateFeeConfigInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ config: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateFeeConfigAccounts#
Accounts for UpdateFeeConfig.
Declaration source: packages/core/src/instructions.ts:3223.
export interface UpdateFeeConfigAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateFeeConfigParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:3228.
export interface UpdateFeeConfigParams {
/** D4{bps} Taker fee curve coefficient. Zero disables taker fees. */
takerFeeCoefficientBps: number;
/** D4{bps_of_fee} Allocation of an already-computed fee. */
protocolShareBps: number;
/** D4{bps_of_fee} Allocation of an already-computed fee. */
creatorShareBps: number;
/** D4{bps_of_fee} Allocation of an already-computed fee. */
referralShareBps: number;
/**
* D4{bps_of_fee} Governed builder share (0..=1000; 0 turns builder fees off).
* Encoded right after `referralShareBps`, making the payload 18 bytes.
*/
builderShareBps: number;
/** D4{bps_of_fee} Allocation of an already-computed fee. */
makerRebateShareBps: number;
/** D0{s} Minimum resting duration for maker-rebate eligibility. */
makerRebateMinRestSeconds: number;
}
Field documentation
takerFeeCoefficientBps— D4{bps} Taker fee curve coefficient. Zero disables taker fees.protocolShareBps— D4{bps_of_fee} Allocation of an already-computed fee.creatorShareBps— D4{bps_of_fee} Allocation of an already-computed fee.referralShareBps— D4{bps_of_fee} Allocation of an already-computed fee.builderShareBps— D4{bps_of_fee} Governed builder share (0..=1000; 0 turns builder fees off). Encoded right afterreferralShareBps, making the payload 18 bytes.makerRebateShareBps— D4{bps_of_fee} Allocation of an already-computed fee.makerRebateMinRestSeconds— D0{s} Minimum resting duration for maker-rebate eligibility.
updateMarketCap#
Not documented.
Declaration source: packages/core/src/sdk.ts:2449.
export function updateMarketCap(input: UpdateMarketCapInput, programAddress?: Address): Promise<SdkResult<UpdateMarketCapResult>>;
Parameters
input: UpdateMarketCapInput— Not documented. See UpdateMarketCapInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UpdateMarketCapResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateMarketCapAccounts#
Accounts for UpdateMarketCap instruction.
Declaration source: packages/core/src/instructions.ts:4097.
export interface UpdateMarketCapAccounts extends BinaryRecorderTailAccounts {
market: Address;
config: Address;
/** Either `market.creator` or `config.authority`. */
authority: Address;
vault: Address;
}
Field documentation
authority— Eithermarket.creatororconfig.authority.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateMarketCapInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:2435.
export interface UpdateMarketCapInput {
marketAddress: Address;
/** Either `market.creator` or `config.authority`. */
authority: Address;
/** This market's own YES/NO claim cap; must be nonzero. */
maxTotalShares: bigint;
}
Field documentation
authority— Eithermarket.creatororconfig.authority.maxTotalShares— This market's own YES/NO claim cap; must be nonzero.
UpdateMarketCapParams#
Parameters for UpdateMarketCap instruction.
Declaration source: packages/core/src/instructions.ts:4106.
export interface UpdateMarketCapParams {
/** D6{share} This market's own YES/NO claim cap; must be nonzero. */
maxTotalShares: bigint;
}
Field documentation
maxTotalShares— D6{share} This market's own YES/NO claim cap; must be nonzero.
UpdateMarketCapResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:2443.
export interface UpdateMarketCapResult {
market: Address;
config: Address;
vault: Address;
}
updateMinRestingNotional#
Build UpdateMinRestingNotional instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1429.
export function updateMinRestingNotional(input: UpdateMinRestingNotionalInput, programAddress?: Address): Promise<SdkResult<UpdateMinRestingNotionalResult>>;
Parameters
input: UpdateMinRestingNotionalInput— Not documented. See UpdateMinRestingNotionalInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UpdateMinRestingNotionalResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateMinRestingNotionalAccounts#
Accounts for UpdateMinRestingNotional instruction.
Declaration source: packages/core/src/instructions.ts:2930.
export interface UpdateMinRestingNotionalAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateMinRestingNotionalInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1417.
export interface UpdateMinRestingNotionalInput {
authority: Address;
minRestingNotional: bigint;
}
UpdateMinRestingNotionalParams#
Parameters for UpdateMinRestingNotional instruction.
Declaration source: packages/core/src/instructions.ts:2936.
export interface UpdateMinRestingNotionalParams {
/** D6{stablecoin} Minimum resting notional in settlement-token base units. */
minRestingNotional: bigint;
}
Field documentation
minRestingNotional— D6{stablecoin} Minimum resting notional in settlement-token base units.
UpdateMinRestingNotionalResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1422.
export interface UpdateMinRestingNotionalResult {
config: Address;
}
updateNotificationPreferences#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:284.
export function updateNotificationPreferences(client: ApiClient, signer: WalletMessageSigner, preferences: NotificationPreferences, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<NotificationPreferences>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.preferences: NotificationPreferences— Not documented. See NotificationPreferences for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<NotificationPreferences>
Not documented.
Throws
Not documented.
</details> <details> <summary>updateOperationalParams</summary>updateOperationalParams#
Build UpdateOperationalParams instruction with automatic PDA derivation.
Replaces the full operational and seat settings.
Declaration source: packages/core/src/sdk.ts:1463.
export function updateOperationalParams(input: UpdateOperationalParamsInput, programAddress?: Address): Promise<SdkResult<UpdateOperationalParamsResult>>;
Parameters
input: UpdateOperationalParamsInput— Not documented. See UpdateOperationalParamsInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UpdateOperationalParamsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateOperationalParamsAccounts#
Accounts for UpdateOperationalParams instruction.
Config-scoped admin setter — same 2-account base layout as the other
config admin instructions (Pause, UpdateTickSize, ...). The on-chain
processor emits UpdateOperationalParams through the binary recorder.
On-chain layout:
0: config (W) — protocol configuration account
1: authority (S) — must match config.authority
Declaration source: packages/core/src/instructions.ts:4265.
export interface UpdateOperationalParamsAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateOperationalParamsInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1450.
export interface UpdateOperationalParamsInput extends UpdateOperationalParamsParams {
authority: Address;
}
Field documentation
closerRewardLamports— D0{lamport/step} Lifecycle closer reward. 0 disables the bounty.maxPriceStalenessSeconds— D0{s} Maximum oracle price staleness. 0 selects the default.marketExpirationWindowSeconds— D0{s} Market expiration window. 0 selects the default.minMarketDurationSeconds— D0{s} Minimum market duration. 0 selects the default.maxMarketDurationSeconds— D0{s} Maximum market duration. 0 selects the default.maxOrderSize— D6{share} Maximum order size. Must be non-zero.splineFlags— Spline feature flags.splineMinCommitment— D6{stablecoin} Minimum collateral commitment required when attaching a spline.splineMidJumpResetBps— D4{bps} Midpoint jump threshold that resets maker-rebate eligibility.
UpdateOperationalParamsParams#
Parameters for UpdateOperationalParams instruction.
The 95-byte payload carries the existing settings followed by the complete seat policy. Read the current ConfigAccount to preserve any seat settings the caller is leaving unchanged.
Every field is range-checked by the corresponding ConfigAccount
setter on-chain; a rejected value aborts the whole instruction.
Declaration source: packages/core/src/instructions.ts:4280.
export interface UpdateOperationalParamsParams {
/** D0{lamport/step} Lifecycle closer reward. 0 disables the bounty. */
closerRewardLamports: bigint;
/** D0{s} Maximum oracle price staleness. 0 selects the default. */
maxPriceStalenessSeconds: bigint;
/** D0{s} Market expiration window. 0 selects the default. */
marketExpirationWindowSeconds: bigint;
/** D0{s} Minimum market duration. 0 selects the default. */
minMarketDurationSeconds: bigint;
/** D0{s} Maximum market duration. 0 selects the default. */
maxMarketDurationSeconds: bigint;
/** D6{share} Maximum order size. Must be non-zero. */
maxOrderSize: bigint;
/** Spline feature flags. */
splineFlags: number; // D0{1}; feature-bit representation.
/** D6{stablecoin} Minimum collateral commitment required when attaching a spline. */
splineMinCommitment: bigint;
/** D4{bps} Midpoint jump threshold that resets maker-rebate eligibility. */
splineMidJumpResetBps: number;
seatParams: SeatOperationalParams;
}
Field documentation
closerRewardLamports— D0{lamport/step} Lifecycle closer reward. 0 disables the bounty.maxPriceStalenessSeconds— D0{s} Maximum oracle price staleness. 0 selects the default.marketExpirationWindowSeconds— D0{s} Market expiration window. 0 selects the default.minMarketDurationSeconds— D0{s} Minimum market duration. 0 selects the default.maxMarketDurationSeconds— D0{s} Maximum market duration. 0 selects the default.maxOrderSize— D6{share} Maximum order size. Must be non-zero.splineFlags— Spline feature flags.splineMinCommitment— D6{stablecoin} Minimum collateral commitment required when attaching a spline.splineMidJumpResetBps— D4{bps} Midpoint jump threshold that resets maker-rebate eligibility.
UpdateOperationalParamsResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1454.
export interface UpdateOperationalParamsResult {
config: Address;
}
updateResponsibleTrading#
Start a cool-off (whole hours, 24 to 8,760) or set the daily deposit limit (base units; null clears it).
Declaration source: packages/core/src/api/compliance.ts:119.
export function updateResponsibleTrading(client: ApiClient, signer: WalletMessageSigner, update: { coolOffHours?: number; dailyDepositLimit?: bigint | null; }, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<ResponsibleTradingState>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.update: { coolOffHours?: number; dailyDepositLimit?: bigint | null; }— Not documented.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ walletAddress: string; coolOffUntil: string | null; blocked: boolean; dailyDepositLimit: string | null; updatedAt: string | null; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>updateSplineMid</summary>updateSplineMid#
Not documented.
Declaration source: packages/core/src/sdk.ts:3552.
export function updateSplineMid(input: UpdateSplineMidInput, programAddress?: Address): Promise<SdkResult<{ spline: Address; }>>;
Parameters
input: UpdateSplineMidInput— Not documented. See UpdateSplineMidInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ spline: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateSplineMidAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4614.
export interface UpdateSplineMidAccounts {
creatorOrQuoteAuthority: Address;
spline: Address;
/** Omit all three context fields only while the spline is detached. */
market?: Address;
settlementVault?: Address;
/** Required for attached external markets, including unresolved ones. */
marketMeta?: Address;
}
Field documentation
market— Omit all three context fields only while the spline is detached.marketMeta— Required for attached external markets, including unresolved ones.
UpdateSplineMidInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3528.
export interface UpdateSplineMidInput extends Omit<UpdateSplineMidParams, 'profile'> {
profile?: UpdateSplineMidParams['profile'];
creatorOrQuoteAuthority: Address;
spline: Address;
market?: Address;
settlementVault?: Address;
marketMeta?: Address;
}
Field documentation
tickWindow— Optional same-slot sequence bounds enforced when matching the seat.
UpdateSplineMidParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:4599.
export interface UpdateSplineMidParams {
sequence: bigint; // D0{id}
expectedAuthorityEpoch: number;
expectedMarketTradingGeneration: number;
expectedShapeGeneration: number;
validFromSlot: bigint;
validUntilSlot: bigint;
sourceObservedAtUnix: bigint;
profile: QuoteProfile;
newMidPriceBps: number; // D4{canonical_price_bps}
active: boolean;
/** Optional same-slot sequence bounds enforced when matching the seat. */
tickWindow?: MarketTickWindow;
}
Field documentation
tickWindow— Optional same-slot sequence bounds enforced when matching the seat.
updateSplineShape#
Not documented.
Declaration source: packages/core/src/sdk.ts:3492.
export function updateSplineShape(input: UpdateSplineShapeInput, programAddress?: Address): Promise<SdkResult<{ spline: Address; market?: Address; }>>;
Parameters
input: UpdateSplineShapeInput— Not documented. See UpdateSplineShapeInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ spline: Address; market?: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateSplineShapeAccounts#
Not documented.
Declaration source: packages/core/src/instructions.ts:4527.
export type UpdateSplineShapeAccounts = BinaryRecorderTailAccounts & {
creator: Address;
spline: Address;
} & (
| { market?: never; vault?: never; config?: never; marketMeta?: never }
| { market: Address; vault: Address; config: Address; marketMeta?: Address }
);
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateSplineShapeInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:3487.
export interface UpdateSplineShapeInput extends SplineAddressInput, UpdateSplineShapeParams {
market?: Address;
marketMeta?: Address;
}
Field documentation
defaultCommitment— Required for a series template update. An attached seat keeps its commitment.
UpdateSplineShapeParams#
Not documented.
Declaration source: packages/core/src/instructions.ts:4517.
export interface UpdateSplineShapeParams {
maxQuoteAgeSeconds: number; // D0{s}
/** Required for a series template update. An attached seat keeps its commitment. */
defaultCommitment?: bigint; // D6{stablecoin}
bidLevelCount: number; // D0{curve_level_count}
askLevelCount: number; // D0{curve_level_count}
bidLevels: readonly CurveLevel[];
askLevels: readonly CurveLevel[];
}
Field documentation
defaultCommitment— Required for a series template update. An attached seat keeps its commitment.
updateTickSize#
Build UpdateTickSize instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1396.
export function updateTickSize(input: UpdateTickSizeInput, programAddress?: Address): Promise<SdkResult<UpdateTickSizeResult>>;
Parameters
input: UpdateTickSizeInput— Not documented. See UpdateTickSizeInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UpdateTickSizeResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateTickSizeAccounts#
Accounts for UpdateTickSize instruction.
Declaration source: packages/core/src/instructions.ts:2888.
export interface UpdateTickSizeAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
}
Field documentation
selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
UpdateTickSizeInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1384.
export interface UpdateTickSizeInput {
authority: Address;
tickSizeBps: number;
}
UpdateTickSizeParams#
Parameters for UpdateTickSize instruction.
Declaration source: packages/core/src/instructions.ts:2894.
export interface UpdateTickSizeParams {
/** D4{tick_size_bps} Exact price-grid increment. */
tickSizeBps: number;
}
Field documentation
tickSizeBps— D4{tick_size_bps} Exact price-grid increment.
UpdateTickSizeResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1389.
export interface UpdateTickSizeResult {
config: Address;
}
updateTreasuryRecipients#
Build UpdateTreasuryRecipients instruction with automatic PDA derivation.
The on-chain validator rate-limits this call (TREASURY_UPDATE_RATE_LIMIT_SECONDS), verifies each recipient is a valid SPL Token v1 account on the settlement mint, and rejects pairwise duplicates.
Declaration source: packages/core/src/sdk.ts:1925.
export function updateTreasuryRecipients(input: UpdateTreasuryRecipientsInput, programAddress?: Address): Promise<SdkResult<UpdateTreasuryRecipientsResult>>;
Parameters
input: UpdateTreasuryRecipientsInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<UpdateTreasuryRecipientsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
UpdateTreasuryRecipientsAccounts#
Accounts for UpdateTreasuryRecipients instruction.
Atomically replaces config.treasuryRecipients with the 8 supplied
SPL token-account addresses. Authority signs; rate-limited
(TREASURY_UPDATE_RATE_LIMIT_SECONDS) on-chain. The on-chain validator
enforces INV-FEE-T4/T5: each recipient is a valid SPL Token v1 account
on the settlement mint, and all 8 are pairwise distinct.
Declaration source: packages/core/src/instructions.ts:3376.
export interface UpdateTreasuryRecipientsAccounts extends BinaryRecorderTailAccounts {
config: Address;
authority: Address;
/** Exactly 8 SPL token-account addresses, one per shard. */
recipients: readonly Address[];
}
Field documentation
recipients— Exactly 8 SPL token-account addresses, one per shard.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
updateUserProfile#
Not documented.
Declaration source: packages/core/src/api/users.ts:113.
export function updateUserProfile(address: string, updates: { displayName?: string; avatar?: string; }): Promise<void>;
Parameters
address: string— Not documented.updates: { displayName?: string; avatar?: string; }— Not documented.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>updateWalletProfile</summary>updateWalletProfile#
Not documented.
Declaration source: packages/core/src/api/social.ts:73.
export function updateWalletProfile(client: ApiClient, signer: WalletMessageSigner, update: WalletProfileUpdate, options?: { signal?: AbortSignal; authDomain?: string; }): Promise<WalletProfile>;
Parameters
client: ApiClient— Not documented. See ApiClient for its declaration and available field documentation.signer: WalletMessageSigner— Not documented. See WalletMessageSigner for its declaration and available field documentation.update: WalletProfileUpdate— Not documented. See WalletProfileUpdate for its declaration and available field documentation.options: { signal?: AbortSignal; authDomain?: string; } | undefined— Not documented.
Returns
Promise<{ [x: string]: unknown; id: string | number; walletAddress: string; displayName: string | null; avatarUrl: string | null; isAnonymous: boolean; streak?: Record<string, unknown> | null | undefined; stats?: Record<string, unknown> | null | undefined; }>
Not documented.
Throws
Not documented.
</details> <details> <summary>UpstreamErrorInfo</summary>UpstreamErrorInfo#
Not documented.
Declaration source: packages/core/src/tokensXyz/upstream.ts:212.
export interface UpstreamErrorInfo {
readonly status: number;
readonly tag: string | null;
readonly code: string | null;
}
UpstreamMarketFacts#
What one source says about a mint's identity and market. All fields nullable.
Declaration source: packages/core/src/tokensXyz/upstream.ts:29.
export interface UpstreamMarketFacts {
readonly mint: string;
readonly assetId: string | null;
readonly name: string | null;
readonly symbol: string | null;
/** Raw https logo URL from the provider, before the server's host allowlist. */
readonly logoUri: string | null;
readonly priceUsd: number | null;
readonly priceChange24hPct: number | null;
readonly priceAsOfMs: number | null;
readonly advisory: CurrencyAdvisory | null;
}
Field documentation
logoUri— Raw https logo URL from the provider, before the server's host allowlist.
USER_CAPABILITY_STATE_VALUES#
Design §9.1: ACE §11.3's states plus not_enrolled and provider_fallback.
Declaration source: packages/core/src/execution/lifecycle.ts:53.
export declare const USER_CAPABILITY_STATE_VALUES: readonly ["quote_active", "quote_expired", "bounded_not_current_slot", "refresh_failed", "priority_unavailable", "confirmation_unknown", "not_enrolled", "provider_fallback"];
UserCapabilityState#
Not documented.
Declaration source: packages/core/src/execution/lifecycle.ts:63.
export type UserCapabilityState = (typeof USER_CAPABILITY_STATE_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
UserPositionAccount#
UserPositionAccount - User position per market. Size: 256 bytes. PDA: ["seesaw", "position", market_pubkey, user_pubkey].
Declaration source: packages/core/src/types.ts:540.
export interface UserPositionAccount {
readonly discriminator: Uint8Array;
readonly market: Address;
readonly owner: Address;
readonly yesShares: bigint;
readonly noShares: bigint;
readonly lockedYesShares: bigint;
readonly lockedNoShares: bigint;
readonly collateralDeposited: bigint;
readonly collateralLocked: bigint;
readonly payout: bigint;
readonly totalBought: bigint;
readonly totalSold: bigint;
readonly totalFeesPaid: bigint;
readonly totalRebatesEarned: bigint;
readonly firstTradeAt: bigint;
readonly lastTradeAt: bigint;
readonly orderCount: number;
readonly settled: boolean;
readonly bump: number;
/** Validated-on-use trader-ledger slot cache (`stored = index + 1`). */
readonly traderSlotHint: number | null;
readonly yesWithdrawn: bigint; // offset 184, YES shares already withdrawn as SPL
readonly noWithdrawn: bigint; // offset 192, NO shares already withdrawn as SPL
readonly referralReferrer: Address;
readonly referralExpiresAt: bigint;
readonly pendingReferralFees: bigint;
readonly referralBindingState: number;
readonly referralBindingVersion: number;
}
Field documentation
traderSlotHint— Validated-on-use trader-ledger slot cache (stored = index + 1).
validateApiResponse#
Validate an API response against a Zod schema.
Uses soft validation: on success returns the parsed data, on failure logs a warning and returns the raw data cast as T. This lets us discover API inconsistencies in development without breaking the app in production.
Declaration source: packages/core/src/api/schemas.ts:313.
export function validateApiResponse<T>(schema: z.ZodType<T>, data: unknown, endpoint: string): T;
Parameters
schema: z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>— Not documented.data: unknown— Not documented.endpoint: string— Not documented.
Returns
T
Not documented.
Throws
Not documented.
</details> <details> <summary>validateExternalPayout</summary>validateExternalPayout#
Numerical admissibility only: the numerators must partition the denominator exactly.
Declaration source: packages/core/src/externalPayout.ts:77.
export function validateExternalPayout(payout: ExternalPayout): void;
Parameters
payout: ExternalPayout— Not documented. See ExternalPayout for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>validateExternalPayoutOrigin</summary>validateExternalPayoutOrigin#
Origin/result separation only; source-final candidates may omit a result.
Declaration source: packages/core/src/externalPayout.ts:66.
export function validateExternalPayoutOrigin(payout: ExternalPayout): void;
Parameters
payout: ExternalPayout— Not documented. See ExternalPayout for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>validateNativeResolutionDisclosure</summary>validateNativeResolutionDisclosure#
Validate event economics. The reason is read from its own field and must be the one the program pairs with the outcome; the weights must be the outcome's canonical split.
Declaration source: packages/core/src/resolutionDisclosure.ts:109.
export function validateNativeResolutionDisclosure(value: NativeResolutionDisclosure): void;
Parameters
value: NativeResolutionDisclosure— Not documented. See NativeResolutionDisclosure for its declaration and available field documentation.
Returns
void
Not documented.
Throws
Not documented.
</details> <details> <summary>validateNativeResolutionPolicyAccount</summary>validateNativeResolutionPolicyAccount#
Validate account ownership, canonical PDA/bump, frozen layout/domain, market/config/feed binding, and the Rust policy hash. The caller must first read the MarketAccount from the same finalized RPC context and separately verify its native resolver marker and canonical native market PDA.
Declaration source: packages/core/src/nativeResolutionPolicy.ts:50.
export function validateNativeResolutionPolicyAccount(data: Uint8Array, accountAddress: Address, expected: NativeResolutionPolicyExpectations): Promise<void>;
Parameters
data: Uint8Array<ArrayBufferLike>— Not documented.accountAddress: Address— Not documented.expected: NativeResolutionPolicyExpectations— Not documented. See NativeResolutionPolicyExpectations for its declaration and available field documentation.
Returns
Promise<void>
Not documented.
Throws
Not documented.
</details> <details> <summary>validateStopLossInput</summary>validateStopLossInput#
Every reason a stop cannot be created as entered; empty when it can.
Declaration source: packages/core/src/stopLoss/trigger.ts:106.
export function validateStopLossInput(input: StopLossInput): StopLossInputError[];
Parameters
input: StopLossInput— Not documented. See StopLossInput for its declaration and available field documentation.
Returns
StopLossInputError[]
Not documented.
Throws
Not documented.
</details> <details> <summary>validateStopLossTransaction</summary>validateStopLossTransaction#
Full validation: structure, expectations, every derived account, signature.
Declaration source: packages/core/src/stopLoss/transaction.ts:357.
export function validateStopLossTransaction(wire: Uint8Array, expected: StopLossTransactionExpectation): Promise<ParsedStopLossTransaction>;
Parameters
wire: Uint8Array<ArrayBufferLike>— Not documented.expected: StopLossTransactionExpectation— Not documented. See StopLossTransactionExpectation for its declaration and available field documentation.
Returns
Promise<ParsedStopLossTransaction>
Not documented.
Throws
Not documented.
</details> <details> <summary>VaultRecord</summary>VaultRecord#
Not documented.
Declaration source: packages/core/src/confidential/vault/vault.ts:26.
export interface VaultRecord extends VaultRecordLocator {
readonly v: 1;
readonly nonce: Uint8Array;
readonly aad_hash: Uint8Array;
readonly ct: Uint8Array;
}
VaultRecordKind#
Not documented.
Declaration source: packages/core/src/confidential/vault/vault.ts:18.
export type VaultRecordKind = (typeof kinds)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
VaultRecordLocator#
Not documented.
Declaration source: packages/core/src/confidential/vault/vault.ts:20.
export interface VaultRecordLocator {
readonly account: Address;
readonly kind: VaultRecordKind;
readonly id: string;
}
VaultStore#
An account-scoped private store. Each replacement must commit atomically.
Declaration source: packages/core/src/confidential/vault/vault.ts:41.
export interface VaultStore {
read(locator: VaultRecordLocator): Promise<VaultRecord | null>;
writeAtomically(record: VaultRecord): Promise<void>;
/** Compare the stored record's nonce with the expected nonce in the same transaction as the write. */
replaceIfCurrent?(record: VaultRecord, expectedNonce: Uint8Array | null): Promise<boolean>;
/** Read the account revision, which changes after every successful record mutation. */
readRevision?(account: Address): Promise<number>;
/** Install the entire batch in one transaction if the account revision is still current. */
writeBatchIfCurrent?(
account: Address,
records: readonly VaultRecord[],
expectedRevision: number
): Promise<boolean>;
}
Field documentation
replaceIfCurrent— Compare the stored record's nonce with the expected nonce in the same transaction as the write.readRevision— Read the account revision, which changes after every successful record mutation.writeBatchIfCurrent— Install the entire batch in one transaction if the account revision is still current.
Verdict#
Result of the preflight. reason is an i18n KEY (e.g.
preflight.tickMisaligned), never user-facing prose.
Declaration source: packages/core/src/preflight/types.ts:760.
export type Verdict = { allowed: true } | PreflightDenied | PreflightUnknownState;
verifyConfidentialCustodyPda#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:497.
export function verifyConfidentialCustodyPda(programAddress: Address, market: Address, bump: number): Promise<Address>;
Parameters
programAddress: Address— Not documented.market: Address— Not documented.bump: number— Not documented.
Returns
Promise<Address>
Not documented.
Throws
Not documented.
</details> <details> <summary>verifyConfidentialMarketPda</summary>verifyConfidentialMarketPda#
Not documented.
Declaration source: packages/core/src/generated/program/confidential.ts:486.
export function verifyConfidentialMarketPda(programAddress: Address, profile: number, nonce: Uint8Array, bump: number): Promise<Address>;
Parameters
programAddress: Address— Not documented.profile: number— Not documented.nonce: Uint8Array<ArrayBufferLike>— Not documented.bump: number— Not documented.
Returns
Promise<Address>
Not documented.
Throws
Not documented.
</details> <details> <summary>verifyCurrencyFreezeException</summary>verifyCurrencyFreezeException#
Authenticate account ownership and canonical identity; this does not check mint admission.
Declaration source: packages/core/src/currency/freezeException.ts:18.
export function verifyCurrencyFreezeException(input: { data: Uint8Array; account: Address; owner: Address | null; mint: Address; tokenProgram: Address; program: Address; }): Promise<CurrencyFreezeException | null>;
Parameters
input: { data: Uint8Array; account: Address; owner: Address | null; mint: Address; tokenProgram: Address; program: Address; }— Not documented.
Returns
Promise<CurrencyFreezeException | null>
Not documented.
Throws
Not documented.
</details> <details> <summary>verifyDiscoverySnapshot</summary>verifyDiscoverySnapshot#
Rerun the reader and the library on a published input set. The rerun reads
exactly the published accounts (by the input rule), recomputes the digest and
every row; compare rows ranked with rankDiscovery to the publisher's list.
matches is false when the inputs do not reproduce expectedSnapshotId, for
example because an account was altered or one the rule needs is extra.
Declaration source: packages/core/src/discoveryVerify.ts:110.
export function verifyDiscoverySnapshot(inputs: readonly DiscoveryInputAccount[], expectedSnapshotId: string, options?: { readonly programAddress?: Address; }): Promise<DiscoveryVerification>;
Parameters
inputs: readonly DiscoveryInputAccount[]— Not documented.expectedSnapshotId: string— Not documented.options: { readonly programAddress?: Address; }— Not documented. Default:{}.
Returns
Promise<DiscoveryVerification>
Not documented.
Throws
Not documented.
Defaults
options:{}.
VersionedFeePolicy#
Not documented.
Declaration source: packages/core/src/fee.ts:226.
export type VersionedFeePolicy =
| { feeModelVersion: 1; feeCapBps: number; decayRateBps: number }
| { feeModelVersion: 2; takerFeeCoefficientBps: number };
VOLUNTARY_CONTROL_ACTIONS#
Which first-party actions a voluntary cool-off blocks.
Matches the product promise ("New buys, deposits, and share minting are disabled; selling shares you hold stays available"): every order placement — taker or maker, single or ladder, ordinary form or shortcut — plus deposits and complete-set minting. Exit and custody actions stay available: cancel, withdraw, redeem, merge, claim and close.
One carve-out, decided from the order terms rather than this label: a
single placeOrder / quickTrade that is a reduce-only exit
({@link isReduceOnlyExit}) is permitted. A maker ladder never is. This is an
explicit policy table, not a heuristic.
Declaration source: packages/core/src/reviewedIntent.ts:620.
export declare const VOLUNTARY_CONTROL_ACTIONS: { readonly placeOrder: "blocked"; readonly quickTrade: "blocked"; readonly makerLadder: "blocked"; readonly deposit: "blocked"; readonly mintCompleteSet: "blocked"; readonly cancelOrder: "permitted"; readonly withdraw: "permitted"; readonly redeem: "permitted"; readonly mergeCompleteSet: "permitted"; readonly claim: "permitted"; readonly closePosition: "permitted"; };
VoluntaryControlAction#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:634.
export type VoluntaryControlAction = keyof typeof VOLUNTARY_CONTROL_ACTIONS;
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
voluntaryControlBlocks#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:716.
export function voluntaryControlBlocks(action: VoluntaryControlAction, observation: VoluntaryControlObservation, nowMs: number): boolean;
Parameters
action: "placeOrder" | "mergeCompleteSet" | "withdraw" | "claim" | "deposit" | "redeem" | "quickTrade" | "makerLadder" | "mintCompleteSet" | "cancelOrder" | "closePosition"— Not documented.observation: VoluntaryControlObservation— Not documented. See VoluntaryControlObservation for its declaration and available field documentation.nowMs: number— Not documented.
Returns
boolean
Not documented.
Throws
Not documented.
</details> <details> <summary>VoluntaryControlObservation</summary>VoluntaryControlObservation#
Not documented.
Declaration source: packages/core/src/reviewedIntent.ts:636.
export interface VoluntaryControlObservation {
/** This device's own cool-off end, ms since epoch. */
readonly localUntilMs: number | null;
/** The account-wide cool-off end just read from the server, ms. */
readonly accountUntilMs: number | null;
/** Last account-wide value this session ever saw, ms (never lifted by a failed read). */
readonly lastKnownAccountUntilMs?: number | null;
/** Whether the account read landed at this gate. */
readonly accountRead: 'fresh' | 'failed' | 'unauthenticated';
}
Field documentation
localUntilMs— This device's own cool-off end, ms since epoch.accountUntilMs— The account-wide cool-off end just read from the server, ms.lastKnownAccountUntilMs— Last account-wide value this session ever saw, ms (never lifted by a failed read).accountRead— Whether the account read landed at this gate.
WalletAuthHeaders#
Not documented.
Declaration source: packages/core/src/auth.ts:20.
export interface WalletAuthHeaders {
'x-wallet-signature': string;
'x-wallet-message': string;
'x-wallet-pubkey': string;
'x-wallet-chain'?: 'solana';
}
WalletMessageSigner#
Not documented.
Declaration source: packages/core/src/auth.ts:15.
export interface WalletMessageSigner {
publicKey: string;
signMessage: (message: Uint8Array) => Promise<Uint8Array | string> | Uint8Array | string;
}
WalletNotification#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:230.
export type WalletNotification = z.infer<typeof inboxItemSchema>;
WalletPriceAlert#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:155.
export type WalletPriceAlert = z.infer<typeof priceAlertSchema>;
Field documentation
targetPrice— Basis points of the YES price.
WalletProfile#
Not documented.
Declaration source: packages/core/src/api/social.ts:39.
export type WalletProfile = z.infer<typeof profileSchema>;
WalletProfileUpdate#
Not documented.
Declaration source: packages/core/src/api/social.ts:41.
export interface WalletProfileUpdate {
/** Up to 50 letters, digits, spaces, underscores or hyphens. */
displayName?: string;
/** An http(s) URL up to 500 characters, or null to clear. */
avatarUrl?: string | null;
isAnonymous?: boolean;
}
Field documentation
displayName— Up to 50 letters, digits, spaces, underscores or hyphens.avatarUrl— An http(s) URL up to 500 characters, or null to clear.
WalletWatchlistItem#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:50.
export type WalletWatchlistItem = z.infer<typeof watchlistItemSchema>;
Field documentation
market— The indexed market row (snake_case, as stored), or null when not indexed.
WalletWatchlistPage#
Not documented.
Declaration source: packages/core/src/api/walletServices.ts:58.
export type WalletWatchlistPage = z.infer<typeof watchlistPageSchema>;
WATCHLIST_MAX_ITEMS#
The indexer caps a wallet's watchlist at 50 markets.
Declaration source: packages/core/src/api/walletServices.ts:38.
export declare const WATCHLIST_MAX_ITEMS: 50;
WatchlistItem#
Not documented.
Declaration source: packages/core/src/api/types.ts:265.
export interface WatchlistItem {
marketAddress: string;
addedAt: string;
}
WebSocketAuthPayload#
Not documented.
Declaration source: packages/core/src/streams.ts:7.
export interface WebSocketAuthPayload {
signature: string;
message: string;
publicKey: string;
}
WebSocketConstructor#
Not documented.
Declaration source: packages/core/src/streams.ts:83.
export type WebSocketConstructor = new (url: string) => WebSocketLike;
WindowHistoryCell#
Not documented.
Declaration source: packages/core/src/windowHistory.ts:14.
export interface WindowHistoryCell {
id: string;
outcome: WindowHistoryOutcome;
settlementPrint: string | null;
isHollow: boolean;
}
WindowHistoryOptions#
Not documented.
Declaration source: packages/core/src/windowHistory.ts:21.
export interface WindowHistoryOptions {
limit?: number;
}
WindowHistoryOutcome#
Not documented.
Declaration source: packages/core/src/windowHistory.ts:4.
export type WindowHistoryOutcome = 'yes' | 'no' | 'expired' | 'unknown';
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
WindowHistoryRow#
Not documented.
Declaration source: packages/core/src/windowHistory.ts:6.
export interface WindowHistoryRow {
marketId: string | number | bigint;
outcome: number | null;
endPrice: string | number | bigint | null;
endPriceExpo: number | null;
state?: number;
}
WITHDRAW_MAKER_QUOTE_INVENTORY_DISCRIMINATOR#
Not documented.
Declaration source: packages/core/src/makerQuoteInstructions.ts:48.
export declare const WITHDRAW_MAKER_QUOTE_INVENTORY_DISCRIMINATOR: 105;
WithdrawCurrencyProtocolTreasuryAccounts#
Accounts for a config-authority withdrawal from a currency protocol treasury shard (0x62).
Declaration source: packages/core/src/instructions.ts:2679.
export interface WithdrawCurrencyProtocolTreasuryAccounts extends BinaryRecorderTailAccounts {
/** Current `config.authority`. */
authority: Address;
config: Address;
mint: Address;
record: Address;
treasury: Address;
/** Initialized, unfrozen token account of the same mint; never the shard itself. */
destination: Address;
tokenProgram?: Address;
}
Field documentation
authority— Currentconfig.authority.destination— Initialized, unfrozen token account of the same mint; never the shard itself.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
withdrawFunds#
Not documented.
Declaration source: packages/core/src/sdk.ts:2675.
export function withdrawFunds(input: WithdrawFundsInput, programAddress?: Address): Promise<SdkResult<DepositOrWithdrawFundsResult>>;
Parameters
input: WithdrawFundsInput— Not documented.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<DepositOrWithdrawFundsResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
WithdrawFundsAccounts#
WithdrawFunds adds MarketMeta before the recorder tail for external markets.
Declaration source: packages/core/src/instructions.ts:3430.
export interface WithdrawFundsAccounts extends DepositOrWithdrawFundsAccounts {
/** Authenticated external-market metadata; omit only for native markets. */
marketMeta?: Address;
/** A delegate may withdraw only to the owner's canonical ATA or an approved owner-held token account. */
strategy?: PrefundedStrategyAccounts;
}
Field documentation
marketMeta— Authenticated external-market metadata; omit only for native markets.strategy— A delegate may withdraw only to the owner's canonical ATA or an approved owner-held token account.selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
WithdrawFundsIntent#
Everything WithdrawFunds needs.
Declaration source: packages/core/src/preflight/types.ts:415.
export interface WithdrawFundsIntent {
/** Settlement units to debit from `quote_free`. */
amount: bigint;
/** Omitted means unknown: preview skips the native clock gates, strict denies. */
nowUnix?: number;
}
Field documentation
amount— Settlement units to debit fromquote_free.nowUnix— Omitted means unknown: preview skips the native clock gates, strict denies.
withdrawFundsVerdict#
Decide whether the program would accept this WithdrawFunds.
Debits the trader-ledger quote_free bucket and transfers settlement units
out of the vault. Deliberately takes NO ConfigSnapshot: global pause does
not gate this path (withdraw_funds.rs:198-203), and neither does the
per-market emergency status (withdraw_funds.rs:215-220).
Declaration source: packages/core/src/preflight/funding.ts:417.
export function withdrawFundsVerdict(_market: MarketSnapshot, ledger: LedgerSnapshot, intent: WithdrawFundsIntent, options?: PreflightOptions): Verdict;
Parameters
_market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.ledger: LedgerSnapshot— Not documented. See LedgerSnapshot for its declaration and available field documentation.intent: WithdrawFundsIntent— Not documented. See WithdrawFundsIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>withdrawShares</summary>withdrawShares#
Build WithdrawShares instruction with automatic PDA derivation.
Declaration source: packages/core/src/sdk.ts:1245.
export function withdrawShares(input: WithdrawSharesInput, programAddress?: Address): Promise<SdkResult<WithdrawSharesResult>>;
Parameters
input: WithdrawSharesInput— Not documented. See WithdrawSharesInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<WithdrawSharesResult>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
WithdrawSharesAccounts#
Accounts for WithdrawShares instruction.
The account list has 9 base accounts — a read-only vault is present so
the post-mint
check_solvency tripwire can read the live market vault balance.
WithdrawShares never moves the vault; the account is read-only. An
optional 2-account self-CPI recorder tail may follow.
On-chain layout (program/src/processor/withdraw_shares.rs):
0: market (W) — market PDA
1: user_position (W) — user position PDA
2: mint (W) — YES or NO token mint PDA
3: user_token_account (W) — user's token account
4: user (S) — user (read-only signer)
5: config (R) — protocol config
6: token_program (R) — SPL Token Program
7: trader_ledger (W) — trader-ledger PDA
8: vault (R) — market vault PDA (read-only solvency tripwire)
9: self_program (R) — optional self program for recorder CPI dispatch
10: log_authority (R) — optional log authority PDA for binary recording
Declaration source: packages/core/src/instructions.ts:2293.
export interface WithdrawSharesAccounts extends BinaryRecorderTailAccounts {
market: Address;
userPosition: Address;
mint: Address;
userTokenAccount: Address;
user: Address;
config: Address;
tokenProgram: Address;
traderLedger: Address;
/** Market vault PDA — read-only post-mint solvency tripwire (Fix L-02). */
vault: Address;
}
Field documentation
vault— Market vault PDA — read-only post-mint solvency tripwire (Fix L-02).selfProgram— Must match a custom instruction program address; ignored for the default program.logAuthority— Custom program"log"PDA; ignored in favor of the canonical default-program constant.
WithdrawSharesInput#
Not documented.
Declaration source: packages/core/src/sdk.ts:1228.
export interface WithdrawSharesInput {
marketAddress: Address;
user: Address;
mint: Address;
userTokenAccount: Address;
amount: bigint;
tokenType: number; // 0 = YES, 1 = NO (matches Rust RedeemTokenType)
}
WithdrawSharesIntent#
Everything WithdrawShares needs.
Declaration source: packages/core/src/preflight/types.ts:423.
export interface WithdrawSharesIntent {
/** Which leg to materialize. Maps to `token_type` `0 = YES` / `1 = NO`. */
side: 'yes' | 'no';
/** Shares to debit from `yes_free` / `no_free`. */
amount: bigint;
/** Omitted means unknown: preview skips the clock gates, strict denies. */
nowUnix?: number;
}
Field documentation
side— Which leg to materialize. Maps totoken_type0 = YES/1 = NO.amount— Shares to debit fromyes_free/no_free.nowUnix— Omitted means unknown: preview skips the clock gates, strict denies.
WithdrawSharesParams#
Parameters for WithdrawShares instruction.
Declaration source: packages/core/src/instructions.ts:2307.
export interface WithdrawSharesParams {
/** D6{share} Side-specific share quantity. */
amount: bigint;
tokenType: number; // D0{1}; 0 = YES, 1 = NO (matches Rust RedeemTokenType)
}
Field documentation
amount— D6{share} Side-specific share quantity.
WithdrawSharesResult#
Not documented.
Declaration source: packages/core/src/sdk.ts:1237.
export interface WithdrawSharesResult {
market: Address;
position: Address;
}
withdrawSharesVerdict#
Decide whether the program would accept this WithdrawShares.
Materializes free ledger shares into real SPL YES/NO tokens. Reads the
ledger's yes_free / no_free buckets — NOT an indexer position balance,
which includes locked shares backing resting asks and would over-report what
can actually be withdrawn.
Deliberately takes NO ConfigSnapshot (withdraw_shares.rs:343-348) and
applies NO compute_state() gate: the on-chain path has neither.
Declaration source: packages/core/src/preflight/funding.ts:463.
export function withdrawSharesVerdict(market: MarketSnapshot, ledger: LedgerSnapshot, intent: WithdrawSharesIntent, options?: PreflightOptions): Verdict;
Parameters
market: MarketSnapshot— Not documented. See MarketSnapshot for its declaration and available field documentation.ledger: LedgerSnapshot— Not documented. See LedgerSnapshot for its declaration and available field documentation.intent: WithdrawSharesIntent— Not documented. See WithdrawSharesIntent for its declaration and available field documentation.options: PreflightOptions | undefined— Not documented. See PreflightOptions for its declaration and available field documentation.
Returns
Verdict
Not documented.
Throws
Not documented.
</details> <details> <summary>withdrawSplineVault</summary>withdrawSplineVault#
Not documented.
Declaration source: packages/core/src/sdk.ts:3795.
export function withdrawSplineVault(input: SplineVaultAmountInput, programAddress?: Address): Promise<SdkResult<{ splineVault: Address; }>>;
Parameters
input: SplineVaultAmountInput— Not documented. See SplineVaultAmountInput for its declaration and available field documentation.programAddress: Address— Not documented. Default:PROGRAM_ADDRESS.
Returns
Promise<SdkResult<{ splineVault: Address; }>>
Not documented.
Throws
Not documented.
Defaults
programAddress:PROGRAM_ADDRESS.
withReferralDecision#
Re-derive the same intent with a different referral decision.
Only the user's own answer to a pending-referrer prompt may change after
review (enroll ⇄ declined); every economic field and the scope are kept
verbatim. A different referrer is a new review, not a substitution.
Declaration source: packages/core/src/reviewedIntent.ts:519.
export function withReferralDecision(intent: ReviewedOrderIntent, decision: Extract<ReviewedReferralDecision, { kind: "enroll" | "declined"; }>): ReviewedOrderIntent;
Parameters
intent: ReviewedOrderIntent— Not documented. See ReviewedOrderIntent for its declaration and available field documentation.decision: { readonly kind: "enroll"; readonly referrer: string; } | { readonly kind: "declined"; readonly referrer: string; }— Not documented.
Returns
ReviewedOrderIntent
Not documented.
Throws
Not documented.
</details> <details> <summary>withRetry</summary>withRetry#
Not documented.
Declaration source: packages/core/src/api/client.ts:604.
export function withRetry<T>(fn: () => Promise<T>, options?: RetryOptions, signal?: AbortSignal): Promise<T>;
Parameters
fn: () => Promise<T>— Not documented.options: RetryOptions | undefined— Not documented. See RetryOptions for its declaration and available field documentation.signal: AbortSignal | undefined— Not documented.
Returns
Promise<T>
Not documented.
Throws
Not documented.
</details> <details> <summary>WRITER_AUTHORIZATION_VALUES</summary>WRITER_AUTHORIZATION_VALUES#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:27.
export declare const WRITER_AUTHORIZATION_VALUES: readonly ["per_program", "per_signer"];
WriterAuthorization#
Not documented.
Declaration source: packages/core/src/execution/standins.ts:28.
export type WriterAuthorization = (typeof WRITER_AUTHORIZATION_VALUES)[number];
Field documentation
toString— Returns a string representation of a string.charAt— Returns the character at the specified index.charCodeAt— Returns the Unicode value of the character at the specified location.concat— Returns a string that contains the concatenation of two or more strings.indexOf— Returns the position of the first occurrence of a substring.lastIndexOf— Returns the last occurrence of a substring in the string.localeCompare— Determines whether two strings are equivalent in the current locale. Determines whether two strings are equivalent in the current or specified locale.match— Matches a string with a regular expression, and returns an array containing the results of that search. Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.replace— Replaces text in a string, using a regular expression or search string. Passes a string and {@linkcode replaceValue} to the[Symbol.replace]method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. Replaces text in a string, using an object that supports replacement within a string.search— Finds the first substring match in a regular expression search.slice— Returns a section of a string.split— Split a string into substrings using the specified separator and return them as an array.substring— Returns the substring at the specified location within a String object.toLowerCase— Converts all the alphabetic characters in a string to lowercase.toLocaleLowerCase— Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.toUpperCase— Converts all the alphabetic characters in a string to uppercase.toLocaleUpperCase— Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.trim— Removes the leading and trailing white space and line terminator characters from a string.length— Returns the length of a String object.substr— Gets a substring beginning at the specified location and having the specified length.valueOf— Returns the primitive value of the specified object.codePointAt— Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.includes— Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.endsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.normalize— Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.repeat— Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.startsWith— Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.anchor— Returns an<a>HTML anchor element and sets the name attribute to the text valuebig— Returns a<big>HTML elementblink— Returns a<blink>HTML elementbold— Returns a<b>HTML elementfixed— Returns a<tt>HTML elementfontcolor— Returns a<font>HTML element and sets the color attribute valuefontsize— Returns a<font>HTML element and sets the size attribute valueitalics— Returns an<i>HTML elementlink— Returns an<a>HTML element and sets the href attribute valuesmall— Returns a<small>HTML elementstrike— Returns a<strike>HTML elementsub— Returns a<sub>HTML elementsup— Returns a<sup>HTML elementpadStart— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.padEnd— Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.trimEnd— Removes the trailing white space and line terminator characters from a string.trimStart— Removes the leading white space and line terminator characters from a string.trimLeft— Removes the leading white space and line terminator characters from a string.trimRight— Removes the trailing white space and line terminator characters from a string.matchAll— Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.replaceAll— Replace all instances of a substring in a string, using a regular expression or search string.at— Returns a new String consisting of the single UTF-16 code unit located at the specified index.__@iterator@28— Iterator
yesProbabilityBpsFromNo#
YES probability implied by a NO probability, both in bps. Inverse of {@link noProbabilityBpsFromYes}.
Declaration source: packages/core/src/price.ts:118.
export function yesProbabilityBpsFromNo(noProbabilityBps: number): number;
Parameters
noProbabilityBps: number— Not documented.
Returns
number
Not documented.
Throws
Not documented.
</details>