Skip to content

client

Defined in: packages/sage/src/client/errors.ts:184

Error thrown when validated account data cannot produce a trustworthy SDK snapshot.

declare const fleetAddress: Address;
declare const cause: unknown;
throw new AccountDecodeError('fleet', fleetAddress, cause);
declare const characterAddress: Address;
declare const cause: unknown;
throw new AccountDecodeError(
'character',
characterAddress,
cause,
'The Character references a different Profile. Verify the Profile address and retry.',
);

message

Optional cause-and-remedy guidance for validated data that decoded successfully but contradicts the requested gameplay relationship.

new AccountDecodeError(
accountType,
address,
cause,
message?): AccountDecodeError;

Defined in: packages/sage/src/client/errors.ts:185

ParameterType
accountTypeEntityType
addressAddress
causeunknown
messagestring

AccountDecodeError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:107

Error thrown when a required account does not exist at the requested address.

declare const fleetAddress: Address;
throw new AccountNotFoundError('fleet', fleetAddress);

new AccountNotFoundError(accountType, address): AccountNotFoundError;

Defined in: packages/sage/src/client/errors.ts:108

ParameterType
accountTypeEntityType
addressAddress

AccountNotFoundError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:90

Error thrown when a read API is invoked after its context is disposed.

throw new ContextDisposedError();

new ContextDisposedError(): ContextDisposedError;

Defined in: packages/sage/src/client/errors.ts:91

ContextDisposedError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:127

Error thrown when an account belongs to a different program.

declare const fleetAddress: Address;
declare const sageProgram: Address;
declare const actualOwner: Address;
throw new InvalidAccountOwnerError('fleet', fleetAddress, sageProgram, actualOwner);

new InvalidAccountOwnerError(
accountType,
address,
expectedOwner,
actualOwner): InvalidAccountOwnerError;

Defined in: packages/sage/src/client/errors.ts:128

ParameterType
accountTypeEntityType
addressAddress
expectedOwnerAddress
actualOwnerAddress

InvalidAccountOwnerError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:328

Error thrown when a pure gameplay derivation input cannot be encoded or used safely.

throw new InvalidDerivationInputError('Fleet mining units per second', -1);

new InvalidDerivationInputError(
field,
value,
remedy?): InvalidDerivationInputError;

Defined in: packages/sage/src/client/errors.ts:332

ParameterTypeDefault value
fieldstringundefined
valuenumber | bigintundefined
remedystring'Supply a finite, nonnegative number before deriving the gameplay value.'

InvalidDerivationInputError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

readonly field: string;

Defined in: packages/sage/src/client/errors.ts:329

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

readonly value: number | bigint;

Defined in: packages/sage/src/client/errors.ts:330

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:150

Error thrown when account bytes do not start with the expected discriminator.

declare const fleetAddress: Address;
throw new InvalidDiscriminatorError('fleet', fleetAddress);

new InvalidDiscriminatorError(accountType, address): InvalidDiscriminatorError;

Defined in: packages/sage/src/client/errors.ts:151

ParameterType
accountTypeEntityType
addressAddress

InvalidDiscriminatorError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:271

Error thrown when a generated account id cannot fit its unsigned 16-bit PDA seed.

throw new InvalidEntityIdError('recipe', 65_536);

new InvalidEntityIdError(entityType, id): InvalidEntityIdError;

Defined in: packages/sage/src/client/errors.ts:282

ParameterType
entityType| "starSystem" | "celestialBody" | "recipe" | "market" | "scanPattern" | "faction" | "region"
idnumber

InvalidEntityIdError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

readonly entityType:
| "starSystem"
| "celestialBody"
| "recipe"
| "market"
| "scanPattern"
| "faction"
| "region";

Defined in: packages/sage/src/client/errors.ts:272

readonly id: number;

Defined in: packages/sage/src/client/errors.ts:280

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:254

Error thrown when an operation needs a canonical Game address.

throw new MissingGameContextError();

new MissingGameContextError(): MissingGameContextError;

Defined in: packages/sage/src/client/errors.ts:255

MissingGameContextError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:202

Error thrown when the configured provider cannot satisfy a read.

