Skip to main content

useKeybanClient

function useKeybanClient(): KeybanClient

Hook to access the Keyban SDK functionalities within a component. This hook provides access to the initialized Keyban client, allowing the component to interact with the SDK. It throws an error if called outside of a KeybanProvider.

Returns

KeybanClient

The initialized Keyban client.

Throws

If the hook is used outside of a KeybanProvider.

Example

const MyComponent = () => {
const keybanClient = useKeybanClient();
// Use the Keyban client to interact with blockchain functionality
};

Defined in

packages/sdk-react/src/provider.tsx:135