Skip to content
Next — unreleased

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

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:192

ParameterType
accountTypeEntityType
addressAddress
causeunknown
messagestring

AccountDecodeError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:114

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:115

ParameterType
accountTypeEntityType
addressAddress

AccountNotFoundError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:97

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:98

ContextDisposedError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:134

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:135

ParameterType
accountTypeEntityType
addressAddress
expectedOwnerAddress
actualOwnerAddress

InvalidAccountOwnerError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:335

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:339

ParameterTypeDefault value
fieldstringundefined
valuestring | number | 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:70

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

readonly field: string;

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

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

readonly value: string | number | bigint;

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

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:157

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:158

ParameterType
accountTypeEntityType
addressAddress

InvalidDiscriminatorError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:278

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:289

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:70

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

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

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

readonly id: number;

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

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:261

Error thrown when an operation needs a canonical Game address.

throw new MissingGameContextError();

new MissingGameContextError(): MissingGameContextError;

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

MissingGameContextError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:209

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:210

ParameterType
messagestring
detailsSageSdkErrorDetails

ProviderError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:430

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:446

ParameterTypeDefault value
section| "ships" | "cargo" | "buildings" | "claimStakes" | "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:70

SageSdkError.accountType

readonly actualSequenceId: number;

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

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

readonly definitionId: number;

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

readonly definitionMissingAfterRefresh: boolean;

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

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

readonly expectedSequenceId: number | undefined;

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

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

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

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

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:248

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:249

ParameterType
messagestring
detailsSageSdkErrorDetails

RelationshipNotDiscoverableError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly address: Address | undefined;

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

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:222

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:228

ParameterType
resourcestring
actualnumber
limitnumber

ResourceLimitExceededError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

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

SageSdkError.accountType

readonly actual: number;

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

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:71

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

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

SageSdkError.code

readonly limit: number;

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

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

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

SageSdkError.provider

readonly resource: string;

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

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

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

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:68

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:75

ParameterType
codeSageSdkErrorCode
messagestring
detailsSageSdkErrorDetails

SageSdkError

Error.constructor

readonly accountType: EntityType | undefined;

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

readonly address: Address | undefined;

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

optional cause?: unknown;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Error.cause

readonly code: SageSdkErrorCode;

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

message: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Error.message

name: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

Error.name

readonly provider:
| DataSourceIdentity
| undefined;

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

optional stack?: string;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Error.stack

readonly strategy: DiscoveryStrategy | undefined;

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

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/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:446

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: readonly number[] | Uint8Array<ArrayBufferLike>;

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

readonly optional minimumDataLength?: number;

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

Optional positive safe-integer byte minimum enforced before decoding.

readonly programAddress: Address;

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

readonly type: EntityType;

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

decode(account): Readonly<TSnapshot>;

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

ParameterType
accountRawAccount

Readonly<TSnapshot>


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

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:331

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

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

ParameterType
requestProgramAccountRequest

Promise<readonly RawAccount[]>

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

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

ParameterType
addressAddress
options?ReadAccountOptions

Promise<RawAccount | undefined>

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

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

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:778

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:781

readonly address: Address;

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

readonly cluster: ClusterIdentity;

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

readonly programAddress: Address;

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


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

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:799

readonly key: CacheKey;

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

readonly snapshot: SnapshotEnvelope<TSnapshot>;

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


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

An application-defined cluster identity.

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

readonly name: string;

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


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

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:164

readonly name: string;

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


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

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:817

readonly optional address?: Address;

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

readonly cluster: ClusterIdentity;

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

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

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


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

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:194

ReadAccountOptions.commitment

readonly filters: readonly ProgramAccountFilter[];

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

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

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

Controls whether validated discoveries populate the account cache.

readonly optional signal?: AbortSignal;

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

ReadAccountOptions.signal

readonly strategy: AccountDiscoveryStrategy;

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

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:239

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:240

readonly optional commitment?: Commitment;

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

ProgramAccountRequest.commitment

readonly filters: readonly ProgramAccountFilter[];

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

ProgramAccountRequest.filters

readonly programAddress: Address;

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

ProgramAccountRequest.programAddress

readonly optional signal?: AbortSignal;

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

ProgramAccountRequest.signal


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

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:263

readonly kind: "indexer";

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

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

ParameterType
requestIndexerDiscoveryRequest

Promise<readonly Address[]>


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

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:50

readonly duplicateCount: number;

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

readonly missingCount: number;

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

readonly validatedCount: number;

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


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

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:207

readonly offset: number;

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


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

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:194

ReadAccountOptions.commitment

readonly filters: readonly ProgramAccountFilter[];

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

readonly programAddress: Address;

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

readonly optional signal?: AbortSignal;

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

ReadAccountOptions.signal


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

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:177

readonly commitment: Commitment;

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

readonly data: Uint8Array;

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

readonly executable: boolean;

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

readonly lamports: bigint;

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

readonly owner: Address;

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

readonly slot: bigint;

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


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

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:194

readonly optional signal?: AbortSignal;

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


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

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:194

ReadAccountOptions.commitment

readonly optional maxAgeMs?: number;

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

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:497

readonly optional refresh?: boolean;

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

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:195

ReadAccountOptions.signal


Defined in: packages/sage/src/client/rpc-subscription-provider.ts:21

Options for the injected Kit WebSocket account adapter. No connection is opened by the factory.

import type { AccountNotificationsApi, RpcSubscriptions } from '@solana/kit';
declare const rpcSubscriptions: RpcSubscriptions<AccountNotificationsApi>;
const options: RpcSubscriptionProviderOptions = { rpcSubscriptions };

readonly optional backoff?: {
initialMs?: number;
maxMs?: number;
};

