allegra

package
v0.127.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EraIdAllegra   = 2
	EraNameAllegra = "Allegra"

	BlockTypeAllegra = 3

	BlockHeaderTypeAllegra = 2

	TxTypeAllegra = 2
)

Variables

View Source
var EraAllegra = common.Era{
	Id:   EraIdAllegra,
	Name: EraNameAllegra,
}

Functions

func UtxoValidateBadInputsUtxo added in v0.109.0

func UtxoValidateBadInputsUtxo(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateFeeTooSmallUtxo added in v0.109.0

func UtxoValidateFeeTooSmallUtxo(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateInputSetEmptyUtxo added in v0.109.0

func UtxoValidateInputSetEmptyUtxo(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateMaxTxSizeUtxo added in v0.109.0

func UtxoValidateMaxTxSizeUtxo(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateOutputBootAddrAttrsTooBig added in v0.109.0

func UtxoValidateOutputBootAddrAttrsTooBig(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateOutputTooSmallUtxo added in v0.109.0

func UtxoValidateOutputTooSmallUtxo(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateOutsideValidityIntervalUtxo added in v0.109.0

func UtxoValidateOutsideValidityIntervalUtxo(
	tx common.Transaction,
	slot uint64,
	_ common.LedgerState,
	_ common.ProtocolParameters,
) error

UtxoValidateOutsideValidityIntervalUtxo ensures that the current tip slot has reached the specified validity interval

func UtxoValidateValueNotConservedUtxo added in v0.109.0

func UtxoValidateValueNotConservedUtxo(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateWrongNetwork added in v0.109.0

func UtxoValidateWrongNetwork(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

func UtxoValidateWrongNetworkWithdrawal added in v0.109.0

func UtxoValidateWrongNetworkWithdrawal(
	tx common.Transaction,
	slot uint64,
	ls common.LedgerState,
	pp common.ProtocolParameters,
) error

Types

type AllegraBlock

type AllegraBlock struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	BlockHeader            *AllegraBlockHeader
	TransactionBodies      []AllegraTransactionBody
	TransactionWitnessSets []shelley.ShelleyTransactionWitnessSet
	TransactionMetadataSet map[uint]*cbor.LazyValue
}

func NewAllegraBlockFromCbor

func NewAllegraBlockFromCbor(data []byte) (*AllegraBlock, error)

func (*AllegraBlock) BlockBodySize

func (b *AllegraBlock) BlockBodySize() uint64

func (*AllegraBlock) BlockNumber

func (b *AllegraBlock) BlockNumber() uint64

func (*AllegraBlock) Era

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

func (*AllegraBlock) Hash

func (b *AllegraBlock) Hash() common.Blake2b256

func (*AllegraBlock) Header

func (b *AllegraBlock) Header() common.BlockHeader

func (*AllegraBlock) IssuerVkey

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

func (*AllegraBlock) PrevHash added in v0.105.0

func (b *AllegraBlock) PrevHash() common.Blake2b256

func (*AllegraBlock) SlotNumber

func (b *AllegraBlock) SlotNumber() uint64

func (*AllegraBlock) Transactions

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

func (AllegraBlock) Type added in v0.94.0

func (AllegraBlock) Type() int

func (*AllegraBlock) UnmarshalCBOR

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

func (*AllegraBlock) Utxorpc

func (b *AllegraBlock) Utxorpc() (*utxorpc.Block, error)

type AllegraBlockHeader

type AllegraBlockHeader struct {
	shelley.ShelleyBlockHeader
}

func NewAllegraBlockHeaderFromCbor added in v0.114.0

func NewAllegraBlockHeaderFromCbor(data []byte) (*AllegraBlockHeader, error)

func (*AllegraBlockHeader) Era

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

type AllegraProtocolParameterUpdate

type AllegraProtocolParameterUpdate = shelley.ShelleyProtocolParameterUpdate

type AllegraProtocolParameters

type AllegraProtocolParameters = shelley.ShelleyProtocolParameters

func UpgradePParams added in v0.103.0

func UpgradePParams(
	prevPParams shelley.ShelleyProtocolParameters,
) AllegraProtocolParameters

type AllegraTransaction

type AllegraTransaction struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	Body       AllegraTransactionBody
	WitnessSet shelley.ShelleyTransactionWitnessSet
	TxMetadata *cbor.LazyValue
}

func NewAllegraTransactionFromCbor

func NewAllegraTransactionFromCbor(data []byte) (*AllegraTransaction, error)

func (AllegraTransaction) AssetMint

func (AllegraTransaction) AuxDataHash

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

func (*AllegraTransaction) Cbor

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

func (AllegraTransaction) Certificates

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

func (AllegraTransaction) Collateral

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

func (AllegraTransaction) CollateralReturn

func (t AllegraTransaction) CollateralReturn() common.TransactionOutput

func (AllegraTransaction) Consumed

func (AllegraTransaction) CurrentTreasuryValue

func (t AllegraTransaction) CurrentTreasuryValue() int64

func (AllegraTransaction) Donation

func (t AllegraTransaction) Donation() uint64

func (AllegraTransaction) Fee

func (t AllegraTransaction) Fee() uint64

func (AllegraTransaction) Hash

func (AllegraTransaction) Inputs

func (AllegraTransaction) IsValid

func (t AllegraTransaction) IsValid() bool

func (AllegraTransaction) Metadata

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

func (AllegraTransaction) Outputs

func (AllegraTransaction) Produced

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

func (AllegraTransaction) ProposalProcedures

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

func (AllegraTransaction) ProtocolParameterUpdates added in v0.95.0

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

func (AllegraTransaction) ReferenceInputs

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

func (AllegraTransaction) RequiredSigners

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

func (AllegraTransaction) ScriptDataHash

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

func (AllegraTransaction) TTL

func (t AllegraTransaction) TTL() uint64

func (AllegraTransaction) TotalCollateral

func (t AllegraTransaction) TotalCollateral() uint64

func (AllegraTransaction) Type added in v0.94.0

func (AllegraTransaction) Type() int

func (*AllegraTransaction) UnmarshalCBOR added in v0.114.1

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

func (AllegraTransaction) Utxorpc

func (t AllegraTransaction) Utxorpc() (*utxorpc.Tx, error)

func (AllegraTransaction) ValidityIntervalStart

func (t AllegraTransaction) ValidityIntervalStart() uint64

func (AllegraTransaction) VotingProcedures

func (t AllegraTransaction) VotingProcedures() common.VotingProcedures

func (AllegraTransaction) Withdrawals

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

func (AllegraTransaction) Witnesses added in v0.110.0

type AllegraTransactionBody

type AllegraTransactionBody struct {
	common.TransactionBodyBase
	TxInputs       shelley.ShelleyTransactionInputSet `cbor:"0,keyasint,omitempty"`
	TxOutputs      []shelley.ShelleyTransactionOutput `cbor:"1,keyasint,omitempty"`
	TxFee          uint64                             `cbor:"2,keyasint,omitempty"`
	Ttl            uint64                             `cbor:"3,keyasint,omitempty"`
	TxCertificates []common.CertificateWrapper        `cbor:"4,keyasint,omitempty"`
	TxWithdrawals  map[*common.Address]uint64         `cbor:"5,keyasint,omitempty"`
	Update         struct {
		cbor.StructAsArray
		ProtocolParamUpdates map[common.Blake2b224]AllegraProtocolParameterUpdate
		Epoch                uint64
	} `cbor:"6,keyasint,omitempty"`
	TxAuxDataHash           *common.Blake2b256 `cbor:"7,keyasint,omitempty"`
	TxValidityIntervalStart uint64             `cbor:"8,keyasint,omitempty"`
}

func NewAllegraTransactionBodyFromCbor

func NewAllegraTransactionBodyFromCbor(
	data []byte,
) (*AllegraTransactionBody, error)

func (*AllegraTransactionBody) AuxDataHash added in v0.117.0

func (b *AllegraTransactionBody) AuxDataHash() *common.Blake2b256

func (*AllegraTransactionBody) Certificates added in v0.117.0

func (b *AllegraTransactionBody) Certificates() []common.Certificate

func (*AllegraTransactionBody) Fee added in v0.117.0

func (b *AllegraTransactionBody) Fee() uint64

func (*AllegraTransactionBody) Inputs added in v0.117.0

func (*AllegraTransactionBody) Outputs added in v0.117.0

func (*AllegraTransactionBody) ProtocolParameterUpdates added in v0.95.0

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

func (*AllegraTransactionBody) TTL added in v0.117.0

func (b *AllegraTransactionBody) TTL() uint64

func (*AllegraTransactionBody) UnmarshalCBOR

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

func (*AllegraTransactionBody) Utxorpc added in v0.117.0

func (b *AllegraTransactionBody) Utxorpc() (*utxorpc.Tx, error)

func (*AllegraTransactionBody) ValidityIntervalStart

func (b *AllegraTransactionBody) ValidityIntervalStart() uint64

func (*AllegraTransactionBody) Withdrawals added in v0.117.0

func (b *AllegraTransactionBody) Withdrawals() map[*common.Address]uint64

type OutsideValidityIntervalUtxoError added in v0.109.0

type OutsideValidityIntervalUtxoError struct {
	ValidityIntervalStart uint64
	Slot                  uint64
}

func (OutsideValidityIntervalUtxoError) Error added in v0.109.0

Jump to

Keyboard shortcuts

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