package module
Version: v0.10.1 Latest Latest

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 17 Imported by: 8



Interact with a variety of different products and services on Dero's decentralized application platform.


  1. Project
  2. dApps
  3. Features
  4. Build
  5. Packages
  6. Donations
  7. Licensing

dReams is a open source platform application that houses multiple desktop dApps and utilities built on Dero. dReams has two facets to its use.


As a application

With a wide array of features from games to blockchain services, dReams is a point of entry into the privacy preserving world of Dero.

As a repository

dReams serves as a source for building Dero applications. Written in Go and using the Fyne toolkit, the dReams repository is constructed into packages with function imports for many different Dero necessities.

Download the latest release or build from source to use dReams.


dReams Template can be used to help create new Dero dApps.


All dApps are ran on chain in a decentralized manner. dReams and packages are solely interfaces to interact with these on chain services. With the main dReams application, users can access the dApps below from one place.

  • Holdero
    • Multiplayer Texas Hold'em style poker
    • In game assets
    • Deployable contracts
    • Multiple tokens supported
    • dReam Tools
  • Baccarat
    • Single player table game
    • In game assets
    • Multiple tokens supported
  • dSports and dPrediction
    • P2P betting and predictions
    • Deployable contracts
    • dService
  • Iluma
    • Tarot readings
    • Custom cards and artwork by Kalina Lux
    • Querent's companion
  • DerBnb
    • Property rental management app
    • Mint property tokens
    • Manage rentals and bookings with Dero private messaging
    • DerBnb profit share
    • TRVL tokens
  • NFA Marketplace
    • View and manage owned assets
    • View and manage listings
    • Search NFAs
    • Mint NFAs
  • More dApps to come...
  • Gnomon with UI controls
  • Create customs Gnomon indexes
  • Gnomon header controls
  • Send Dero messages
  • Send Dero assets
  • Deployable contract rating system
  • Dynamic app updates from on chain data
  • Import only the dApps and collections you want to use
  • Shared config files for platform wide use
  • Install latest Go version
  • Install Fyne dependencies.
  • Clone repo and build with:
git clone https://github.com/dReam-dApps/dReams.git
cd dReams
cd cmd/dReams
go build .


dReams repo is built as packages. With imports from the Dero code base, dReams variable structures are complete with the basics needs for building Dero applications that can run alone, or ones that could be integrated into dReams.

dReams Template can be used as a UI starting point and you can view our Examples repo for further references.


The rpc package contains all of the basic functionality needed to set up clients, check connectivity and read blockchain and wallet information. There are arbitrary rpc calls which any dApp can make use of such as the NFA calls, SendMessage() or SendAsset() with optional payload. This example checks for daemon and wallet rpc connectivity.

package main

