MetaMask Connection Task: Status

task::connect_metamask::statusAPI-v2task::connect_metamask::status

After calling task::connect_metamask::init, use this method to poll for progress, gather additional details, or fetch the final result once the MetaMask context is ready.

Request Parameters

Parameter Type Required Default Description
task_id integer ✓ The task_id returned by the init call.
forget_if_finished boolean – true If false, the final (completed) response is returned on every call.

Response Parameters

Parameter Type Required Description
status string ✓ A short indication of how the connection process is progressing (Initializing, SigningLoginMetadata, Ok, or Error).
details object ✓ Extra data whose structure depends on the current status. See examples below. In the successful case it contains eth_address.

Possible in-progress status values:

  • Initializing – Preparing the MetaMask context.
  • SigningLoginMetadata – Waiting for the user to sign the login metadata inside MetaMask.

When the task completes successfully, status will be Ok and details will hold the resulting Ethereum address.

📌 Examples

POST connect_metamask::status (in progress) task::connect_metamask::status
{
  "mmrpc": "2.0",
  "method": "task::connect_metamask::status",
  "params": {
    "task_id": 42,
    "forget_if_finished": false
  },
  "id": 1,
  "userpass": "RPC_UserP@SSW0RD"
}
Show Response

Response (in progress)

{
  "mmrpc": "2.0",
  "result": {
    "status": "InProgress",
    "details": "Initializing"
  },
  "id": 1
}
Show Response

Response (ready, successful)

{
  "mmrpc": "2.0",
  "result": {
    "status": "Ok",
    "details": {
      "eth_address": "0x7b6E7C4555c5F6f5Fc4d0fAA940bAe50cC3C7d29"
    }
  },
  "id": 1
}

Error Types

Parameter Type Required Description
MetamaskCtxNotInitialized string – The MetaMask context was not yet created (call init first).
EthProviderNotFound string – No MetaMask provider detected.
UserCancelled string – The user rejected the MetaMask signature / request.
Timeout string – MetaMask did not respond within the expected time-out window.
InternalError string – The request failed due to an internal error in the Komodo DeFi Framework API.