Class MerkleNode
The IPFS MerkleDag is the datastructure at the heart of IPFS. It is an acyclic directed graph whose edges are hashes.
Assembly: Ipfs.Http.Client.dll
Syntax
[DataContract]
public class MerkleNode : IMerkleNode<IMerkleLink>, IDataBlock, IEquatable<MerkleNode>
Constructors
|
Improve this Doc
View Source
MerkleNode(Cid, String)
Declaration
public MerkleNode(Cid id, string name = null)
Parameters
Type |
Name |
Description |
Cid |
id |
The Cid of the node.
|
String |
name |
A name for the node.
|
|
Improve this Doc
View Source
MerkleNode(IMerkleLink)
Declaration
public MerkleNode(IMerkleLink link)
Parameters
Type |
Name |
Description |
IMerkleLink |
link |
The link to a node.
|
|
Improve this Doc
View Source
MerkleNode(String, String)
Creates a new instance of the MerkleNode with the specified
Id and optional Name.
Declaration
public MerkleNode(string path, string name = null)
Parameters
Type |
Name |
Description |
String |
path |
The string representation of a Cid of the node or "/ipfs/cid".
|
String |
name |
A name for the node.
|
Properties
|
Improve this Doc
View Source
BlockSize
Size of the raw, encoded node.
Declaration
[DataMember]
public long BlockSize { get; }
Property Value
|
Improve this Doc
View Source
DataBytes
Declaration
[DataMember]
public byte[] DataBytes { get; }
Property Value
|
Improve this Doc
View Source
DataStream
Declaration
public Stream DataStream { get; }
Property Value
|
Improve this Doc
View Source
Id
Declaration
[DataMember]
public Cid Id { get; }
Property Value
|
Improve this Doc
View Source
Links
Declaration
[DataMember]
public IEnumerable<IMerkleLink> Links { get; }
Property Value
|
Improve this Doc
View Source
Name
The name for the node. If unknown it is "" (not null).
Declaration
[DataMember]
public string Name { get; set; }
Property Value
|
Improve this Doc
View Source
Size
Declaration
[DataMember]
public long Size { get; }
Property Value
See Also
Methods
|
Improve this Doc
View Source
Equals(MerkleNode)
Declaration
public bool Equals(MerkleNode that)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
ToLink(String)
Declaration
public IMerkleLink ToLink(string name = null)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(MerkleNode, MerkleNode)
Declaration
public static bool operator ==(MerkleNode a, MerkleNode b)
Parameters
Returns
|
Improve this Doc
View Source
Implicit(String to MerkleNode)
Declaration
public static implicit operator MerkleNode(string hash)
Parameters
Type |
Name |
Description |
String |
hash |
|
Returns
|
Improve this Doc
View Source
Inequality(MerkleNode, MerkleNode)
Declaration
public static bool operator !=(MerkleNode a, MerkleNode b)
Parameters
Returns
Implements