Documentation
¶
Index ¶
- func Copy(from, to goctx.Context) goctx.Context
- func WithAppContext(ctx goctx.Context, app *AppContext) goctx.Context
- type AppContext
- func (a *AppContext) Config() config.Config
- func (a *AppContext) GetEnabledChains() []chains.Chain
- func (a *AppContext) GetKeygen() relayertypes.Keygen
- func (a *AppContext) PellCoreContext() *PellCoreContext
- func (a *AppContext) Update(keygen relayertypes.Keygen, newChains []chains.Chain, ...) error
- type PellCoreContext
- func (c *PellCoreContext) GetAllEVMChainParams() map[int64]*relayertypes.ChainParams
- func (c *PellCoreContext) GetCrossChainFlags() relayertypes.CrosschainFlags
- func (c *PellCoreContext) GetCurrentTssPubkey() string
- func (c *PellCoreContext) GetEVMChainParams(chainID int64) (*relayertypes.ChainParams, bool)
- func (c *PellCoreContext) GetEnabledChains() []chains.Chain
- func (c *PellCoreContext) GetKeygen() relayertypes.Keygen
- func (c *PellCoreContext) GetVerificationFlags() lightclienttypes.VerificationFlags
- func (c *PellCoreContext) IsInboundObservationEnabled(chainParams relayertypes.ChainParams) bool
- func (c *PellCoreContext) IsOutboundObservationEnabled(chainParams relayertypes.ChainParams) bool
- func (c *PellCoreContext) Update(keygen relayertypes.Keygen, newChains []chains.Chain, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy copies AppContext from one context to another (is present). This is useful when you want to drop timeouts and deadlines from the context (e.g. run something in another goroutine).
func WithAppContext ¶
func WithAppContext(ctx goctx.Context, app *AppContext) goctx.Context
WithAppContext applied AppContext to standard Go context.Context.
Types ¶
type AppContext ¶
type AppContext struct {
// contains filtered or unexported fields
}
AppContext contains global app structs like config, core context and logger
func FromContext ¶
func FromContext(ctx goctx.Context) (*AppContext, error)
FromContext extracts AppContext from context.Context
func NewAppContext ¶
func NewAppContext( config config.Config, logger zerolog.Logger, ) *AppContext
NewAppContext creates and returns new AppContext
func (*AppContext) Config ¶
func (a *AppContext) Config() config.Config
func (*AppContext) GetEnabledChains ¶
func (a *AppContext) GetEnabledChains() []chains.Chain
func (*AppContext) GetKeygen ¶
func (a *AppContext) GetKeygen() relayertypes.Keygen
func (*AppContext) PellCoreContext ¶
func (a *AppContext) PellCoreContext() *PellCoreContext
func (*AppContext) Update ¶
func (a *AppContext) Update( keygen relayertypes.Keygen, newChains []chains.Chain, evmChainParams map[int64]*relayertypes.ChainParams, tssPubKey string, crosschainFlags relayertypes.CrosschainFlags, verificationFlags lightclienttypes.VerificationFlags, init bool, logger zerolog.Logger, ) error
type PellCoreContext ¶
type PellCoreContext struct {
// contains filtered or unexported fields
}
PellCoreContext contains core context params these are initialized and updated at runtime at every height
func NewPellCoreContext ¶
func NewPellCoreContext(cfg config.Config) *PellCoreContext
NewPellCoreContext creates and returns new PellCoreContext it is initializing chain params from provided config
func (*PellCoreContext) GetAllEVMChainParams ¶
func (c *PellCoreContext) GetAllEVMChainParams() map[int64]*relayertypes.ChainParams
func (*PellCoreContext) GetCrossChainFlags ¶
func (c *PellCoreContext) GetCrossChainFlags() relayertypes.CrosschainFlags
func (*PellCoreContext) GetCurrentTssPubkey ¶
func (c *PellCoreContext) GetCurrentTssPubkey() string
func (*PellCoreContext) GetEVMChainParams ¶
func (c *PellCoreContext) GetEVMChainParams(chainID int64) (*relayertypes.ChainParams, bool)
func (*PellCoreContext) GetEnabledChains ¶
func (c *PellCoreContext) GetEnabledChains() []chains.Chain
func (*PellCoreContext) GetKeygen ¶
func (c *PellCoreContext) GetKeygen() relayertypes.Keygen
func (*PellCoreContext) GetVerificationFlags ¶
func (c *PellCoreContext) GetVerificationFlags() lightclienttypes.VerificationFlags
func (*PellCoreContext) IsInboundObservationEnabled ¶
func (c *PellCoreContext) IsInboundObservationEnabled(chainParams relayertypes.ChainParams) bool
IsInboundObservationEnabled returns true if the chain is supported and inbound flag is enabled
func (*PellCoreContext) IsOutboundObservationEnabled ¶
func (c *PellCoreContext) IsOutboundObservationEnabled(chainParams relayertypes.ChainParams) bool
IsOutboundObservationEnabled returns true if the chain is supported and outbound flag is enabled
func (*PellCoreContext) Update ¶
func (c *PellCoreContext) Update( keygen relayertypes.Keygen, newChains []chains.Chain, evmChainParams map[int64]*relayertypes.ChainParams, tssPubKey string, crosschainFlags relayertypes.CrosschainFlags, verificationFlags lightclienttypes.VerificationFlags, init bool, logger zerolog.Logger, ) error
Update updates core context and params for all chains this must be the ONLY function that writes to core context