Metadata

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlonzoMetadata

type AlonzoMetadata struct {
	Metadata      Metadata                    `cbor:"0,keyasint,omitempty"`
	NativeScripts []NativeScript.NativeScript `cbor:"1,keyasint,omitempty"`
	PlutusScripts []uint8                     `cbor:"2,keyasint,omitempty"`
}

type AuxiliaryData

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

func (*AuxiliaryData) Hash

func (ad *AuxiliaryData) Hash() []byte

*

Hash computes computes the has of the AuxiliaryData.

Returns:
	[]byte: The computed hash or nil if all metadata fileds are empty.

func (*AuxiliaryData) MarshalCBOR

func (ad *AuxiliaryData) MarshalCBOR() ([]byte, error)

*

MarshalCBOR serializes the AUxiliaryData to a CBOR byte slice.

Returns:
	[]byte: The CBOR-serialized AuxiliaryData.
	error: An error if serialization fails.

func (*AuxiliaryData) SetAlonzoMetadata

func (ad *AuxiliaryData) SetAlonzoMetadata(value AlonzoMetadata)

*

SetAlonzoMetadata sets the Alonzo metadata for the AuxiliaryData.

func (*AuxiliaryData) SetBasicMetadata

func (ad *AuxiliaryData) SetBasicMetadata(value Metadata)

*

SetBasicMetadata sets the basic metadata for the AuxiliaryData.

func (*AuxiliaryData) SetShelleyMetadata

func (ad *AuxiliaryData) SetShelleyMetadata(value ShelleyMaryMetadata)

*

SetShelleyMetadata sets the Shelley metadata for the AuxiliaryData.

func (*AuxiliaryData) UnmarshalCBOR

func (ad *AuxiliaryData) UnmarshalCBOR(value []byte) error

*

UnmarshalCBOR deserializes the AuxiliaryData from a CBOR-encoded byte slice.

Params:
	value []byte: The CBOR-encoded data to deserialize.

Returns:
	error: An error if deserialization fails.

type Metadata

type Metadata map[int]any

type MinimalMetadata

type MinimalMetadata map[string]any

type PoliciesMetadata

type PoliciesMetadata map[string]MinimalMetadata

type ShelleyMaryMetadata

type ShelleyMaryMetadata struct {
	Metadata      Metadata                    `cbor:",omitempty"`
	NativeScripts []NativeScript.NativeScript `cbor:",omitempty"`
	// contains filtered or unexported fields
}

func (*ShelleyMaryMetadata) MarshalCBOR

func (smm *ShelleyMaryMetadata) MarshalCBOR() ([]byte, error)

*

MarshalCBOR marshals a ShelleyMaryMetadata instance into CBOR-encoded data.

Returns:
	([]byte, error): The CBOR-encoded data and an error if marshaling fails,
					 nil otherwise.

type TagMetadata

type TagMetadata map[string]any

Jump to

Keyboard shortcuts

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