filecoinretrieval

package
v0.0.0-...-de8e8a8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT, Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event datatransfer.Event

type FilecoinExchange

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

func NewFilecoinExchange

func NewFilecoinExchange(node PaymentAPI, h host.Host, dataTransfer datatransfer.Manager) *FilecoinExchange

func (*FilecoinExchange) Close

func (fe *FilecoinExchange) Close()

cancel subscription to data transfer.

func (*FilecoinExchange) Code

func (fe *FilecoinExchange) Code() multicodec.Code

func (*FilecoinExchange) RequestData

func (fe *FilecoinExchange) RequestData(ctx context.Context, root ipld.Link, selector ipld.Node, routingProvider interface{}, routingPayload interface{}) <-chan exchange.EventData

type PaymentAPI

type PaymentAPI interface {
	GetPaychWithMinFunds(ctx context.Context, dest address.Address) (address.Address, error)
	AllocateLane(ctx context.Context, payCh address.Address) (uint64, error)
	CreateVoucher(ctx context.Context, payCh address.Address, vouch paych.SignedVoucher) (*VoucherCreateResult, error)
}

type State

type VoucherCreateResult

type VoucherCreateResult struct {
	// Voucher that was created, or nil if there was an error or if there
	// were insufficient funds in the channel
	Voucher *paych.SignedVoucher
	// Shortfall is the additional amount that would be needed in the channel
	// in order to be able to create the voucher
	Shortfall big.Int
}

Jump to

Keyboard shortcuts

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