Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainProvider ¶
type ChainProvider interface { ChainQuery NID() string Name() string Init(context.Context, string, kms.KMS) error Type() string Config() Config Listener(ctx context.Context, lastProcessedTx types.LastProcessedTx, blockInfo chan *types.BlockInfo) error Route(ctx context.Context, message *types.Message, callback types.TxResponseFunc) error ShouldReceiveMessage(ctx context.Context, message *types.Message) (bool, error) ShouldSendMessage(ctx context.Context, message *types.Message) (bool, error) SetLastSavedHeightFunc(func() uint64) MessageReceived(ctx context.Context, key *types.MessageKey) (bool, error) SetAdmin(context.Context, string) error FinalityBlock(ctx context.Context) uint64 GenerateMessages(ctx context.Context, messageKey *types.MessageKeyWithMessageHeight) ([]*types.Message, error) QueryBalance(ctx context.Context, addr string) (*types.Coin, error) NewKeystore(string) (string, error) RestoreKeystore(context.Context) error ImportKeystore(context.Context, string, string) (string, error) RevertMessage(context.Context, *big.Int) error GetFee(context.Context, string, bool) (uint64, error) SetFee(context.Context, string, *big.Int, *big.Int) error ClaimFee(context.Context) error }
type ChainQuery ¶
type CommonConfig ¶ added in v1.2.9
type CommonConfig struct { ChainName string `json:"-" yaml:"-"` RPCUrl string `json:"rpc-url" yaml:"rpc-url"` StartHeight uint64 `json:"start-height" yaml:"start-height"` Address string `json:"address" yaml:"address"` Contracts types.ContractConfigMap `json:"contracts" yaml:"contracts"` FinalityBlock uint64 `json:"finality-block" yaml:"finality-block"` NID string `json:"nid" yaml:"nid"` HomeDir string `json:"-" yaml:"-"` Disabled bool `json:"disabled" yaml:"disabled"` }
CommonConfig is the common configuration for all chain providers
func (*CommonConfig) Enabled ¶ added in v1.2.9
func (c *CommonConfig) Enabled() bool
Enabled returns true if the provider is enabled
func (*CommonConfig) GetWallet ¶ added in v1.2.9
func (pc *CommonConfig) GetWallet() string
func (*CommonConfig) SetWallet ¶ added in v1.2.9
func (pc *CommonConfig) SetWallet(addr string)
func (*CommonConfig) Validate ¶ added in v1.2.9
func (pc *CommonConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.