throw new ProviderError('The z.ink provider is unavailable. Check its endpoint and retry.');

new ProviderError(message, details?): ProviderError;

Defined in: packages/sage/src/client/errors.ts:203

ParameterType
messagestring
detailsSageSdkErrorDetails

ProviderError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:360

Error thrown when live state and one cached definitions section disagree.

A cached section behind live state is marked for refresh on its next lookup. After an authoritative read confirms that mismatch, further refresh attempts for the section are coalesced for one second. Sequence-sensitive sections reject callers behind the loaded section. Ship lookups may reuse newer stable identity summaries; an id removed from the newer ship rows throws without scheduling an impossible historical refresh.

throw new RegistryOutOfSyncError('ships', 12, 11, 3);

new RegistryOutOfSyncError(
section,
expectedSequenceId,
actualSequenceId,
definitionId,
definitionMissingAfterRefresh?): RegistryOutOfSyncError;

Defined in: packages/sage/src/client/errors.ts:369

ParameterTypeDefault value
section"ships" | "cargo" | "craftingHabs" | "habBuildings" | "xp" | "research"undefined
expectedSequenceIdnumber | undefinedundefined
actualSequenceIdnumberundefined
definitionIdnumberundefined
definitionMissingAfterRefreshbooleanfalse

RegistryOutOfSyncError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly actualSequenceId: number;

Defined in: packages/sage/src/client/errors.ts:364

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

readonly definitionId: number;

Defined in: packages/sage/src/client/errors.ts:365

readonly definitionMissingAfterRefresh: boolean;

Defined in: packages/sage/src/client/errors.ts:367

Whether a fresh Game read already confirmed the definition is absent.

readonly expectedSequenceId: number | undefined;

Defined in: packages/sage/src/client/errors.ts:363

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

readonly section: "ships" | "cargo" | "craftingHabs" | "habBuildings" | "xp" | "research";

Defined in: packages/sage/src/client/errors.ts:361

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:241

Error thrown when a requested relationship has no configured discovery capability.

throw new RelationshipNotDiscoverableError(
'Wallet-to-Profile discovery is unavailable. Configure a provider.',
);

new RelationshipNotDiscoverableError(message, details?): RelationshipNotDiscoverableError;

Defined in: packages/sage/src/client/errors.ts:242

ParameterType
messagestring
detailsSageSdkErrorDetails

RelationshipNotDiscoverableError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:215

Error thrown before an untrusted collection or payload can exceed a context limit.

throw new ResourceLimitExceededError('discovery results', 1001, 1000);

new ResourceLimitExceededError(
resource,
actual,
limit): ResourceLimitExceededError;

Defined in: packages/sage/src/client/errors.ts:221

ParameterType
resourcestring
actualnumber
limitnumber

ResourceLimitExceededError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

SageSdkError.accountType

readonly actual: number;

Defined in: packages/sage/src/client/errors.ts:218

The observed quantity, or a conservative decoded-byte upper bound when an encoded payload is rejected before decoding.

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

SageSdkError.code

readonly limit: number;

Defined in: packages/sage/src/client/errors.ts:219

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

SageSdkError.provider

readonly resource: string;

Defined in: packages/sage/src/client/errors.ts:216

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace


Defined in: packages/sage/src/client/errors.ts:61

Base error for all SDK failures.

Messages identify the gameplay cause and a corrective next step.

throw new SageSdkError(
'ACCOUNT_NOT_FOUND',
'The Fleet account was not found. Verify the Fleet address and cluster.',
);
  • Error

new SageSdkError(
code,
message,
details?): SageSdkError;

Defined in: packages/sage/src/client/errors.ts:68

ParameterType
codeSageSdkErrorCode
messagestring
detailsSageSdkErrorDetails

SageSdkError

Error.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:63

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:64

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Error.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:62

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

Error.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Error.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:65

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

Error.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:66

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Error.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

Error.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Error.prepareStackTrace

Defined in: packages/sage/src/client/contracts.ts:405

Adapter-owned definition for validating and decoding one account type.

