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 useCreateDelegation(): UseCreateDelegationReturnType;
Hook that provides a function to create a delegation allowing a developer to sign on behalf of an end user.
Returns
UseCreateDelegationReturnType
An object containing the createDelegation function.
Example
const { createDelegation } = useCreateDelegation();
const result = await createDelegation({ expiresAt: '2025-12-31T23:59:59Z' });
console.log(result.delegationId);