Documentation
¶
Index ¶
- Variables
- func AddSupportToChooser(existing traversal.LinkTargetNodePrototypeChooser) traversal.LinkTargetNodePrototypeChooser
- func AppendEncode(enc []byte, inNode ipld.Node) ([]byte, error)
- func Decode(na ipld.NodeAssembler, in io.Reader) error
- func DecodeBytes(na ipld.NodeAssembler, src []byte) error
- func DecodeLightBlock(na ipld.NodeAssembler, lb types.LightBlock) error
- func Decoder(na ipld.NodeAssembler, r io.Reader) errordeprecated
- func Encode(node ipld.Node, w io.Writer) error
- func EncodeLightBlock(lb *types.LightBlock, inNode ipld.Node) error
- func Encoder(inNode ipld.Node, w io.Writer) errordeprecated
- func Marshal(inNode ipld.Node, w io.Writer) errordeprecated
- func Unmarshal(na ipld.NodeAssembler, r io.Reader) errordeprecated
Constants ¶
This section is empty.
Variables ¶
var ( MultiCodecType = uint64(cid.DagCBOR) // TODO: replace this with the chosen codec MultiHashType = uint64(multihash.SHA2_256) )
Functions ¶
func AddSupportToChooser ¶
func AddSupportToChooser(existing traversal.LinkTargetNodePrototypeChooser) traversal.LinkTargetNodePrototypeChooser
AddSupportToChooser takes an existing node prototype chooser and subs in LightBlock for the tendermint light block multicodec code.
func AppendEncode ¶
AppendEncode is like Encode, but it uses a destination buffer directly. This means less copying of bytes, and if the destination has enough capacity, fewer allocations.
func Decode ¶
Decode provides an IPLD codec decode interface for Cosmos LightBlock IPLDs. This function is registered via the go-ipld-prime link loader for multicodec code XXX when this package is invoked via init.
func DecodeBytes ¶
DecodeBytes is like Decode, but it uses an input buffer directly. Decode will grab or read all the bytes from an io.Reader anyway, so this can save having to copy the bytes or create a bytes.Buffer.
func DecodeLightBlock ¶
func DecodeLightBlock(na ipld.NodeAssembler, lb types.LightBlock) error
DecodeLightBlock is like Decode, but it uses an input tendermint LightBlock type
func Encode ¶
Encode provides an IPLD codec encode interface for Tendermint light block IPLDs. This function is registered via the go-ipld-prime link loader for multicodec code XXX when this package is invoked via init.
func EncodeLightBlock ¶
func EncodeLightBlock(lb *types.LightBlock, inNode ipld.Node) error
EncodeLightBlock packs the node into the provided Tendermint LightBlock
Types ¶
This section is empty.