Class: Node

Node

Extends Kademlia with ORC protocol rules

new Node(options, identity)

Parameters:
Name Type Description
options object
Properties
Name Type Description
privateKey buffer SECP256k1 private key
identity kadence.eclipse.EclipseIdentity Solved identity
License:
  • AGPL-3.0
Source:

Extends

  • KademliaNode

Methods


download(blobPointer)

Accepts an ORC blob pointer and resolves all the parts, assembling them, decrypting them, and returning the BlobMapping.
Parameters:
Name Type Description
blobPointer BlobPointer
Source:
Returns:
Type
Promise.<BlobMapping>

resolve(href)

Accepts a pointer info link and resolves the encrypted slice, decrypts it, and returns a BlobPointer.
Parameters:
Name Type Description
href string
Source:
Returns:
Type
Promise.<BlobPointer>

upload(blobMapping)

Accepts an ORC blob mapping and uses it to store the shards and pointers in the network.
Parameters:
Name Type Description
blobMapping BlobMapping
Source:
Returns:
Type
Promise.<BlobPointer>