channel

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Overview

Package channel contains the simulated channel backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppID added in v0.11.0

type AppID struct {
	*wallet.Address
}

AppID represents an app identifier.

func NewRandomAppID added in v0.11.0

func NewRandomAppID(rng *rand.Rand) AppID

NewRandomAppID generates a new random app identifier.

func (AppID) Equal added in v0.11.0

func (id AppID) Equal(b channel.AppID) bool

Equal returns whether the object is equal to the given object.

func (AppID) Key added in v0.11.0

func (id AppID) Key() channel.AppIDKey

Key returns the key representation of this app identifier.

type Asset

type Asset struct {
	ID int64
}

Asset simulates a `channel.Asset` by only containing an `ID`.

func NewRandomAsset

func NewRandomAsset(rng *rand.Rand) *Asset

NewRandomAsset returns a new random sim Asset.

func (Asset) Equal added in v0.9.0

func (a Asset) Equal(b channel.Asset) bool

Equal returns true iff the asset equals the given asset.

func (Asset) MarshalBinary added in v0.9.0

func (a Asset) MarshalBinary() ([]byte, error)

MarshalBinary marshals the address into its binary representation.

func (*Asset) UnmarshalBinary added in v0.9.0

func (a *Asset) UnmarshalBinary(data []byte) error

UnmarshalBinary unmarshals the asset from its binary representation.

Jump to

Keyboard shortcuts

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