paych

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0, MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaychAPI added in v1.1.0

type PaychAPI struct {
	// contains filtered or unexported fields
}

func NewPaychAPI added in v1.1.0

func NewPaychAPI(p *paychmgr.Manager) *PaychAPI

func (*PaychAPI) PaychAllocateLane added in v1.1.0

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

func (*PaychAPI) PaychAvailableFunds added in v1.1.0

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

func (*PaychAPI) PaychAvailableFundsByFromTo added in v1.1.0

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

func (*PaychAPI) PaychCollect added in v1.1.0

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

func (*PaychAPI) PaychFund added in v1.6.0

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

func (*PaychAPI) PaychGet added in v1.1.0

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

func (*PaychAPI) PaychGetWaitReady added in v1.1.0

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

func (*PaychAPI) PaychList added in v1.1.0

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

func (*PaychAPI) PaychNewPayment added in v1.1.0

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

func (*PaychAPI) PaychSettle added in v1.1.0

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

func (*PaychAPI) PaychStatus added in v1.1.0

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

func (*PaychAPI) PaychVoucherAdd added in v1.1.0

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

func (*PaychAPI) PaychVoucherCheckSpendable added in v1.1.0

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

func (*PaychAPI) PaychVoucherCheckValid added in v1.1.0

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

func (*PaychAPI) PaychVoucherCreate added in v1.1.0

func (a *PaychAPI) PaychVoucherCreate(ctx context.Context, pch address.Address, amt big.Int, lane uint64) (*types.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 added in v1.1.0

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

func (*PaychAPI) PaychVoucherSubmit added in v1.1.0

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

type PaychSubmodule

type PaychSubmodule struct {
	// contains filtered or unexported fields
}

PaychSubmodule support paych related functions, including paych construction, extraction, query and other functions

func NewPaychSubmodule

func NewPaychSubmodule(ctx context.Context, ds datastore.Batching, params *paychmgr.ManagerParams) (*PaychSubmodule, error)

PaychSubmodule enhances the `Node` with paych capabilities.

func (*PaychSubmodule) API

func (ps *PaychSubmodule) API() v1api.IPaychan

API create a new paych implement

func (*PaychSubmodule) Start

func (ps *PaychSubmodule) Start(ctx context.Context) error

func (*PaychSubmodule) Stop

func (ps *PaychSubmodule) Stop()

func (*PaychSubmodule) V0API added in v0.9.7

func (ps *PaychSubmodule) V0API() v0api.IPaychan

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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