import (


// dReams rpc connection example

// Name my app
const app_tag = "My_app"

func main() {
	// Initialize rpc addresses to rpc.Daemon and rpc.Wallet vars
	rpc.Daemon.Rpc = ""
	rpc.Wallet.Rpc = ""
	// Initialize rpc.Wallet.UserPass for rpc user:pass

	// Check for daemon connection

	// Check for wallet connection and get address

	// Exit with ctrl-C
	var exit bool
	c := make(chan os.Signal, 1)
	signal.Notify(c, os.Interrupt, syscall.SIGTERM)
	go func() {
		log.Printf("[%s] Closing\n", app_tag)
		exit = true

	// Loop will check for daemon and wallet connection and
	// print wallet height and balance. It will keep
	// running while daemon and wallet are connected or until exit
	for !exit && rpc.IsReady() {
		log.Printf("[%s] Height: %d   Dero Balance: %s\n", app_tag, rpc.Wallet.Height, rpc.FromAtomic(rpc.Wallet.Balance, 5))
		time.Sleep(3 * time.Second)

	log.Printf("[%s] Not connected\n", app_tag)

The menu package contains the base components used for Gnomon indexing. StartGnomon() allows apps to run a instance of Gnomon with search filter and pass optional func for any custom index requirements. NFA related items such as the dReams NFA marketplace and asset controls can be independently imported for use in other dApps, it can be used with or without dReams filters. There are menu panels and custom Dero indicators that can be imported. This example starts Gnomon with NFA search filter.

package main

import (


// dReams menu StartGnomon() example

// Name my app
const app_tag = "My_app"

// Log output
var logger = structures.Logger.WithFields(logrus.Fields{})

func main() {
	// Initialize Gnomon fast sync
	menu.Gnomes.Fast = true

	// Initialize rpc address to rpc.Daemon var
	rpc.Daemon.Rpc = ""

	// Initialize logger to Stdout

	// Check for daemon connection, if daemon is not connected we won't start Gnomon
	if rpc.Daemon.Connect {
		// Initialize NFA search filter and start Gnomon
		filter := []string{menu.NFA_SEARCH_FILTER}
		menu.StartGnomon(app_tag, "boltdb", filter, 0, 0, nil)

		// Exit with ctrl-C
		var exit bool
		c := make(chan os.Signal, 1)
		signal.Notify(c, os.Interrupt, syscall.SIGTERM)
		go func() {
			exit = true

		// Gnomon will continue to run if daemon is connected
		for !exit && rpc.Daemon.Connect {
			contracts := menu.Gnomes.GetAllOwnersAndSCIDs()
			logger.Printf("[%s] Index contains %d contracts\n", app_tag, len(contracts))
			time.Sleep(3 * time.Second)

		// Stop Gnomon

	logger.Printf("[%s] Done\n", app_tag)

The dwidget package is a extension to fyne widgets that intends to make creating dApps simpler and quicker with widgets specified for use with Dero. Numerical entries have prefix, increment and decimal control and pre-configured connection boxes can be used that are tied into dReams rpc vars and have default Dero connection addresses populated. There is objects for shutdown control as well as a spot for the dReams indicators, or new ones. This example starts a Fyne gui app using VerticalEntries() to start Gnomon when connected.

package main

import (


// dReams dwidget NewVerticalEntries() example

// Name my app
const app_tag = "My_app"

func main() {
	// Initialize Gnomon fast sync
	menu.Gnomes.Fast = true

	// Initialize logger to Stdout

	// Initialize fyne app
	a := app.New()

	// Initialize fyne window with size
	w := a.NewWindow(app_tag)
	w.Resize(fyne.NewSize(300, 100))

	// When window closes, stop Gnomon if running
	w.SetCloseIntercept(func() {
		if menu.Gnomes.Init {

	// Initialize dwidget connection box
	connect_box := dwidget.NewVerticalEntries(app_tag, 1)

	// When connection button is pressed we will connect to wallet rpc,
	// and start Gnomon with NFA search filter if it is not running
	connect_box.Button.OnTapped = func() {
		if rpc.Daemon.Connect && !menu.Gnomes.IsInitialized() && !menu.Gnomes.Start {
			go menu.StartGnomon(app_tag, "boltdb", []string{menu.NFA_SEARCH_FILTER}, 0, 0, nil)

	// Place connection box and start app

The bundle package contains all dReams resources. Images, gifs and fonts can be imported as well as the two Dero styled base app themes for Fyne. This example starts a Fyne gui app with various widgets to show case both Dero themes and image imports from bundle.

package main

import (


// Name my app
const app_tag = "My_app"

func main() {
	// Initialize app color to bundle var
	bundle.AppColor = color.Black

	// Initialize fyne app with Dero theme
	a := app.New()

	// Initialize fyne window with size and icon from bundle package
	w := a.NewWindow(app_tag)
	w.Resize(fyne.NewSize(300, 100))

	// Initialize fyne container and add some various widgets for viewing purposes
	cont := container.NewVBox()
	cont.Add(container.NewAdaptiveGrid(3, dwidget.NewCenterLabel("Label"), widget.NewEntry(), widget.NewButton("Button", nil)))
	cont.Add(container.NewAdaptiveGrid(3, widget.NewLabel("Label"), widget.NewCheck("Check", nil), widget.NewButton("Button", nil)))
	cont.Add(widget.NewSlider(0, 100))

	// Widget to change theme
	change_theme := widget.NewRadioGroup([]string{"Dark", "Light"}, func(s string) {
		switch s {
		case "Dark":
			bundle.AppColor = color.Black
		case "Light":
			bundle.AppColor = color.White


	change_theme.Horizontal = true

	// Add a image from bundle package
	gnomon_img := canvas.NewImageFromResource(bundle.ResourceGnomonIconPng)
	gnomon_img.SetMinSize(fyne.NewSize(45, 45))

	// Adding last widget
	select_entry := widget.NewSelect([]string{"Choice 1", "Choice 2", "Choice 3"}, nil)

	// Place widget container and start app


  • Dero Address: dero1qyr8yjnu6cl2c5yqkls0hmxe6rry77kn24nmc5fje6hm9jltyvdd5qq4hn5pn



dReams platform and packages are free and open source.
The source code is published under the MIT License.
Copyright © 2023 dReam dApps




This section is empty.


This section is empty.


func DownloadFile

func DownloadFile(URL, fileName string) (canvas.Image, error)

Download image file from url and return as canvas image

func FileExists

func FileExists(path, tag string) bool

Check if path to file exists

  • tag for log print

func GetDir

func GetDir() (dir string)

Get current working directory path for prefix

func ThemeSelect

func ThemeSelect() fyne.Widget

dReams app theme selection object

  • If image is not present locally, it is downloaded


type AppObject added in v0.10.1

type AppObject struct {
	App        fyne.App
	Window     fyne.Window
	Background *fyne.Container
	// contains filtered or unexported fields

AppObject holds the main app and channels

func (*AppObject) CloseAllDapps added in v0.10.1

func (d *AppObject) CloseAllDapps()

Send close signal to all active dApp channels

func (*AppObject) CloseDapp added in v0.10.1

func (d *AppObject) CloseDapp() <-chan struct{}

Close signal for a dApp

func (*AppObject) Closing added in v0.10.1

func (d *AppObject) Closing() <-chan struct{}

Close signal for main app

func (*AppObject) Configure added in v0.10.1

func (d *AppObject) Configure(b bool)

Set main configure bool

func (*AppObject) IsConfiguring added in v0.10.1

func (d *AppObject) IsConfiguring() bool

Check if main app is configuring

func (*AppObject) IsWindows added in v0.10.1

func (d *AppObject) IsWindows() bool

Check if runtime os is windows

func (*AppObject) Notification added in v0.10.1

func (d *AppObject) Notification(title, content string) bool

Notification pop up for main app

func (*AppObject) OS added in v0.10.1

func (d *AppObject) OS() string

Check what OS is set

func (*AppObject) OnSubTab added in v0.10.1

func (d *AppObject) OnSubTab(name string) bool

Check what sub tab is being viewed

func (*AppObject) OnTab added in v0.10.1

func (d *AppObject) OnTab(name string) bool

Check what tab main windows is on

func (*AppObject) Receive added in v0.10.1

func (d *AppObject) Receive() <-chan struct{}

Receive signal for work

func (*AppObject) SetChannels added in v0.10.1

func (d *AppObject) SetChannels(i int)

Initialize channels

func (*AppObject) SetOS added in v0.10.1

func (d *AppObject) SetOS()

Set what OS is being used

func (*AppObject) SetSubTab added in v0.10.1

func (d *AppObject) SetSubTab(name string)

Set what sub tab is being viewed

func (*AppObject) SetTab added in v0.10.1

func (d *AppObject) SetTab(name string)

Set what tab main windows is on

func (*AppObject) SignalChannel added in v0.10.1

func (d *AppObject) SignalChannel()

Signal all available channels when we are ready for them to work

func (*AppObject) StopProcess added in v0.10.1

func (d *AppObject) StopProcess()

Stop the main apps process

func (*AppObject) WorkDone added in v0.10.1

func (d *AppObject) WorkDone()

Signal back to counter when work is done

type AssetSelect

type AssetSelect struct {
	Name   string
	URL    string
	Img    canvas.Image
	Select *widget.Select

Select widget items for Dero assets

var Theme AssetSelect

Background theme AssetSelect

func (*AssetSelect) Add

func (a *AssetSelect) Add(add, check string)

Add a asset option to a AssetSelect

func (*AssetSelect) ClearAll added in v0.10.1

func (a *AssetSelect) ClearAll()

Clears all assets from select options

func (*AssetSelect) RemoveAsset added in v0.10.1

func (a *AssetSelect) RemoveAsset(rm string)

Remove a asset from Select by name

func (*AssetSelect) Sort added in v0.10.1

func (a *AssetSelect) Sort()

Sort the select widgets options

type ContainerStack added in v0.10.1

type ContainerStack struct {
	LeftLabel  *widget.Label
	RightLabel *widget.Label
	TopLabel   *canvas.Text

	Back    fyne.Container
	Front   fyne.Container
	Actions fyne.Container
	DApp    *fyne.Container

ContainerStack used for building various container/label layouts to be placed in main app

type SaveData added in v0.10.1

type SaveData struct {
	Skin    color.Gray16 `json:"skin"`
	Daemon  []string     `json:"daemon"`
	Tables  []string     `json:"tables"`
	Predict []string     `json:"predict"`
	Sports  []string     `json:"sports"`
	G45s    []string     `json:"g45s"`
	NFAs    []string     `json:"nfas"`
	DBtype  string       `json:"dbType"`
	Para    int          `json:"paraBlocks"`

	Assets map[string]bool `json:"assets"`
	Dapps  map[string]bool `json:"dapps"`

Saved data for users local config.json file


Path Synopsis

Jump to

Keyboard shortcuts

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