@kagamidigital/salt-sdk-mirror
    Preparing search index...

    Class RoboHost

    A RoboHost represents the server-side record for an organisation's robos. It provides the credentials and hosting parameters needed to provision the actual compute instances (via setup script or AWS CloudFormation) that will connect and act as robo signers.

    Index

    Properties

    active: boolean

    Whether this host has completed 2FA activation, as of when this record was fetched. A snapshot — like signers/provisioned, it does not refresh on its own. Activate via Salt.activateRoboHost.

    id: string

    The robo ID

    name: string | null

    The robo name

    otp: string | null

    The setup OTP shown during robo-guardian setup, or null once activation has consumed it. Used to provision the host (generateSetupScript / generateCloudFormationUrl) and to activate it (Salt.activateRoboHost).

    ownerAddress: string | null

    The owner's address

    signers: string[]

    The robo signers' addresses (empty until the host is provisioned)

    Accessors

    • get provisioned(): boolean

      Whether this host has at least one connected signer. false after setup has started (script run or CloudFormation stack launched) means no robo has connected yet — generateSetupScript / generateCloudFormationUrl are still safe to re-run in that case, since no account has enrolled a signer yet.

      Returns boolean

    Methods

    • Build an AWS CloudFormation quick-create console URL that provisions a robo host from Salt's launch template, pre-filled with the robo's setup OTP and the owner's public key. Opening it in a browser signed in to AWS launches the stack; the host then runs the same setup as generateSetupScript.

      Parameters

      Returns string

      The CloudFormation quick-create URL

      ValidationError if this host record carries no setup OTP (otp is null). Hosts returned by Salt.createRoboHost always carry it; hosts fetched with Salt.getRoboHost carry it until activation consumes it

      const url = host.generateCloudFormationUrl({
      publicKey: ownerPublicKey,
      stackName: 'my-org-robos',
      });
      console.log(`Open to launch: ${url}`);
    • Build the install-robos.sh setup script for a self-hosted robo, targeting this instance's environment. Run as root on an Ubuntu/Debian host, the script installs Docker, generates a seed on the host, encrypts it to the owner's public key, uploads the encrypted backup to Salt, and starts the robo container with an automatic updater. The plaintext seed never leaves the host.

      Parameters

      Returns string

      The setup script contents

      ValidationError if this host record carries no setup OTP (otp is null). Hosts returned by Salt.createRoboHost always carry it; hosts fetched with Salt.getRoboHost carry it until activation consumes it

      const script = host.generateSetupScript({ publicKey: ownerPublicKey });
      fs.writeFileSync('install-robos.sh', script);