OpenClaw SDK
    Preparing search index...

    Function createConnectionStateMachine

    • Create a connection state machine.

      Returns ConnectionStateMachine

      A new ConnectionStateMachine instance

      import { createConnectionStateMachine } from './connection/state.js';

      const stateMachine = createConnectionStateMachine();

      stateMachine.onStateChange((event) => {
      console.log(`State: ${event.previousState} -> ${event.newState}`);
      });

      stateMachine.transition('connecting');