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

BlockchainModule Interface

암호화폐 개발자는 Anamwallet에서RPC 요청을 처리하는 모듈을 AnamWallet에 업로드할 수 있습니다. 이러한 모듈은 동적으로 배포 및 관리되며, 사용자는 필요할 때 다운로드하여 사용할 수 있습니다.

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

  1. request(String requestJson) : String

    • Description: JsonRpc 요청을 처리하는 함수

    • input: Sting 형태의 jsonRpc 요청

      • "
        {
         "id": 0,
         "method": "eth_chainId",
         "params": [],
        }
        "
    • output: String 형태의 jsonRpc 결과

      • "
        {
          "id": 0
          "jsonrpc": "2.0",
          "result": "0x1"
        }
        "
    • Details:

      • 이 메서드는 들어오는 JSON 요청(메서드 이름 + 파라미터)을 파싱하고, 각 코인에 특화된 로직을 실행한 후 결과를 반환하는 핵심 함수

      • 코인마다 API 호출 방식, 트랜잭션 구조, 서명 방식 등이 다를 수 있기 때문에, 이 메서드는 각 코인 클래스 내에서 직접 구현 필요

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

  • Description: 해당 메서드가 호출될 때 필요한 rpc param들을 반환함

  • input : 메서드 명

    • "anam_sendFunds"
  • output : <필요한 항목, 사용자에게 보여지는 필요한 항목에 관한 설명>

    • {
        "To" : "Address(0x....)",
        "Amounts" :"ETH",
        "Gas Price(gwei)" : "If not entered, automatically set to default Network Gas Price"
      }<java:Map>

  1. getSymbol() : String

  • Description: 코인의 화폐단위인 심볼을(예: ETH, BTC)을 문자열로 반환

  • output: String형태의 코인 심볼

    • "ETH"
  • Details:

    • 이 메서드는 "ETH", "BTC"와 같이 코인을 식별하는 심볼을 반환

PreviousMODULENextEssential JSON-RPC Methods

Last updated 21 days ago