Documentation
¶
Index ¶
- Constants
- func ContainRestrictedAddress(addrs ...string) bool
- func GetPath(inputPath string) string
- func GetPellConnectorABI() string
- func LoadComplianceConfig(cfg Config)
- func Save(config *Config, path string) error
- type BTCConfig
- type ClientConfiguration
- type ComplianceConfig
- type Config
- func (c Config) GetAllEVMConfigs() map[int64]EVMConfig
- func (c Config) GetBTCConfig() (BTCConfig, bool)
- func (c Config) GetEVMConfig(chainID int64) (EVMConfig, bool)
- func (c *Config) GetKeyringBackend() KeyringBackend
- func (c Config) GetRestrictedAddressBook() map[string]bool
- func (c Config) String() string
- type EVMConfig
- type KeyringBackend
Constants ¶
View Source
const ( BtcConfirmationCount = 1 DevEthConfirmationCount = 2 // TssTestPrivkey is the private key of the TSS address // #nosec G101 - used for testing only TssTestPrivkey = "2082bc9775d6ee5a05ef221a9d1c00b3cc3ecb274a4317acc0a182bc1e05d1bb" TssTestAddress = "0xE80B6467863EbF8865092544f441da8fD3cF6074" // Number of blocks to scan per period under normal conditions DefaultBlocksPerPeriod = 100 // MaxLatestIndexedBlockGap defines the maximum allowed gap between the current block // and the latest indexed block height on chain. The scanning process will stop when // this threshold is exceeded to prevent invalid votes. DefaultMaxLatestIndexedBlockGap = uint64(2000) )
View Source
const (
DefaultMaxMsgLen uint8 = 13
)
Variables ¶
This section is empty.
Functions ¶
func ContainRestrictedAddress ¶
ContainRestrictedAddress returns true if any one of the addresses is restricted Note: the addrs can contains both ETH and BTC addresses
func GetPellConnectorABI ¶
func GetPellConnectorABI() string
func LoadComplianceConfig ¶
func LoadComplianceConfig(cfg Config)
Types ¶
type ClientConfiguration ¶
type ClientConfiguration struct {
ChainHost string `json:"chain_host" mapstructure:"chain_host"`
ChainRPC string `json:"chain_rpc" mapstructure:"chain_rpc"`
ChainHomeFolder string `json:"chain_home_folder" mapstructure:"chain_home_folder"`
SignerName string `json:"signer_name" mapstructure:"signer_name"`
SignerPasswd string `json:"signer_passwd"`
HsmMode bool `json:"hsm_mode"`
}
ClientConfiguration is a subset of pellclient config that is used by pellbridge
type ComplianceConfig ¶
type Config ¶
type Config struct {
Peer string `json:"Peer"`
PublicIP string `json:"PublicIP"`
LogFormat string `json:"LogFormat"`
LogLevel int8 `json:"LogLevel"`
LogSampler bool `json:"LogSampler"`
PreParamsPath string `json:"PreParamsPath"`
PellCoreHome string `json:"PellCoreHome"`
ChainID string `json:"ChainID"`
PellCoreURL string `json:"PellCoreURL"`
AuthzGranter string `json:"AuthzGranter"`
AuthzHotkey string `json:"AuthzHotkey"`
P2PDiagnostic bool `json:"P2PDiagnostic"`
ConfigUpdateTicker uint64 `json:"ConfigUpdateTicker"`
P2PDiagnosticTicker uint64 `json:"P2PDiagnosticTicker"`
TssPath string `json:"TssPath"`
TestTssKeysign bool `json:"TestTssKeysign"`
KeyringBackend KeyringBackend `json:"KeyringBackend"`
HsmMode bool `json:"HsmMode"`
HsmHotKey string `json:"HsmHotKey"`
EVMChainConfigs map[int64]EVMConfig `json:"EVMChainConfigs"`
BitcoinConfig BTCConfig `json:"BitcoinConfig"`
PellTxMsgLength uint8 `json:"PellTxMsgLength"`
// compliance config
ComplianceConfig ComplianceConfig `json:"ComplianceConfig"`
// contains filtered or unexported fields
}
Config is the config for PellClient TODO: use snake case for json fields
func (Config) GetAllEVMConfigs ¶
func (Config) GetBTCConfig ¶
func (*Config) GetKeyringBackend ¶
func (c *Config) GetKeyringBackend() KeyringBackend
func (Config) GetRestrictedAddressBook ¶
GetRestrictedAddressBook returns a map of restricted addresses Note: the restricted address book contains both ETH and BTC addresses
type EVMConfig ¶
type EVMConfig struct {
Chain chains.Chain
Endpoint string
ForceStartHeight uint64 // If it is not equal to 0. scan starts from this height
// MaxLatestIndexedBlockGap defines the maximum allowed gap between the current block
// and the latest indexed block height on chain. The scanning process will stop when
// this threshold is exceeded to prevent invalid votes.
MaxLatestIndexedBlockGap uint64
}
type KeyringBackend ¶
type KeyringBackend string
KeyringBackend is the type of keyring backend to use for the hotkey
const ( KeyringBackendUndefined KeyringBackend = "" KeyringBackendTest KeyringBackend = "test" KeyringBackendFile KeyringBackend = "file" )
Click to show internal directories.
Click to hide internal directories.