Documentation
¶
Index ¶
- Constants
- Variables
- func MinCoinTxOut(_ common.Transaction, pparams common.ProtocolParameters) (uint64, error)
- func MinFeeTx(tx common.Transaction, pparams common.ProtocolParameters) (uint64, error)
- func UtxoValidateBadInputsUtxo(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateFeeTooSmallUtxo(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateInputSetEmptyUtxo(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateMaxTxSizeUtxo(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateOutputBootAddrAttrsTooBig(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateOutputTooSmallUtxo(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateTimeToLive(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateValueNotConservedUtxo(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateWrongNetwork(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- func UtxoValidateWrongNetworkWithdrawal(tx common.Transaction, slot uint64, ls common.LedgerState, ...) error
- type BadInputsUtxoError
- type ExpiredUtxoError
- type FeeTooSmallUtxoError
- type InputSetEmptyUtxoError
- type MaxTxSizeUtxoError
- type OutputBootAddrAttrsTooBigError
- type OutputTooSmallUtxoError
- type ShelleyBlock
- func (b *ShelleyBlock) BlockBodySize() uint64
- func (b *ShelleyBlock) BlockNumber() uint64
- func (b *ShelleyBlock) Era() common.Era
- func (b *ShelleyBlock) Hash() common.Blake2b256
- func (b *ShelleyBlock) Header() common.BlockHeader
- func (b *ShelleyBlock) IssuerVkey() common.IssuerVkey
- func (b *ShelleyBlock) PrevHash() common.Blake2b256
- func (b *ShelleyBlock) SlotNumber() uint64
- func (b *ShelleyBlock) Transactions() []common.Transaction
- func (ShelleyBlock) Type() int
- func (b *ShelleyBlock) UnmarshalCBOR(cborData []byte) error
- func (b *ShelleyBlock) Utxorpc() *utxorpc.Block
- type ShelleyBlockHeader
- func (h *ShelleyBlockHeader) BlockBodySize() uint64
- func (h *ShelleyBlockHeader) BlockNumber() uint64
- func (h *ShelleyBlockHeader) Era() common.Era
- func (h *ShelleyBlockHeader) Hash() common.Blake2b256
- func (h *ShelleyBlockHeader) IssuerVkey() common.IssuerVkey
- func (h *ShelleyBlockHeader) PrevHash() common.Blake2b256
- func (h *ShelleyBlockHeader) SlotNumber() uint64
- func (h *ShelleyBlockHeader) UnmarshalCBOR(cborData []byte) error
- type ShelleyBlockHeaderBody
- type ShelleyGenesis
- type ShelleyGenesisProtocolParams
- type ShelleyProtocolParameterUpdate
- type ShelleyProtocolParameters
- type ShelleyTransaction
- func (t ShelleyTransaction) AssetMint() *common.MultiAsset[common.MultiAssetTypeMint]
- func (t ShelleyTransaction) AuxDataHash() *common.Blake2b256
- func (t *ShelleyTransaction) Cbor() []byte
- func (t ShelleyTransaction) Certificates() []common.Certificate
- func (t ShelleyTransaction) Collateral() []common.TransactionInput
- func (t ShelleyTransaction) CollateralReturn() common.TransactionOutput
- func (t ShelleyTransaction) Consumed() []common.TransactionInput
- func (t ShelleyTransaction) CurrentTreasuryValue() int64
- func (t ShelleyTransaction) Donation() uint64
- func (t ShelleyTransaction) Fee() uint64
- func (t ShelleyTransaction) Hash() common.Blake2b256
- func (t ShelleyTransaction) Inputs() []common.TransactionInput
- func (t ShelleyTransaction) IsValid() bool
- func (t ShelleyTransaction) Metadata() *cbor.LazyValue
- func (t ShelleyTransaction) Outputs() []common.TransactionOutput
- func (t ShelleyTransaction) Produced() []common.Utxo
- func (t ShelleyTransaction) ProposalProcedures() []common.ProposalProcedure
- func (t *ShelleyTransaction) ProtocolParameterUpdates() (uint64, map[common.Blake2b224]common.ProtocolParameterUpdate)
- func (t ShelleyTransaction) ReferenceInputs() []common.TransactionInput
- func (t ShelleyTransaction) RequiredSigners() []common.Blake2b224
- func (t ShelleyTransaction) ScriptDataHash() *common.Blake2b256
- func (t ShelleyTransaction) TTL() uint64
- func (t ShelleyTransaction) TotalCollateral() uint64
- func (ShelleyTransaction) Type() int
- func (t *ShelleyTransaction) UnmarshalCBOR(cborData []byte) error
- func (t ShelleyTransaction) Utxorpc() *utxorpc.Tx
- func (t ShelleyTransaction) ValidityIntervalStart() uint64
- func (t ShelleyTransaction) VotingProcedures() common.VotingProcedures
- func (t ShelleyTransaction) Withdrawals() map[*common.Address]uint64
- func (t ShelleyTransaction) Witnesses() common.TransactionWitnessSet
- type ShelleyTransactionBody
- func (b *ShelleyTransactionBody) AuxDataHash() *common.Blake2b256
- func (b *ShelleyTransactionBody) Certificates() []common.Certificate
- func (b *ShelleyTransactionBody) Fee() uint64
- func (b *ShelleyTransactionBody) Inputs() []common.TransactionInput
- func (b *ShelleyTransactionBody) Outputs() []common.TransactionOutput
- func (b *ShelleyTransactionBody) ProtocolParameterUpdates() (uint64, map[common.Blake2b224]common.ProtocolParameterUpdate)
- func (b *ShelleyTransactionBody) TTL() uint64
- func (b *ShelleyTransactionBody) UnmarshalCBOR(cborData []byte) error
- func (b *ShelleyTransactionBody) Utxorpc() *utxorpc.Tx
- func (b *ShelleyTransactionBody) Withdrawals() map[*common.Address]uint64
- type ShelleyTransactionInput
- type ShelleyTransactionInputSet
- type ShelleyTransactionOutput
- func (o ShelleyTransactionOutput) Address() common.Address
- func (o ShelleyTransactionOutput) Amount() uint64
- func (o ShelleyTransactionOutput) Assets() *common.MultiAsset[common.MultiAssetTypeOutput]
- func (o ShelleyTransactionOutput) Datum() *cbor.LazyValue
- func (o ShelleyTransactionOutput) DatumHash() *common.Blake2b256
- func (o *ShelleyTransactionOutput) UnmarshalCBOR(cborData []byte) error
- func (o ShelleyTransactionOutput) Utxorpc() *utxorpc.TxOutput
- type ShelleyTransactionWitnessSet
- func (w ShelleyTransactionWitnessSet) Bootstrap() []common.BootstrapWitness
- func (w ShelleyTransactionWitnessSet) NativeScripts() []common.NativeScript
- func (w ShelleyTransactionWitnessSet) PlutusData() []cbor.Value
- func (w ShelleyTransactionWitnessSet) PlutusV1Scripts() [][]byte
- func (w ShelleyTransactionWitnessSet) PlutusV2Scripts() [][]byte
- func (w ShelleyTransactionWitnessSet) PlutusV3Scripts() [][]byte
- func (w ShelleyTransactionWitnessSet) Redeemers() common.TransactionWitnessRedeemers
- func (w *ShelleyTransactionWitnessSet) UnmarshalCBOR(cborData []byte) error
- func (w ShelleyTransactionWitnessSet) Vkey() []common.VkeyWitness
- type ValueNotConservedUtxoError
- type WrongNetworkError
- type WrongNetworkWithdrawalError
Constants ¶
const ( EraIdShelley = 1 EraNameShelley = "Shelley" BlockTypeShelley = 2 BlockHeaderTypeShelley = 1 TxTypeShelley = 1 )
Variables ¶
var EraShelley = common.Era{ Id: EraIdShelley, Name: EraNameShelley, }
var UtxoValidationRules = []common.UtxoValidationRuleFunc{ UtxoValidateTimeToLive, UtxoValidateInputSetEmptyUtxo, UtxoValidateFeeTooSmallUtxo, UtxoValidateBadInputsUtxo, UtxoValidateWrongNetwork, UtxoValidateWrongNetworkWithdrawal, UtxoValidateValueNotConservedUtxo, UtxoValidateOutputTooSmallUtxo, UtxoValidateOutputBootAddrAttrsTooBig, UtxoValidateMaxTxSizeUtxo, }
Functions ¶
func MinCoinTxOut ¶ added in v0.109.0
func MinCoinTxOut( _ common.Transaction, pparams common.ProtocolParameters, ) (uint64, error)
MinCoinTxOut calculates the minimum coin for a transaction output based on protocol parameters
func MinFeeTx ¶ added in v0.109.0
func MinFeeTx( tx common.Transaction, pparams common.ProtocolParameters, ) (uint64, error)
MinFeeTx calculates the minimum required fee for a transaction based on protocol parameters
func UtxoValidateBadInputsUtxo ¶ added in v0.109.0
func UtxoValidateBadInputsUtxo( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateBadInputsUtxo ensures that all inputs are present in the ledger state (have not been spent)
func UtxoValidateFeeTooSmallUtxo ¶ added in v0.109.0
func UtxoValidateFeeTooSmallUtxo( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateFeeTooSmallUtxo ensures that the fee is at least the calculated minimum
func UtxoValidateInputSetEmptyUtxo ¶ added in v0.109.0
func UtxoValidateInputSetEmptyUtxo( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateInputSetEmptyUtxo ensures that the input set is not empty
func UtxoValidateMaxTxSizeUtxo ¶ added in v0.109.0
func UtxoValidateMaxTxSizeUtxo( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateMaxTxSizeUtxo ensures that a transaction does not exceed the max size
func UtxoValidateOutputBootAddrAttrsTooBig ¶ added in v0.109.0
func UtxoValidateOutputBootAddrAttrsTooBig( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateOutputBootAddrAttrsTooBig ensures that bootstrap (Byron) addresses don't have attributes that are too large
func UtxoValidateOutputTooSmallUtxo ¶ added in v0.109.0
func UtxoValidateOutputTooSmallUtxo( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateOutputTooSmallUtxo ensures that outputs have at least the minimum value
func UtxoValidateTimeToLive ¶ added in v0.109.0
func UtxoValidateTimeToLive( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateTimeToLive ensures that the current tip slot is not after the specified TTL value
func UtxoValidateValueNotConservedUtxo ¶ added in v0.109.0
func UtxoValidateValueNotConservedUtxo( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateValueNotConservedUtxo ensures that the consumed value equals the produced value
func UtxoValidateWrongNetwork ¶ added in v0.109.0
func UtxoValidateWrongNetwork( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateWrongNetwork ensures that all output addresses use the correct network ID
func UtxoValidateWrongNetworkWithdrawal ¶ added in v0.109.0
func UtxoValidateWrongNetworkWithdrawal( tx common.Transaction, slot uint64, ls common.LedgerState, pp common.ProtocolParameters, ) error
UtxoValidateWrongNetworkWithdrawal ensures that all withdrawal addresses use the correct network ID
Types ¶
type BadInputsUtxoError ¶ added in v0.109.0
type BadInputsUtxoError struct {
Inputs []common.TransactionInput
}
func (BadInputsUtxoError) Error ¶ added in v0.109.0
func (e BadInputsUtxoError) Error() string
type ExpiredUtxoError ¶ added in v0.109.0
func (ExpiredUtxoError) Error ¶ added in v0.109.0
func (e ExpiredUtxoError) Error() string
type FeeTooSmallUtxoError ¶ added in v0.109.0
func (FeeTooSmallUtxoError) Error ¶ added in v0.109.0
func (e FeeTooSmallUtxoError) Error() string
type InputSetEmptyUtxoError ¶ added in v0.109.0
type InputSetEmptyUtxoError struct{}
func (InputSetEmptyUtxoError) Error ¶ added in v0.109.0
func (InputSetEmptyUtxoError) Error() string
type MaxTxSizeUtxoError ¶ added in v0.109.0
func (MaxTxSizeUtxoError) Error ¶ added in v0.109.0
func (e MaxTxSizeUtxoError) Error() string
type OutputBootAddrAttrsTooBigError ¶ added in v0.109.0
type OutputBootAddrAttrsTooBigError struct {
Outputs []common.TransactionOutput
}
func (OutputBootAddrAttrsTooBigError) Error ¶ added in v0.109.0
func (e OutputBootAddrAttrsTooBigError) Error() string
type OutputTooSmallUtxoError ¶ added in v0.109.0
type OutputTooSmallUtxoError struct {
Outputs []common.TransactionOutput
}
func (OutputTooSmallUtxoError) Error ¶ added in v0.109.0
func (e OutputTooSmallUtxoError) Error() string
type ShelleyBlock ¶
type ShelleyBlock struct {
cbor.StructAsArray
cbor.DecodeStoreCbor
BlockHeader *ShelleyBlockHeader
TransactionBodies []ShelleyTransactionBody
TransactionWitnessSets []ShelleyTransactionWitnessSet
TransactionMetadataSet map[uint]*cbor.LazyValue
}
func NewShelleyBlockFromCbor ¶
func NewShelleyBlockFromCbor(data []byte) (*ShelleyBlock, error)
func (*ShelleyBlock) BlockBodySize ¶
func (b *ShelleyBlock) BlockBodySize() uint64
func (*ShelleyBlock) BlockNumber ¶
func (b *ShelleyBlock) BlockNumber() uint64
func (*ShelleyBlock) Era ¶
func (b *ShelleyBlock) Era() common.Era
func (*ShelleyBlock) Hash ¶
func (b *ShelleyBlock) Hash() common.Blake2b256
func (*ShelleyBlock) Header ¶
func (b *ShelleyBlock) Header() common.BlockHeader
func (*ShelleyBlock) IssuerVkey ¶
func (b *ShelleyBlock) IssuerVkey() common.IssuerVkey
func (*ShelleyBlock) PrevHash ¶ added in v0.105.0
func (b *ShelleyBlock) PrevHash() common.Blake2b256
func (*ShelleyBlock) SlotNumber ¶
func (b *ShelleyBlock) SlotNumber() uint64
func (*ShelleyBlock) Transactions ¶
func (b *ShelleyBlock) Transactions() []common.Transaction
func (ShelleyBlock) Type ¶ added in v0.94.0
func (ShelleyBlock) Type() int
func (*ShelleyBlock) UnmarshalCBOR ¶
func (b *ShelleyBlock) UnmarshalCBOR(cborData []byte) error
func (*ShelleyBlock) Utxorpc ¶
func (b *ShelleyBlock) Utxorpc() *utxorpc.Block
type ShelleyBlockHeader ¶
type ShelleyBlockHeader struct {
cbor.StructAsArray
cbor.DecodeStoreCbor
Body ShelleyBlockHeaderBody
Signature []byte
// contains filtered or unexported fields
}
func NewShelleyBlockHeaderFromCbor ¶
func NewShelleyBlockHeaderFromCbor(data []byte) (*ShelleyBlockHeader, error)
func (*ShelleyBlockHeader) BlockBodySize ¶
func (h *ShelleyBlockHeader) BlockBodySize() uint64
func (*ShelleyBlockHeader) BlockNumber ¶
func (h *ShelleyBlockHeader) BlockNumber() uint64
func (*ShelleyBlockHeader) Era ¶
func (h *ShelleyBlockHeader) Era() common.Era
func (*ShelleyBlockHeader) Hash ¶
func (h *ShelleyBlockHeader) Hash() common.Blake2b256
func (*ShelleyBlockHeader) IssuerVkey ¶
func (h *ShelleyBlockHeader) IssuerVkey() common.IssuerVkey
func (*ShelleyBlockHeader) PrevHash ¶ added in v0.105.0
func (h *ShelleyBlockHeader) PrevHash() common.Blake2b256
func (*ShelleyBlockHeader) SlotNumber ¶
func (h *ShelleyBlockHeader) SlotNumber() uint64
func (*ShelleyBlockHeader) UnmarshalCBOR ¶
func (h *ShelleyBlockHeader) UnmarshalCBOR(cborData []byte) error
type ShelleyBlockHeaderBody ¶ added in v0.114.0
type ShelleyBlockHeaderBody struct {
cbor.StructAsArray
BlockNumber uint64
Slot uint64
PrevHash common.Blake2b256
IssuerVkey common.IssuerVkey
VrfKey []byte
NonceVrf common.VrfResult
LeaderVrf common.VrfResult
BlockBodySize uint64
BlockBodyHash common.Blake2b256
OpCertHotVkey []byte
OpCertSequenceNumber uint32
OpCertKesPeriod uint32
OpCertSignature []byte
ProtoMajorVersion uint64
ProtoMinorVersion uint64
}
type ShelleyGenesis ¶ added in v0.96.0
type ShelleyGenesis struct {
cbor.StructAsArray
SystemStart time.Time `json:"systemStart"`
NetworkMagic uint32 `json:"networkMagic"`
NetworkId string `json:"networkid"`
ActiveSlotsCoeff common.GenesisRat `json:"activeSlotsCoeff"`
SecurityParam int `json:"securityParam"`
EpochLength int `json:"epochLength"`
SlotsPerKESPeriod int `json:"slotsPerKESPeriod"`
MaxKESEvolutions int `json:"maxKESEvolutions"`
SlotLength int `json:"slotLength"`
UpdateQuorum int `json:"updateQuorum"`
MaxLovelaceSupply uint64 `json:"maxLovelaceSupply"`
ProtocolParameters ShelleyGenesisProtocolParams `json:"protocolParams"`
GenDelegs map[string]map[string]string `json:"genDelegs"`
InitialFunds map[string]any `json:"initialFunds"`
Staking any `json:"staking"`
}
func NewShelleyGenesisFromFile ¶ added in v0.96.0
func NewShelleyGenesisFromFile(path string) (ShelleyGenesis, error)
func NewShelleyGenesisFromReader ¶ added in v0.96.0
func NewShelleyGenesisFromReader(r io.Reader) (ShelleyGenesis, error)
func (ShelleyGenesis) MarshalCBOR ¶ added in v0.106.2
func (g ShelleyGenesis) MarshalCBOR() ([]byte, error)
type ShelleyGenesisProtocolParams ¶ added in v0.96.0
type ShelleyGenesisProtocolParams struct {
cbor.StructAsArray
MinFeeA uint `json:"minFeeA"`
MinFeeB uint `json:"minFeeB"`
MaxBlockBodySize uint `json:"maxBlockBodySize"`
MaxTxSize uint `json:"maxTxSize"`
MaxBlockHeaderSize uint `json:"maxBlockHeaderSize"`
KeyDeposit uint `json:"keyDeposit"`
PoolDeposit uint `json:"poolDeposit"`
MaxEpoch uint `json:"eMax"`
NOpt uint `json:"nOpt"`
A0 *common.GenesisRat `json:"a0"`
Rho *common.GenesisRat `json:"rho"`
Tau *common.GenesisRat `json:"tau"`
Decentralization *common.GenesisRat `json:"decentralisationParam"`
ExtraEntropy common.Nonce `json:"extraEntropy"`
ProtocolVersion struct {
Major uint `json:"major"`
Minor uint `json:"minor"`
} `json:"protocolVersion"`
MinUtxoValue uint `json:"minUTxOValue"`
MinPoolCost uint `json:"minPoolCost"`
}
func (ShelleyGenesisProtocolParams) MarshalCBOR ¶ added in v0.106.2
func (p ShelleyGenesisProtocolParams) MarshalCBOR() ([]byte, error)
type ShelleyProtocolParameterUpdate ¶
type ShelleyProtocolParameterUpdate struct {
cbor.DecodeStoreCbor
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"`
Decentralization *cbor.Rat `cbor:"12,keyasint"`
ExtraEntropy *common.Nonce `cbor:"13,keyasint"`
ProtocolVersion *common.ProtocolParametersProtocolVersion `cbor:"14,keyasint"`
MinUtxoValue *uint `cbor:"15,keyasint"`
}
func (ShelleyProtocolParameterUpdate) IsProtocolParameterUpdate ¶ added in v0.95.0
func (ShelleyProtocolParameterUpdate) IsProtocolParameterUpdate()
func (*ShelleyProtocolParameterUpdate) UnmarshalCBOR ¶ added in v0.95.0
func (u *ShelleyProtocolParameterUpdate) UnmarshalCBOR(cborData []byte) error
type ShelleyProtocolParameters ¶
type ShelleyProtocolParameters 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
Decentralization *cbor.Rat
ExtraEntropy common.Nonce
ProtocolMajor uint
ProtocolMinor uint
MinUtxoValue uint
}
func UpgradePParams ¶ added in v0.103.0
func UpgradePParams(prevPParams any) ShelleyProtocolParameters
func (*ShelleyProtocolParameters) Update ¶ added in v0.98.0
func (p *ShelleyProtocolParameters) Update( paramUpdate *ShelleyProtocolParameterUpdate, )
func (*ShelleyProtocolParameters) UpdateFromGenesis ¶ added in v0.98.0
func (p *ShelleyProtocolParameters) UpdateFromGenesis(genesis *ShelleyGenesis)
func (*ShelleyProtocolParameters) Utxorpc ¶ added in v0.103.0
func (p *ShelleyProtocolParameters) Utxorpc() *cardano.PParams
type ShelleyTransaction ¶
type ShelleyTransaction struct {
cbor.StructAsArray
cbor.DecodeStoreCbor
Body ShelleyTransactionBody
WitnessSet ShelleyTransactionWitnessSet
TxMetadata *cbor.LazyValue
}
func NewShelleyTransactionFromCbor ¶
func NewShelleyTransactionFromCbor(data []byte) (*ShelleyTransaction, error)
func (ShelleyTransaction) AssetMint ¶
func (t ShelleyTransaction) AssetMint() *common.MultiAsset[common.MultiAssetTypeMint]
func (ShelleyTransaction) AuxDataHash ¶
func (t ShelleyTransaction) AuxDataHash() *common.Blake2b256
func (*ShelleyTransaction) Cbor ¶
func (t *ShelleyTransaction) Cbor() []byte
func (ShelleyTransaction) Certificates ¶
func (t ShelleyTransaction) Certificates() []common.Certificate
func (ShelleyTransaction) Collateral ¶
func (t ShelleyTransaction) Collateral() []common.TransactionInput
func (ShelleyTransaction) CollateralReturn ¶
func (t ShelleyTransaction) CollateralReturn() common.TransactionOutput
func (ShelleyTransaction) Consumed ¶
func (t ShelleyTransaction) Consumed() []common.TransactionInput
func (ShelleyTransaction) CurrentTreasuryValue ¶
func (t ShelleyTransaction) CurrentTreasuryValue() int64
func (ShelleyTransaction) Donation ¶
func (t ShelleyTransaction) Donation() uint64
func (ShelleyTransaction) Fee ¶
func (t ShelleyTransaction) Fee() uint64
func (ShelleyTransaction) Hash ¶
func (t ShelleyTransaction) Hash() common.Blake2b256
func (ShelleyTransaction) Inputs ¶
func (t ShelleyTransaction) Inputs() []common.TransactionInput
func (ShelleyTransaction) IsValid ¶
func (t ShelleyTransaction) IsValid() bool
func (ShelleyTransaction) Metadata ¶
func (t ShelleyTransaction) Metadata() *cbor.LazyValue
func (ShelleyTransaction) Outputs ¶
func (t ShelleyTransaction) Outputs() []common.TransactionOutput
func (ShelleyTransaction) Produced ¶
func (t ShelleyTransaction) Produced() []common.Utxo
func (ShelleyTransaction) ProposalProcedures ¶
func (t ShelleyTransaction) ProposalProcedures() []common.ProposalProcedure
func (*ShelleyTransaction) ProtocolParameterUpdates ¶ added in v0.95.0
func (t *ShelleyTransaction) ProtocolParameterUpdates() (uint64, map[common.Blake2b224]common.ProtocolParameterUpdate)
func (ShelleyTransaction) ReferenceInputs ¶
func (t ShelleyTransaction) ReferenceInputs() []common.TransactionInput
func (ShelleyTransaction) RequiredSigners ¶
func (t ShelleyTransaction) RequiredSigners() []common.Blake2b224
func (ShelleyTransaction) ScriptDataHash ¶
func (t ShelleyTransaction) ScriptDataHash() *common.Blake2b256
func (ShelleyTransaction) TTL ¶
func (t ShelleyTransaction) TTL() uint64
func (ShelleyTransaction) TotalCollateral ¶
func (t ShelleyTransaction) TotalCollateral() uint64
func (ShelleyTransaction) Type ¶ added in v0.94.0
func (ShelleyTransaction) Type() int
func (*ShelleyTransaction) UnmarshalCBOR ¶ added in v0.114.1
func (t *ShelleyTransaction) UnmarshalCBOR(cborData []byte) error
func (ShelleyTransaction) Utxorpc ¶
func (t ShelleyTransaction) Utxorpc() *utxorpc.Tx
func (ShelleyTransaction) ValidityIntervalStart ¶
func (t ShelleyTransaction) ValidityIntervalStart() uint64
func (ShelleyTransaction) VotingProcedures ¶
func (t ShelleyTransaction) VotingProcedures() common.VotingProcedures
func (ShelleyTransaction) Withdrawals ¶
func (t ShelleyTransaction) Withdrawals() map[*common.Address]uint64
func (ShelleyTransaction) Witnesses ¶ added in v0.110.0
func (t ShelleyTransaction) Witnesses() common.TransactionWitnessSet
type ShelleyTransactionBody ¶
type ShelleyTransactionBody struct {
common.TransactionBodyBase
TxInputs ShelleyTransactionInputSet `cbor:"0,keyasint,omitempty"`
TxOutputs []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]ShelleyProtocolParameterUpdate
Epoch uint64
} `cbor:"6,keyasint,omitempty"`
TxAuxDataHash *common.Blake2b256 `cbor:"7,keyasint,omitempty"`
}
func NewShelleyTransactionBodyFromCbor ¶
func NewShelleyTransactionBodyFromCbor( data []byte, ) (*ShelleyTransactionBody, error)
func (*ShelleyTransactionBody) AuxDataHash ¶
func (b *ShelleyTransactionBody) AuxDataHash() *common.Blake2b256
func (*ShelleyTransactionBody) Certificates ¶
func (b *ShelleyTransactionBody) Certificates() []common.Certificate
func (*ShelleyTransactionBody) Fee ¶
func (b *ShelleyTransactionBody) Fee() uint64
func (*ShelleyTransactionBody) Inputs ¶
func (b *ShelleyTransactionBody) Inputs() []common.TransactionInput
func (*ShelleyTransactionBody) Outputs ¶
func (b *ShelleyTransactionBody) Outputs() []common.TransactionOutput
func (*ShelleyTransactionBody) ProtocolParameterUpdates ¶ added in v0.95.0
func (b *ShelleyTransactionBody) ProtocolParameterUpdates() (uint64, map[common.Blake2b224]common.ProtocolParameterUpdate)
func (*ShelleyTransactionBody) TTL ¶
func (b *ShelleyTransactionBody) TTL() uint64
func (*ShelleyTransactionBody) UnmarshalCBOR ¶
func (b *ShelleyTransactionBody) UnmarshalCBOR(cborData []byte) error
func (*ShelleyTransactionBody) Utxorpc ¶
func (b *ShelleyTransactionBody) Utxorpc() *utxorpc.Tx
func (*ShelleyTransactionBody) Withdrawals ¶
func (b *ShelleyTransactionBody) Withdrawals() map[*common.Address]uint64
type ShelleyTransactionInput ¶
type ShelleyTransactionInput struct {
cbor.StructAsArray
TxId common.Blake2b256
OutputIndex uint32
}
func NewShelleyTransactionInput ¶
func NewShelleyTransactionInput(hash string, idx int) ShelleyTransactionInput
func (ShelleyTransactionInput) Id ¶
func (i ShelleyTransactionInput) Id() common.Blake2b256
func (ShelleyTransactionInput) Index ¶
func (i ShelleyTransactionInput) Index() uint32
func (ShelleyTransactionInput) MarshalJSON ¶
func (i ShelleyTransactionInput) MarshalJSON() ([]byte, error)
func (ShelleyTransactionInput) String ¶
func (i ShelleyTransactionInput) String() string
func (ShelleyTransactionInput) Utxorpc ¶
func (i ShelleyTransactionInput) Utxorpc() *utxorpc.TxInput
type ShelleyTransactionInputSet ¶ added in v0.108.1
type ShelleyTransactionInputSet struct {
// contains filtered or unexported fields
}
func NewShelleyTransactionInputSet ¶ added in v0.109.0
func NewShelleyTransactionInputSet( items []ShelleyTransactionInput, ) ShelleyTransactionInputSet
func (*ShelleyTransactionInputSet) Items ¶ added in v0.108.1
func (s *ShelleyTransactionInputSet) Items() []ShelleyTransactionInput
func (*ShelleyTransactionInputSet) SetItems ¶ added in v0.109.0
func (s *ShelleyTransactionInputSet) SetItems(items []ShelleyTransactionInput)
func (*ShelleyTransactionInputSet) UnmarshalCBOR ¶ added in v0.108.1
func (s *ShelleyTransactionInputSet) UnmarshalCBOR(data []byte) error
type ShelleyTransactionOutput ¶
type ShelleyTransactionOutput struct {
cbor.StructAsArray
cbor.DecodeStoreCbor
OutputAddress common.Address `json:"address"`
OutputAmount uint64 `json:"amount"`
}
func NewShelleyTransactionOutputFromCbor ¶
func NewShelleyTransactionOutputFromCbor( data []byte, ) (*ShelleyTransactionOutput, error)
func (ShelleyTransactionOutput) Address ¶
func (o ShelleyTransactionOutput) Address() common.Address
func (ShelleyTransactionOutput) Amount ¶
func (o ShelleyTransactionOutput) Amount() uint64
func (ShelleyTransactionOutput) Assets ¶
func (o ShelleyTransactionOutput) Assets() *common.MultiAsset[common.MultiAssetTypeOutput]
func (ShelleyTransactionOutput) Datum ¶
func (o ShelleyTransactionOutput) Datum() *cbor.LazyValue
func (ShelleyTransactionOutput) DatumHash ¶
func (o ShelleyTransactionOutput) DatumHash() *common.Blake2b256
func (*ShelleyTransactionOutput) UnmarshalCBOR ¶ added in v0.114.1
func (o *ShelleyTransactionOutput) UnmarshalCBOR(cborData []byte) error
func (ShelleyTransactionOutput) Utxorpc ¶
func (o ShelleyTransactionOutput) Utxorpc() *utxorpc.TxOutput
type ShelleyTransactionWitnessSet ¶
type ShelleyTransactionWitnessSet struct {
cbor.DecodeStoreCbor
VkeyWitnesses []common.VkeyWitness `cbor:"0,keyasint,omitempty"`
WsNativeScripts []common.NativeScript `cbor:"1,keyasint,omitempty"`
BootstrapWitnesses []common.BootstrapWitness `cbor:"2,keyasint,omitempty"`
}
func (ShelleyTransactionWitnessSet) Bootstrap ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) Bootstrap() []common.BootstrapWitness
func (ShelleyTransactionWitnessSet) NativeScripts ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) NativeScripts() []common.NativeScript
func (ShelleyTransactionWitnessSet) PlutusData ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) PlutusData() []cbor.Value
func (ShelleyTransactionWitnessSet) PlutusV1Scripts ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) PlutusV1Scripts() [][]byte
func (ShelleyTransactionWitnessSet) PlutusV2Scripts ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) PlutusV2Scripts() [][]byte
func (ShelleyTransactionWitnessSet) PlutusV3Scripts ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) PlutusV3Scripts() [][]byte
func (ShelleyTransactionWitnessSet) Redeemers ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) Redeemers() common.TransactionWitnessRedeemers
func (*ShelleyTransactionWitnessSet) UnmarshalCBOR ¶
func (w *ShelleyTransactionWitnessSet) UnmarshalCBOR(cborData []byte) error
func (ShelleyTransactionWitnessSet) Vkey ¶ added in v0.110.0
func (w ShelleyTransactionWitnessSet) Vkey() []common.VkeyWitness
type ValueNotConservedUtxoError ¶ added in v0.109.0
func (ValueNotConservedUtxoError) Error ¶ added in v0.109.0
func (e ValueNotConservedUtxoError) Error() string
type WrongNetworkError ¶ added in v0.109.0
func (WrongNetworkError) Error ¶ added in v0.109.0
func (e WrongNetworkError) Error() string
type WrongNetworkWithdrawalError ¶ added in v0.109.0
func (WrongNetworkWithdrawalError) Error ¶ added in v0.109.0
func (e WrongNetworkWithdrawalError) Error() string