Decoded snapshots may contain primitives, arrays, and plain objects. Account definitions must normalize mutation-capable built-ins such as typed arrays, Date, Map, and Set to immutable domain values before returning them. The returned value must be an acyclic JSON-safe tree without undefined, symbol-keyed properties, accessors, or functions. Acyclic repeated object references are allowed and retain their identity in the frozen runtime tree. Each decoder receives an isolated copy of the untrusted provider account, so decoder mutation cannot affect another concurrent decoder or raw read. Decoders return plain data without methods. Public domain layers attach their required toJSON() method after reading through this port; returning a method from decode violates the immutable plain-data contract. A context reuses decoded cache entries only for the same definition object; distinct definitions cannot consume or overwrite each other’s typed data. Keep definitions as stable module-level singletons. Reconstructing an equivalent definition for each call deliberately creates independent cache slots and prevents cache reuse.

declare const programAddress: Address;
const definition: AccountDefinition<{ name: string }> = {
type: 'fleet',
programAddress,
discriminator: new Uint8Array([1]),
minimumDataLength: 128,
decode: () => ({ name: 'Ravager' }),
};
Type Parameter
TSnapshot

readonly discriminator: Uint8Array<ArrayBufferLike> | readonly number[];

Defined in: packages/sage/src/client/contracts.ts:408

readonly optional minimumDataLength?: number;

Defined in: packages/sage/src/client/contracts.ts:410

Optional positive safe-integer byte minimum enforced before decoding.

readonly programAddress: Address;

Defined in: packages/sage/src/client/contracts.ts:407

readonly type: EntityType;

Defined in: packages/sage/src/client/contracts.ts:406

decode(account): Readonly<TSnapshot>;

Defined in: packages/sage/src/client/contracts.ts:411

ParameterType
accountRawAccount

Readonly<TSnapshot>


Defined in: packages/sage/src/client/contracts.ts:289

Provider contract for raw z.ink account access.

Provider results remain untrusted until an account definition validates and decodes them. Provider implementations must sanitize transport-specific causes before wrapping them in a typed SageSdkError; unknown exceptions are normalized by the data plane without retaining their raw cause.

const provider: AccountProvider = {
identity: { kind: 'fixture', name: 'unit-test' },
readAccount: async () => undefined,
discoverAccounts: async () => [],
};

readonly identity: DataSourceIdentity;

Defined in: packages/sage/src/client/contracts.ts:290

discoverAccounts(request): Promise<readonly RawAccount[]>;

Defined in: packages/sage/src/client/contracts.ts:306

ParameterType
requestProgramAccountRequest

Promise<readonly RawAccount[]>

readAccount(address, options?): Promise<RawAccount | undefined>;

Defined in: packages/sage/src/client/contracts.ts:291

ParameterType
addressAddress
options?ReadAccountOptions

Promise<RawAccount | undefined>

optional readAccounts(addresses, options?): Promise<readonly (RawAccount | undefined)[]>;

Defined in: packages/sage/src/client/contracts.ts:302

Optional provider batching capability.

Implementations preserve input order. Callers can fall back to ordered readAccount calls when a provider does not expose this transport method. Large reads can span multiple source slots because every RPC chunk records its own response context.

ParameterType
addressesreadonly Address[]
options?ReadAccountOptions

Promise<readonly (RawAccount | undefined)[]>


Defined in: packages/sage/src/client/contracts.ts:735

Address-keyed cache identity scoped to one context.

declare const programAddress: Address;
declare const address: Address;
const key: CacheKey = { cluster: 'zink-ptr', programAddress, accountType: 'fleet', address };

readonly accountType: EntityType;

Defined in: packages/sage/src/client/contracts.ts:738

readonly address: Address;

Defined in: packages/sage/src/client/contracts.ts:739

readonly cluster: ClusterIdentity;

Defined in: packages/sage/src/client/contracts.ts:736

readonly programAddress: Address;

Defined in: packages/sage/src/client/contracts.ts:737


Defined in: packages/sage/src/client/contracts.ts:753

Compatibility prototype; not the runtime cache representation.

The shipped context owns its cache internally and does not expose cache records for inspection or mutation.

