Skip to content

nooschain v0.1.0


nooschain / node/node-role / getLocalNodeRole

Function: getLocalNodeRole()

getLocalNodeRole(db, args?): Promise<NodeRuntimeRole>

Defined in: node/node-role.ts:55

Resolves the local node role from explicit config first, then node identity.

A configured role is authoritative when it is known. Otherwise the helper looks up the local nodeId in consensus node identity state. Missing config and missing DB identity resolve to unknown.

Parameters

db

Kysely<Database>

args?

configuredRole?

NodeRuntimeRole

nodeId?

string

Returns

Promise<NodeRuntimeRole>

Audience-first NOOSChain documentation.