mainchain

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: 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 MainchainClient

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

MainchainClient is an object which holds data required to communicate with Mainchain

func NewMainchainClient

func NewMainchainClient(wrkchainID uint64, cliCtx context.CLIContext, kb keys.Keybase, cdc *codec.Codec) MainchainClient

NewMainchainClient returns an initialised MainchainClient object

func (MainchainClient) BroadcastToMainchain

func (mc MainchainClient) BroadcastToMainchain(header types.WrkChainBlockHeader) error

BroadcastToMainchain generates and broadcasts a TX containing a MsgRecordWrkChainBlock message to Mainchain

func (MainchainClient) GetRecordFees

func (mc MainchainClient) GetRecordFees() string

GetRecordFees returns the current required fees to submit WRKChain block header hashes to Mainchain

func (MainchainClient) GetWrkchainMeta

func (mc MainchainClient) GetWrkchainMeta() types.WrkChainMeta

GetWrkchainMeta returns the WRKChain's metadata object

func (MainchainClient) GetWrkchainType

func (mc MainchainClient) GetWrkchainType() string

GetWrkchainType returns the configured WRKChain type, e.g. geth etc.

func (*MainchainClient) SetRecordFees

func (mc *MainchainClient) SetRecordFees()

SetRecordFees queries Mainchain's wrkchain/params endpoint to update the current fees required to pay for submitting WRKChain block header hashes. The result is used internally by the MainchainClient.txBroadcaster function

func (*MainchainClient) SetWrkchainMetaData

func (mc *MainchainClient) SetWrkchainMetaData() error

SetWrkchainMetaData queries Mainchain for the WRKChain metadata and stores it in the MainchainClient.wrkchainMeta object

Jump to

Keyboard shortcuts

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