Initialise MetaMask Connection Task

task::connect_metamask::initAPI-v2task::connect_metamask::init

Use this method to begin a task-managed process that establishes a MetaMask context. The method returns a task_id that can be polled using task::connect_metamask::status.

Request Parameters

Parameter Type Required Description
project string A short, human-readable identifier for the DApp or integration requesting the context.

Response Parameters

Parameter Type Required Description
task_id integer An identifying number that is used to query task status or to cancel it

📌 Examples

POST connect_metamask::init task::connect_metamask::init
{
  "mmrpc": "2.0",
  "method": "task::connect_metamask::init",
  "params": {
    "project": "my_kdf_app"
  },
  "id": 1,
  "userpass": "RPC_UserP@SSW0RD"
}
Show Response

Response (success)

{
  "mmrpc": "2.0",
  "result": {
    "task_id": 42
  },
  "id": 1
}

Error Types

Parameter Type Required Description
MetamaskInitializingAlready string A MetaMask initialisation task is already in progress.
EthProviderNotFound string No MetaMask provider detected in the browser / environment.
UnexpectedAccountSelected string A different ETH account is currently selected in MetaMask.
UserCancelled string The user rejected the signature/request in MetaMask.
Timeout string MetaMask did not respond within the expected time-out window.
InternalError string The request failed due to a Komodo DeFi Framework API internal error.