menu

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 42 Imported by: 11

Documentation

Index

Constants

View Source
const (
	Seals_mint = "dero1qyfq8m3rju62tshju60zuc0ymrajwxqajkdh6pw888ejuv94jlfgjqq58px98"
	Seals_coll = "c6fa9a2c95d97da816eb9689a2fb52be385bb1df9e93abe99373ddbd3407129d"
	ATeam_mint = "dero1qyx9748k9wrt89a6rm0zzlayxgs3ndkmvg6m20shqp8ynh54zf2rgqq8yn9hn"
	ATeam_coll = "bbc357bdfe9fc41128fc11ce555eaadbd9b411eca903008396e0de4cc31821c7"
	Degen_coll = "8edea52b9a8a041e3b579ca2d81ea3d3e87e148ba4409273d53039991afa91be"
	Degen_mint = "dero1qy4e7jj4jaaj66pc0vg8h7l0hqelqjxj9ya9qgal03v0phjaycv5yqq8aqgyg"
)
View Source
const (
	NFA_SEARCH_FILTER = `` /* 977-byte string literal not displayed */

	G45_search_filter = `STORE("type", "G45-NFT")`
)

Variables

View Source
var ART_NFA_MS1 string
View Source
var Assets assetObjects
View Source
var Control menuObjects
View Source
var Exit exit
View Source
var Gnomes gnomon
View Source
var Market marketObjects
View Source
var Username string

Functions

func AssetList

func AssetList() fyne.CanvasObject

Owned asset list object

  • Sets Control.Viewing_asset and asset stats on selected

func AssetStats

func AssetStats() fyne.CanvasObject

Display for owned asset info

func AuctionInfo

func AuctionInfo() fyne.CanvasObject

Container for auction info objects

func AuctionListings

func AuctionListings() fyne.Widget

NFA auction listings object

  • Gets images and details for Market objects on selected

func BackgroundRast

func BackgroundRast(tag string) *canvas.Raster

Create a new raster from image, looking for holdero.Settings.ThemeImg and will fallback to bundle.ResourceBackgroundPng if err

func BidBuyConfirm

func BidBuyConfirm(scid string, amt uint64, b int, obj *container.Split, reset fyne.CanvasObject) fyne.CanvasObject

Confirm a bid or buy action of listed NFA

  • amt of Dero in atomic units
  • b defines auction or sale
  • Pass main window obj to reset to

func BuyNowInfo

func BuyNowInfo() fyne.CanvasObject

Container for buy now info objects

func BuyNowListings

func BuyNowListings() fyne.Widget

NFA buy now listings object

  • Gets images and details for Market objects on selected

func CheckAllNFAs

func CheckAllNFAs(gc bool, scids map[string]string)

Check wallet for all indexed NFAs

  • Pass scids from db store, can be nil arg
  • Pass false gc for rechecks

func CheckNFAListingType

func CheckNFAListingType(scid string) (list int, addr string)

Check NFA listing type and return owner address

  • Auction returns 1
  • Sale returns 2

func CheckOwner

func CheckOwner(scid string) bool

Check owner of any SCID using "owner" key

func CheckWalletNames

func CheckWalletNames(value string)

Get a wallets registered names

func CloseAppSignal

func CloseAppSignal(value bool)

Set app closing signal value

func ClosingApps

func ClosingApps() (close bool)

Check for app closing signal

func CoinDecimal

func CoinDecimal(ticker string) int

Used for placing coin decimal, default returns 2 decimal place

func ConfirmCancelClose

func ConfirmCancelClose(scid string, c int, obj *container.Split, reset fyne.CanvasObject) fyne.CanvasObject

Confirm a cancel or close action of listed NFA

  • c defines close or cancel
  • Confirmation string from Market.Tab
  • Pass main window obj to reset to

func Connected

func Connected() bool

Check three connection signals

func CreateNFAContract

func CreateNFAContract(art, royalty, update, name, descrip, typeHdr, icon, tags, fileCheckC, fileCheckS, fileUrl, fileSignUrl, coverURl, collection string) (contract string)

Create a new NFA contract string with passed values

func CreateSwapContainer

func CreateSwapContainer(pair string) (*dwidget.DeroAmts, *fyne.Container)

func DaemonRpcEntry

func DaemonRpcEntry() fyne.Widget

Daemon rpc entry object with default options

  • Bound to rpc.Daemon.Rpc

func DisableIndexControls

func DisableIndexControls(d bool)

Disable index objects

func DisplayRating

func DisplayRating(i uint64) fyne.Resource

Display SCID rating from dReams SCID rating system

func EnabledDapps

func EnabledDapps() (enabled int)

Returns how many dApps are enabled

func FetchFilters

func FetchFilters(check string) (filter []string)

Get search filters from on chain store

func FindNfaListings

