useSolanaConnection

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

Import

1import { useSolanaConnection } from "@account-kit/react";

Usage

1const { connection } = useSolanaConnection();

Parameters

opts

SolanaConnectionHookParams Options for the hook to get setup

Returns

SolanaConnection The transaction hook.