AnamWallet
  • Developers
    • INTRODUCE
      • Purpose of AnamWallet
      • Key Features of AnamWallet
    • ARCHITECTURE
      • Main - Module Process
      • Inter-Process Communication (IPC)
    • MODULE
      • Coinmodule Interface
      • Essential JSON-RPC Methods
      • Apply your Module with DFM
      • How to use DFM
    • ENCRYPTION MANAGEMENT
      • Hybrid Encryption System
      • KeyStore File System
    • GUIDELINE
      • Version Requirements
  • Developers - 한국어
    • INTRODUCE
      • Purpose of AnamWallet
      • Key Features of AnamWallet
    • ARCHITECTURE
      • Main - Module Process
      • Inter-Process Communication (IPC)
    • MODULE
      • BlockchainModule Interface
      • Essential JSON-RPC Methods
    • ENCRYPTION MANAGEMENT
      • Hybrid Encryption System
      • KeyStore File System
    • GUIDELINE
      • Version Requirements
  • Users
    • INTRODUCE
    • HELP
    • FAQ
  • License
Powered by GitBook
On this page
  1. Developers
  2. MODULE

Coinmodule Interface

Cryptocurrency developers can upload modules they have created to handle RPC requests onto AnamWallet.

These modules are distributed and managed as Dynamic Feature Modules, allowing users to download and use them on demand.

public abstract class CoinModule {
    public abstract String request(String requestJson);
    public abstract Map<String, String> getComponents(String method);
    public abstract String getSymbol();
}

Cryptocurrency modules must implement the CoinModule interface.

  1. request(String requestJson) : String

    • Description: Parses network requests (such as JSON-RPC), executes coin-specific logic, and returns the result as a string (JSON).

    • Details:

      • This method is the core function that parses incoming JSON requests (method name + parameters), executes the logic specific to each coin, and returns the result.

      • Since each coin may have different API call methods, transaction structures, and signing methods, this method must be implemented directly within each coin class.

  1. getComponents(String method) : Map<String, String>

  • Description: Dynamically configures the necessary UI components (input fields, etc.) when the corresponding method is called.

  • Details:

    • This method determines which input fields to display on the UI when a specific method (e.g., anam_sendFunds) is invoked.

    • For example, Ethereum may require fields like to, amounts, and gas price. Since different coins may require different fields, each coin class needs to override this method accordingly.

  1. getSymbol() : String

  • Description: Returns the coin’s symbol (e.g., ETH, BTC) as a string.

  • Details:

    • This method returns the symbol that identifies the coin, such as “ETH” or “BTC”, which is crucial for distinguishing between different cryptocurrencies.

These method implementations ensure that each coin module operates correctly within the AnamWallet system, handling specific requirements and maintaining overall system integrity

PreviousMODULENextEssential JSON-RPC Methods

Last updated 5 months ago