client

package
v0.0.0-...-9a646ef Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainHead              = "Filecoin.ChainHead"
	ChainGetGenesis        = "Filecoin.ChainGetGenesis"
	ChainGetBlock          = "Filecoin.ChainGetBlock"
	ChainGetTipSetByHeight = "Filecoin.ChainGetTipSetByHeight"
	ChainGetBlockMessages  = "Filecoin.ChainGetBlockMessages"
	ChainGetMessage        = "Filecoin.ChainGetMessage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func Init

func Init(url, jwt string) (*APIClient, error)

func (*APIClient) GetBlock

func (c *APIClient) GetBlock(cid cid.Cid) *types.BlockHeader

func (*APIClient) GetBlockMessages

func (c *APIClient) GetBlockMessages(cid cid.Cid) *api.BlockMessages

func (*APIClient) GetByHeight

func (c *APIClient) GetByHeight(height abi.ChainEpoch) (*types.TipSet, bool)

func (*APIClient) GetGenesis

func (c *APIClient) GetGenesis() *types.TipSet

func (*APIClient) GetHead

func (c *APIClient) GetHead() *types.TipSet

func (*APIClient) GetMessage

func (c *APIClient) GetMessage(cid cid.Cid) *types.Message

type APIErr

type APIErr struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type APIRequest

type APIRequest struct {
	Id      int           `json:"id"`
	Version string        `json:"jsonrpc"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
}

type APIResponse

type APIResponse struct {
	Id      int     `json:"id"`
	Version string  `json:"jsonrpc"` // 2.0
	Error   *APIErr `json:"error"`
}

type Block

type Block struct {
	APIResponse
	Result *types.BlockHeader `json:"result"` // payload
}

type BlockMessages

type BlockMessages struct {
	APIResponse
	Result *api.BlockMessages `json:"result"` // payload
}

type Message

type Message struct {
	APIResponse
	Result *types.Message `json:"result"` // payload
}

type TipSet

type TipSet struct {
	APIResponse
	Result *types.TipSet `json:"result"` // payload
}

Jump to

Keyboard shortcuts

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