CID class final

This is a simple implementation of V1 CID, or a content identifier. CID is a label used to point to material in IPFS.

Constructors

CID(Uint8List bytes)
Returns the new instance of CID.
CID.create(String input, [Multicodec codec = Multicodec.raw])
Returns the CID representation of specific string input.
factory
CID.createFromBytes(List<int> input, [Multicodec codec = Multicodec.raw])
Returns the CID representation of binary input.
factory
CID.fromJson(Map<String, dynamic> json)
Returns the new instance of CID based on json.
factory
CID.fromList(List<int> bytes)
Returns the new instance of CID based on list bytes.
factory
CID.parse(String cid)
Returns the new instance of CID based on string cid.
factory

Properties

bytes Uint8List
Returns an unmodifiable view of the byte representation of this CID.
no setter
codec Multicodec
Returns the multicodec of this CID.
no setter
hashCode int
The hash code for this object.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toAtprotoJson() Map<String, dynamic>
Returns the atproto data model JSON representation of this CID.
toJson() Map<String, dynamic>
Returns the JSON representation of this CID.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override