conway

package
v0.103.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EraIdConway   = 6
	EraNameConway = "Conway"

	BlockTypeConway = 7

	BlockHeaderTypeConway = 6

	TxTypeConway = 6
)

Variables

View Source
var (
	EraConway = common.Era{
		Id:   EraIdConway,
		Name: EraNameConway,
	}
)

Functions

This section is empty.

Types

type ConwayBlock

type ConwayBlock struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	Header                 *ConwayBlockHeader
	TransactionBodies      []ConwayTransactionBody
	TransactionWitnessSets []ConwayTransactionWitnessSet
	TransactionMetadataSet map[uint]*cbor.LazyValue
	InvalidTransactions    []uint
}

func NewConwayBlockFromCbor

func NewConwayBlockFromCbor(data []byte) (*ConwayBlock, error)

func (*ConwayBlock) BlockBodySize

func (b *ConwayBlock) BlockBodySize() uint64

func (*ConwayBlock) BlockNumber

func (b *ConwayBlock) BlockNumber() uint64

func (*ConwayBlock) Era

func (b *ConwayBlock) Era() common.Era

func (*ConwayBlock) Hash

func (b *ConwayBlock) Hash() string

func (*ConwayBlock) IssuerVkey

func (b *ConwayBlock) IssuerVkey() common.IssuerVkey

func (*ConwayBlock) SlotNumber

func (b *ConwayBlock) SlotNumber() uint64

func (*ConwayBlock) Transactions

func (b *ConwayBlock) Transactions() []common.Transaction

func (ConwayBlock) Type added in v0.94.0

func (ConwayBlock) Type() int

func (*ConwayBlock) UnmarshalCBOR

func (b *ConwayBlock) UnmarshalCBOR(cborData []byte) error

func (*ConwayBlock) Utxorpc

func (b *ConwayBlock) Utxorpc() *utxorpc.Block

type ConwayBlockHeader

type ConwayBlockHeader struct {
	babbage.BabbageBlockHeader
}

func NewConwayBlockHeaderFromCbor

func NewConwayBlockHeaderFromCbor(data []byte) (*ConwayBlockHeader, error)

func (*ConwayBlockHeader) Era

func (h *ConwayBlockHeader) Era() common.Era

type ConwayGenesis added in v0.96.0

type ConwayGenesis struct {
	PoolVotingThresholds       ConwayGenesisPoolVotingThresholds
	DRepVotingThresholds       ConwayGenesisDRepVotingThresholds
	MinCommitteeSize           uint   `json:"committeeMinSize"`
	CommitteeTermLimit         uint64 `json:"committeeMaxTermLength"`
	GovActionValidityPeriod    uint64 `json:"govActionLifetime"`
	GovActionDeposit           uint64
	DRepDeposit                uint64 `json:"dRepDeposit"`
	DRepInactivityPeriod       uint64 `json:"dRepActivity"`
	MinFeeRefScriptCostPerByte *common.GenesisRat
	PlutusV3CostModel          []int64 `json:"plutusV3CostModel"`
	Constitution               ConwayGenesisConstitution
	Committee                  ConwayGenesisCommittee
}

func NewConwayGenesisFromFile added in v0.96.0

func NewConwayGenesisFromFile(path string) (ConwayGenesis, error)

func NewConwayGenesisFromReader added in v0.96.0

func NewConwayGenesisFromReader(r io.Reader) (ConwayGenesis, error)

type ConwayGenesisCommittee added in v0.96.0

type ConwayGenesisCommittee struct {
	Members   map[string]int
	Threshold map[string]int
}

type ConwayGenesisConstitution added in v0.96.0

type ConwayGenesisConstitution struct {
	Anchor ConwayGenesisConstitutionAnchor
	Script string
}

type ConwayGenesisConstitutionAnchor added in v0.96.0

type ConwayGenesisConstitutionAnchor struct {
	DataHash string
	Url      string
}

type ConwayGenesisDRepVotingThresholds added in v0.96.0

type ConwayGenesisDRepVotingThresholds struct {
	MotionNoConfidence    *common.GenesisRat
	CommitteeNormal       *common.GenesisRat
	CommitteeNoConfidence *common.GenesisRat
	UpdateToConstitution  *common.GenesisRat
	HardForkInitiation    *common.GenesisRat
	PpNetworkGroup        *common.GenesisRat
	PpEconomicGroup       *common.GenesisRat
	PpTechnicalGroup      *common.GenesisRat
	PpGovGroup            *common.GenesisRat
	TreasuryWithdrawal    *common.GenesisRat
}

type ConwayGenesisPoolVotingThresholds added in v0.96.0

type ConwayGenesisPoolVotingThresholds struct {
	CommitteeNormal       *common.GenesisRat
	CommitteeNoConfidence *common.GenesisRat
	HardForkInitiation    *common.GenesisRat
	MotionNoConfidence    *common.GenesisRat
	PpSecurityGroup       *common.GenesisRat
}

type ConwayProtocolParameterUpdate