declare const record: CacheRecord<unknown>;
const snapshot = record.invalidated ? undefined : record.snapshot;
Type Parameter
TSnapshot

readonly invalidated: boolean;

Defined in: packages/sage/src/client/contracts.ts:756

readonly key: CacheKey;

Defined in: packages/sage/src/client/contracts.ts:754

readonly snapshot: SnapshotEnvelope<TSnapshot>;

Defined in: packages/sage/src/client/contracts.ts:755


Defined in: packages/sage/src/client/contracts.ts:102

An application-defined cluster identity.

const cluster: CustomClusterIdentity = { name: 'local-fixture' };

readonly name: string;

Defined in: packages/sage/src/client/contracts.ts:103


Defined in: packages/sage/src/client/contracts.ts:122

The source that supplied a raw account or translated snapshot.

const source: DataSourceIdentity = { kind: 'fixture', name: 'unit-test' };

readonly kind: "indexer" | "rpc" | "websocket" | "fixture" | "application";

Defined in: packages/sage/src/client/contracts.ts:123

readonly name: string;

Defined in: packages/sage/src/client/contracts.ts:124


Defined in: packages/sage/src/client/contracts.ts:769

Compatibility prototype; no context-wide diagnostic emitter ships.

Shipped diagnostics are limited to finder provenance through readMeta() and subscription delivery events through SubscriptionObserver.onDiagnostic.

const event: DiagnosticEvent = { kind: 'cache-hit', cluster: 'zink-ptr' };

readonly optional accountType?: EntityType;

Defined in: packages/sage/src/client/contracts.ts:774

readonly optional address?: Address;

Defined in: packages/sage/src/client/contracts.ts:773

readonly cluster: ClusterIdentity;

Defined in: packages/sage/src/client/contracts.ts:772

readonly kind:
| "cache-hit"
| "cache-miss"
| "provider-read"
| "validation"
| "discovery";

Defined in: packages/sage/src/client/contracts.ts:770


Defined in: packages/sage/src/client/contracts.ts:492

A discovery request supplied to the shared data port.

Discovery always consults the provider, so direct-read freshness controls such as refresh and maxAgeMs are intentionally unavailable.

const request: DiscoveryRequest = {
strategy: 'targeted-program-accounts',
filters: [],
};

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:153

ReadAccountOptions.commitment

readonly filters: readonly ProgramAccountFilter[];

Defined in: packages/sage/src/client/contracts.ts:502

readonly optional policy?: "cache-first" | "no-store";

Defined in: packages/sage/src/client/contracts.ts:494

Controls whether validated discoveries populate the account cache.

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:154

ReadAccountOptions.signal

readonly strategy: AccountDiscoveryStrategy;

Defined in: packages/sage/src/client/contracts.ts:501

Selects the discovery behavior when no indexer takes precedence.

When an indexer is configured, targeted-program-accounts, broad-scan, and indexer are advisory and use the indexer. Use direct or derived to bypass the indexer for a request.


Defined in: packages/sage/src/client/contracts.ts:198

Address-only discovery request accepted by a replaceable indexer.

Indexers return candidate addresses, never decoded domain state. The context validates every candidate through its direct account provider before a finder can expose it.

declare const programAddress: Address;
const request: IndexerDiscoveryRequest = {
accountType: 'fleet',
programAddress,
filters: [],
};

readonly accountType: EntityType;

Defined in: packages/sage/src/client/contracts.ts:199

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:153

ProgramAccountRequest.commitment

readonly filters: readonly ProgramAccountFilter[];

Defined in: packages/sage/src/client/contracts.ts:179

ProgramAccountRequest.filters

readonly programAddress: Address;

Defined in: packages/sage/src/client/contracts.ts:178

ProgramAccountRequest.programAddress

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:154

ProgramAccountRequest.signal


Defined in: packages/sage/src/client/contracts.ts:221

Optional address-only provider for reverse and high-cardinality discovery.

Implementations must treat signal as cancellation, preserve candidate order, and sanitize transport failures before throwing a SageSdkError. Duplicate addresses are allowed; the context deduplicates them before direct validation. A configured provider must support every account type and stable filter request that its context may issue. An empty result means the request is supported and has no candidates; it does not trigger RPC fallback. Use a separate context or the direct/derived strategies when indexer coverage is intentionally partial.

