babbage

package
v0.94.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EraIdBabbage   = 5
	EraNameBabbage = "Babbage"

	BlockTypeBabbage = 6

	BlockHeaderTypeBabbage = 5

	TxTypeBabbage = 5
)
View Source
const (
	DatumOptionTypeHash = 0
	DatumOptionTypeData = 1
)

Variables

View Source
var (
	EraBabbage = common.Era{
		Id:   EraIdBabbage,
		Name: EraNameBabbage,
	}
)

Functions

This section is empty.

Types

type BabbageBlock

type BabbageBlock struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	Header                 *BabbageBlockHeader
	TransactionBodies      []BabbageTransactionBody
	TransactionWitnessSets []BabbageTransactionWitnessSet
	TransactionMetadataSet map[uint]*cbor.LazyValue
	InvalidTransactions    []uint
}

func NewBabbageBlockFromCbor

func NewBabbageBlockFromCbor(data []byte) (*BabbageBlock, error)

func (*BabbageBlock) BlockBodySize

func (b *BabbageBlock) BlockBodySize() uint64

func (*BabbageBlock) BlockNumber

func (b *BabbageBlock) BlockNumber() uint64

func (*BabbageBlock) Era

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

func (*BabbageBlock) Hash

func (b *BabbageBlock) Hash() string

func (*BabbageBlock) IssuerVkey

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

func (*BabbageBlock) SlotNumber

func (b *BabbageBlock) SlotNumber() uint64

func (*BabbageBlock) Transactions

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

func (BabbageBlock) Type added in v0.94.0

func (BabbageBlock) Type() int

func (*BabbageBlock) UnmarshalCBOR

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

func (*BabbageBlock) Utxorpc

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

type BabbageBlockHeader

type BabbageBlockHeader struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor

	Body struct {
		cbor.StructAsArray
		BlockNumber   uint64
		Slot          uint64
		PrevHash      common.Blake2b256
		IssuerVkey    common.IssuerVkey
		VrfKey        []byte
		VrfResult     interface{}
		BlockBodySize uint64
		BlockBodyHash common.Blake2b256
		OpCert        struct {
			cbor.StructAsArray
			HotVkey        []byte
			SequenceNumber uint32
			KesPeriod      uint32
			Signature      []byte
		}
		ProtoVersion struct {
			cbor.StructAsArray
			Major uint64
			Minor uint64
		}
	}
	Signature interface{}
	// contains filtered or unexported fields
}

func NewBabbageBlockHeaderFromCbor

func NewBabbageBlockHeaderFromCbor(data []byte) (*BabbageBlockHeader, error)

func (*BabbageBlockHeader) BlockBodySize

func (h *BabbageBlockHeader) BlockBodySize() uint64

func (*BabbageBlockHeader) BlockNumber

func (h *BabbageBlockHeader) BlockNumber() uint64

func (*BabbageBlockHeader) Era

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

func (*BabbageBlockHeader) Hash

func (h *BabbageBlockHeader) Hash() string

func (*BabbageBlockHeader) IssuerVkey

func (h *BabbageBlockHeader) IssuerVkey() common.IssuerVkey

func (*BabbageBlockHeader) SlotNumber

func (h *BabbageBlockHeader) SlotNumber() uint64

func (*BabbageBlockHeader) UnmarshalCBOR

func (h *BabbageBlockHeader) UnmarshalCBOR(cborData []byte) error

type BabbageProtocolParameterUpdate

