On this page

Initialise MetaMask Connection Task

API-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.

ParameterTypeRequiredDescription
projectstringA short, human-readable identifier for the DApp or integration requesting the context.

ParameterTypeDescription
task_idintegerAn identifying number that is used to query task status or to cancel it

connect_metamask::init

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

ParameterTypeDescription
MetamaskInitializingAlreadystringA MetaMask initialisation task is already in progress.
EthProviderNotFoundstringNo MetaMask provider detected in the browser / environment.
UnexpectedAccountSelectedstringA different ETH account is currently selected in MetaMask.
UserCancelledstringThe user rejected the signature/request in MetaMask.
TimeoutstringMetaMask did not respond within the expected time-out window.
InternalErrorstringThe request failed due to a Komodo DeFi Framework API internal error.