Skip to content
Alchemy Logo

useSolanaConnection

function useSolanaConnection(opts): SolanaConnection;

Defined in: account-kit/react/src/hooks/useSolanaConnection.ts:39

This hook is used for establishing a connection to Solana and returns the connection object and the signer object.

import { useSolanaConnection } from "@account-kit/react";
 
const { connection } = useSolanaConnection();

ParameterTypeDescription

opts

SolanaConnectionHookParams

Options for the hook to get setup

SolanaConnection

The transaction hook.

Was this page helpful?