Function: useHolder()
typescript
1
useHolder(): AgentContextType & object
Defined in: hooks/index.ts:358
Hook for accessing credential holder context and operations.
Provides functionality for receiving, storing, and presenting verifiable credentials. This hook must be used within a HolderProvider and requires a running agent.
Returns
Holder context containing:
agent
: Current Agent instance or null if not runningstart
: Async function to start the agent for holder operationsstop
: Async function to stop the agentstate
: Current agent state stringparseOOBOffer
: Parse and validate out-of-band credential offersacceptOOBOffer
: Accept and store offered credentials in wallethandlePresentationRequest
: Respond to verifier presentation requests
Throws
When used outside of HolderProvider