paych

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0, MIT Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaychAPI

type PaychAPI struct {
	fx.In

	full.MpoolAPI
	full.WalletAPI
	full.ChainAPI

	PaychMgr *paychmgr.Manager
}

func (*PaychAPI) PaychAllocateLane

func (a *PaychAPI) PaychAllocateLane(ctx context.Context, ch address.Address) (uint64, error)

func (*PaychAPI) PaychCollect added in v0.5.0

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

func (*PaychAPI) PaychGet

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

func (*PaychAPI) PaychGetWaitReady added in v0.5.0

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

func (*PaychAPI) PaychList

func (a *PaychAPI) PaychList(ctx context.Context) ([]address.Address, error)

func (*PaychAPI) PaychNewPayment

func (a *PaychAPI) PaychNewPayment(ctx context.Context, from, to address.Address, vouchers []api.VoucherSpec) (*api.PaymentInfo, error)

func (*PaychAPI) PaychSettle added in v0.5.0

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

func (*PaychAPI) PaychStatus

func (a *PaychAPI) PaychStatus(ctx context.Context, pch address.Address) (*api.PaychStatus, error)

func (*PaychAPI) PaychVoucherAdd

func (a *PaychAPI) PaychVoucherAdd(ctx context.Context, ch address.Address, sv *paych.SignedVoucher, proof []byte, minDelta types.BigInt) (types.BigInt, error)

func (*PaychAPI) PaychVoucherCheckSpendable

func (a *PaychAPI) PaychVoucherCheckSpendable(ctx context.Context, ch address.Address, sv *paych.SignedVoucher, secret []byte, proof []byte) (bool, error)

func (*PaychAPI) PaychVoucherCheckValid

func (a *PaychAPI) PaychVoucherCheckValid(ctx context.Context, ch address.Address, sv *paych.SignedVoucher) error

func (*PaychAPI) PaychVoucherCreate

func (a *PaychAPI) PaychVoucherCreate(ctx context.Context, pch address.Address, amt types.BigInt, lane uint64) (*paych.SignedVoucher, error)

PaychVoucherCreate 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.

func (*PaychAPI) PaychVoucherList

func (a *PaychAPI) PaychVoucherList(ctx context.Context, pch address.Address) ([]*paych.SignedVoucher, error)

func (*PaychAPI) PaychVoucherSubmit

func (a *PaychAPI) PaychVoucherSubmit(ctx context.Context, ch address.Address, sv *paych.SignedVoucher) (cid.Cid, error)

Jump to

Keyboard shortcuts

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