DeleteUser

Please note that this operation is non-reversible. User funds will not be recoverable once deleted unless they have backed up their private key.

Description

Deletes the user's encrypted wallets, the Metafi share and the user's share on their device. Renders the wallet unrecoverable.

Details

Signature

async DeleteUser(apiKey)

Arguments

ParameterTypeDefinition

apiKey

String

The API Key generated from the Developer Portal

Return Value

This function returns a Promise that resolves to the following object:

{
    "statusCode": 1/0,
    "data": "data" // always null
    "error": "error" // error if any, else null
}

Example

import { DeleteUser } from '@metafi/metafi-js-package';

function App() {

    const handleDeleteUser = async () => {
        var result = await DeleteUser("YOUR-API-KEY");
        console.log("result after deleting user", result);
    }
    
    return (
        <div>
	    <button onClick={handleDeleteUser}>Delete your Wallet</button>
        </div>
    );
}

export default App;

Last updated