Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ datashards/
docs/*
!docs/ARCHITECTURE.md
!docs/DESIGN-SYSTEM-RULEBOOK.md
!docs/LINUX-BUILD.md

# Compiled binaries (should be built, not committed)
TELA-Browser-Wails
Expand Down
22 changes: 17 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,52 @@ Thank you for your interest in contributing to HOLOGRAM — a native desktop DER

### Prerequisites

- **Go** 1.24.0+
- **Go** 1.24.0+ — install from [go.dev/dl](https://go.dev/dl). Distro packages (`apt install golang-go`, etc.) are usually too old; HOLOGRAM will not build on Go 1.22.
- **Wails v2 CLI:** `go install github.com/wailsapp/wails/v2/cmd/wails@latest`
- **Node.js** 18+

### Linux users

All current distros (Ubuntu 24.04+, Debian 13, Fedora 40+, Arch) ship `webkit2gtk-4.1` (libsoup3). The Makefile auto-applies `-tags webkit2_41` on Linux — install the matching system packages:

```bash
# Ubuntu/Debian
sudo apt install libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.0-dev
sudo apt install libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev

# Fedora
sudo dnf install gtk3-devel glib2-devel webkit2gtk4.1-devel

# Arch Linux
sudo pacman -S gtk3 glib2 webkit2gtk
sudo pacman -S gtk3 glib2 webkit2gtk-4.1
```

> Build error, runtime crash, or vite timeout on Linux? See **[docs/LINUX-BUILD.md](docs/LINUX-BUILD.md)** — covers the libsoup conflict, OOM during `make all`, and stale dev-server cleanup.

### Run in development mode

```bash
git clone https://github.com/DHEBP/HOLOGRAM.git
cd HOLOGRAM
cd frontend && npm install && cd ..

# macOS / Windows
wails dev

# Linux
wails dev -tags webkit2_41
# or, equivalently:
make dev
```

### Build

```bash
# Full build (HOLOGRAM + derod + simulator)
# Full build (HOLOGRAM + derod + simulator) — auto-tags on Linux
make all

# HOLOGRAM only
wails build
wails build # macOS / Windows
wails build -tags webkit2_41 # Linux
```

### Run Go tests
Expand Down
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ else
SIMULATOR_BIN = simulator-linux-$(GOARCH)
endif

# Linux: link against webkit2gtk-4.1 (libsoup3) instead of the default
# webkit2gtk-4.0 (libsoup2). All current distros (Ubuntu 24.04+, Debian 13,
# Fedora 40+, Arch) ship 4.1 only — building without this tag fails to link
# or crashes at runtime due to libsoup2 ↔ libsoup3 conflicts.
# Override on the command line if you really need the legacy 4.0 binding:
# make WAILS_TAGS= ...
ifeq ($(GOOS),linux)
WAILS_TAGS ?= -tags webkit2_41
else
WAILS_TAGS ?=
endif

# Build directories
BUILD_DIR = build/bin
DEROHE_PKG = github.com/deroproject/derohe
Expand All @@ -65,13 +77,13 @@ endif
# Build HOLOGRAM using wails (dev/local build with metadata)
hologram:
@echo "🔨 Building HOLOGRAM ($(VERSION), $(COMMIT))..."
wails build -ldflags "$(LDFLAGS)"
wails build $(WAILS_TAGS) -ldflags "$(LDFLAGS)"
@echo "✅ HOLOGRAM built"

# Release build — clean, trimpath, metadata injected (use this for distribution)
release: derod simulator
@echo "🚀 Building HOLOGRAM release ($(VERSION), $(COMMIT))..."
wails build -ldflags "$(LDFLAGS)" -clean -trimpath
wails build $(WAILS_TAGS) -ldflags "$(LDFLAGS)" -clean -trimpath
@echo "✅ Release build complete: $(BUILD_DIR)/$(HOLOGRAM_BIN)"

# Build derod from derohe source
Expand Down Expand Up @@ -125,7 +137,7 @@ test-mtp-integration: mtp-anchor

# Development mode
dev:
wails dev
wails dev $(WAILS_TAGS)

# Clean build artifacts
clean:
Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,41 @@ Browse TELA applications. Manage your DERO. Build and deploy dApps with an integ

### Prerequisites

- **Go** 1.24.0+
- **Go** 1.24.0+ — install from [go.dev/dl](https://go.dev/dl) (distro packages like `apt install golang-go` are usually too old)
- **Wails** v2 CLI: `go install github.com/wailsapp/wails/v2/cmd/wails@latest`
- **Node.js** 18+

#### Linux-specific Dependencies

All current Linux distros (Ubuntu 24.04+, Debian 13, Fedora 40+, Arch) have moved to `webkit2gtk-4.1` (libsoup3). The Makefile auto-applies the matching `-tags webkit2_41` build tag on Linux — you just need the right system packages:

```bash
# Ubuntu/Debian
sudo apt install libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.0-dev
sudo apt install libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev

# Fedora
sudo dnf install gtk3-devel glib2-devel webkit2gtk4.1-devel

# Arch Linux
sudo pacman -S gtk3 glib2 webkit2gtk
sudo pacman -S gtk3 glib2 webkit2gtk-4.1
```

> **Note:** Ubuntu 24.04/Debian 13 users may need additional steps for webkit2gtk-4.0. See the [DERO community Linux setup guide](https://github.com/deroproject/documentation) or open an issue if you hit a platform-specific snag.
> Hitting a build error, runtime crash, or vite timeout on Linux? See [docs/LINUX-BUILD.md](docs/LINUX-BUILD.md) — it covers the libsoup conflict, the `webkit2_41` tag, OOM during `make all`, and stale dev-server cleanup.

### Development

```bash
git clone https://github.com/DHEBP/HOLOGRAM.git
cd HOLOGRAM
cd frontend && npm install && cd ..

# macOS / Windows
wails dev

# Linux
wails dev -tags webkit2_41
# or, equivalently:
make dev
```

### Production Build (Recommended)
Expand All @@ -93,9 +102,12 @@ This builds the DERO daemon and simulator directly from the derohe source code,
If you prefer to download derod separately:

```bash
# Build HOLOGRAM only
# macOS / Windows
wails build

# Linux
wails build -tags webkit2_41

# Output locations:
# macOS: build/bin/Hologram.app
# Linux: build/bin/Hologram
Expand All @@ -105,10 +117,10 @@ wails build
### Cross-Platform Builds

```bash
wails build -platform darwin/amd64 # macOS Intel
wails build -platform darwin/arm64 # macOS Apple Silicon
wails build -platform linux/amd64 # Linux x64
wails build -platform windows/amd64 # Windows x64
wails build -platform darwin/amd64 # macOS Intel
wails build -platform darwin/arm64 # macOS Apple Silicon
wails build -platform linux/amd64 -tags webkit2_41 # Linux x64
wails build -platform windows/amd64 # Windows x64
```

---
Expand Down
39 changes: 39 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,45 @@ func (a *App) DaemonGetSC(scid string) map[string]interface{} {
if err != nil {
return ErrorResponse(err)
}
res = normalizeDEROGetSCResult(res)
return map[string]interface{}{"success": true, "result": res}
}

// GetSCVariable queries specific keys from a smart contract
// Used for fetching individual variables like avatar data without fetching all contract data
func (a *App) GetSCVariable(scid string, keys []string) map[string]interface{} {
if a.daemonClient == nil {
return map[string]interface{}{"success": false, "error": "Not connected to any node. Please connect to a network first."}
}
if scid == "" {
return map[string]interface{}{"success": false, "error": "SCID is required"}
}
if len(keys) == 0 {
return map[string]interface{}{"success": false, "error": "At least one key is required"}
}

params := map[string]interface{}{
"scid": scid,
"code": false,
"variables": false,
"keysstring": keys,
}

res, err := a.daemonClient.Call("DERO.GetSC", params)
if err != nil {
a.logToConsole(fmt.Sprintf("[ERR] GetSCVariable failed for %s: %v", scid[:16], err))
return ErrorResponse(err)
}

// Extract valuesstring from result
if resMap, ok := res.(map[string]interface{}); ok {
return map[string]interface{}{
"success": true,
"scid": scid,
"valuesstring": resMap["valuesstring"],
}
}

return map[string]interface{}{"success": true, "result": res}
}

Expand Down
Loading
Loading