heyfil

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0, MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultHeyfilEndpoint = "https://heyfil.prod.cid.contact/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Heyfil

type Heyfil struct {
	Endpoint        string
	TranslatePeerId bool
	TranslateFaddr  bool
}

func (Heyfil) CanTranslate

func (h Heyfil) CanTranslate(s string) bool

func (Heyfil) Translate

func (h Heyfil) Translate(s string) (string, error)

Translate will translate an input string to a full multiaddr if the string appears to be a Filecoin SP actor address or a peer id using the Heyfil service. If the input string is not a Filecoin SP actor address or a peer id, it will be returned as-is.

func (Heyfil) TranslateAll

func (h Heyfil) TranslateAll(ss []string) ([]string, error)

TranslateAll performs a Translate on all strings in the input slice. If none of the strings can be translated, the input slice is returned as-is.

Jump to

Keyboard shortcuts

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