fcrlotuswrapper

package
v0.0.0-...-12ab560 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fcrlotuswrapper - is a wrapper API over FileCoin Lotus API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address   string
	AuthToken string
}

func (*Config) NewFullNodeAPI

func (c *Config) NewFullNodeAPI(ctx context.Context) (*LotusNodeApi, error)

NewFullNodeAPI json-rpc api to lotus.

type LotusNodeApi

type LotusNodeApi struct {
	Methods struct {

		// ChainHead returns the current head of the chain.
		ChainHead func(context.Context) (*types.TipSet, error)

		// WalletNew creates a new address in the wallet with the given sigType.
		// Available key types: bls, secp256k1, secp256k1-ledger
		// Support for numerical types: 1 - secp256k1, 2 - BLS is deprecated
		WalletNew func(context.Context, types.KeyType) (address.Address, error)

		// MpoolPushMessage atomically assigns a nonce, signs, and pushes a message
		// to mempool.
		// maxFee is only used when GasFeeCap/GasPremium fields aren't specified
		//
		// When maxFee is set to 0, MpoolPushMessage will guess appropriate fee
		// based on current chain conditions
		MpoolPushMessage func(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error)
	}
	// contains filtered or unexported fields
}

func (*LotusNodeApi) ChainHead

func (l *LotusNodeApi) ChainHead(ctx context.Context) (*types.TipSet, error)

func (*LotusNodeApi) Close

func (l *LotusNodeApi) Close()

func (*LotusNodeApi) MpoolPushMessage

func (l *LotusNodeApi) MpoolPushMessage(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error)

func (*LotusNodeApi) WalletNew

func (l *LotusNodeApi) WalletNew(ctx context.Context, kt types.KeyType) (address.Address, error)

type NodeApi

type NodeApi interface {
	ChainHead(context.Context) (*types.TipSet, error)

	WalletNew(context.Context, types.KeyType) (address.Address, error)

	MpoolPushMessage(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error)
}

Jump to

Keyboard shortcuts

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