ipns

package
v0.3.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair

func GenerateKeyPair() (crypto.PrivKey, crypto.PubKey, error)

func Publish

func Publish(shell *shell.Shell, rec *IPNSRecord) (string, error)

func Resolve

func Resolve(shell *shell.Shell, id string) (string, error)

Types

type IPNSRecord

type IPNSRecord struct {
	PubKey  libp2p_crypto.PubKey
	PrivKey libp2p_crypto.PrivKey
	Builder *IPNSURIBuilder
	Ttl     time.Duration
	Record  *pb.IpnsEntry
}

func New

func New(key crypto.PrivateKey) (*IPNSRecord, error)

func (*IPNSRecord) CreateRecord

func (ir *IPNSRecord) CreateRecord() error

type IPNSURIBuilder

type IPNSURIBuilder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *IPNSURIBuilder

func (*IPNSURIBuilder) BuildService

func (iub *IPNSURIBuilder) BuildService() did.Service

func (*IPNSURIBuilder) SetCid

func (iub *IPNSURIBuilder) SetCid(cid string)

func (*IPNSURIBuilder) String

func (iub *IPNSURIBuilder) String() string

Jump to

Keyboard shortcuts

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