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
.
Parameter | Type | Required | Description |
---|---|---|---|
project | string | ✓ | A short, human-readable identifier for the DApp or integration requesting the context. |
Parameter | Type | Description |
---|---|---|
task_id | integer | An 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"
}
Parameter | Type | 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. |