paych

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0, MIT Imports: 11 Imported by: 10

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 *paych.Manager
}

func (*PaychAPI) PaychAllocateLane

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

func (*PaychAPI) PaychClose

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

func (*PaychAPI) PaychGet

func (a *PaychAPI) PaychGet(ctx context.Context, from, to address.Address, ensureFunds types.BigInt) (*api.ChannelInfo, 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) 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 *types.SignedVoucher, proof []byte, minDelta types.BigInt) (types.BigInt, error)

func (*PaychAPI) PaychVoucherCheckSpendable

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

func (*PaychAPI) PaychVoucherCheckValid

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

func (*PaychAPI) PaychVoucherCreate

func (a *PaychAPI) PaychVoucherCreate(ctx context.Context, pch address.Address, amt types.BigInt, lane uint64) (*types.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) ([]*types.SignedVoucher, error)

func (*PaychAPI) PaychVoucherSubmit

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

Jump to

Keyboard shortcuts

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