Skip to content

SDK Reference

Generated overview of the public @aster/sdk package surface.

The @aster/sdk package is published to npm and documented here from the SDK sources, generated client artifacts, and public package exports.

The main guarantee boundary is simple:

  • helper functions and exports are read from the public package sources
  • client groups and methods are read from the generated SDK client
  • API shapes still come from the gateway OpenAPI document

Use @aster/sdk when you need to connect to Aster from JavaScript or TypeScript. Use @aster/spaces when you are building a programmable space. Use @aster/gate when you are composing or extending a product runtime.

For endpoint-by-endpoint detail, jump to the API reference.

@aster/sdk

Generated SDK metadata

The helpers, entrypoints, client groups, and socket APIs below are read from the checked-in SDK sources and generated client files.

Version
0.10.0
Entrypoints
8
Client groups
0

Package exports

. {"types":"./src/index.ts","development":"./src/index.ts","default":"./dist/index.js"}
./apps {"types":"./src/apps/index.ts","development":"./src/apps/index.ts","default":"./dist/apps/index.js"}
./apps/substrate {"types":"./dist/apps/substrate.d.ts","default":"./dist/apps/substrate.js"}
./react {"types":"./src/react/index.ts","development":"./src/react/index.ts","default":"./dist/react/index.js"}
./gate {"types":"./src/gate/index.ts","development":"./src/gate/index.ts","default":"./dist/gate/index.js"}
./gate/client {"types":"./src/gate/client.ts","development":"./src/gate/client.ts","default":"./dist/gate/client.js"}
./gate/server {"types":"./src/gate/server.ts","development":"./src/gate/server.ts","default":"./dist/gate/server.js"}
./gate/transport {"types":"./src/gate/transport.ts","development":"./src/gate/transport.ts","default":"./dist/gate/transport.js"}

Factory helpers

AsterClient.make

Create an authenticated or anonymous SDK surface for the gateway API.

AsterClient.make(config?: AsterClientConfig)

AsterApp.make

Create a paired app SDK surface with the core Aster capabilities plus app lifecycle helpers.

AsterApp.make(config: AsterAppMakeConfig)

createAsterServer

Spawn an Aster server process and wait for gateway readiness.

createAsterServer(options: ServerOptions)

useAsterResource

React hook for subscribing to SDK live resources.

useAsterResource(resource: AsterLiveResource<T> | null | undefined, options: UseAsterResourceOptions = {})

useAster

React hook for Apps SDK pairing and connection state.

useAster(config: AsterAppMakeConfig, options: UseAsterOptions = {})

Runtime sockets

connectRuntimeCommandSocket

connectRuntimeCommandSocket(input: ConnectGatewayRuntimeSocketOptions)

connectGatewayRuntimeSocket

Open the runtime WebSocket and subscribe to run events.

connectGatewayRuntimeSocket(input: ConnectGatewayRuntimeSocketOptions)

Client groups

Support types

  • UseAsterStatus
  • UseAsterOptions
  • AsterLiveResource
  • UseAsterResourceOptions
  • UseAsterResourceResult
  • UseAsterResult
  • ServerOptions
  • CloseAsterServerOptions
  • AsterServerHandle
  • ServerLifecycleEvent
  • GatewayRuntimeEvent
  • GatewayAppLifecycleEvent
  • GatewayAppEventSocketEvent
  • GatewayRuntimeSocket
  • RuntimeCommandSocket
  • RuntimeSocketLike
  • ConnectGatewayRuntimeSocketOptions
  • RuntimeProtocolUpdateRequiredError