identity/actions
Interfaces
Section titled “Interfaces”PlanCreateProfileOptions
Section titled “PlanCreateProfileOptions”Defined in: packages/sage/src/identity/actions/create-profile.ts:38
Explicit storage funder, ordered keys, and protected Profile update threshold. No permissions or threshold are selected automatically.
Example
Section titled “Example”declare const funder: Address;declare const keys: readonly ProfileCreationKeyInput[];const options: PlanCreateProfileOptions = {funder, keys, keyThreshold: 1};Properties
Section titled “Properties”funder
Section titled “funder”readonly funder: Address;Defined in: packages/sage/src/identity/actions/create-profile.ts:39
readonly keys: readonly ProfileCreationKeyInput[];Defined in: packages/sage/src/identity/actions/create-profile.ts:40
keyThreshold
Section titled “keyThreshold”readonly keyThreshold: number;Defined in: packages/sage/src/identity/actions/create-profile.ts:41
PlanRegisterCharacterOptions
Section titled “PlanRegisterCharacterOptions”Defined in: packages/sage/src/identity/actions/index.ts:31
Address of the external signer that will fund Character account storage. Character registration has no Profile-authority or faction signer role.
Example
Section titled “Example”declare const funder: Address;const options:PlanRegisterCharacterOptions={funder};Properties
Section titled “Properties”funder
Section titled “funder”readonly funder: Address;Defined in: packages/sage/src/identity/actions/index.ts:32
PlanUnlockResearchNodeOptions
Section titled “PlanUnlockResearchNodeOptions”Defined in: packages/sage/src/identity/actions/research-unlock.ts:33
Address-only options for one explicit research node unlock.
system names the Starbase where the Character’s Starbase Player pays any
cargo cost; level is the level the node reaches, its current level plus one.
Example
Section titled “Example”declare const profile: Address, authority: Address, system: Address;const options: PlanUnlockResearchNodeOptions = { authorization: { profile, authority, keyIndex: 0 }, system, level: 1,};Properties
Section titled “Properties”authorization
Section titled “authorization”readonly authorization: PlanAuthorization;Defined in: packages/sage/src/identity/actions/research-unlock.ts:34
readonly level: number;Defined in: packages/sage/src/identity/actions/research-unlock.ts:36
system
Section titled “system”readonly system: Address;Defined in: packages/sage/src/identity/actions/research-unlock.ts:35
ProfileCreationKeyInput
Section titled “ProfileCreationKeyInput”Defined in: packages/sage/src/identity/actions/create-profile.ts:22
One explicitly scoped key and its exact unsigned 64-bit permission mask.
expiresAt is a nonnegative Unix timestamp in seconds; omission means no expiry.
Profile AUTH keys must omit expiry and must be directly signing addresses.
Example
Section titled “Example”declare const authority: Address;declare const playerProfileProgram: Address;const key: ProfileCreationKeyInput = {address: authority, scope: playerProfileProgram, permissionsRaw: 1n};Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/identity/actions/create-profile.ts:23
expiresAt?
Section titled “expiresAt?”readonly optional expiresAt?: bigint;Defined in: packages/sage/src/identity/actions/create-profile.ts:26
permissionsRaw
Section titled “permissionsRaw”readonly permissionsRaw: bigint;Defined in: packages/sage/src/identity/actions/create-profile.ts:25
readonly scope: Address;Defined in: packages/sage/src/identity/actions/create-profile.ts:24
Functions
Section titled “Functions”planCreateProfile()
Section titled “planCreateProfile()”function planCreateProfile( ctx, profileAddress,input): Promise<Plan>;Defined in: packages/sage/src/identity/actions/create-profile.ts:200
Plans a new signer-created Profile with explicit scoped permissions.
The new Profile, storage funder, and every Player Profile AUTH key sign creation,
even when the editing threshold is lower. Other keys remain readonly.
The new Profile signer is needed only for creation unless explicitly listed
among the initial authority keys; creating the account does not grant it AUTH.
The threshold governs protected Profile updates; it is not a gameplay-wide multisig policy.
Existing target accounts and a Profile address equal to its funder are rejected.
No Game load, onboarding, funding top-up, key generation or signing is implicit.
Storage rent, balances and final creation remain chain-authoritative. Simulate
before requesting signatures; after confirmed execution, read getProfile and
verify the exact keys, scopes, permission masks and threshold.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
profileAddress | Address |
input | PlanCreateProfileOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”import {planCreateProfile} from '@aephia/atlas-kit/identity/actions';declare const ctx: SageContext;declare const profileAddress: Address;declare const options: PlanCreateProfileOptions;const plan = await planCreateProfile(ctx, profileAddress, options);console.log(plan.summary, plan.requiredSigners);planRegisterCharacter()
Section titled “planRegisterCharacter()”function planRegisterCharacter( ctx, profileAddress,input): Promise<Plan>;Defined in: packages/sage/src/identity/actions/index.ts:85
Plans creation of an existing Profile’s canonical Character in the configured Game.
Only the explicit storage funder signs. The Profile’s authority and faction
enrollment are not prerequisites for this instruction. Planning never creates
an account, signs, submits, or retains a signer. Existing Characters are rejected;
reuse them through getCharacterForProfile or maybeGetCharacterForProfile.
New Plans bind the current Game-2 Character and Career XP creation intent.
The canonical accounts, absence, storage pricing, and funder balance are
revalidated before signing. Final creation remains chain-authoritative. Simulate
before signing and read the Character after confirmed execution to verify its
exact Profile/Game identity. Submission alone does not prove creation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
profileAddress | Address |
input | PlanRegisterCharacterOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”import {planRegisterCharacter} from '@aephia/atlas-kit/identity/actions';import type {SageContext,Address} from '@aephia/atlas-kit/client';declare const ctx:SageContext;declare const profileAddress:Address;declare const funder:Address;const plan=await planRegisterCharacter(ctx,profileAddress,{funder});console.log(plan.summary,plan.requiredSigners);planUnlockResearchNode()
Section titled “planUnlockResearchNode()”function planUnlockResearchNode( ctx, nodeId,input): Promise<Plan>;Defined in: packages/sage/src/identity/actions/research-unlock.ts:120
Plans one explicit research node unlock: the node’s next level for the
Profile’s Character, paid at one of its current Starbase Players.
Every required research tag, minimum category level, research point or
Renown cost, and ATLAS and Starbase Player cargo cost grown linearly with
the current level and rounded down, is checked from fresh accounts, with an
exact shortfall when one is missing. The Character’s research and XP must
match the current Game definitions: the program resynchronizes a stale
Character itself when at most 8 node levels are pending, but its result
decides eligibility, so the planner refuses with the next step (any SAGE
action that validates the Character, or syncCharacter). Daily XP costs are
refused as unqualified. Uses a direct Profile AUTH key or a doResearch key
scoped to SAGE or the Game; certificates are unsupported. The program funds
the Character’s storage growth, and any Starbase Player rent shortfall, from
the Profile vault with the signing key:
the Plan bounds that Profile lamport debit from the node’s new entries, and
a positive debit needs Profile AUTH or a key that also holds drainSolVault,
plus Profile lamports above its own rent reserve. The Plan never chooses a
level, unlocks prerequisites, synchronizes the Character or signs.
Eligibility, definition sequences, the observed ATLAS debit and the Profile
storage debit are rechecked before signing; the ceilings are not atomic
on-chain caps. The program folds the node’s tags and modifier into the
Character, and the resulting modifiers remain chain-authoritative: simulate
before signing and read the Character after confirmed execution. One unlock
per Character composes into a transaction.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
nodeId | number |
input | PlanUnlockResearchNodeOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”import { planUnlockResearchNode } from '@aephia/atlas-kit/identity/actions';declare const ctx: SageContext;declare const profile: Address, authority: Address, system: Address;const plan = await planUnlockResearchNode(ctx, 62, { authorization: { profile, authority, keyIndex: 0 }, system, level: 1,});console.log(plan.describe());