Documentation
¶
Index ¶
- Constants
- Variables
- func AssetIcon(icon []byte, name string, size float32) fyne.CanvasObject
- func AssetList(icon fyne.Resource, rescan func(), d *dreams.AppObject) fyne.CanvasObject
- func AssetType(collection, typeHdr string) string
- func AuctionInfo() fyne.Container
- func BackgroundRast(tag string) *canvas.Raster
- func BidBuyConfirm(scid string, amt uint64, bid bool, d *dreams.AppObject)
- func BuyNowInfo() fyne.Container
- func CheckAllNFAs(scids map[string]string)
- func CheckClaimable() (claimable []string)
- func CheckNFAListingType(scid string) (list int, addr string)
- func CheckWalletNames(value string)
- func ClaimAll(title string, d *dreams.AppObject)
- func ClaimClaimable(title string, claimable []string, d *dreams.AppObject)
- func CoinDecimal(ticker string) int
- func ConfirmCancelClose(scid string, close bool, d *dreams.AppObject)
- func CreateNFAContract(...) (contract string)
- func DappEnabled(dapp string) bool
- func DefaultThemeResource() *fyne.StaticResource
- func DisableIndexControls(d bool)
- func DisplayRating(i uint64) fyne.Resource
- func EnabledCollections(intro bool) (obj fyne.CanvasObject)
- func EnabledDappCount() (enabled int)
- func FindNFAListings(scids map[string]string, progress *widget.ProgressBar)
- func G45CollectionSC(name string) (collection string)
- func G45Index()
- func GetAuctionDetails(scid string)
- func GetBuyNowDetails(scid string)
- func GetFilters(check string) (filter []string)
- func GetListingPercents(scid string) (artP float64, royaltyP float64)
- func GetNFAImages(scid string)
- func GetNFAName(scid string) string
- func GetPrice(coin, tag string) (price float64, display string)
- func GetUnlistedDetails(scid string)
- func HowToMintNFA(button *widget.Button) fyne.CanvasObject
- func InfoDisplay() fyne.CanvasObject
- func IntroTree(intros []IntroText) fyne.CanvasObject
- func IsClosing() (close bool)
- func IsDreamsG45(check string) bool
- func IsDreamsNFACollection(collection string) bool
- func IsDreamsNFACreator(creator string) bool
- func NFACoverImg() fyne.CanvasObject
- func NFACreationExists(collection string) bool
- func NFAIcon() fyne.CanvasObject
- func NFAMarketInfo() fyne.Container
- func NameEntry() fyne.CanvasObject
- func NotListedInfo() fyne.Container
- func ParseURL(url string) string
- func PlaceAssets(tag string, profile fyne.CanvasObject, rescan func(), icon fyne.Resource, ...) *fyne.Container
- func PlaceMarket(d *dreams.AppObject) *container.Split
- func PlaceNFAMint(tag string, window fyne.Window) fyne.CanvasObject
- func RateConfirm(scid string, d *dreams.AppObject)
- func ReadDeroSignFile(tag, sign_path string) (checkC string, checkS string, signer string)
- func ReadDreamsConfig(tag string) (saved dreams.SaveData)
- func ResetAuctionInfo()
- func ResetBuyInfo()
- func ResetNotListedInfo()
- func RestartGif(g *xwidget.AnimatedGif)
- func ReturnAssetCount() (count int)
- func ReturnEnabledG45s(assets map[string]bool) (filter []string)
- func ReturnEnabledNFAs(assets map[string]bool) (filters []string)
- func RunNFAMarket(d *dreams.AppObject, cont *fyne.Container)
- func SearchNFAsBy(by int, prefix string) (results map[string]string)
- func SendMessageMenu(dest string, window_icon fyne.Resource)
- func SetClose(value bool)
- func SetUpNFACreation(tag, collection string) (save_path string, sign_path string)
- func ShowConfirmDialog(done chan struct{}, confirm interface{})
- func ShowMessageDialog(title, message string, delay time.Duration, w fyne.Window)
- func ShowTxDialog(title, tag, txid string, delay time.Duration, w fyne.Window)
- func StartDreamsIndicators(add []DreamsIndicator) fyne.CanvasObject
- func StartIndicators() fyne.CanvasObject
- func StopIndicators(these []DreamsIndicator)
- func SwitchProfileIcon(collection, name, url string, size float32) (icon *canvas.Image)
- func ThemeSelect(d *dreams.AppObject) fyne.CanvasObject
- func ToolsBadge() fyne.CanvasObject
- func TrimStringLen(str string, l int) string
- func ValidNFA(file string) bool
- func WriteDreamsConfig(u dreams.SaveData)
- type Agent
- type Asset
- type Degen
- type DreamsIndicator
- type IntroText
- type NFAListing
- type Seal
Constants ¶
const ( Seals_mint = "dero1qyfq8m3rju62tshju60zuc0ymrajwxqajkdh6pw888ejuv94jlfgjqq58px98" Seals_coll = "c6fa9a2c95d97da816eb9689a2fb52be385bb1df9e93abe99373ddbd3407129d" ATeam_mint = "dero1qyx9748k9wrt89a6rm0zzlayxgs3ndkmvg6m20shqp8ynh54zf2rgqq8yn9hn" ATeam_coll = "bbc357bdfe9fc41128fc11ce555eaadbd9b411eca903008396e0de4cc31821c7" Degen_coll = "8edea52b9a8a041e3b579ca2d81ea3d3e87e148ba4409273d53039991afa91be" Degen_mint = "dero1qy4e7jj4jaaj66pc0vg8h7l0hqelqjxj9ya9qgal03v0phjaycv5yqq8aqgyg" )
const ( SIX_mint = "dero1qy4ascka9rtspjvcyj6t8maazaay8t9udtt5nper3mukqkx2qtvyxqgflkpwp" AZY_mint = "dero1qyfk5w2rvqpl9kzfd7fpteyp2k362y6audydcu2qrgcmj6vtasfkgqq9704gn" DCB_mint = "dero1qy02stluwgh5aaawkmugqh47krtfzcq6f88jv2ydf6dkfupjca4gzqqwsmdzf" HS_mint = "dero1qy8p8cw8hr8dlxyg9xjxzlxf2zznwshcxk98ad688csgmk44y9kzyqqt9g2m0" Dorbling_mint = "dero1qy2tkfgpapjsgev8m9rs25209ajc6kcm42vzt2fapgk3ngmtc2guzqq52eq2r" Desperado_mint = "dero1qy0ydkcwuf7nvh6938jpalt5snsj2atgmdyms67rd05whuy8a2hvzqg46gh5f" )
Variables ¶
var ART_NFA_MS1 string
var Assets assetObjects
var Control menuObjects
Control menu indicators, checks, maps and defaults
var Info dispayObjects
var Market marketObjects
Market contains widget a list objects for NFA market
var Theme dreams.AssetSelect
Background theme AssetSelect
var Username string
Functions ¶
func AssetList ¶
Owned asset list object
- Sets Assets.Viewing and buttons visibility on selected
- rescan is func placed in button to rescan wallet assets
func BackgroundRast ¶
Create a new raster from image, looking for dreams.Theme.Img.Resource and will fallback to bundle.ResourceBackgroundPng if err
func BidBuyConfirm ¶
Confirm a bid or buy action of listed NFA
- amt of Dero in atomic units
- bid true for auction, false for sale
func BuyNowInfo ¶
func BuyNowInfo() fyne.Container
Returns container for NFA buy now display objects
func CheckAllNFAs ¶
Check if wallet owns any indexed NFAs
- Pass scids from db store, can be nil arg to check all from db
func CheckClaimable ¶ added in v0.11.0
func CheckClaimable() (claimable []string)
Checks if wallet has any claimable NFAs, looking assets sent with dst uint64(0xA1B2C3D4E5F67890)
func CheckNFAListingType ¶
Check NFA listing type and return owner address
- Auction returns 1
- Sale returns 2
func ClaimClaimable ¶ added in v0.11.0
Call ClaimOwnership on SC and confirm tx on all claimable SCs
func CoinDecimal ¶
Used for placing coin decimal, default returns 2 decimal place
func ConfirmCancelClose ¶
Confirm a cancel or close action of listed NFA
- close true to close listing, false to cancel
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 DefaultThemeResource ¶ added in v0.11.0
func DefaultThemeResource() *fyne.StaticResource
Returns default theme resource by Theme.Name
func DisplayRating ¶
func DisplayRating(i uint64) fyne.Resource
Display SCID rating from dReams SCID rating system
func EnabledCollections ¶ added in v0.10.1
func EnabledCollections(intro bool) (obj fyne.CanvasObject)
Enable asset collection objects
- intro used to set label if initial boot screen
func EnabledDappCount ¶ added in v0.11.0
func EnabledDappCount() (enabled int)
Returns how many dApps are enabled
func FindNFAListings ¶ added in v0.11.0
func FindNFAListings(scids map[string]string, progress *widget.ProgressBar)
Scan index for any active auction and buy now NFA listings
- Pass scids from db store, can be nil arg to check all from db
- progress widget to update ui
func G45CollectionSC ¶ added in v0.11.0
Returns collection SCID by name
func GetAuctionDetails ¶
func GetAuctionDetails(scid string)
Get auction details for current asset and set display objects
func GetBuyNowDetails ¶
func GetBuyNowDetails(scid string)
Get buy now details for current asset and set display objects
func GetFilters ¶ added in v0.11.0
Get search filters from on chain store
func GetListingPercents ¶
Get percentages for a NFA
func GetNFAImages ¶ added in v0.11.0
func GetNFAImages(scid string)
Get NFA cover and icon images for scid and set market images
func GetPrice ¶
Main price fetch, returns float and display string, average from 4 feeds
- coin, "BTC-USDT", "DERO-USDT", "XMR-USDT", "DERO-BTC", "XMR-BTC"
func GetUnlistedDetails ¶
func GetUnlistedDetails(scid string)
Get details for unlisted NFA and set display objects
func HowToMintNFA ¶
Tree object containing NFA minting instructions screen
func InfoDisplay ¶ added in v0.11.0
func InfoDisplay() fyne.CanvasObject
Set wallet and chain display content for menu
func IsDreamsNFACollection ¶ added in v0.11.0
Check if string is dReams NFA collection
func IsDreamsNFACreator ¶ added in v0.11.0
Check if string is dReams NFA creator address
func NFACoverImg ¶ added in v0.11.0
func NFACoverImg() fyne.CanvasObject
Returns NFA cover image for market display
func NFACreationExists ¶
Check that all creation directories exists
func NFAIcon ¶ added in v0.11.0
func NFAIcon() fyne.CanvasObject
Returns NFA market icon image with frame
func NFAMarketInfo ¶ added in v0.11.0
func NFAMarketInfo() fyne.Container
Initialize market display objects
func NotListedInfo ¶
func NotListedInfo() fyne.Container
Returns container for unlisted display objects
func PlaceAssets ¶
func PlaceAssets(tag string, profile fyne.CanvasObject, rescan func(), icon fyne.Resource, d *dreams.AppObject) *fyne.Container
Owned asset tab layout
- tag for log print
- profile is canvas object of widgets used to select assets for games, themes, etc
- rescan is func used to rescan wallet assets
- icon resources for side menus
- d for main window dialogs
func PlaceNFAMint ¶
func PlaceNFAMint(tag string, window fyne.Window) fyne.CanvasObject
Place objects for NFA minting of collections or single mint
func RateConfirm ¶
Confirmation for a SCID rating
func ReadDeroSignFile ¶ added in v0.10.1
Read a Dero .sign file and return signer, C and S signatures
func ReadDreamsConfig ¶
Read dReams platform config.json file
- tag for log print
- Sets up directory if none exists
func ResetNotListedInfo ¶
func ResetNotListedInfo()
Reset unlisted NFA 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 ¶
Returns search filter with all enabled G45s
func ReturnEnabledNFAs ¶
Returns search filter with all enabled NFAs
func RunNFAMarket ¶
Routine for NFA market, finds listings and disables controls, see PlaceAssets() and PlaceMarket() layouts
func SearchNFAsBy ¶
Search NFAs in index by name or collection
- by 0 is collection, 1 is name, 2 is description, 3 is scid
func SendMessageMenu ¶
func SendMessageMenu(dest string, window_icon fyne.Resource)
Send Dero message menu
func SetUpNFACreation ¶
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 ShowConfirmDialog ¶ added in v0.11.0
func ShowConfirmDialog(done chan struct{}, confirm interface{})
Shows a passed Fyne CustomDialog or ConfirmDialog and closes it if connection is lost
func ShowMessageDialog ¶ added in v0.11.0
Create and show dialog for general messages
func ShowTxDialog ¶ added in v0.10.1
Create and show dialog for sent TX, dismiss copies txid to clipboard, dialog will hide after delay
func StartDreamsIndicators ¶
func StartDreamsIndicators(add []DreamsIndicator) fyne.CanvasObject
dReams app status indicators for wallet, daemon, Gnomon and services
- Pass further DreamsIndicators to add
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 SwitchProfileIcon ¶ added in v0.11.0
func ThemeSelect ¶ added in v0.11.0
App theme selection object
- If image is not present locally, it is downloaded
func TrimStringLen ¶
Trim input string to specified len
func WriteDreamsConfig ¶
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 Asset ¶ added in v0.11.0
type Asset struct { Name string `json:"name"` Collection string `json:"collection"` SCID string `json:"scid"` Type string `json:"type"` Image []byte `json:"image"` }
Asset info
type DreamsIndicator ¶
type IntroText ¶
type IntroText struct {
// contains filtered or unexported fields
}
Menu tree items for dApp intros
func MakeMenuIntro ¶
Create menu tree items for dApps
type NFAListing ¶ added in v0.11.0
type NFAListing struct { Name string `json:"name"` Collection string `json:"collection"` Description string `json:"description"` SCID string `json:"scid"` Icon []byte `json:"icon"` IconURL string `json:"iconURL"` }
NFA listing data
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