Documentation ¶
Index ¶
- type TransactionOutput
- func (to TransactionOutput) Clone() TransactionOutput
- func (to *TransactionOutput) EqualTo(other TransactionOutput) bool
- func (to *TransactionOutput) GetAddress() Address.Address
- func (to *TransactionOutput) GetAddressPointer() *Address.Address
- func (to *TransactionOutput) GetAmount() Value.Value
- func (to *TransactionOutput) GetDatum() *PlutusData.PlutusData
- func (to *TransactionOutput) GetDatumHash() *serialization.DatumHash
- func (to *TransactionOutput) GetDatumOption() *PlutusData.DatumOption
- func (to *TransactionOutput) GetScriptRef() *PlutusData.ScriptRef
- func (to *TransactionOutput) GetValue() Value.Value
- func (to *TransactionOutput) Lovelace() int64
- func (txo *TransactionOutput) MarshalCBOR() ([]byte, error)
- func (txo *TransactionOutput) SetAmount(amount Value.Value)
- func (to *TransactionOutput) SetDatum(datum *PlutusData.PlutusData)
- func (txo TransactionOutput) String() string
- func (txo *TransactionOutput) UnmarshalCBOR(value []byte) error
- type TransactionOutputAlonzo
- type TransactionOutputShelley
- type TxOWithDatum
- type TxOWithoutDatum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionOutput ¶
type TransactionOutput struct { PostAlonzo TransactionOutputAlonzo PreAlonzo TransactionOutputShelley IsPostAlonzo bool }
TODO
func SimpleTransactionOutput ¶
func SimpleTransactionOutput(address Address.Address, value Value.Value) TransactionOutput
*
SimpleTransactionOutput creates a simple TransactionOutput with a given address and value. Params: address (Address.Address): The recipinet address. value (Value.value): The value to send. Returns: TransactionOutput: A simple TransactionOutput.
func (TransactionOutput) Clone ¶
func (to TransactionOutput) Clone() TransactionOutput
*
Clone creates a deep copy of the TransactionOutput. Returns: TransactionOutput: A deep copy of the TransactionOutput.
func (*TransactionOutput) EqualTo ¶
func (to *TransactionOutput) EqualTo(other TransactionOutput) bool
*
EqualTo checks if the current TransactionOutput is equal to another one. Params: other (TransactionOutput): The other TransactionOutput to compare. Returns: bool: True if the TransactionOutputs are equal, false otherwise.
func (*TransactionOutput) GetAddress ¶
func (to *TransactionOutput) GetAddress() Address.Address
*
GetAddress retrieves the recipient address of the TransactionOutput. Returns: Address.Address: The recipient address.
func (*TransactionOutput) GetAddressPointer ¶
func (to *TransactionOutput) GetAddressPointer() *Address.Address
*
GetAddressPointer retrieves a pointer to the recipient address of the TransactionOutput. Returns: *Address.Address: A pointer to the recipient address.
func (*TransactionOutput) GetAmount ¶
func (to *TransactionOutput) GetAmount() Value.Value
*
GetAmount retrieves the value of the TransactionOutput as a Value object. Returns: Value.Value: The value of the TransactionOutput as a Value object.
func (*TransactionOutput) GetDatum ¶
func (to *TransactionOutput) GetDatum() *PlutusData.PlutusData
*
GetAddressPointer retrieves, if available, the Datum of the TransactionOutput. Returns: *PlutusData.PlutusData: The Datum of the TransictionOutput or an empty PlutusData.PlutusData.
func (*TransactionOutput) GetDatumHash ¶
func (to *TransactionOutput) GetDatumHash() *serialization.DatumHash
*
GetDatumHash retrieves, if available, the DatumHash of the TransactionOutput. Returns: *serialization.DatumHash: The DatumHash of the TransictionOutput or nil.
func (*TransactionOutput) GetDatumOption ¶ added in v1.0.5
func (to *TransactionOutput) GetDatumOption() *PlutusData.DatumOption
func (*TransactionOutput) GetScriptRef ¶
func (to *TransactionOutput) GetScriptRef() *PlutusData.ScriptRef
func (*TransactionOutput) GetValue ¶
func (to *TransactionOutput) GetValue() Value.Value
*
GetValue retrieves the value of the TransactionOutput as a value object. Returns: Value.Value: The value of the TransactionOutput as a Value object.
func (*TransactionOutput) Lovelace ¶
func (to *TransactionOutput) Lovelace() int64
*
Lovelace retireves the amount in Lovelace of the TransactionOutput. Returns: int64: The amount in Lovelace.
func (*TransactionOutput) MarshalCBOR ¶
func (txo *TransactionOutput) MarshalCBOR() ([]byte, error)
*
MarshalCBOR serializes the TransactionOutput into a CBOR-encoded byte slice, which encodes the output based on whether it is pre- or post- Alonzo. Returns: []byte: A CBOR-encoded byte slice representing the TransactionOutput. error: An error if serialization fails.
func (*TransactionOutput) SetAmount ¶
func (txo *TransactionOutput) SetAmount(amount Value.Value)
*
SetAmount sets the amount of the TransactionOutput. In case of a post-Alonzo output, the amount is set directly, otherwise the amount is set. Params: amount Value.Value: The amount to set.
func (*TransactionOutput) SetDatum ¶
func (to *TransactionOutput) SetDatum(datum *PlutusData.PlutusData)
*
SetDatum sets the Datum of the TransactionOutput. If it is a post Alonzo, it sets the Datum directly, otherwise it sets the DatumHash. Params: datum (*PlutusData.PlutusData): The Datum to set.
func (TransactionOutput) String ¶
func (txo TransactionOutput) String() string
*
String returns a string representation of the TransactionOutput. Returns: string: A string representation of the TransactionOutput.
func (*TransactionOutput) UnmarshalCBOR ¶
func (txo *TransactionOutput) UnmarshalCBOR(value []byte) error
*
UnmarshalCBOR deserializes a CBOR-encoded byte slice into a TransactionOutput, which determines the format of the output (pre- or post-Alonzo) and decodes accordingly. Params: value ([]byte): A CBOR-encoded byte slice representing the TransactionOutput. Returns: error: An error if deserialization fails.
type TransactionOutputAlonzo ¶
type TransactionOutputAlonzo struct { Address Address.Address `cbor:"0,keyasint"` Amount Value.AlonzoValue `cbor:"1,keyasint"` Datum *PlutusData.DatumOption `cbor:"2,keyasint,omitempty"` ScriptRef *PlutusData.ScriptRef `cbor:"3,keyasint,omitempty"` }
func (TransactionOutputAlonzo) Clone ¶
func (t TransactionOutputAlonzo) Clone() TransactionOutputAlonzo
*
Clone returns a dep copy of the TransactionOutputAlonzo. Returns: TransactionOutputAlonzo: A deep copy of the TransactionOutputAlonzo.
func (TransactionOutputAlonzo) String ¶
func (txo TransactionOutputAlonzo) String() string
*
String returns a string representation of the TransactionOutputAlonzo, which includes the address and amount indicator. Returns: string: The string representation of TransactionOutputAlonzo.
type TransactionOutputShelley ¶
type TransactionOutputShelley struct { Address Address.Address Amount Value.Value DatumHash serialization.DatumHash HasDatum bool }
func (TransactionOutputShelley) Clone ¶
func (t TransactionOutputShelley) Clone() TransactionOutputShelley
*
Clone returns a deep copy of the TransactionOutputShelley. Returns: TransactionOutputShelley: A deep copy of the TransactionOutputShelley.
func (*TransactionOutputShelley) MarshalCBOR ¶
func (txo *TransactionOutputShelley) MarshalCBOR() ([]byte, error)
*
MarshalCBOR serializes the TransactionOutputShelley into a CBOR-encoded byte slice, which is based on the DATUM information. Returns: []byte: A CBOR-encoded byte slice representing the TransactionOutputShelley. error: An error if serialization fails.
func (TransactionOutputShelley) String ¶
func (txo TransactionOutputShelley) String() string
*
String returns a string representation of the TransactionOutputShelley, which includes the address, amount and datum information in hexadecimal format. Returns: string: The string representation of TransactionOutputShelley.
func (*TransactionOutputShelley) UnmarshalCBOR ¶
func (txo *TransactionOutputShelley) UnmarshalCBOR(value []byte) error
*
UnmarshalCBOR deserializes a CBOR-encoded byte slice into a TransactionOutputShelley, which determines whether the output has DATUM information and decodes accordingly. Params: value ([]byte): A CBOR-encoded byte slice representing the TransactionOutputShelley. Returns: error: An error if deserialization fails.
type TxOWithDatum ¶
Click to show internal directories.
Click to hide internal directories.