type BabbageProtocolParameterUpdate struct {
	MinFeeA            uint      `cbor:"0,keyasint"`
	MinFeeB            uint      `cbor:"1,keyasint"`
	MaxBlockBodySize   uint      `cbor:"2,keyasint"`
	MaxTxSize          uint      `cbor:"3,keyasint"`
	MaxBlockHeaderSize uint      `cbor:"4,keyasint"`
	KeyDeposit         uint      `cbor:"5,keyasint"`
	PoolDeposit        uint      `cbor:"6,keyasint"`
	MaxEpoch           uint      `cbor:"7,keyasint"`
	NOpt               uint      `cbor:"8,keyasint"`
	A0                 *cbor.Rat `cbor:"9,keyasint"`
	Rho                *cbor.Rat `cbor:"10,keyasint"`
	Tau                *cbor.Rat `cbor:"11,keyasint"`
	ProtocolVersion    struct {
		cbor.StructAsArray
		Major uint
		Minor uint
	} `cbor:"14,keyasint"`
	MinPoolCost            uint           `cbor:"16,keyasint"`
	AdaPerUtxoByte         uint           `cbor:"17,keyasint"`
	CostModels             map[uint][]int `cbor:"18,keyasint"`
	ExecutionUnitPrices    []*cbor.Rat    `cbor:"19,keyasint"`
	MaxTxExecutionUnits    []uint         `cbor:"20,keyasint"`
	MaxBlockExecutionUnits []uint         `cbor:"21,keyasint"`
	MaxValueSize           uint           `cbor:"22,keyasint"`
	CollateralPercentage   uint           `cbor:"23,keyasint"`
	MaxCollateralInputs    uint           `cbor:"24,keyasint"`
}

type BabbageProtocolParameters

type BabbageProtocolParameters 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
	ProtocolMajor          uint
	ProtocolMinor          uint
	MinPoolCost            uint
	AdaPerUtxoByte         uint
	CostModels             map[uint][]int
	ExecutionUnitPrices    []*cbor.Rat // [priceMemory priceSteps]
	MaxTxExecutionUnits    []uint
	MaxBlockExecutionUnits []uint
	MaxValueSize           uint
	CollateralPercentage   uint
	MaxCollateralInputs    uint
}

BabbageProtocolParameters represents the current Babbage protocol parameters as seen in local-state-query

type BabbageTransaction

type BabbageTransaction struct {
	cbor.StructAsArray
	cbor.DecodeStoreCbor
	Body       BabbageTransactionBody
	WitnessSet BabbageTransactionWitnessSet
	IsTxValid  bool
	TxMetadata *cbor.LazyValue
}

func NewBabbageTransactionFromCbor

func NewBabbageTransactionFromCbor(data []byte) (*BabbageTransaction, error)

func (BabbageTransaction) AssetMint

func (BabbageTransaction) AuxDataHash

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

func (*BabbageTransaction) Cbor

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

func (BabbageTransaction) Certificates

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

func (BabbageTransaction) Collateral

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

func (BabbageTransaction) CollateralReturn

func (t BabbageTransaction) CollateralReturn() common.TransactionOutput

func (BabbageTransaction) Consumed

func (BabbageTransaction) CurrentTreasuryValue

func (t BabbageTransaction) CurrentTreasuryValue() int64

func (BabbageTransaction) Donation

func (t BabbageTransaction) Donation() uint64

func (BabbageTransaction) Fee

func (t BabbageTransaction) Fee() uint64

func (BabbageTransaction) Hash

func (t BabbageTransaction) Hash() string

func (BabbageTransaction) Inputs

func (BabbageTransaction) IsValid

func (t BabbageTransaction) IsValid() bool

func (BabbageTransaction) Metadata

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

func (BabbageTransaction) Outputs

func (BabbageTransaction) Produced

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

func (BabbageTransaction) ProposalProcedures

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

func (BabbageTransaction) ProtocolParametersUpdate

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

func (BabbageTransaction) ReferenceInputs

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

func (BabbageTransaction) RequiredSigners

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

func (BabbageTransaction) ScriptDataHash

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

func (BabbageTransaction) TTL

func (t BabbageTransaction) TTL() uint64

func (BabbageTransaction) TotalCollateral

func (t BabbageTransaction) TotalCollateral() uint64

func (BabbageTransaction) Type added in v0.94.0

func (BabbageTransaction) Type() int

func (*BabbageTransaction) Utxorpc

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

func (BabbageTransaction) ValidityIntervalStart

