getConnection

Used to get the connection for the currently active chain

Import

1import { getConnection } from "@account-kit/core";

Usage

1import { getConnection } from "@account-kit/core";
2import { config } from "./config";
3
4const connection = getConnection(config);

Parameters

config

AlchemyAccountsConfig the account config

Returns

Connection a connection object for the current active chain