Skip to main content

getNodeVersionInfo

A builder function for the Get Node Version Info interaction.

Creates an interaction to retrieve version information from the connected Flow Access Node. This includes details about the node's software version, protocol version, and spork information.

Consider using the pre-built interaction 'fcl.nodeVersionInfo()' if you do not need to pair with any other builders.

Import

You can import the entire package and access the function:


_10
import * as fcl from '@onflow/fcl';
_10
_10
fcl.getNodeVersionInfo();

Or import directly the specific function:


_10
import { getNodeVersionInfo } from '@onflow/fcl';
_10
_10
getNodeVersionInfo();

Usage


_14
import * as fcl from '@onflow/fcl';
_14
_14
// Get node version information using builder
_14
const versionInfo = await fcl.send([fcl.getNodeVersionInfo()]).then(fcl.decode);
_14
_14
console.log('Node version:', versionInfo.semver);
_14
console.log('Protocol version:', versionInfo.protocol_version);
_14
console.log('Spork ID:', versionInfo.spork_id);
_14
_14
// Use with other builders if needed
_14
const interaction = await fcl.build([
_14
fcl.getNodeVersionInfo(),
_14
// other builders can be added here
_14
]);

Returns


_10
export type InteractionBuilderFn = (
_10
ix: Interaction,
_10
) => Interaction | Promise<Interaction>;

A function that processes an interaction object


Rate this page