globalState

package
v0.0.0-...-b4e1fbf Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalStateCmd = &cobra.Command{
	Use:   "global-state",
	Short: "List global state UTxOs on Andamio Network",
	Long: `
List network participants

	`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Querying Andamio Global State...")
		globalState(tokenName)
	},
}

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Unit   string `json:"unit"`
	Amount string `json:"amount"`
}

Define the structs

type Datum

type Datum struct {
	Type  string    `json:"type"`
	Hash  string    `json:"hash"`
	Bytes string    `json:"bytes"`
	JSON  DatumJSON `json:"json"`
}

type DatumField

type DatumField struct {
	Bytes string       `json:"bytes,omitempty"`
	List  []DatumField `json:"list,omitempty"`
}

type DatumJSON

type DatumJSON struct {
	Constructor int          `json:"constructor"`
	Fields      []DatumField `json:"fields"`
}

type GlobalStateUTxO

type GlobalStateUTxO struct {
	TxHash          string  `json:"tx_hash"`
	Index           int     `json:"index"`
	Slot            int     `json:"slot"`
	Assets          []Asset `json:"assets"`
	Address         string  `json:"address"`
	Datum           Datum   `json:"datum"`
	ReferenceScript *string `json:"reference_script"` // Use *string to allow null values
	TxoutCbor       *string `json:"txout_cbor"`       // Use *string to allow null values
}

Jump to

Keyboard shortcuts

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