if (isset($_GET['wallet_name'])) {
$walletName = filter_input(INPUT_GET, 'wallet_name', FILTER_SANITIZE_SPECIAL_CHARS);
} else {
$walletName = 'bob';
}
$walletClient = new \BlockCypher\Client\HDWalletClient($apiContexts['BTC.main']);
try {
$output = $walletClient->delete($walletName);
} catch (Exception $ex) {
ResultPrinter::printError("Deleted HDWallet", "HDWallet", $walletName, null, $ex);
exit(1);
}
ResultPrinter::printResult("Deleted HDWallet", "HDWallet", $walletName, null, $output);
return $output;
Delete HDWallet
This sample code demonstrate how you can delete a HD wallet, as documented here at docs
API used: DELETE /v1/btc/main/wallets/hd/Wallet-Name