On this page

MetaMask Connection Task: Status

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

ParameterTypeRequiredDefaultDescription
task_idinteger-The task_id returned by the init call.
forget_if_finishedbooleantrueIf false, the final (completed) response is returned on every call.

ParameterTypeDescription
statusstringA short indication of how the connection process is progressing (Initializing, SigningLoginMetadata, Ok, or Error).
detailsobjectExtra 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.

connect_metamask::status (in progress)

POST
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"
}

ParameterTypeDescription
MetamaskCtxNotInitializedstringThe MetaMask context was not yet created (call init first).
EthProviderNotFoundstringNo MetaMask provider detected.
UserCancelledstringThe user rejected the MetaMask signature / request.
TimeoutstringMetaMask did not respond within the expected time-out window.
InternalErrorstringThe request failed due to an internal error in the Komodo DeFi Framework API.