Optional
connectionOptional
logger?: LoggerOptional
refreshOptional
refreshOptional
retryReadonly
[initReadonly
baseProtected
checkReadonly
checkReadonly
connectionProtected
dbProtected
gcReadonly
gcProtected
gestaltProtected
keyProtected
loggerProtected
nodeProtected
nodeProtected
pendingProtected
pingReadonly
pingProtected
refreshProtected
refreshProtected
refreshReadonly
refreshProtected
retryProtected
sigchainProtected
taskProtected
addOptional
tran: DBTransactionCall this function upon receiving a "claim node request" notification from another node.
Optional
tran: DBTransactionOptional
ctx: ContextTimedProtected
garbageGets the specified bucket from the NodeGraph
Optional
tran: DBTransactionRetrieves the node Address from the NodeGraph
node ID of the target node
Node Address of the target node
Optional
tran: DBTransactionProtected
handleDetermines whether a node ID -> node address mapping exists in the NodeGraph
the node ID of the node to find
true if the node exists in the table, false otherwise
Determines whether a node in the Polykey network is online.
NodeId of the node we're pinging
Optional
address: NodeAddressOptional Host and Port we want to ping
Optional
ctx: Partial<ContextTimedInput>true if online, false if offline
Kademlia refresh bucket operation. It picks a random node within a bucket and does a search for that node. Connections during the search will share node information with other nodes.
Optional
pingTimeoutTime: numberOptional
ctx: Partial<ContextTimed>Connects to the target node, and retrieves its sigchain data. Verifies and returns the decoded chain as ChainData. Note: this will drop any unverifiable claims. For node1 -> node2 claims, the verification process also involves connecting to node2 to verify the claim (to retrieve its signing public key).
Adds a node to the node graph. This assumes that you have already authenticated the node
Updates the node if the node already exists
This operation is blocking by default - set block
2qto false to make it non-blocking
Id of the node we wish to add
Expected address of the node we want to add
Optional
block: booleanWhen true it will wait for any garbage collection to finish before returning.
Optional
force: booleanFlag for if we want to add the node without authenticating or if the bucket is full. This will drop the oldest node in favor of the new.
Optional
pingTimeoutTime: numberTimeout for each ping operation during garbage collection.
Optional
ctx: Partial<ContextTimed>Optional
tran: DBTransactionProtected
setupGCTaskProtected
setupPerform an initial database synchronisation: get k of the closest nodes
from each seed node and add them to this database
Establish a connection to each node before adding it
By default this operation is blocking, set block
to false
to make it
non-blocking
Optional
block: booleanOptional
pingTimeoutTime: numberOptional
ctx: Partial<ContextTimedInput>Removes a node from the NodeGraph
Generated using TypeDoc
Time used to establish
NodeConnection