Documentation Index
Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
Use this file to discover all available pages before exploring further.
function useGetEvmEip7702DelegationOperation(): {
getEvmEip7702DelegationOperation: (options: GetEvmEip7702DelegationOperationOptions) => Promise<EvmEip7702DelegationOperation>;
};
A hook for getting the status of an EIP-7702 delegation operation.
Used to check the progress of a delegation operation created via createEvmEip7702Delegation.
Returns
An object containing the getEvmEip7702DelegationOperation function.
Example
import { useGetEvmEip7702DelegationOperation } from '@coinbase/cdp-hooks';
function MyComponent() {
const { getEvmEip7702DelegationOperation } = useGetEvmEip7702DelegationOperation();
const handleCheckOperation = async () => {
try {
const operation = await getEvmEip7702DelegationOperation({
delegationOperationId: 'op-123',
});
console.log('Operation status:', operation.status); // PENDING | SUBMITTED | COMPLETED | FAILED
} catch (error) {
console.error('Failed to get operation:', error);
}
};
return <button onClick={handleCheckOperation}>Check delegation operation</button>;
}