utils

package
v0.0.0-...-4181ed6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSHA256HexToCIDv1

func ConvertSHA256HexToCIDv1(hashHex string) (string, error)

ConvertSHA256HexToCIDv1 converts given SHA256 digest hex to CID v1.

func IsCIDv1

func IsCIDv1(h string) bool

IsCIDv1 checks if the hash is an IPFS CIDv1 hash.

func IsDigestHex

func IsDigestHex(digest string) bool

IsDigestHex checks if the digest is a 64-byte blob digest hex.

func IsIPFSPath

func IsIPFSPath(path string) bool

IsIPFSPath checks if given address is an IPFS content path.

func ToCIDv1

func ToCIDv1(cidV0 string) (string, error)

ToCIDv1 converts IPFS CIDv0 to v1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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