View Source Xander.ChainSync.Response (Xander v0.3.0)
This module is responsible for decoding CBOR responses and parsing them into Ouroboros-specific structs.
Summary
Functions
Decodes a CBOR payload and returns a Ouroboros-specific struct. This function should be used in favor of using CBOR.decode/1 from the CBOR hex package directly.
Functions
@spec decode(cbor :: binary()) :: {:ok, Xander.ChainSync.Response.AwaitReply.t() | Xander.ChainSync.Response.RollForward.t() | Xander.ChainSync.Response.RollBackward.t() | Xander.ChainSync.Response.IntersectFound.t()} | {:error, any()}
Decodes a CBOR payload and returns a Ouroboros-specific struct. This function should be used in favor of using CBOR.decode/1 from the CBOR hex package directly.