paych

package
v1.22.0-rc2-beta Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0, MIT Imports: 9 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

	PaychMgr *paychmgr.Manager
}

func (*PaychAPI) PaychAllocateLane

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

func (*PaychAPI) PaychAvailableFunds added in v0.6.0

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

func (*PaychAPI) PaychAvailableFundsByFromTo added in v0.6.0

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

func (*PaychAPI) PaychCollect added in v0.5.0

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

func (*PaychAPI) PaychFund added in v1.15.1

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

func (*PaychAPI) PaychGet

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

func (*PaychAPI) PaychVoucherCheckSpendable

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

func (*PaychAPI) PaychVoucherCheckValid

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

func (*PaychAPI) PaychVoucherCreate

func (a *PaychAPI) PaychVoucherCreate(ctx context.Context, pch address.Address, amt types.BigInt, lane uint64) (*api.VoucherCreateResult, 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. If there are insufficient funds in the channel to create the voucher, returns a nil voucher and the shortfall.

func (*PaychAPI) PaychVoucherList

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

func (*PaychAPI) PaychVoucherSubmit

func (a *PaychAPI) PaychVoucherSubmit(ctx context.Context, ch address.Address, sv *paychtypes.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