Documentation ¶
Index ¶
- type MainchainClient
- func (mc MainchainClient) BroadcastToMainchain(header types.WrkChainBlockHeader) error
- func (mc MainchainClient) GetRecordFees() string
- func (mc MainchainClient) GetWrkchainMeta() types.WrkChainMeta
- func (mc MainchainClient) GetWrkchainType() string
- func (mc *MainchainClient) SetRecordFees()
- func (mc *MainchainClient) SetWrkchainMetaData() error
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