func FindNfaListings(assets map[string]string)

Scan index for any active NFA listings

  • Pass assets from db store, can be nil arg

func G45Collection

func G45Collection(name string) (collection string)

Returns collection SCID by name

func G45Index

func G45Index()

Manually add G45 collections to Gnomon index

func GetAssetUrl

func GetAssetUrl(w int, scid string) (url string)

Get a requested NFA url

  • w of 0 returns "fileURL"
  • w of 1 returns "iconURLHdr"
  • w of 2 returns "coverURLHdr"

func GetAuctionDetails

func GetAuctionDetails(scid string)

Create auction tab info for current asset

func GetBuyNowDetails

func GetBuyNowDetails(scid string)

Create buy now tab info for current asset

func GetListingPercents

func GetListingPercents(scid string) (artP float64, royaltyP float64)

Get percentages for a NFA

func GetNfaImages

func GetNfaImages(scid string)

Get NFA image files

func GetOwnedAssetStats

func GetOwnedAssetStats(scid string)

Get SCID info and update Asset content

func GetPrice

func GetPrice(coin, tag string) (price float64, display string)

Main price fetch, returns float and display string

  • Average from 3 feeds, if not take average from 2, if not TO value takes priority spot

func GetSCHeaders

func GetSCHeaders(scid string) []string

Get Gnomon headers of SCID

func GetUnlistedDetails

func GetUnlistedDetails(scid string)

Create info for unlisted NFA

func GnomonBoltDB

func GnomonBoltDB(dbType, dbPath string) *storage.BboltStore

Create Gnomon bbolt db with dReams tag

  • If dbType is not boltdb, will return nil boltdb

func GnomonEndPoint

func GnomonEndPoint()

Update Gnomon endpoint to current rpc.Daemon.Rpc value

func GnomonGravDB

func GnomonGravDB(dbType, dbPath string) *storage.GravitonStore

Create Gnomon graviton db with dReams tag

  • If dbType is boltdb, will return nil gravdb

func GnomonScan

func GnomonScan(config bool) bool

Gnomon is ready for dApp to preform initial scan

func GnomonState

func GnomonState(config bool, scan func(map[string]string))

Gnomon will scan connected wallet on start up, then ensure sync

  • Hold out checking if dReams is in configure
  • Pass scan func for initial Gnomon sync

func HowToMintNFA

func HowToMintNFA(button *widget.Button) fyne.CanvasObject

Tree object containing NFA minting instructions screen

func IconImg

func IconImg(res fyne.Resource) *fyne.Container

Icon image for Holdero tables and asset viewing

  • Pass res as frame resource

func IndexEntry

func IndexEntry(window_icon fyne.Resource) fyne.CanvasObject

Index entry and NFA control objects

  • Pass window resources for side menu windows

func InitLogrusLog

func InitLogrusLog(windows bool)

func IntroTree

func IntroTree(intros []IntroText) fyne.CanvasObject

Menu instruction tree

func IsDreamsG45

func IsDreamsG45(check string) bool

dReams G45 collections

func MarketEntry

func MarketEntry() fyne.CanvasObject

NFA market amount entry

func MarketTab

func MarketTab(ti *container.TabItem)

Switch triggered when market tab changes

func MenuDisplay() fyne.CanvasObject

Set wallet and chain display content for menu

func MyNFAListings

func MyNFAListings() fyne.Widget

NFA listing for connected wallet

  • Gets images and details for Market objects on selected

func NFACreationExists

func NFACreationExists(collection string) bool

Check that all creation directories exists

func NameEntry

func NameEntry() fyne.CanvasObject

Dero wallet name entry

func NfaIcon

func NfaIcon(res fyne.Resource) fyne.CanvasObject

NFA market icon image with frame

  • Pass res for frame resource

func NfaImg

func NfaImg(img canvas.Image) fyne.CanvasObject

NFA cover image for market display

func NfaMarketInfo

func NfaMarketInfo() fyne.CanvasObject

Set up market info objects

func NotListedInfo

func NotListedInfo() fyne.CanvasObject

Container for unlisted info objects

func PlaceAssets

func PlaceAssets(tag string, assets []fyne.Widget, menu_icon fyne.Resource, w fyne.Window) *container.Split

Owned asset tab layout

  • tag for log print
  • assets is array of widgets used for asset selections
  • menu_icon resources for side menus
  • w for main window dialog

func PlaceMarket

func PlaceMarket() *container.Split

NFA market layout

func PlaceNFAMint

func PlaceNFAMint(tag string, window fyne.Window) fyne.CanvasObject

Place objects for NFA minting of collections or single mint

func RateConfirm

func RateConfirm(scid string, tab *container.AppTabs, reset fyne.CanvasObject) fyne.CanvasObject

Confirmation for a SCID rating

