alonzo

package
v0.106.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EraIdAlonzo   = 4
	EraNameAlonzo = "Alonzo"

	BlockTypeAlonzo = 5

	BlockHeaderTypeAlonzo = 4

	TxTypeAlonzo = 4
)

Variables

View Source
var (
	EraAlonzo = common.Era{
		Id:   EraIdAlonzo,
		Name: EraNameAlonzo,
	}
)

Functions

This section is empty.

Types

type AlonzoBlock

type AlonzoBlock struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	BlockHeader            *AlonzoBlockHeader
	TransactionBodies      []AlonzoTransactionBody
	TransactionWitnessSets []AlonzoTransactionWitnessSet
	TransactionMetadataSet map[uint]*cbor.LazyValue
	InvalidTransactions    []uint
}

func NewAlonzoBlockFromCbor

func NewAlonzoBlockFromCbor(data []byte) (*AlonzoBlock, error)

func (*AlonzoBlock) BlockBodySize

func (b *AlonzoBlock) BlockBodySize() uint64

func (*AlonzoBlock) BlockNumber

func (b *AlonzoBlock) BlockNumber() uint64

func (*AlonzoBlock) Era

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

func (*AlonzoBlock) Hash

func (b *AlonzoBlock) Hash() string

func (*AlonzoBlock) Header

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

func (*AlonzoBlock) IssuerVkey

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

func (*AlonzoBlock) PrevHash added in v0.105.0

func (b *AlonzoBlock) PrevHash() string

func (*AlonzoBlock) SlotNumber

func (b *AlonzoBlock) SlotNumber() uint64

func (*AlonzoBlock) Transactions

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

func (AlonzoBlock) Type added in v0.94.0

func (AlonzoBlock) Type() int

func (*AlonzoBlock) UnmarshalCBOR

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

func (*AlonzoBlock) Utxorpc

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

type AlonzoBlockHeader

type AlonzoBlockHeader struct {
	shelley.ShelleyBlockHeader
}

func (*AlonzoBlockHeader) Era

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

type AlonzoGenesis added in v0.96.0

type AlonzoGenesis struct {
	LovelacePerUtxoWord  uint64 `json:"lovelacePerUTxOWord"`
	MaxValueSize         uint
	CollateralPercentage uint
	MaxCollateralInputs  uint
	ExecutionPrices      AlonzoGenesisExecutionPrices
	MaxTxExUnits         AlonzoGenesisExUnits
	MaxBlockExUnits      AlonzoGenesisExUnits
	CostModels           map[string]map[string]int
}

func NewAlonzoGenesisFromFile added in v0.96.0

func NewAlonzoGenesisFromFile(path string) (AlonzoGenesis, error)

func NewAlonzoGenesisFromReader added in v0.96.0

func NewAlonzoGenesisFromReader(r io.Reader) (AlonzoGenesis, error)

type AlonzoGenesisExUnits added in v0.99.0

type AlonzoGenesisExUnits struct {
	Mem   uint `json:"exUnitsMem"`
	Steps uint `json:"exUnitsSteps"`
}

type AlonzoGenesisExecutionPrices added in v0.99.0

type AlonzoGenesisExecutionPrices struct {
	Steps *AlonzoGenesisExecutionPricesRat `json:"prSteps"`
	Mem   *AlonzoGenesisExecutionPricesRat `json:"prMem"`
}

type AlonzoGenesisExecutionPricesRat added in v0.99.0

type AlonzoGenesisExecutionPricesRat struct {
	*big.Rat
}

func (*AlonzoGenesisExecutionPricesRat) UnmarshalJSON added in v0.99.0

func (r *AlonzoGenesisExecutionPricesRat) UnmarshalJSON(data []byte) error

type AlonzoProtocolParameterUpdate

