flowch

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowchAPI

type FlowchAPI struct {
	fx.In

	FlowchMgr *flowchmgr.Manager
}

func (*FlowchAPI) FlowchAllocateLane

func (a *FlowchAPI) FlowchAllocateLane(ctx context.Context, ch address.Address) (uint64, error)

func (*FlowchAPI) FlowchAvailableFunds

func (a *FlowchAPI) FlowchAvailableFunds(ctx context.Context, ch address.Address) (*api.ChannelAvailableFunds, error)

func (*FlowchAPI) FlowchAvailableFundsByFromTo

func (a *FlowchAPI) FlowchAvailableFundsByFromTo(ctx context.Context, from, to address.Address) (*api.ChannelAvailableFunds, error)

func (*FlowchAPI) FlowchCollect

func (a *FlowchAPI) FlowchCollect(ctx context.Context, addr address.Address) (cid.Cid, error)

func (*FlowchAPI) FlowchGet

func (a *FlowchAPI) FlowchGet(ctx context.Context, from, to address.Address, amt types.BigInt) (*api.ChannelInfo, error)

func (*FlowchAPI) FlowchGetWaitReady

func (a *FlowchAPI) FlowchGetWaitReady(ctx context.Context, sentinel cid.Cid) (address.Address, error)

func (*FlowchAPI) FlowchList

func (a *FlowchAPI) FlowchList(ctx context.Context) ([]address.Address, error)

func (*FlowchAPI) FlowchNewPayment

func (a *FlowchAPI) FlowchNewPayment(ctx context.Context, from, to address.Address, vouchers []api.FlowVoucherSpec) (*api.FlowInfo, error)

func (*FlowchAPI) FlowchSettle

func (a *FlowchAPI) FlowchSettle(ctx context.Context, addr address.Address) (cid.Cid, error)

func (*FlowchAPI) FlowchStatus

func (a *FlowchAPI) FlowchStatus(ctx context.Context, pch address.Address) (*api.FlowchStatus, error)

func (*FlowchAPI) FlowchVoucherAdd

func (a *FlowchAPI) FlowchVoucherAdd(ctx context.Context, ch address.Address, sv *flowch.SignedVoucher, proof []byte, minDelta types.BigInt) (types.BigInt, error)

func (*FlowchAPI) FlowchVoucherCheckSpendable

func (a *FlowchAPI) FlowchVoucherCheckSpendable(ctx context.Context, ch address.Address, sv *flowch.SignedVoucher, secret []byte, proof []byte) (bool, error)

func (*FlowchAPI) FlowchVoucherCheckValid

func (a *FlowchAPI) FlowchVoucherCheckValid(ctx context.Context, ch address.Address, sv *flowch.SignedVoucher) error

func (*FlowchAPI) FlowchVoucherCreate

func (a *FlowchAPI) FlowchVoucherCreate(ctx context.Context, pch address.Address, amt types.BigInt, lane uint64) (*api.FlowVoucherCreateResult, error)

FlowchVoucherCreate creates a new signed voucher on the given payment channel with the given lane and amount. The value passed in is exactly the value that will be used to create the voucher, so if previous vouchers exist, the actual additional value of this voucher will only be the difference between the two. If there are insufficient funds in the channel to create the voucher, returns a nil voucher and the shortfall.

func (*FlowchAPI) FlowchVoucherList

func (a *FlowchAPI) FlowchVoucherList(ctx context.Context, pch address.Address) ([]*flowch.SignedVoucher, error)

func (*FlowchAPI) FlowchVoucherSubmit

func (a *FlowchAPI) FlowchVoucherSubmit(ctx context.Context, ch address.Address, sv *flowch.SignedVoucher, secret []byte, proof []byte) (cid.Cid, error)

Jump to

Keyboard shortcuts

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