Connection

connect

async window.fewcha.connect(): Promise<Response<PublicAccount>>

Response

{
    "method": "connect",
    "status": 200,
    "data": {
        "address": "0x20364f4121f608f2a09830bc0ab6980fdccff45c2f5df6c41c17f40e511fe80e",
        "publicKey": "0x89a10bded6d812d21299ee129410d53a74f12f91183989c19282fa24ce629b49"
    }
}

Learn more about Response and PublicAccount type at Response Format and Types

disconnect

async window.fewcha.disconnect(): Promise<Response<boolean>>

Response

{
    "method": "disconnect",
    "status": 200,
    "data": true
}

Disconnect the current website with the wallet, the website will get status 403if the website call to legacy methods

isConnected

async window.fewcha.isConnected(): Promise<Response<boolean>>

Response

{
    "method": "isConnected",
    "status": 200,
    "data": true
}

Last updated