Defined in the Base Account SDK
Prompts the user to approve revoking the specified spend permission. Requires
user interaction via their Base Account wallet UI.
Parameters
The permission to revoke.
Returns
Transaction hash of the revoke operation.
import { requestRevoke } from "@base-org/account/spend-permission";
try {
const hash = await requestRevoke(permission);
console.log("Revoke succeeded", hash);
} catch (err) {
console.warn("Revoke was rejected or failed", err);
}
Error Handling
Always wrap the call in a try-catch block to handle these errors gracefully.