Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Cid.SSourceval v :
version:[ `Cidv0 | `Cidv1 | `Cidv2 | `Cidv3 ] ->
base:Multibase.Encoding.t ->
codec:Multicodec.t ->
hash:multihash ->
tBuild a CID, this performs no checks on any of the inputs
val version : t -> [ `Cidv0 | `Cidv1 | `Cidv2 | `Cidv3 ]The CID version.
val base : t -> Multibase.Encoding.tThe multibase encoding of the CID.
val codec : t -> Multicodec.tThe multicodec type of the data
val of_string :
string ->
(t, [ `Msg of string | `Unsupported of Multibase.Encoding.t ]) resultof_string s takes an encoded string s that is the CID and pulls out each of the parts that make it up.
val of_cstruct :
base:Multibase.Encoding.t ->
Cstruct.t ->
(t, [ `Msg of string | `Unsupported of Multibase.Encoding.t ]) resultof_cstruct ~base buf builds a value representing a CID. The buffer should not be encoded with the multibase encoding.
val to_string : t -> stringto_string t converts the CID to a multibase encoded string. Errors happen if the base encoding is not supported. This may raise an exception of the base encoding format is not supported.
val to_cstruct : t -> Cstruct.tto_cstruct t returns a buffer with the bytes corresponding to the unencoded CID.
val pp_human : Format.formatter -> t -> unitPretty-prints a CID.