Documentation
¶
Index ¶
- type FeeParams
- type FeeParamsQueryResponse
- type MainchainClient
- func (mc MainchainClient) BroadcastToMainchain(header wrkchains.WrkChainBlockHeader) error
- func (mc MainchainClient) GetRecordFees() string
- func (mc MainchainClient) GetWrkchainMeta() wrkchains.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 FeeParams ¶ added in v0.2.2
type FeeParams struct { Denom string `json:"denom"` FeeRecord string `json:"fee_record"` FeeRegister string `json:"fee_register"` }
FeeParams holds fee data from Mainchain params query for WRKChain fees
type FeeParamsQueryResponse ¶ added in v0.2.2
type FeeParamsQueryResponse struct { Height string `json:"height"` Result FeeParams `json:"result"` }
FeeParamsQueryResponse is is a structure which holds Mainchain query data specifically for WRKChain module params queries
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(cliCtx context.CLIContext, kb keys.Keybase, cdc *codec.Codec, log log.Logger) *MainchainClient
NewMainchainClient returns an initialised MainchainClient object
func (MainchainClient) BroadcastToMainchain ¶
func (mc MainchainClient) BroadcastToMainchain(header wrkchains.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() wrkchains.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