Skip to content
0.7.0 — latest

Defined in: packages/sage/src/starbases/actions/index.ts:95

Address-only stale StarbasePlayer recovery input.

The funder is the sole required signer, pays any rent the recovered account grows by and receives any surplus rent. It must stay rent-exempt afterwards.

declare const funder: Address;
const options: PlanDestroyStarbasePlayerOptions = { funder };
readonly funder: Address;

Defined in: packages/sage/src/starbases/actions/index.ts:96


Defined in: packages/sage/src/starbases/actions/index.ts:80

Address-only StarbasePlayer registration input.

The funder is the sole required signer and pays account rent. Reusing the later assembly fee payer is convenient, but the planner does not require the two addresses to match.

declare const funder: Address;
const options: PlanRegisterStarbasePlayerOptions = { funder };
readonly funder: Address;

Defined in: packages/sage/src/starbases/actions/index.ts:81

function planDestroyStarbasePlayer(
ctx,
player,
system,
input): Promise<Plan>;

Defined in: packages/sage/src/starbases/actions/index.ts:495

Plans recovery of one StarbasePlayer left on an older Starbase generation.

Destroying a Starbase at Level 1 or below hands it to the attacker and advances its Star System’s sequence, and every StarbasePlayer on the old sequence is refused until it is recovered. A higher-level Starbase only loses a level. Recovery cannot be undone: crew and ships move to their respawn queues, respawn-protected cargo moves to the cargo respawn queue, all other cargo is lost, and the account joins the current generation. Any funder may sign, including one the Profile does not know, and keeps any surplus rent. Recover the StarbasePlayer before respawning a Claim Stake or Crafting Hab in the same System, which the program otherwise refuses.

ParameterType
ctxSageContext
playerStarbasePlayerSnapshot
systemStarSystemSnapshot
inputPlanDestroyStarbasePlayerOptions

Promise<Plan>

declare const ctx: SageContext;
declare const player: StarbasePlayerSnapshot;
declare const system: StarSystemSnapshot;
declare const funder: Address;
const plan = await planDestroyStarbasePlayer(ctx, player, system, {
funder,
});
console.log(plan.describe());

function planRegisterStarbasePlayer(
ctx,
character,
system,
input): Promise<Plan>;

Defined in: packages/sage/src/starbases/actions/index.ts:162

Plans one StarbasePlayer registration without signing, assembly, or writes.

The Character and Star System must already be loaded public snapshots. The planner derives and directly validates every plumbing account and returns a Plan only when the canonical StarbasePlayer address is absent. The Starbase FactionOwnership sidecar is always passed by address; when it is uninitialized the chain admits by the legacy Starbase owner, and the Plan guards that it stays unallocated. Optional faction expansion accounts use the generated omitted-account convention.

ParameterType
ctxSageContext
characterCharacterSnapshot
systemStarSystemSnapshot
inputPlanRegisterStarbasePlayerOptions

Promise<Plan>

declare const ctx: SageContext;
declare const character: CharacterSnapshot;
declare const system: StarSystemSnapshot;
declare const funder: Address;
const plan = await planRegisterStarbasePlayer(
ctx,
character,
system,
{ funder },
);
console.log(plan.describe());