const indexer: IndexerProvider = {
identity: { kind: 'indexer', name: 'application-indexer' },
discoverAddresses: async () => [],
};

readonly identity: DataSourceIdentity & {
kind: "indexer";
};

Defined in: packages/sage/src/client/contracts.ts:222

readonly kind: "indexer";

discoverAddresses(request): Promise<readonly Address[]>;

Defined in: packages/sage/src/client/contracts.ts:223

ParameterType
requestIndexerDiscoveryRequest

Promise<readonly Address[]>


Defined in: packages/sage/src/internal/read-meta.ts:48

Conservative validation summary for address hints returned by an indexer.

const summary: IndexerValidationMeta = {
candidateCount: 3,
duplicateCount: 1,
missingCount: 1,
validatedCount: 1,
};

readonly candidateCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:49

readonly duplicateCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:50

readonly missingCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:51

readonly validatedCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:52


Defined in: packages/sage/src/client/contracts.ts:164

A verified byte comparison used for targeted program-account discovery.

const filter: ProgramAccountFilter = { offset: 0, bytes: new Uint8Array([1]) };

readonly bytes: Uint8Array;

Defined in: packages/sage/src/client/contracts.ts:166

readonly offset: number;

Defined in: packages/sage/src/client/contracts.ts:165


Defined in: packages/sage/src/client/contracts.ts:177

A targeted program-account request using only adapter-verified offsets.

declare const programAddress: Address;
const request: ProgramAccountRequest = { programAddress, filters: [] };

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:153

ReadAccountOptions.commitment

readonly filters: readonly ProgramAccountFilter[];

Defined in: packages/sage/src/client/contracts.ts:179

readonly programAddress: Address;

Defined in: packages/sage/src/client/contracts.ts:178

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:154

ReadAccountOptions.signal


Defined in: packages/sage/src/client/contracts.ts:135

Raw, untrusted account bytes returned by a provider.

declare const rawAccount: RawAccount;
const bytes = rawAccount.data;

readonly address: Address;

Defined in: packages/sage/src/client/contracts.ts:136

readonly commitment: Commitment;

Defined in: packages/sage/src/client/contracts.ts:142

readonly data: Uint8Array;

Defined in: packages/sage/src/client/contracts.ts:139

readonly executable: boolean;

Defined in: packages/sage/src/client/contracts.ts:140

readonly lamports: bigint;

Defined in: packages/sage/src/client/contracts.ts:138

readonly owner: Address;

Defined in: packages/sage/src/client/contracts.ts:137

readonly slot: bigint;

Defined in: packages/sage/src/client/contracts.ts:141


Defined in: packages/sage/src/client/contracts.ts:152

Options shared by direct and batched raw-account reads.

const options: ReadAccountOptions = { commitment: 'confirmed' };

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:153

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:154


Defined in: packages/sage/src/client/contracts.ts:443

Cache-first read controls for account and finder operations.

const options: ReadOptions = { refresh: true, commitment: 'confirmed' };

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:153

ReadAccountOptions.commitment

readonly optional maxAgeMs?: number;

Defined in: packages/sage/src/client/contracts.ts:455

Maximum age of a completed cache entry in milliseconds.

Overrides the context’s defaultMaxAgeMs. Use 0 to always revalidate or Infinity to reuse completed cache entries until explicit invalidation.

readonly optional policy?: "cache-first" | "no-store";

Defined in: packages/sage/src/client/contracts.ts:456

readonly optional refresh?: boolean;

Defined in: packages/sage/src/client/contracts.ts:449

Bypasses a completed cache entry.

A refresh may share a compatible provider request that is already in flight, because that request has not yet produced cached state.

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:154

ReadAccountOptions.signal


Defined in: packages/sage/src/client/contracts.ts:606

Public read and discovery boundary shared by built-in domains and extensions.

