wire

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

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

Account is a wire account.

func NewRandomAccount

func NewRandomAccount(rng *rand.Rand) *Account

NewRandomAccount generates a new random account.

func (*Account) Address

func (acc *Account) Address() wire.Address

Address returns the account's address.

type Address

type Address struct {
	*wallet.Address
}

Address is a wrapper for wallet.Address.

func NewAddress

func NewAddress() *Address

NewAddress returns a new address.

func NewRandomAddress

func NewRandomAddress(rng *rand.Rand) *Address

NewRandomAddress returns a new random peer address.

func (Address) Cmp

func (a Address) Cmp(b wire.Address) int

Cmp compares the byte representation of two addresses. For `a.Cmp(b)` returns -1 if a < b, 0 if a == b, 1 if a > b.

func (Address) Equal

func (a Address) Equal(b wire.Address) bool

Equal returns whether the two addresses are equal.

Jump to

Keyboard shortcuts

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