func (t BabbageTransaction) ValidityIntervalStart() uint64

func (BabbageTransaction) VotingProcedures

func (t BabbageTransaction) VotingProcedures() common.VotingProcedures

func (BabbageTransaction) Withdrawals

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

type BabbageTransactionBody

type BabbageTransactionBody struct {
	alonzo.AlonzoTransactionBody
	TxOutputs []BabbageTransactionOutput `cbor:"1,keyasint,omitempty"`
	Update    struct {
		cbor.StructAsArray
		ProtocolParamUpdates map[common.Blake2b224]BabbageProtocolParameterUpdate
		Epoch                uint64
	} `cbor:"6,keyasint,omitempty"`
	TxCollateralReturn *BabbageTransactionOutput         `cbor:"16,keyasint,omitempty"`
	TxTotalCollateral  uint64                            `cbor:"17,keyasint,omitempty"`
	TxReferenceInputs  []shelley.ShelleyTransactionInput `cbor:"18,keyasint,omitempty"`
}

func NewBabbageTransactionBodyFromCbor

func NewBabbageTransactionBodyFromCbor(
	data []byte,
) (*BabbageTransactionBody, error)

func (*BabbageTransactionBody) CollateralReturn

func (b *BabbageTransactionBody) CollateralReturn() common.TransactionOutput

func (*BabbageTransactionBody) Outputs

func (*BabbageTransactionBody) ProtocolParametersUpdate

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

func (*BabbageTransactionBody) ReferenceInputs

func (b *BabbageTransactionBody) ReferenceInputs() []common.TransactionInput

func (*BabbageTransactionBody) TotalCollateral

func (b *BabbageTransactionBody) TotalCollateral() uint64

func (*BabbageTransactionBody) UnmarshalCBOR

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

func (*BabbageTransactionBody) Utxorpc

func (b *BabbageTransactionBody) Utxorpc() *utxorpc.Tx

type BabbageTransactionOutput

type BabbageTransactionOutput struct {
	cbor.DecodeStoreCbor
	OutputAddress common.Address                       `cbor:"0,keyasint,omitempty"`
	OutputAmount  mary.MaryTransactionOutputValue      `cbor:"1,keyasint,omitempty"`
	DatumOption   *BabbageTransactionOutputDatumOption `cbor:"2,keyasint,omitempty"`
	ScriptRef     *cbor.Tag                            `cbor:"3,keyasint,omitempty"`
	// contains filtered or unexported fields
}

func NewBabbageTransactionOutputFromCbor

func NewBabbageTransactionOutputFromCbor(
	data []byte,
) (*BabbageTransactionOutput, error)

func (BabbageTransactionOutput) Address

func (BabbageTransactionOutput) Amount

func (o BabbageTransactionOutput) Amount() uint64

func (BabbageTransactionOutput) Assets

func (BabbageTransactionOutput) Datum

func (BabbageTransactionOutput) DatumHash

func (*BabbageTransactionOutput) MarshalCBOR

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

func (BabbageTransactionOutput) MarshalJSON

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

func (*BabbageTransactionOutput) UnmarshalCBOR

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

func (BabbageTransactionOutput) Utxorpc

type BabbageTransactionOutputDatumOption

type BabbageTransactionOutputDatumOption struct {
	// contains filtered or unexported fields
}

func (*BabbageTransactionOutputDatumOption) MarshalCBOR

func (d *BabbageTransactionOutputDatumOption) MarshalCBOR() ([]byte, error)

func (*BabbageTransactionOutputDatumOption) UnmarshalCBOR

func (d *BabbageTransactionOutputDatumOption) UnmarshalCBOR(data []byte) error

type BabbageTransactionWitnessSet

type BabbageTransactionWitnessSet struct {
	alonzo.AlonzoTransactionWitnessSet
	PlutusV2Scripts []cbor.RawMessage `cbor:"6,keyasint,omitempty"`
}

func (*BabbageTransactionWitnessSet) UnmarshalCBOR

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

Jump to

Keyboard shortcuts

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