type ConwayProtocolParameterUpdate struct {
	babbage.BabbageProtocolParameterUpdate
	PoolVotingThresholds       *PoolVotingThresholds `cbor:"25,keyasint"`
	DRepVotingThresholds       *DRepVotingThresholds `cbor:"26,keyasint"`
	MinCommitteeSize           *uint                 `cbor:"27,keyasint"`
	CommitteeTermLimit         *uint64               `cbor:"28,keyasint"`
	GovActionValidityPeriod    *uint64               `cbor:"29,keyasint"`
	GovActionDeposit           *uint64               `cbor:"30,keyasint"`
	DRepDeposit                *uint64               `cbor:"31,keyasint"`
	DRepInactivityPeriod       *uint64               `cbor:"32,keyasint"`
	MinFeeRefScriptCostPerByte *cbor.Rat             `cbor:"33,keyasint"`
}

func (*ConwayProtocolParameterUpdate) UnmarshalCBOR added in v0.99.0

func (u *ConwayProtocolParameterUpdate) UnmarshalCBOR(data []byte) error

type ConwayProtocolParameters

type ConwayProtocolParameters struct {
	cbor.StructAsArray
	MinFeeA                    uint
	MinFeeB                    uint
	MaxBlockBodySize           uint
	MaxTxSize                  uint
	MaxBlockHeaderSize         uint
	KeyDeposit                 uint
	PoolDeposit                uint
	MaxEpoch                   uint
	NOpt                       uint
	A0                         *cbor.Rat
	Rho                        *cbor.Rat
	Tau                        *cbor.Rat
	ProtocolVersion            common.ProtocolParametersProtocolVersion
	MinPoolCost                uint64
	AdaPerUtxoByte             uint64
	CostModels                 map[uint][]int64
	ExecutionCosts             common.ExUnitPrice
	MaxTxExUnits               common.ExUnit
	MaxBlockExUnits            common.ExUnit
	MaxValueSize               uint
	CollateralPercentage       uint
	MaxCollateralInputs        uint
	PoolVotingThresholds       PoolVotingThresholds
	DRepVotingThresholds       DRepVotingThresholds
	MinCommitteeSize           uint
	CommitteeTermLimit         uint64
	GovActionValidityPeriod    uint64
	GovActionDeposit           uint64
	DRepDeposit                uint64
	DRepInactivityPeriod       uint64
	MinFeeRefScriptCostPerByte *cbor.Rat
}

func UpgradePParams added in v0.103.0

func UpgradePParams(
	prevPParams babbage.BabbageProtocolParameters,
) ConwayProtocolParameters

func (*ConwayProtocolParameters) Update added in v0.99.0

func (p *ConwayProtocolParameters) Update(
	paramUpdate *ConwayProtocolParameterUpdate,
)

func (*ConwayProtocolParameters) UpdateFromGenesis added in v0.99.0

func (p *ConwayProtocolParameters) UpdateFromGenesis(genesis *ConwayGenesis)

func (*ConwayProtocolParameters) Utxorpc added in v0.102.0

type ConwayRedeemerKey

type ConwayRedeemerKey struct {
	cbor.StructAsArray
	Tag   uint8
	Index uint32
}

type ConwayRedeemerValue

type ConwayRedeemerValue struct {
	cbor.StructAsArray
	Data    cbor.RawMessage
	ExUnits common.RedeemerExUnits
}

type ConwayRedeemers

type ConwayRedeemers struct {
	Redeemers map[ConwayRedeemerKey]ConwayRedeemerValue
	// contains filtered or unexported fields
}

func (*ConwayRedeemers) UnmarshalCBOR

func (r *ConwayRedeemers) UnmarshalCBOR(cborData []byte) error

type ConwayTransaction

type ConwayTransaction struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	Body       ConwayTransactionBody
	WitnessSet ConwayTransactionWitnessSet
	IsTxValid  bool
	TxMetadata *cbor.LazyValue
}

func NewConwayTransactionFromCbor

func NewConwayTransactionFromCbor(data []byte) (*ConwayTransaction, error)

func (ConwayTransaction) AssetMint

func (ConwayTransaction) AuxDataHash

func (t ConwayTransaction) AuxDataHash() *common.Blake2b256

func (*ConwayTransaction) Cbor

func (t *ConwayTransaction) Cbor() []byte

func (ConwayTransaction) Certificates

func (t ConwayTransaction) Certificates() []common.Certificate

func (ConwayTransaction) Collateral

func (t ConwayTransaction) Collateral() []common.TransactionInput

func (ConwayTransaction) CollateralReturn

func (t ConwayTransaction) CollateralReturn() common.TransactionOutput

func (ConwayTransaction) Consumed

func (t ConwayTransaction) Consumed() []common.TransactionInput

func (ConwayTransaction) CurrentTreasuryValue

func (t ConwayTransaction) CurrentTreasuryValue() int64

func (ConwayTransaction) Donation

func (t ConwayTransaction) Donation() uint64

func (ConwayTransaction) Fee

func (t ConwayTransaction) Fee() uint64