func ReadDreamsConfig

func ReadDreamsConfig(tag string) (saved dreams.DreamSave)

Read dReams platform config.json file

  • tag for log print
  • Sets up directory if none exists

func RefreshNfaImages

func RefreshNfaImages()

Refresh Market images

func ResetAuctionInfo

func ResetAuctionInfo()

Set auction display content to default values

func ResetBuyInfo

func ResetBuyInfo()

Set buy now display content to default values

func ResetNotListedInfo

func ResetNotListedInfo()

Set unlisted display content to default values

func RestartGif

func RestartGif(g *xwidget.AnimatedGif)

Main gif seems to stop when hidden for 5min+ will use this for now to check if running and restart

func ReturnAssetCount

func ReturnAssetCount() (count int)

func ReturnEnabledG45s

func ReturnEnabledG45s(assets map[string]bool) (filter []string)

func ReturnEnabledNFAs

func ReturnEnabledNFAs(assets map[string]bool) (filters []string)

func RunNFAMarket

func RunNFAMarket(tag string, quit, done chan struct{}, connect_box *dwidget.DeroRpcEntries)

Full routine for NFA market and scanning wallet for NFAs, can use PlaceAssets() and PlaceMarket() layouts

  • tag for log print
  • quit for exit chan
  • connected box for DeroRpcEntries

func SearchNFAs

func SearchNFAs() fyne.CanvasObject

Search NFA objects

func SearchNFAsBy

func SearchNFAsBy(by int, prefix string) (results []string)

Search NFAs in index by name or collection

func SendMessageMenu

func SendMessageMenu(dest string, window_icon fyne.Resource)

Send Dero message menu

func SetUpNFACreation

func SetUpNFACreation(tag, collection string) (save_path string, sign_path string)

Set up NFA-Creation directory with sub directory for collection or single asset, which contains sub directories for asset, bas, icon, cover and sign files

func StartDreamsIndicators

func StartDreamsIndicators(add []DreamsIndicator) fyne.CanvasObject

dReams app status indicators for wallet, daemon, Gnomon and services

  • Pass further DreamsIndicators to add

func StartGnomon

func StartGnomon(tag, dbtype string, filters []string, upper, lower int, custom func())

Start Gnomon indexer with or without search filters

  • End point from rpc.Daemon.Rpc
  • tag for log print
  • dbtype defines gravdb or boltdb
  • Passing nil filters with Gnomes.Trim false will run a full Gnomon index
  • custom func() is for adding specific SCID to index on Gnomon start, Gnomes.Trim false will bypass
  • lower defines the lower limit of indexed SCIDs from Gnomon search filters before custom adds
  • upper defines the higher limit when custom indexed SCIDs exist already

func StartIndicators

func StartIndicators() fyne.CanvasObject

Dero status indicators for wallet, daemon and Gnomon

func StopIndicators

func StopIndicators(these []DreamsIndicator)

Stop dReams app status indicators

func StopLabel

func StopLabel()

Menu label when Gnomon is closing

func ToolsBadge

func ToolsBadge(res fyne.Resource) fyne.CanvasObject

Badge for dReam Tools enabled assets

  • Pass res for frame resource

func TrimStringLen

func TrimStringLen(str string, l int) string

Trim input string to specified len

func ValidNfa

func ValidNfa(file string) bool

Check if SCID is a valid NFA

  • file != "-"

func WriteDreamsConfig

func WriteDreamsConfig(u dreams.DreamSave)

Save dReams config.json file for platform wide dApp use

Types

type Agent

type Agent struct {
	Attributes struct {
		Color  string `json:"Color"`
		IChing string `json:"I-ching"`
	} `json:"attributes"`
	ID    int    `json:"id"`
	Image string `json:"image"`
	Name  string `json:"name"`
}

Dero A-Team metadata struct

type Degen

type Degen struct {
	Attributes struct {
	} `json:"attributes"`
	ID    int    `json:"id"`
	Image string `json:"image"`
	Name  string `json:"name"`
}

type DreamsIndicator

type DreamsIndicator struct {
	Img       *canvas.Image
	Rect      *canvas.Rectangle
	Animation *fyne.Animation
}

type IntroText

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

func MakeMenuIntro

func MakeMenuIntro(items map[string][]string) (entries []IntroText)

Create menu tree items for dApps

type Seal

type Seal struct {
	Attributes struct {
		Eyes        string `json:"Eyes"`
		FacialHair  string `json:"Facial Hair"`
		HairAndHats string `json:"Hair And Hats"`
		Shirts      string `json:"Shirts"`
	} `json:"attributes"`
	ID    int     `json:"id"`
	Image string  `json:"image"`
	Name  string  `json:"name"`
	Score float64 `json:"score"`
}

Dero Seals metadata struct

Jump to

Keyboard shortcuts

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