Services
Walrus, Seal, DeepBook, host dev servers, and known on-chain dependencies.
The root package exports current service factories in lowercase. Compose only the behavior the options actually support, and include a dev server when the stack backs a browser app.
Dev server
Use hostService(...) for the frontend process so devstack up starts and stops the app with the
rest of the stack.
import {
HOST_SERVICE_PORT_TOKEN,
defineDevstack,
hostService,
sui,
wallet,
} from '@mysten-incubation/devstack';
const localnet = sui();
const devWallet = wallet({ accounts: 'all' });
const app = hostService({
name: 'app',
script: `pnpm exec vite --host 127.0.0.1 --strictPort --port ${HOST_SERVICE_PORT_TOKEN}`,
port: 5173,
ready: { kind: 'http' },
after: [devWallet] as const,
});
export default defineDevstack({ members: [localnet, app] });The dev server binds the allocated process port injected through HOST_SERVICE_PORT_TOKEN, while
the router exposes the stable dev endpoint on http://dev.<app>.localhost:5175. See
Dev servers for the port assignment details.
Walrus
Local mode starts a local cluster. Use walCoin(localWalrus) with normal account funding when an
account needs WAL.
import { defineDevstack, account, sui, walCoin, walrus } from '@mysten-incubation/devstack';
const localnet = sui();
const localWalrus = walrus({
local: {
nodeCount: 1,
shards: 4,
},
});
const wal = walCoin(localWalrus);
const alice = account('alice', {
funding: [
{ coin: 'sui', amount: 1_000_000_000n },
{ coin: wal, amount: 500_000_000n },
],
});
export default defineDevstack({
members: [localnet, localWalrus, alice],
});Known mode requires explicit on-chain ids and an explicit node list. Fork stacks can use known
Walrus deployments through walrusFor(forkNetwork).known(...); local Walrus clusters remain a
local-mode service. See Walrus.
Seal
Local keygen mode requires a signer account:
import { defineDevstack, account, seal, sui } from '@mysten-incubation/devstack';
const localnet = sui();
const publisher = account('publisher');
const keyServer = seal({
mode: 'local-keygen',
signer: publisher,
});
export default defineDevstack({
members: [localnet, keyServer],
});Live modes reference existing key servers and do not expose a local manager. Fork stacks can point
at the upstream key server through sealFor(forkNetwork).forkKnown(...); local keygen remains a
local-mode service. See Seal.
DeepBook
Local mode publishes or consumes a local DeepBook package, can initialize local Pyth price feeds,
creates requested pools, and seeds those pools through the same faucet/funding path used by
accounts. Coins should come from coin.builtin('sui') or coin.fromPackage(...) so the pool,
funding, and generated bindings all share one resolved coin record.
Known mode wraps a canonical or explicitly supplied deployment. Override mode can wrap caller-supplied deployment ids, but it does not publish or manage DeepBook locally.
import { defineDevstack, deepbook, sui } from '@mysten-incubation/devstack';
const liveSui = sui({ mode: 'live', network: 'testnet' });
const dex = deepbook({
mode: 'known',
network: 'testnet',
});
export default defineDevstack({
members: [liveSui, dex],
});The current DeepBook surface only claims local pool creation, Pyth, margin, or market-maker behavior
when those fields are present in the resolved value. Known mode still requires explicit deployed ids
such as packageId and registryId, or a supported network shortcut. Local Pyth feeds are
generated into the DeepBook bindings so app and Playwright code can assert the feed ids and initial
prices that the stack created. See DeepBook.
Known on-chain dependencies
Use knownPackage(name, { packageId }) for fixed deployed modules:
import { defineDevstack, knownPackage, sui } from '@mysten-incubation/devstack';
const liveSui = sui({ mode: 'live', network: 'testnet' });
const registry = knownPackage('registry', {
packageId: '0x...',
mvrPlaceholder: '@demo/registry',
});
export default defineDevstack({ members: [liveSui, registry] });See Known packages.