type AlonzoProtocolParameterUpdate struct {
	mary.MaryProtocolParameterUpdate
	MinPoolCost          *uint64             `cbor:"16,keyasint"`
	AdaPerUtxoByte       *uint64             `cbor:"17,keyasint"`
	CostModels           map[uint][]int64    `cbor:"18,keyasint"`
	ExecutionCosts       *common.ExUnitPrice `cbor:"19,keyasint"`
	MaxTxExUnits         *common.ExUnit      `cbor:"20,keyasint"`
	MaxBlockExUnits      *common.ExUnit      `cbor:"21,keyasint"`
	MaxValueSize         *uint               `cbor:"22,keyasint"`
	CollateralPercentage *uint               `cbor:"23,keyasint"`
	MaxCollateralInputs  *uint               `cbor:"24,keyasint"`
}

func (*AlonzoProtocolParameterUpdate) UnmarshalCBOR added in v0.99.0

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

type AlonzoProtocolParameters

type AlonzoProtocolParameters struct {
	mary.MaryProtocolParameters
	MinPoolCost          uint64
	AdaPerUtxoByte       uint64
	CostModels           map[uint][]int64
	ExecutionCosts       common.ExUnitPrice
	MaxTxExUnits         common.ExUnit
	MaxBlockExUnits      common.ExUnit
	MaxValueSize         uint
	CollateralPercentage uint
	MaxCollateralInputs  uint
}

func UpgradePParams added in v0.103.0

func UpgradePParams(
	prevPParams mary.MaryProtocolParameters,
) AlonzoProtocolParameters

func (*AlonzoProtocolParameters) Update added in v0.99.0

func (p *AlonzoProtocolParameters) Update(
	paramUpdate *AlonzoProtocolParameterUpdate,
)

func (*AlonzoProtocolParameters) UpdateFromGenesis added in v0.99.0

func (p *AlonzoProtocolParameters) UpdateFromGenesis(genesis *AlonzoGenesis)

func (*AlonzoProtocolParameters) Utxorpc added in v0.102.0

type AlonzoRedeemer

type AlonzoRedeemer struct {
	cbor.StructAsArray
	Tag     uint8
	Index   uint32
	Data    cbor.RawMessage
	ExUnits common.RedeemerExUnits
}

type AlonzoTransaction

type AlonzoTransaction struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	Body       AlonzoTransactionBody
	WitnessSet AlonzoTransactionWitnessSet
	IsTxValid  bool
	TxMetadata *cbor.LazyValue
}

func NewAlonzoTransactionFromCbor

func NewAlonzoTransactionFromCbor(data []byte) (*AlonzoTransaction, error)

func (AlonzoTransaction) AssetMint

func (AlonzoTransaction) AuxDataHash

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

func (*AlonzoTransaction) Cbor

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

func (AlonzoTransaction) Certificates

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

func (AlonzoTransaction) Collateral

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

func (AlonzoTransaction) CollateralReturn

func (t AlonzoTransaction) CollateralReturn() common.TransactionOutput

func (AlonzoTransaction) Consumed

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

func (AlonzoTransaction) CurrentTreasuryValue

func (t AlonzoTransaction) CurrentTreasuryValue() int64

func (AlonzoTransaction) Donation

func (t AlonzoTransaction) Donation() uint64

func (AlonzoTransaction) Fee

func (t AlonzoTransaction) Fee() uint64

func (AlonzoTransaction) Hash

func (t AlonzoTransaction) Hash() string

func (AlonzoTransaction) Inputs

func (AlonzoTransaction) IsValid

func (t AlonzoTransaction) IsValid() bool

func (AlonzoTransaction) Metadata

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

func (AlonzoTransaction) Outputs

func (AlonzoTransaction) Produced

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

func (AlonzoTransaction) ProposalProcedures

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

func (AlonzoTransaction) ProtocolParameterUpdates added in v0.95.0

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

func (AlonzoTransaction) ReferenceInputs

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

func (AlonzoTransaction) RequiredSigners

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

func (AlonzoTransaction) ScriptDataHash

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

func (AlonzoTransaction) TTL

func (t AlonzoTransaction) TTL() uint64

func (AlonzoTransaction) TotalCollateral

func (t AlonzoTransaction) TotalCollateral() uint64

