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 sdk from "@onflow/sdk"_10_10sdk.getNodeVersionInfo()
Or import directly the specific function:
_10import { getNodeVersionInfo } from "@onflow/sdk"_10_10getNodeVersionInfo()
Usage
_16import * as fcl from "@onflow/fcl";_16_16// Get node version information using builder_16const versionInfo = await fcl.send([_16 fcl.getNodeVersionInfo()_16]).then(fcl.decode);_16_16console.log("Node version:", versionInfo.semver);_16console.log("Protocol version:", versionInfo.protocol_version);_16console.log("Spork ID:", versionInfo.spork_id);_16_16// Use with other builders if needed_16const interaction = await fcl.build([_16 fcl.getNodeVersionInfo()_16 // other builders can be added here_16]);
Returns
InteractionBuilderFn
_10export type InteractionBuilderFn = (_10 ix: Interaction_10) => Interaction | Promise<Interaction>