Links

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

Parameter
Type
Definition
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

1
import { DeleteUser } from '@metafi/metafi-js-package';
2
3
function App() {
4
5
const handleDeleteUser = async () => {
6
var result = await DeleteUser("YOUR-API-KEY");
7
console.log("result after deleting user", result);
8
}
9
10
return (
11
<div>
12
<button onClick={handleDeleteUser}>Delete your Wallet</button>
13
</div>
14
);
15
}
16
17
export default App;
18