func (AlonzoTransaction) Type added in v0.94.0

func (AlonzoTransaction) Type() int

func (*AlonzoTransaction) Utxorpc

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

func (AlonzoTransaction) ValidityIntervalStart

func (t AlonzoTransaction) ValidityIntervalStart() uint64

func (AlonzoTransaction) VotingProcedures

func (t AlonzoTransaction) VotingProcedures() common.VotingProcedures

func (AlonzoTransaction) Withdrawals

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

type AlonzoTransactionBody

type AlonzoTransactionBody struct {
	mary.MaryTransactionBody
	TxOutputs []AlonzoTransactionOutput `cbor:"1,keyasint,omitempty"`
	Update    struct {
		cbor.StructAsArray
		ProtocolParamUpdates map[common.Blake2b224]AlonzoProtocolParameterUpdate
		Epoch                uint64
	} `cbor:"6,keyasint,omitempty"`
	TxScriptDataHash  *common.Blake2b256                `cbor:"11,keyasint,omitempty"`
	TxCollateral      []shelley.ShelleyTransactionInput `cbor:"13,keyasint,omitempty"`
	TxRequiredSigners []common.Blake2b224               `cbor:"14,keyasint,omitempty"`
	NetworkId         uint8                             `cbor:"15,keyasint,omitempty"`
}

func NewAlonzoTransactionBodyFromCbor

func NewAlonzoTransactionBodyFromCbor(
	data []byte,
) (*AlonzoTransactionBody, error)

func (*AlonzoTransactionBody) Collateral

func (b *AlonzoTransactionBody) Collateral() []common.TransactionInput

func (*AlonzoTransactionBody) Outputs

func (*AlonzoTransactionBody) ProtocolParameterUpdates added in v0.95.0

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

func (*AlonzoTransactionBody) RequiredSigners

func (b *AlonzoTransactionBody) RequiredSigners() []common.Blake2b224

func (*AlonzoTransactionBody) ScriptDataHash

func (b *AlonzoTransactionBody) ScriptDataHash() *common.Blake2b256

func (*AlonzoTransactionBody) UnmarshalCBOR

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

type AlonzoTransactionOutput

type AlonzoTransactionOutput struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	OutputAddress     common.Address
	OutputAmount      mary.MaryTransactionOutputValue
	TxOutputDatumHash *common.Blake2b256
	// contains filtered or unexported fields
}

func NewAlonzoTransactionOutputFromCbor

func NewAlonzoTransactionOutputFromCbor(
	data []byte,
) (*AlonzoTransactionOutput, error)

func (AlonzoTransactionOutput) Address

func (AlonzoTransactionOutput) Amount

func (o AlonzoTransactionOutput) Amount() uint64

func (AlonzoTransactionOutput) Assets

func (AlonzoTransactionOutput) Datum

func (AlonzoTransactionOutput) DatumHash

func (o AlonzoTransactionOutput) DatumHash() *common.Blake2b256

func (*AlonzoTransactionOutput) MarshalCBOR

func (o *AlonzoTransactionOutput) MarshalCBOR() ([]byte, error)

func (AlonzoTransactionOutput) MarshalJSON

func (o AlonzoTransactionOutput) MarshalJSON() ([]byte, error)

func (*AlonzoTransactionOutput) UnmarshalCBOR

func (o *AlonzoTransactionOutput) UnmarshalCBOR(cborData []byte) error

func (AlonzoTransactionOutput) Utxorpc

type AlonzoTransactionWitnessSet

type AlonzoTransactionWitnessSet struct {
	shelley.ShelleyTransactionWitnessSet
	PlutusScripts []cbor.RawMessage `cbor:"3,keyasint,omitempty"`
	PlutusData    []cbor.RawMessage `cbor:"4,keyasint,omitempty"`
	Redeemers     []AlonzoRedeemer  `cbor:"5,keyasint,omitempty"`
}

func (*AlonzoTransactionWitnessSet) UnmarshalCBOR

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

Jump to

Keyboard shortcuts

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