alonzo

package
v0.93.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 8 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
	Header                 *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) IssuerVkey

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

func (*AlonzoBlock) SlotNumber

func (b *AlonzoBlock) SlotNumber() uint64

func (*AlonzoBlock) Transactions

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

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 AlonzoProtocolParameterUpdate

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

type AlonzoProtocolParameters

type AlonzoProtocolParameters struct {
	mary.MaryProtocolParameters
	MinPoolCost          uint
	AdaPerUtxoByte       uint
	CostModels           uint
	ExecutionCosts       uint
	MaxTxExUnits         uint
	MaxBlockExUnits      uint
	MaxValueSize         uint
	CollateralPercentage uint
	MaxCollateralInputs  uint
}

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

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

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

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

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

type ExUnit

type ExUnit struct {
	cbor.StructAsArray
	Mem   uint
	Steps uint
}

type ExUnitPrice

type ExUnitPrice struct {
	cbor.StructAsArray
	MemPrice  uint
	StepPrice uint
}

Jump to

Keyboard shortcuts

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