API reference > @kontsedal/olas-vue > useRoot
useRoot() function
The root's api, from the nearest olasPlugin. Typed by the registered root (Register), or by useRoot<Api>() as an unchecked cast. Throws when no plugin provided a root, and when called outside a component's setup(), where there is no app to ask.
Signature:
typescript
export declare function useRoot<Api = RegisteredApi>(): Api;Returns:
Api