Cache entries are partitioned by stable account-definition object identity and may retain one view per commitment. They remain in memory until replaced, explicitly removed with invalidate(), or released when the owning context is disposed. The context rejects new cache keys above maxCacheEntries; callers can use no-store for intentional reads beyond that bound. Reconstructing definitions per call can therefore exhaust the configured capacity. Invalidation retains lightweight per-key generation barriers until context disposal so older in-flight reads and discoveries cannot repopulate a removed entry.

declare const ctx: SageContext;
declare const definition: AccountDefinition<unknown>;
declare const address: Address;
const data: SageDataPort = ctx.data;
const envelope = await data.read(definition, address);
data.invalidate(definition, address);

discover<TSnapshot>(definition, request): Promise<readonly SnapshotEnvelope<TSnapshot>[]>;

Defined in: packages/sage/src/client/contracts.ts:633

Type Parameter
TSnapshot
ParameterType
definitionAccountDefinition<TSnapshot>
requestDiscoveryRequest

Promise<readonly SnapshotEnvelope<TSnapshot>[]>

invalidate<TSnapshot>(definition, address): void;

Defined in: packages/sage/src/client/contracts.ts:613

Removes the exact cached account generation.

Operations that started before invalidation may still resolve to their original callers, but cannot repopulate this cache entry or satisfy reads that start after invalidation.

Type Parameter
TSnapshot
ParameterType
definitionAccountDefinition<TSnapshot>
addressAddress

void

read<TSnapshot>(
definition,
address,
options?): Promise<SnapshotEnvelope<TSnapshot>>;

Defined in: packages/sage/src/client/contracts.ts:617

Type Parameter
TSnapshot
ParameterType
definitionAccountDefinition<TSnapshot>
addressAddress
options?ReadOptions

Promise<SnapshotEnvelope<TSnapshot>>

readMany<TSnapshot>(
definition,
addresses,
options?): Promise<readonly (
| SnapshotEnvelope<TSnapshot>
| undefined)[]>;

Defined in: packages/sage/src/client/contracts.ts:628

Reads addresses in input order.

Context reads remain individually deduplicated. Uncached unique addresses use provider batching when available; direct-only providers use a bounded fallback worker pool.

Type Parameter
TSnapshot
ParameterType
definitionAccountDefinition<TSnapshot>
addressesreadonly Address[]
options?ReadOptions

Promise<readonly ( | SnapshotEnvelope<TSnapshot> | undefined)[]>

readRaw(address, options?): Promise<RawAccount | undefined>;

Defined in: packages/sage/src/client/contracts.ts:651

ParameterType
addressAddress
options?ReadAccountOptions

Promise<RawAccount | undefined>

subscribe<TSnapshot>(
definition,
address,
observer,
options?): Promise<SageSubscription>;

Defined in: packages/sage/src/client/contracts.ts:645

Subscribes to one typed account and emits the selected cache view.

Registration establishes the WebSocket listener first, then performs one direct read to close the registration race and emit current state. Valid stream updates use the same validation and cache path as direct reads. A failed initial read is reported through onError; it does not reject the subscription handle or end the registered stream.

Type Parameter
TSnapshot
ParameterType
definitionAccountDefinition<TSnapshot>
addressAddress
observerSubscriptionObserver<TSnapshot>
options?ReadAccountOptions

Promise<SageSubscription>


Defined in: packages/sage/src/client/errors.ts:41

Safe contextual fields carried by SDK errors.

declare const address: Address;
const details: SageSdkErrorDetails = { accountType: 'fleet', address };

readonly optional accountType?: EntityType;

Defined in: packages/sage/src/client/errors.ts:42

readonly optional address?: Address;

Defined in: packages/sage/src/client/errors.ts:43

readonly optional cause?: unknown;

Defined in: packages/sage/src/client/errors.ts:44

readonly optional provider?: DataSourceIdentity;

Defined in: packages/sage/src/client/errors.ts:45

readonly optional strategy?: DiscoveryStrategy;

Defined in: packages/sage/src/client/errors.ts:46


Defined in: packages/sage/src/client/contracts.ts:423

A fully described immutable account snapshot plus its read provenance.

declare const envelope: SnapshotEnvelope<unknown>;
const slot = envelope.slot;
const snapshot = envelope.data;
Type Parameter
TSnapshot

