channel

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 11 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 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