multihash

package
v1.0.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package multihash contains functions for converting between multihashes and CIDs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CIDToMultihash

func CIDToMultihash(cid string) (string, error)

CIDToMultihash takes a V0 or V1 CID and converts it to a multibase-encoded (with base64url as the base) multihash.

func IsValidCID

func IsValidCID(value string) bool

IsValidCID returns true if value passed in is a valid CID.

func ToV0CID

func ToV0CID(multibaseEncodedMultihash string) (string, error)

ToV0CID takes a multibase-encoded multihash and converts it to a V0 CID.

func ToV1CID

func ToV1CID(multibaseEncodedMultihash string) (string, error)

ToV1CID takes a multibase-encoded multihash and converts it to a V1 CID.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL