Skip to main content

LookupNode

@totemsdk/lookup-node


@totemsdk/lookup-node / LookupNode

Class: LookupNode

@totemsdk/lookup-node — public API

Implements

Constructors

Constructor

new LookupNode(config): LookupNode

Parameters

config

LookupNodeConfig

Returns

LookupNode

Properties

agentRegistry?

readonly optional agentRegistry?: AgentRegistry

Implementation of

NodeDispatcher.agentRegistry


appRegistry?

readonly optional appRegistry?: AppRegistry

Implementation of

NodeDispatcher.appRegistry


config

readonly config: LookupNodeConfig

Implementation of

NodeDispatcher.config


lease?

readonly optional lease?: LeaseCoordinator

Implementation of

NodeDispatcher.lease


nodeId

nodeId: string

Implementation of

NodeDispatcher.nodeId


provider

readonly provider: ChainStateProvider

Implementation of

NodeDispatcher.provider


relay?

readonly optional relay?: TxPoWRelay

Implementation of

NodeDispatcher.relay


store

readonly store: SqliteStore

Implementation of

NodeDispatcher.store


trustIndex?

readonly optional trustIndex?: TrustIndex

Implementation of

NodeDispatcher.trustIndex


watchlist

readonly watchlist: WatchlistManager

Implementation of

NodeDispatcher.watchlist

Accessors

isMegaMMRMode

Get Signature

get isMegaMMRMode(): boolean

Whether this node is running in MegaMMR/indexer mode. When true, the provider is expected to support wider chain-state queries such as full balance indexing and chain-wide analytics endpoints. The provider's getCoins() may be called without an address filter to retrieve all coins from the indexer.

Returns

boolean

Implementation of

NodeDispatcher.isMegaMMRMode


sessionCount

Get Signature

get sessionCount(): number

Returns

number

Methods

getSessions()

getSessions(): ClientSession[]

Returns

ClientSession[]


handleConnection()

handleConnection(transport): ClientSession

Register a new client connection. In production: called for each Hyperswarm connection. In tests: inject a TestTransport (see tests/helpers.ts).

Parameters

transport

ITransport

Returns

ClientSession


onSessionClosed()

onSessionClosed(sessionId): void

Parameters

sessionId

string

Returns

void

Implementation of

NodeDispatcher.onSessionClosed


start()

start(): Promise<void>

Returns

Promise<void>


stop()

stop(): Promise<void>

Returns

Promise<void>