readonly accountType: EntityType;

Defined in: packages/sage/src/client/contracts.ts:427

readonly address: Address;

Defined in: packages/sage/src/client/contracts.ts:425

readonly commitment: Commitment;

Defined in: packages/sage/src/client/contracts.ts:429

readonly data: Readonly<TSnapshot>;

Defined in: packages/sage/src/client/contracts.ts:424

readonly fetchedAt: number;

Defined in: packages/sage/src/client/contracts.ts:430

readonly programAddress: Address;

Defined in: packages/sage/src/client/contracts.ts:426

readonly slot: bigint;

Defined in: packages/sage/src/client/contracts.ts:428

readonly source: DataSourceIdentity;

Defined in: packages/sage/src/client/contracts.ts:431

toJSON(): unknown;

Defined in: packages/sage/src/client/contracts.ts:433

Returns a JSON-safe copy with every bigint represented as a decimal string.

unknown


Defined in: packages/sage/src/client/contracts.ts:266

Replaceable address-only provider for wallet-to-Profile discovery.

Implementations may use an application index, service, or recorded mapping, but their output is never authoritative. They return Profile addresses only; the SDK validates account ownership, discriminator, shape, and the stored wallet-key relationship through its direct account provider. Duplicate and stale addresses are permitted and reported through finder metadata. Concurrent requests for the same wallet and commitment are single-flighted per context; cancelling one caller does not cancel the shared provider call. Shared operations are in-flight only: a settled failure is removed so a later request can retry the provider. Implementations must sanitize transport-specific causes before throwing a typed SageSdkError; unknown exceptions are normalized without their cause.

const walletProfiles: WalletProfileDiscoveryProvider = {
identity: { kind: 'indexer', name: 'application-wallet-index' },
discoverProfileAddresses: async () => [],
};

readonly identity: DataSourceIdentity;

Defined in: packages/sage/src/client/contracts.ts:267

discoverProfileAddresses(request): Promise<readonly Address[]>;

Defined in: packages/sage/src/client/contracts.ts:268

ParameterType
requestWalletProfileDiscoveryRequest

Promise<readonly Address[]>


Defined in: packages/sage/src/client/contracts.ts:240

Address-only request accepted by a wallet-to-Profile discovery provider.

The provider returns hints only. The identity domain directly reads every candidate Profile and verifies that its decoded key list contains the requested wallet before exposing it.

declare const wallet: Address;
const request: WalletProfileDiscoveryRequest = { wallet };

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:153

ReadAccountOptions.commitment

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:154

ReadAccountOptions.signal

readonly wallet: Address;

Defined in: packages/sage/src/client/contracts.ts:241


Defined in: packages/sage/src/internal/read-meta.ts:67

Validation summary for wallet-to-Profile address hints.

const summary: WalletProfileValidationMeta = {
candidateCount: 3,
duplicateCount: 1,
missingCount: 1,
validatedCount: 1,
};

readonly candidateCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:68

readonly duplicateCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:69

readonly missingCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:70

readonly validatedCount: number;

Defined in: packages/sage/src/internal/read-meta.ts:71

type AccountDiscoveryStrategy =
| "direct"
| "derived"
| "indexer"
| "targeted-program-accounts"
| "broad-scan";

Defined in: packages/sage/src/client/contracts.ts:466

Strategies supported by generic account discovery requests.

const strategy: AccountDiscoveryStrategy = 'targeted-program-accounts';

type ClusterIdentity =
| KnownCluster
| CustomClusterIdentity;

Defined in: packages/sage/src/client/contracts.ts:113

Identity used to isolate context-owned caches and providers.

const cluster: ClusterIdentity = { name: 'local-fixture' };

type Commitment = KitCommitment;

Defined in: packages/sage/src/client/contracts.ts:28

A z.ink/Solana RPC commitment level.

const commitment: Commitment = 'confirmed';

type DiscoveryStrategy =
| AccountDiscoveryStrategy
| "known-addresses"
| "wallet-profile-provider";

Defined in: packages/sage/src/client/contracts.ts:476

Every strategy name exposed through public read metadata and errors.

