conway

package
v0.94.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 8 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 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"`
}

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
	Protocol           struct {
		cbor.StructAsArray
		Major uint
		Minor uint
	}
	MinPoolCost                uint
	AdaPerUtxoByte             uint
	CostModels                 map[uint][]int
	ExecutionUnitPrices        []*cbor.Rat // [priceMemory priceSteps]
	MaxTxExecutionUnits        []uint
	MaxBlockExecutionUnits     []uint
	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
}

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) ProtocolParametersUpdate

func (t ConwayTransaction) ProtocolParametersUpdate() map[common.Blake2b224]any

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) ProtocolParametersUpdate

func (b *ConwayTransactionBody) ProtocolParametersUpdate() map[common.Blake2b224]any

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
	UpdateConstitution    cbor.Rat
	HardForkInitiation    cbor.Rat
	PPNetworkGroup        cbor.Rat
	PPEconomicGroup       cbor.Rat
	PPTechnicalGroup      cbor.Rat
	PPGovGroup            cbor.Rat
	TreasureWithdrawal    cbor.Rat
}

type PoolVotingThresholds

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

Jump to

Keyboard shortcuts

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