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:
_10import * as fcl from '@onflow/fcl';_10_10fcl.getNodeVersionInfo();
Or import directly the specific function:
_10import { getNodeVersionInfo } from '@onflow/fcl';_10_10getNodeVersionInfo();
Usage
_14import * as fcl from '@onflow/fcl';_14_14// Get node version information using builder_14const versionInfo = await fcl.send([fcl.getNodeVersionInfo()]).then(fcl.decode);_14_14console.log('Node version:', versionInfo.semver);_14console.log('Protocol version:', versionInfo.protocol_version);_14console.log('Spork ID:', versionInfo.spork_id);_14_14// Use with other builders if needed_14const interaction = await fcl.build([_14 fcl.getNodeVersionInfo(),_14 // other builders can be added here_14]);
Returns
_10export type InteractionBuilderFn = (_10 ix: Interaction,_10) => Interaction | Promise<Interaction>;
A function that processes an interaction object