Skip to main content

IneryDB Value Contract

The IneryDB GUI Contract is a critical element of the Inery ecosystem, implemented to manage and execute database-related operations securely and efficiently on the Distributed Ledger System (DLS). This contract provides functionality for global and user-specific operations, enabling seamless interaction between the GUI and the blockchain.


Key Features

  • Database Management:
    Defines and manages database templates, plugins, and structures for efficient operation.

  • User Operations:
    Facilitates user registration, authentication, and updates, ensuring security through hashed credentials and recovery mechanisms.

  • History Tracking:
    Records actions like creation, updates, and deletions for better accountability and traceability.

  • Permission Control:
    Links permissions to specific database components, streamlining access control.

  • Modular Plugin System:
    Enables dynamic plugin management with activation and deactivation actions.


Core Structures

  • global_info:
    Stores global state, including the version, available templates, and plugins.

  • user:
    Contains user details such as ID, GUI account name, hashed password, associated accounts, servers, templates, and plugins.

  • history:
    Tracks transaction history, including block numbers, timestamps, and operations executed.

  • permissions:
    Defines and links permissions to database components for controlled access.


Action Overview

Global Actions

  • addtemplateg: Add a new template to the global state.
  • addpluging: Register a new plugin globally with metadata such as name and description.
  • uppluging: Update details of an existing plugin.
  • upversiong: Update the global version.
  • waversion: Synchronize user versions with the global version.

User Actions

  • adduser: Register a new user with a unique name, hashed password, and initial version.
  • rmusers: Remove all registered users (admin-only action).
  • recoverpsw: Reset a user's password using recovery words.

Account and Server Management

  • addaccount / rmaccount: Add or remove blockchain accounts associated with a user.
  • addserver / rmserver: Add or remove servers linked to a user's database.

Template and Plugin Management

  • addtemplateu / rmtemplateu: Assign or remove templates for a user.
  • addpluginu / rmpluginu: Assign or remove plugins for a user.
  • turnonplugin / turnofplugin: Activate or deactivate a plugin for a user.

History Management

  • addhistory: Record an operation (create, update, or delete) in the user's transaction history.

Permission Control

  • linkperm: Link specific permissions to a database component.

Usage Notes
  • Security: The contract uses hashed credentials and recovery mechanisms to ensure user data remains secure.
  • Modularity: The template and plugin systems allow for dynamic extension and customization of the GUI's functionality.
  • Traceability: Detailed history tracking enables full transparency and accountability for all actions performed.
  • Access Control: The permission system ensures that only authorized users can perform specific operations on the database.