Skip to content

Use Solana connection

In this example, we will use the Helius SDK to access the Solana connection object.

Access the Solana connection object

// You can access the Solana connection object
const hash = await client.connection.getGenesisHash()
// Will print EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG on devnet
console.log('Genesis hash:', hash)
// Get the version of the node
const version = await client.connection.getVersion()
console.log('Version:', version)