Skip to content
Alchemy Logo

watchSolanaConnection

function watchSolanaConnection(config): (onChange) => any;

Defined in: account-kit/core/src/actions/watchSolanaConnection.ts:18

Subscribe to changes to the solana connection for the id

import { watchSolanaConnection } from "@account-kit/core";
// see createConfig for more information on how to create a config
const config = {} as any;
 
watchSolanaConnection(config)(console.log);

ParameterTypeDescription

config

AlchemyAccountsConfig

the account config of the connection

a function which accepts an onChange callback that will be fired when the connection changes and returns a function to unsubscribe from the store

(onChange): any;

ParameterType

onChange

(connection) => void

any

Was this page helpful?