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.
Cryptocurrency modules must implement the CoinModule interface.
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.
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
, andgas price
. Since different coins may require different fields, each coin class needs to override this method accordingly.
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
Last updated