Skip to main content

Function: useGrantDelegation()

useGrantDelegation(): UseMutationResult<DelegationResult, Error, GrantDelegationInput, unknown>

Defined in: web/lib/hooks/use-governance.ts:837

Mutation hook for granting delegation (admin only).

Returns

UseMutationResult<DelegationResult, Error, GrantDelegationInput, unknown>

Mutation object for granting delegation

Example

const grantDelegation = useGrantDelegation();

await grantDelegation.mutateAsync({
delegateDid: 'did:plc:example',
collections: ['pub.chive.graph.authority'],
daysValid: 365,
});