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 sdk from "@onflow/sdk"
_10
_10
sdk.getNodeVersionInfo()

Or import directly the specific function:


_10
import { getNodeVersionInfo } from "@onflow/sdk"
_10
_10
getNodeVersionInfo()

Usage


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

Returns

InteractionBuilderFn


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


Rate this page