types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublicKeyFromKeyPair

func PublicKeyFromKeyPair(kp keypair.KP) (ed25519.PublicKey, error)

Types

type Participant

type Participant struct {
	// Address is the stellar ParticipantAddress of the participant.
	Address keypair.FromAddress
	// PublicKey is the public key of the participant, which is used to verify signatures on channel state.
	PublicKey ed25519.PublicKey
}

Participant is the backend's version of the on-chain participant in the Perun smart contract on stellar.

func AsParticipant

func AsParticipant(address wallet.Address) *Participant

func NewParticipant

func NewParticipant(addr keypair.FromAddress, pk ed25519.PublicKey) *Participant

func ToParticipant

func ToParticipant(address wallet.Address) (*Participant, error)

func ZeroAddress

func ZeroAddress() (*Participant, error)

func (Participant) AddressString

func (p Participant) AddressString() string

func (Participant) Equal

func (p Participant) Equal(other wallet.Address) bool

func (Participant) MarshalBinary

func (p Participant) MarshalBinary() (data []byte, err error)

MarshalBinary encodes the participant into binary form.

func (Participant) PublicKeyString

func (p Participant) PublicKeyString() string

func (Participant) String

func (p Participant) String() string

String returns the string representation of the participant as [ParticipantAddress string]:[public key hex].

func (*Participant) UnmarshalBinary

func (p *Participant) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes the participant from binary form.

Jump to

Keyboard shortcuts

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