func (ConwayTransaction) Hash

func (t ConwayTransaction) Hash() string

func (ConwayTransaction) Inputs

func (ConwayTransaction) IsValid

func (t ConwayTransaction) IsValid() bool

func (ConwayTransaction) Metadata

func (t ConwayTransaction) Metadata() *cbor.LazyValue

func (ConwayTransaction) Outputs

func (ConwayTransaction) Produced

func (t ConwayTransaction) Produced() []common.Utxo

func (ConwayTransaction) ProposalProcedures

func (t ConwayTransaction) ProposalProcedures() []common.ProposalProcedure

func (ConwayTransaction) ProtocolParameterUpdates added in v0.95.0

func (t ConwayTransaction) ProtocolParameterUpdates() (uint64, map[common.Blake2b224]common.ProtocolParameterUpdate)

func (ConwayTransaction) ReferenceInputs

func (t ConwayTransaction) ReferenceInputs() []common.TransactionInput

func (ConwayTransaction) RequiredSigners

func (t ConwayTransaction) RequiredSigners() []common.Blake2b224

func (ConwayTransaction) ScriptDataHash

func (t ConwayTransaction) ScriptDataHash() *common.Blake2b256

func (ConwayTransaction) TTL

func (t ConwayTransaction) TTL() uint64

func (ConwayTransaction) TotalCollateral

func (t ConwayTransaction) TotalCollateral() uint64

func (ConwayTransaction) Type added in v0.94.0

func (ConwayTransaction) Type() int

func (*ConwayTransaction) Utxorpc

func (t *ConwayTransaction) Utxorpc() *utxorpc.Tx

func (ConwayTransaction) ValidityIntervalStart

func (t ConwayTransaction) ValidityIntervalStart() uint64

func (ConwayTransaction) VotingProcedures

func (t ConwayTransaction) VotingProcedures() common.VotingProcedures

func (ConwayTransaction) Withdrawals

func (t ConwayTransaction) Withdrawals() map[*common.Address]uint64

type ConwayTransactionBody

type ConwayTransactionBody struct {
	babbage.BabbageTransactionBody
	TxVotingProcedures     common.VotingProcedures    `cbor:"19,keyasint,omitempty"`
	TxProposalProcedures   []common.ProposalProcedure `cbor:"20,keyasint,omitempty"`
	TxCurrentTreasuryValue int64                      `cbor:"21,keyasint,omitempty"`
	TxDonation             uint64                     `cbor:"22,keyasint,omitempty"`
}

func NewConwayTransactionBodyFromCbor

func NewConwayTransactionBodyFromCbor(
	data []byte,
) (*ConwayTransactionBody, error)

func (*ConwayTransactionBody) CurrentTreasuryValue

func (b *ConwayTransactionBody) CurrentTreasuryValue() int64

func (*ConwayTransactionBody) Donation

func (b *ConwayTransactionBody) Donation() uint64

func (*ConwayTransactionBody) ProposalProcedures

func (b *ConwayTransactionBody) ProposalProcedures() []common.ProposalProcedure

func (*ConwayTransactionBody) ProtocolParameterUpdates added in v0.95.0

func (b *ConwayTransactionBody) ProtocolParameterUpdates() (uint64, map[common.Blake2b224]common.ProtocolParameterUpdate)

func (*ConwayTransactionBody) UnmarshalCBOR

func (b *ConwayTransactionBody) UnmarshalCBOR(cborData []byte) error

func (*ConwayTransactionBody) VotingProcedures

func (b *ConwayTransactionBody) VotingProcedures() common.VotingProcedures

type ConwayTransactionWitnessSet

type ConwayTransactionWitnessSet struct {
	babbage.BabbageTransactionWitnessSet
	Redeemers       ConwayRedeemers   `cbor:"5,keyasint,omitempty"`
	PlutusV3Scripts []cbor.RawMessage `cbor:"7,keyasint,omitempty"`
}

func (*ConwayTransactionWitnessSet) UnmarshalCBOR

func (t *ConwayTransactionWitnessSet) UnmarshalCBOR(cborData []byte) error

type DRepVotingThresholds

type DRepVotingThresholds struct {
	cbor.StructAsArray
	MotionNoConfidence    cbor.Rat
	CommitteeNormal       cbor.Rat
	CommitteeNoConfidence cbor.Rat
	UpdateToConstitution  cbor.Rat
	HardForkInitiation    cbor.Rat
	PpNetworkGroup        cbor.Rat
	PpEconomicGroup       cbor.Rat
	PpTechnicalGroup      cbor.Rat
	PpGovGroup            cbor.Rat
	TreasuryWithdrawal    cbor.Rat
}

type PoolVotingThresholds

type PoolVotingThresholds struct {
	cbor.StructAsArray
	MotionNoConfidence    cbor.Rat
	CommitteeNormal       cbor.Rat
	CommitteeNoConfidence cbor.Rat
	HardForkInitiation    cbor.Rat
	PpSecurityGroup       cbor.Rat
}

Jump to

Keyboard shortcuts

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