adintro

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: Unlicense Imports: 13 Imported by: 0

Documentation

Overview

Package adintro defines a message type that provides information about an introduction point for a hidden service.

Index

Constants

View Source
const (
	Magic = "inad"
	Len   = adproto.Len + splice.AddrLen + 1 + slice.Uint16Len + slice.Uint32Len
)

Variables

This section is empty.

Functions

func IntroSplice

func IntroSplice(
	s *splice.Splice,
	id nonce.ID,
	key *crypto.Pub,
	ap *netip.AddrPort,
	relayRate uint32,
	port uint16,
	expires time.Time,
)

Types

type Ad struct {
	adproto.Ad
	AddrPort  *netip.AddrPort // Introducer address.
	Port      uint16          // Well known port of protocol available.
	RelayRate uint32          // mSat/Mb
}

func New added in v0.1.15

func New(
	id nonce.ID,
	key *crypto.Prv,
	ap *netip.AddrPort,
	relayRate uint32,
	port uint16,
	expires time.Time,
) (in *Ad)

func (*Ad) Decode

func (x *Ad) Decode(s *splice.Splice) (e error)

func (*Ad) Encode

func (x *Ad) Encode(s *splice.Splice) (e error)

func (*Ad) GetOnion

func (x *Ad) GetOnion() interface{}

func (*Ad) Len

func (x *Ad) Len() int

func (*Ad) Magic

func (x *Ad) Magic() string

func (*Ad) Splice

func (x *Ad) Splice(s *splice.Splice)

func (*Ad) SpliceNoSig

func (x *Ad) SpliceNoSig(s *splice.Splice)

func (*Ad) Validate

func (x *Ad) Validate() bool

Jump to

Keyboard shortcuts

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