Documentation ¶
Index ¶
Constants ¶
const ( DefaultCheckpointCacheMaxEntries = 100 DefaultPollingIntervalSeconds = 60 // in seconds DefaultResendIntervalSeconds = 1800 // 30 minutes )
const (
// DefaultGRPCAddress defines the default address to bind the gRPC server to.
DefaultGRPCAddress = "0.0.0.0:8080"
)
const (
// DefaultGRPCWebAddress defines the default address to bind the gRPC-web server to.
DefaultGRPCWebAddress = "0.0.0.0:8081"
)
Variables ¶
var ModuleBasics = append( client.ModuleBasics, epoching.AppModuleBasic{}, checkpointing.AppModuleBasic{}, btclightclient.AppModuleBasic{}, btccheckpoint.AppModuleBasic{}, )
ModuleBasics is the list of modules used in Babylon necessary for serialising/deserialising Babylon messages/queries
Functions ¶
func DefaultConfigFile ¶
func DefaultConfigFile() string
func WriteSample ¶
func WriteSample() error
Types ¶
type BTCConfig ¶
type BTCConfig struct { DisableClientTLS bool `mapstructure:"no-client-tls"` CAFile string `mapstructure:"ca-file"` Endpoint string `mapstructure:"endpoint"` WalletEndpoint string `mapstructure:"wallet-endpoint"` WalletPassword string `mapstructure:"wallet-password"` WalletName string `mapstructure:"wallet-name"` WalletCAFile string `mapstructure:"wallet-ca-file"` WalletLockTime int64 `mapstructure:"wallet-lock-time"` // time duration in which the wallet remains unlocked, in seconds TxFee btcutil.Amount `mapstructure:"tx-fee"` // BTC tx fee, in BTC NetParams string `mapstructure:"net-params"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` ReconnectAttempts int `mapstructure:"reconnect-attempts"` SubscriptionMode types.SupportedSubscriptionMode `mapstructure:"subscription-mode"` ZmqEndpoint string `mapstructure:"zmq-endpoint"` }
BTCConfig defines configuration for the Bitcoin client
func DefaultBTCConfig ¶
func DefaultBTCConfig() BTCConfig
type BabylonConfig ¶
type BabylonConfig struct { Key string `mapstructure:"key"` ChainID string `mapstructure:"chain-id"` RPCAddr string `mapstructure:"rpc-addr"` GRPCAddr string `mapstructure:"grpc-addr"` AccountPrefix string `mapstructure:"account-prefix"` KeyringBackend string `mapstructure:"keyring-backend"` GasAdjustment float64 `mapstructure:"gas-adjustment"` GasPrices string `mapstructure:"gas-prices"` KeyDirectory string `mapstructure:"key-directory"` Debug bool `mapstructure:"debug"` Timeout time.Duration `mapstructure:"timeout"` BlockTimeout time.Duration `mapstructure:"block-timeout"` OutputFormat string `mapstructure:"output-format"` SignModeStr string `mapstructure:"sign-mode"` SubmitterAddress string `mapstructure:"submitter-address"` TagIdx string `mapstructure:"tag-idx"` Modules []module.AppModuleBasic `mapstructure:"-"` }
BabylonConfig defines configuration for the Babylon client adapted from https://github.com/strangelove-ventures/lens/blob/v0.5.1/client/config.go
func DefaultBabylonConfig ¶
func DefaultBabylonConfig() BabylonConfig
func (*BabylonConfig) Unwrap ¶
func (cfg *BabylonConfig) Unwrap() *client.ChainClientConfig
func (*BabylonConfig) Validate ¶
func (cfg *BabylonConfig) Validate() error
type CommonConfig ¶
type CommonConfig struct { // Backoff interval for the first retry. RetrySleepTime time.Duration `mapstructure:"retry-sleep-time"` // Maximum backoff interval between retries. Exponential backoff leads to interval increase. // This value is the cap of the interval, when exceeded the retries stop. MaxRetrySleepTime time.Duration `mapstructure:"max-retry-sleep-time"` }
CommonConfig defines the server's basic configuration
func DefaultCommonConfig ¶
func DefaultCommonConfig() CommonConfig
func (*CommonConfig) Validate ¶
func (cfg *CommonConfig) Validate() error
type Config ¶
type Config struct { Common CommonConfig `mapstructure:"common"` BTC BTCConfig `mapstructure:"btc"` Babylon BabylonConfig `mapstructure:"babylon"` GRPC GRPCConfig `mapstructure:"grpc"` GRPCWeb GRPCWebConfig `mapstructure:"grpc-web"` Submitter SubmitterConfig `mapstructure:"submitter"` Reporter ReporterConfig `mapstructure:"reporter"` }
Config defines the server's top level configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns server's default configuration.
type GRPCConfig ¶
type GRPCConfig struct { OneTimeTLSKey bool `mapstructure:"onetime-tls-key"` RPCKeyFile string `mapstructure:"rpc-key"` RPCCertFile string `mapstructure:"rpc-cert"` Endpoints []string `mapstructure:"endpoints"` }
GRPCConfig defines configuration for the gRPC server.
func DefaultGRPCConfig ¶
func DefaultGRPCConfig() GRPCConfig
func (*GRPCConfig) Validate ¶
func (cfg *GRPCConfig) Validate() error
type GRPCWebConfig ¶
type GRPCWebConfig struct {
Placeholder string `mapstructure:"placeholder"`
}
GRPCWebConfig defines configuration for the gRPC-web server.
func DefaultGRPCWebConfig ¶
func DefaultGRPCWebConfig() GRPCWebConfig
func (*GRPCWebConfig) Validate ¶
func (cfg *GRPCWebConfig) Validate() error
type ReporterConfig ¶
type ReporterConfig struct {
NetParams string `mapstructure:"netparams"` // should be mainnet|testnet|simnet|signet
}
ReporterConfig defines configuration for the reporter.
func DefaultReporterConfig ¶
func DefaultReporterConfig() ReporterConfig
func (*ReporterConfig) Validate ¶
func (cfg *ReporterConfig) Validate() error
type SubmitterConfig ¶
type SubmitterConfig struct { NetParams string `mapstructure:"netparams"` // should be mainnet|testnet|simnet|signet BufferSize uint `mapstructure:"buffer-size"` // buffer for raw checkpoints PollingIntervalSeconds uint `mapstructure:"polling-interval-seconds"` ResendIntervalSeconds uint `mapstructure:"resend-interval-seconds"` }
SubmitterConfig defines configuration for the gRPC-web server.
func DefaultSubmitterConfig ¶
func DefaultSubmitterConfig() SubmitterConfig
func (*SubmitterConfig) GetTag ¶
func (cfg *SubmitterConfig) GetTag(tagIdx uint8) btctxformatter.BabylonTag
func (*SubmitterConfig) GetVersion ¶
func (cfg *SubmitterConfig) GetVersion() btctxformatter.FormatVersion
func (*SubmitterConfig) Validate ¶
func (cfg *SubmitterConfig) Validate() error