filclient

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: 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 FilClient

type FilClient interface {
	io.Closer

	VerifyBidder(bidderSig []byte, bidderID peer.ID, storageProviderID string) (bool, error)
	GetChainHeight() (uint64, error)
}

FilClient provides functionalities to verify bidders.

type LotusFilClient

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

LotusFilClient is a FilClient backed by Lotus.

func New

func New(lotusGatewayURL string, fakeMode bool) (*LotusFilClient, error)

New returns a new LotusFilClient.

func (*LotusFilClient) Close

func (fc *LotusFilClient) Close() error

Close the client.

func (*LotusFilClient) GetChainHeight

func (fc *LotusFilClient) GetChainHeight() (uint64, error)

GetChainHeight returns the current chain height in epochs.

func (*LotusFilClient) VerifyBidder

func (fc *LotusFilClient) VerifyBidder(
	bidderSig []byte,
	bidderID peer.ID,
	storageProviderIDStr string) (bool, error)

VerifyBidder ensures that the wallet address authorized the use of bidder peer.ID to make bids. Miner's authorize a bidding peer.ID by signing it with a wallet address private key.

Jump to

Keyboard shortcuts

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