types

package
v0.0.0-...-d3b4d27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPubRandCommitAndProofs

func GetPubRandCommitAndProofs(pubRandList []*btcec.FieldVal) ([]byte, []*merkle.Proof)

GetPubRandCommitAndProofs commits a list of public randomness and returns the commitment (i.e., Merkle root) and all Merkle proofs

Types

type BlockInfo

type BlockInfo struct {
	Height uint64
	Hash   []byte
}

type ChainKeyInfo

type ChainKeyInfo struct {
	Name       string
	Mnemonic   string
	AccAddress sdk.AccAddress
	PublicKey  *btcec.PublicKey
	PrivateKey *btcec.PrivateKey
}

type PubRandCommit

type PubRandCommit struct {
	StartHeight uint64 `json:"start_height"`
	NumPubRand  uint64 `json:"num_pub_rand"`
	Commitment  []byte `json:"commitment"`
}

func (*PubRandCommit) Validate

func (prc *PubRandCommit) Validate() error

Validate checks if the PubRandCommit structure is valid returns an error if not.

type StakingParams

type StakingParams struct {
	// K-deep
	ConfirmationTimeBlocks uint32
	// W-deep
	FinalizationTimeoutBlocks uint32

	// Minimum amount of tx fee (quantified in Satoshi) needed for the pre-signed slashing tx
	MinSlashingTxFeeSat btcutil.Amount

	// Bitcoin public keys of the covenant committee
	CovenantPks []*btcec.PublicKey

	// Address to which slashing transactions are sent
	SlashingPkScript []byte

	// Minimum number of signatures needed for the covenant multisignature
	CovenantQuorum uint32

	// The staked amount to be slashed, expressed as a decimal (e.g., 0.5 for 50%).
	SlashingRate sdkmath.LegacyDec

	// The minimum time for unbonding transaction timelock in BTC blocks
	MinUnbondingTime uint32
}

func (*StakingParams) MinimumUnbondingTime

func (p *StakingParams) MinimumUnbondingTime() uint32

MinimumUnbondingTime returns the minimum unbonding time. It is the bigger value from: - MinUnbondingTime - CheckpointFinalizationTimeout

type TxResponse

type TxResponse struct {
	TxHash string
	// JSON-encoded data, now it is for testing purposes only
	Events []byte
}

TxResponse handles the transaction response in the interface ConsumerController Not every consumer has Events thing in their response, so consumer client implementations need to care about Events field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL