Class Debot

java.lang.Object
tech.deplant.java4ever.binding.Debot

public final class Debot extends Object
Debot Contains methods of "debot" module of EVER-SDK API [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Module for working with debot.
  • Constructor Details

    • Debot

      public Debot()
  • Method Details

    • init

      @Unstable @Deprecated public static Debot.RegisteredDebot init(EverSdkContext ctx, String address, AppSigningBox appObject) throws EverSdkException
      Deprecated.
      Downloads debot smart contract (code and data) from blockchain and creates an instance of Debot Engine for it. # Remarks It does not switch debot to context 0. Browser Callbacks are not called. [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Creates and instance of DeBot.
      Parameters:
      address - Debot smart contract address
      Throws:
      EverSdkException
    • start

      @Unstable @Deprecated public static void start(EverSdkContext ctx, Long debotHandle) throws EverSdkException
      Deprecated.
      Downloads debot smart contract from blockchain and switches it to context zero. This function must be used by Debot Browser to start a dialog with debot. While the function is executing, several Browser Callbacks can be called, since the debot tries to display all actions from the context 0 to the user. When the debot starts SDK registers `BrowserCallbacks` AppObject. Therefore when `debote.remove` is called the debot is being deleted and the callback is called with `finish`=`true` which indicates that it will never be used again. [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Starts the DeBot.
      Parameters:
      debotHandle - Debot handle which references an instance of debot engine.
      Throws:
      EverSdkException
    • fetch

      @Unstable @Deprecated public static Debot.ResultOfFetch fetch(EverSdkContext ctx, String address) throws EverSdkException
      Deprecated.
      Downloads DeBot from blockchain and creates and fetches its metadata. [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Fetches DeBot metadata from blockchain.
      Parameters:
      address - Debot smart contract address.
      Throws:
      EverSdkException
    • execute

      @Unstable @Deprecated public static void execute(EverSdkContext ctx, Long debotHandle, Debot.DebotAction action) throws EverSdkException
      Deprecated.
      Calls debot engine referenced by debot handle to execute input action. Calls Debot Browser Callbacks if needed. # Remarks Chain of actions can be executed if input action generates a list of subactions. [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Executes debot action.
      Parameters:
      debotHandle - Debot handle which references an instance of debot engine.
      action - Debot Action that must be executed.
      Throws:
      EverSdkException
    • send

      @Unstable @Deprecated public static void send(EverSdkContext ctx, Long debotHandle, String message) throws EverSdkException
      Deprecated.
      Used by Debot Browser to send response on Dinterface call or from other Debots. [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Sends message to Debot.
      Parameters:
      debotHandle - Debot handle which references an instance of debot engine.
      message - BOC of internal message to debot encoded in base64 format.
      Throws:
      EverSdkException
    • remove

      @Unstable @Deprecated public static void remove(EverSdkContext ctx, Long debotHandle) throws EverSdkException
      Deprecated.
      Removes handle from Client Context and drops debot engine referenced by that handle. [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Destroys debot handle.
      Parameters:
      debotHandle - Debot handle which references an instance of debot engine.
      Throws:
      EverSdkException