Defined in: packages/sage/src/client/rpc-subscription-provider.ts:25

readonly optional initialMs?: number;
readonly optional maxMs?: number;

readonly optional identity?: DataSourceIdentity;

Defined in: packages/sage/src/client/rpc-subscription-provider.ts:24

Non-secret provenance label; never supply an endpoint or credentials.

readonly rpcSubscriptions: RpcSubscriptions<AccountNotificationsApi>;

Defined in: packages/sage/src/client/rpc-subscription-provider.ts:22


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

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:674

Type Parameter
TSnapshot
ParameterType
definitionAccountDefinition<TSnapshot>
requestDiscoveryRequest

Promise<readonly SnapshotEnvelope<TSnapshot>[]>

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

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

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:658

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:669

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:692

ParameterType
addressAddress
options?ReadAccountOptions

Promise<RawAccount | undefined>

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

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

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:48

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:49

readonly optional address?: Address;

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

readonly optional cause?: unknown;

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

readonly optional provider?: DataSourceIdentity;

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

readonly optional strategy?: DiscoveryStrategy;

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


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

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:468

readonly address: Address;

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

readonly commitment: Commitment;

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

readonly data: Readonly<TSnapshot>;

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

readonly fetchedAt: number;

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

readonly programAddress: Address;

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

readonly slot: bigint;

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

readonly source: DataSourceIdentity;

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

toJSON(): unknown;

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

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

unknown


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

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:308

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

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

ParameterType
requestWalletProfileDiscoveryRequest

Promise<readonly Address[]>


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

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:194

ReadAccountOptions.commitment

readonly optional signal?: AbortSignal;

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

ReadAccountOptions.signal

readonly wallet: Address;

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


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

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:69

readonly duplicateCount: number;

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

readonly missingCount: number;

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

readonly validatedCount: number;

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

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

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

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:154

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:34

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:517

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"
| "scanSignal"
| "scanPatternPolicy"
| "scanLootProfile"
| "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:87

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:134

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:44

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_DEFINITION_SECTION"
| "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"
| "INVALID_ACTION_INPUT"
| "INCOMPATIBLE_PLAN_COMPOSITION"
| "MISSING_WRITE_TRANSPORT"
| "TRANSACTION_TOO_LARGE"
| "TRANSACTION_EXPIRED"
| "ACTION_PRECONDITION_FAILED"
| "SIMULATION_FAILED"
| "TRANSACTION_SUBMISSION_FAILED"
| "TRANSACTION_OUTCOME_UNKNOWN";

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

Stable error codes for read behavior and approved write boundaries.

const code: SageSdkErrorCode = 'ACCOUNT_NOT_FOUND';

type SageWriteRpc = Rpc<GetBlockHeightApi & GetLatestBlockhashApi & GetFeeForMessageApi & SimulateTransactionApi & SendTransactionApi & GetSignatureStatusesApi>;

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

The minimal Kit RPC surface used for explicit write-side operations.

Context creation only retains this transport; it never invokes it. Custom transports must implement all six methods using Kit’s sendable RPC contract:

  • getLatestBlockhash: transaction assembly’s blockhash lifetime.
  • getFeeForMessage: the assembled transaction’s current fee for Character registration funding checks before signing.
  • simulateTransaction: signer-free Plan simulation.
  • sendTransaction: explicit execution submission.
  • getSignatureStatuses: execution confirmation.
  • getBlockHeight: transaction lifetime checks during confirmation.

Update older custom transports to include getFeeForMessage; registration execution rejects a missing method with MISSING_WRITE_TRANSPORT and never skips the funding check or invokes a signer in that case.

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

const ZINK_PTR_GAME_ADDRESS: Address;

Defined in: packages/sage/src/client/deployments.ts:3

Release-pinned canonical Game address for the z.ink PTR deployment.

createSageContext({ cluster: 'zink-ptr' }) uses this address only when the context does not receive an explicit game. Read context.game when a context may use an override.

import { address } from '@solana/kit';
import {
ZINK_PTR_GAME_ADDRESS,
createSageContext,
type AccountProvider,
} from '@aephia/atlas-kit/client';
declare const provider: AccountProvider;
const defaultContext = createSageContext({
cluster: 'zink-ptr',
provider,
});
const explicitGame = address('11111111111111111111111111111111');
const overriddenContext = createSageContext({
cluster: 'zink-ptr',
game: explicitGame,
provider,
});
console.log(defaultContext.game === ZINK_PTR_GAME_ADDRESS); // true
console.log(overriddenContext.game === explicitGame); // true

function createRpcSubscriptionProvider(options): AccountSubscriptionProvider;

Defined in: packages/sage/src/client/rpc-subscription-provider.ts:90

Adapt an application-owned Kit transport to context-owned account subscriptions. Initial registration failures reject with a sanitized ProviderError. Dropped streams retry with equal jitter (half to all of the capped exponential delay). Successful registration resets backoff. Cancellation releases Kit through its abort signal; iterator cleanup is best-effort and cannot block unsubscribe.

ParameterType
optionsRpcSubscriptionProviderOptions

AccountSubscriptionProvider

import type { AccountNotificationsApi, RpcSubscriptions } from '@solana/kit';
declare const rpcSubscriptions: RpcSubscriptions<AccountNotificationsApi>;
const subscriptions = createRpcSubscriptionProvider({ rpcSubscriptions });

function createSageContext(options): SageContext;

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

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 DefinitionPreloadMeta


Re-exports DefinitionSection


Re-exports DefinitionSectionSnapshot


Re-exports EntityRef


Re-exports InvalidDefinitionSectionError


Re-exports PreloadedDefinitions


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