const strategy: DiscoveryStrategy = 'wallet-profile-provider';

type EntityType =
| "game"
| "profile"
| "profileFaction"
| "character"
| "fleet"
| "fleetCrewBinding"
| "starSystem"
| "celestialBody"
| "starbasePlayer"
| "starbaseUpgradeProcess"
| "cargoPod"
| "claimStakeInstance"
| "recipe"
| "craftingHabInstance"
| "craftingProcess"
| "market"
| "marketOrder"
| "scanPattern"
| "loot"
| "outlawFlag"
| "atlasRewardRegistry"
| "atlasRewardConfig"
| "atlasRewardTreasury"
| "faction"
| "factionConfig"
| "factionEconomicsConfig"
| "factionRelationTracker"
| "factionStanding"
| "factionTreasury"
| "factionOwnership"
| "kingSystemTracker"
| "regionTracker"
| "loyaltyEpoch"
| "loyaltyContribution"
| "loyaltyAtlasBank";

Defined in: packages/sage/src/client/contracts.ts:49

Stable account and gameplay entity identifiers used by cache keys and references.

const type: EntityType = 'fleet';

type KnownCluster = "zink-ptr";

Defined in: packages/sage/src/client/contracts.ts:93

A known deployment preset supported by the installed SDK version.

const cluster: KnownCluster = 'zink-ptr';

type SageRpc = Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetProgramAccountsApi>;

Defined in: packages/sage/src/client/contracts.ts:38

The minimal Kit RPC surface used by the read-only z.ink provider.

declare const rpc: SageRpc;
const ctx = createSageContext({ cluster: 'zink-ptr', rpc });

type SageSdkErrorCode =
| "ACCOUNT_NOT_FOUND"
| "INVALID_ACCOUNT_OWNER"
| "INVALID_DISCRIMINATOR"
| "INVALID_ENTITY_ID"
| "INVALID_DERIVATION_INPUT"
| "ACCOUNT_DECODE_FAILED"
| "RELATIONSHIP_NOT_DISCOVERABLE"
| "MISSING_GAME_CONTEXT"
| "REGISTRY_OUT_OF_SYNC"
| "STALE_BINDING_VERSION"
| "PROVIDER_ERROR"
| "RESOURCE_LIMIT_EXCEEDED"
| "CONTEXT_DISPOSED"
| "ACTION_PRECONDITION_FAILED"
| "SIMULATION_FAILED"
| "TRANSACTION_SUBMISSION_FAILED";

Defined in: packages/sage/src/client/errors.ts:15

Stable error codes for read behavior and reserved future write boundaries.

const code: SageSdkErrorCode = 'ACCOUNT_NOT_FOUND';

function createSageContext(options): SageContext;

Defined in: packages/sage/src/client/context.ts:1922

Creates an isolated context synchronously without performing network I/O.

ParameterType
optionsSageContextOptions

SageContext

declare const rpc: SageRpc;
const ctx = createSageContext({ cluster: 'zink-ptr', rpc });

function entityRef<TType>(type, address): EntityRef<TType>;

Defined in: packages/sage/src/client/refs.ts:24

Creates a plain typed reference without resolving or reading the account.

Type Parameter
TType extends EntityType
ParameterType
typeTType
addressAddress

EntityRef<TType>

declare const fleetAddress: Address;
const fleet = entityRef('fleet', fleetAddress);

Re-exports AccountSubscriptionEvent


Re-exports AccountSubscriptionProvider


Re-exports AccountSubscriptionRegistration


Re-exports AccountSubscriptionRequest


Re-exports Address


Re-exports CargoDefinitionSummary


Re-exports DefinitionLookupOptions


Re-exports DefinitionSection


Re-exports DefinitionSectionSnapshot


Re-exports EntityRef


Re-exports readMeta


Re-exports ReadMeta


Re-exports ReadMetaFilter


Re-exports RegistrySnapshotStore


Re-exports SageContext


Re-exports SageContextOptions


Re-exports SageSubscription


Re-exports ShipDefinitionSummary


Re-exports SubscriptionDiagnosticEvent


Re-exports SubscriptionObserver


Re-exports SubscriptionOptions