types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EthereumWalletAddressLength = 42
	PeerIdLength                = 46
)

Functions

func WrapperAlgorithmToProto

func WrapperAlgorithmToProto(
	algorithm WrapperAlgorithm,
) messageContentsProto.WelcomeWrapperAlgorithm

Convert a WrapperAlgorithm to its proto representation

Types

type PeerId

type PeerId peer.ID

func (PeerId) IsValid

func (peerId PeerId) IsValid() bool

func (PeerId) Raw

func (peerId PeerId) Raw() peer.ID

func (PeerId) String

func (peerId PeerId) String() string

type WalletAddr

type WalletAddr string

func (WalletAddr) IsValid

func (walletAddr WalletAddr) IsValid() bool

func (WalletAddr) String

func (walletAddr WalletAddr) String() string

type WrapperAlgorithm

type WrapperAlgorithm int16
const (
	AlgorithmCurve25519 WrapperAlgorithm = iota
	AlgorithmXwingMlkem768Draft6
)

DO NOT MODIFY THE ORDER OF THESE VALUES The values get saved in the DB as int16s, so changing the order will change the meaning of existing rows

func WrapperAlgorithmFromProto

func WrapperAlgorithmFromProto(
	proto messageContentsProto.WelcomeWrapperAlgorithm,
) WrapperAlgorithm

WelcomeWrapperAlgorithm converts the enum from the proto to a WrapperAlgorithm enum Defaults to Curve25519 if the proto is not set (older clients, which only support Curve25519)

Jump to

Keyboard shortcuts

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