Marketplace integration: devnet account + generic listing type #41

Open
opened 2026-03-28 05:42:37 +00:00 by mik-tf · 11 comments
Owner

Context

The Mycelium Marketplace (mycelium_code/home#50) is integrating hero_ledger as its backend. We've wired the heroledger_gateway_client crate and can already read marketplace.listListings from the dev gateway (6 node listings).

Architectural decision: hero_ledger is the single source of truth for all marketplace economic data (listings, balances, transactions, identity).

Request 1: Devnet marketplace account

We need a test account on devnet to verify:

  • tokens.balance queries (authenticated)
  • tokens.transfer operations
  • Marketplace contract interactions

Please provide:

  • Account ID
  • Secret key (ed25519)
  • Initial SPORE balance for testing

Request 2: Generic listing type

Currently marketplace.listListings only returns node listings (compute resources with slices, CPU, RAM, storage). The marketplace has 6 product categories:

Category Examples On hero_ledger today?
Compute resources VM slices, CPU, RAM Yes (node listings)
Mycelium nodes Dedicated hardware Yes (node listings)
Gateways Reverse proxy, TLS No
Agentic apps Self-healing applications No
Human energy services Consulting, development No
Domain names DNS registration No

Would it be possible to add a generic listing type with:

  • category field (string — compute, application, service, gateway, name, bandwidth)
  • metadata field (JSON — category-specific attributes like price, description, provider info)
  • Same CRUD pattern as node listings (create, list, get, update, delete)

This way all marketplace products can live on-chain, not just compute nodes.

Timeline

No rush — we can start with node listings now (compute category) and add other categories when the generic type is ready. The marketplace code uses trait-based backends so adding new listing types is non-breaking.

cc @scott

— mik-tf

## Context The Mycelium Marketplace (https://forge.ourworld.tf/mycelium_code/home/issues/50) is integrating hero_ledger as its backend. We've wired the `heroledger_gateway_client` crate and can already read `marketplace.listListings` from the dev gateway (6 node listings). Architectural decision: hero_ledger is the single source of truth for all marketplace economic data (listings, balances, transactions, identity). ## Request 1: Devnet marketplace account We need a test account on devnet to verify: - `tokens.balance` queries (authenticated) - `tokens.transfer` operations - Marketplace contract interactions Please provide: - Account ID - Secret key (ed25519) - Initial SPORE balance for testing ## Request 2: Generic listing type Currently `marketplace.listListings` only returns node listings (compute resources with slices, CPU, RAM, storage). The marketplace has 6 product categories: | Category | Examples | On hero_ledger today? | |----------|---------|----------------------| | Compute resources | VM slices, CPU, RAM | Yes (node listings) | | Mycelium nodes | Dedicated hardware | Yes (node listings) | | Gateways | Reverse proxy, TLS | No | | Agentic apps | Self-healing applications | No | | Human energy services | Consulting, development | No | | Domain names | DNS registration | No | Would it be possible to add a generic listing type with: - `category` field (string — compute, application, service, gateway, name, bandwidth) - `metadata` field (JSON — category-specific attributes like price, description, provider info) - Same CRUD pattern as node listings (create, list, get, update, delete) This way all marketplace products can live on-chain, not just compute nodes. ## Timeline No rush — we can start with node listings now (compute category) and add other categories when the generic type is ready. The marketplace code uses trait-based backends so adding new listing types is non-breaking. cc @scott — mik-tf
Author
Owner

Update: marketplace is reading real listings from dev gateway

We deployed the marketplace with APP_WALLET_BACKEND=ledger and it's now displaying real TFGrid node listings from ledger.dev.projectmycelium.com/rpc:

  • 6 compute node listings (marketplace.listListings, public method)
  • Node 82 (US, 8 vCPU, 31GB RAM), Node 390 + 391 (Belgium, 4 vCPU each)
  • Pricing shown as USDH

Live at: https://dev-app.projectmycelium.org/api/products/featured

Still need from this issue:

  1. Devnet account credentials — for testing tokens.balance and tokens.transfer
  2. Generic listing type — for non-compute products (apps, services, gateways, names)

No rush on #2 — compute listings work now. But the account (#1) would let us test wallet integration end-to-end.

— mik-tf

## Update: marketplace is reading real listings from dev gateway We deployed the marketplace with `APP_WALLET_BACKEND=ledger` and it's now displaying real TFGrid node listings from `ledger.dev.projectmycelium.com/rpc`: - 6 compute node listings (marketplace.listListings, public method) - Node 82 (US, 8 vCPU, 31GB RAM), Node 390 + 391 (Belgium, 4 vCPU each) - Pricing shown as USDH Live at: https://dev-app.projectmycelium.org/api/products/featured Still need from this issue: 1. **Devnet account credentials** — for testing tokens.balance and tokens.transfer 2. **Generic listing type** — for non-compute products (apps, services, gateways, names) No rush on #2 — compute listings work now. But the account (#1) would let us test wallet integration end-to-end. — mik-tf
Author
Owner

Update: we can almost create the account ourselves

Tested account.activate on dev gateway:

public_key: 92529d7083b2983d26229ad527ccc2eee1188d242468973842cda3006e6b7e5a
domain: mktplace.mycelium
email: marketplace@projectmycelium.org

Result: "Confirmation email sent. Please check your inbox."

Email verification is enabled on dev. Could you either:

  1. Confirm the email for us (if you have access to the gateway admin), or
  2. Disable email verification on devnet for this domain, or
  3. Let us know which email inbox to use

Once the account is activated, we can test the full wallet flow (tokens.balance, tokens.transfer) end-to-end.

— mik-tf

## Update: we can almost create the account ourselves Tested `account.activate` on dev gateway: ``` public_key: 92529d7083b2983d26229ad527ccc2eee1188d242468973842cda3006e6b7e5a domain: mktplace.mycelium email: marketplace@projectmycelium.org ``` Result: `"Confirmation email sent. Please check your inbox."` Email verification is enabled on dev. Could you either: 1. Confirm the email for us (if you have access to the gateway admin), or 2. Disable email verification on devnet for this domain, or 3. Let us know which email inbox to use Once the account is activated, we can test the full wallet flow (tokens.balance, tokens.transfer) end-to-end. — mik-tf
Author
Owner

Update: created account with proper ed25519 keypair

First attempt used random hex as pubkey (can't sign). Second attempt uses a real ed25519 keypair:

  • Account ID: 0a431196b5d5a4d0c30501f049af2ac1b303decf9dd38d0c54c4fb53ce4f0205
  • Domain: mktplace3.mycelium
  • Email: perreault@incubaid.com

Pending email confirmation. Once confirmed we can test the full wallet flow.

The generic listing type request still stands for non-compute products.

— mik-tf

## Update: created account with proper ed25519 keypair First attempt used random hex as pubkey (can't sign). Second attempt uses a real ed25519 keypair: - Account ID: `0a431196b5d5a4d0c30501f049af2ac1b303decf9dd38d0c54c4fb53ce4f0205` - Domain: `mktplace3.mycelium` - Email: `perreault@incubaid.com` Pending email confirmation. Once confirmed we can test the full wallet flow. The **generic listing type** request still stands for non-compute products. — mik-tf
Author
Owner

Account working — auth flow verified

Account 0a431196...4f0205 (mktplace3.mycelium) is activated and authenticated:

  • tokens.balance returns {"balance":"0","token":"SPORE"}
  • Signed request with ed25519 headers verified by gateway

We discovered that params key order must be alphabetical for signature verification. The Rust GatewayClient crate handles this via serde_json.

Still needed:

  1. Some SPORE tokens in this account to test transfers
  2. Generic listing type for non-compute products

— mik-tf

## Account working — auth flow verified Account `0a431196...4f0205` (mktplace3.mycelium) is activated and authenticated: - `tokens.balance` returns `{"balance":"0","token":"SPORE"}` - Signed request with ed25519 headers verified by gateway We discovered that **params key order must be alphabetical** for signature verification. The Rust GatewayClient crate handles this via serde_json. Still needed: 1. Some SPORE tokens in this account to test transfers 2. Generic listing type for non-compute products — mik-tf
Author
Owner

No public SPORE faucet on devnet (gas faucet exists for NEAR tokens but not exposed via gateway for SPORE). Could you send some test SPORE to our marketplace account?

Account: 0a431196b5d5a4d0c30501f049af2ac1b303decf9dd38d0c54c4fb53ce4f0205

— mik-tf

No public SPORE faucet on devnet (gas faucet exists for NEAR tokens but not exposed via gateway for SPORE). Could you send some test SPORE to our marketplace account? Account: `0a431196b5d5a4d0c30501f049af2ac1b303decf9dd38d0c54c4fb53ce4f0205` — mik-tf
Author
Owner

@scott Hi

@scott Hi
Author
Owner

New marketplace devnet account — ready for SPORE tokens

The previous account (0a431196...) lost its secret key between sessions. We generated a fresh keypair and registered a new account:

  • Account ID: a63dc8c818174264fa0a4790762d6f1d67fcd8fce1075b02cd9f294a33d07d01
  • Domain: mktplace4.mycelium
  • Status: Activated and authenticated (tokens.balance returns 0 SPORE)

Could you please send some test SPORE to this account? We need it to test:

  1. tokens.balance — confirmed working (returns 0)
  2. tokens.transfer — needs non-zero balance
  3. End-to-end wallet flow in the marketplace SPA

Everything else is ready — 318 tests pass, all code is wired, just need tokens to test the real flow.

— mik-tf

## New marketplace devnet account — ready for SPORE tokens The previous account (0a431196...) lost its secret key between sessions. We generated a fresh keypair and registered a new account: - **Account ID**: `a63dc8c818174264fa0a4790762d6f1d67fcd8fce1075b02cd9f294a33d07d01` - **Domain**: `mktplace4.mycelium` - **Status**: Activated and authenticated (tokens.balance returns 0 SPORE) Could you please send some test SPORE to this account? We need it to test: 1. `tokens.balance` — confirmed working (returns 0) 2. `tokens.transfer` — needs non-zero balance 3. End-to-end wallet flow in the marketplace SPA Everything else is ready — 318 tests pass, all code is wired, just need tokens to test the real flow. — mik-tf
Author
Owner

SPORE tokens received!

tokens.balance confirms 10,000 SPORE in the marketplace account:

{"balance": "10000000000000000000000", "balance_formatted": "10000.0000", "token": "SPORE"}

Thank you Scott! We will now wire this on the dev VM and test the full wallet flow (balance display, signed transfers, marketplace purchases).

Will report back once end-to-end testing is done.

— mik-tf

## SPORE tokens received! `tokens.balance` confirms **10,000 SPORE** in the marketplace account: ```json {"balance": "10000000000000000000000", "balance_formatted": "10000.0000", "token": "SPORE"} ``` Thank you Scott! We will now wire this on the dev VM and test the full wallet flow (balance display, signed transfers, marketplace purchases). Will report back once end-to-end testing is done. — mik-tf
Author
Owner

End-to-end integration working

Deployed to dev-app.projectmycelium.org with SPORE wallet backend:

  • Marketplace authenticates as a63dc8c8... (10,000 SPORE balance confirmed)
  • User registration calls account.activate on the gateway
  • Balance queries hit tokens.balance with token spore
  • Product catalog reads from marketplace.listListings (6 TFGrid nodes)

Two items to discuss:

  1. Email confirmation on account.activate — marketplace users get status: pending because the gateway requires email confirmation. Is there a way to auto-confirm accounts created by a trusted marketplace operator?

  2. Starter credits — we want to transfer a small SPORE amount from marketplace account to new users on registration. Will tokens.transfer work for this once their account is confirmed?

Thank you for the tokens!

— mik-tf

## End-to-end integration working Deployed to dev-app.projectmycelium.org with SPORE wallet backend: - Marketplace authenticates as `a63dc8c8...` (10,000 SPORE balance confirmed) - User registration calls `account.activate` on the gateway - Balance queries hit `tokens.balance` with token `spore` - Product catalog reads from `marketplace.listListings` (6 TFGrid nodes) Two items to discuss: 1. **Email confirmation on account.activate** — marketplace users get `status: pending` because the gateway requires email confirmation. Is there a way to auto-confirm accounts created by a trusted marketplace operator? 2. **Starter credits** — we want to transfer a small SPORE amount from marketplace account to new users on registration. Will `tokens.transfer` work for this once their account is confirmed? Thank you for the tokens! — mik-tf
Member

I've funded account a63dc8c818174264fa0a4790762d6f1d67fcd8fce1075b02cd9f294a33d07d01.

I've funded account `a63dc8c818174264fa0a4790762d6f1d67fcd8fce1075b02cd9f294a33d07d01`.
Author
Owner

Thanks Scott!

Quick question: account.activate requires email confirmation, which blocks automated user creation from the marketplace. Two options:

  • A. Auto-confirm — can the gateway skip email confirmation for accounts created by a trusted operator?
  • B. Pooled wallet — marketplace holds all SPORE in one account, tracks per-user balances internally

We will start with B (works now). Let us know if A is possible for later.

— mik-tf

Thanks Scott! Quick question: `account.activate` requires email confirmation, which blocks automated user creation from the marketplace. Two options: - **A. Auto-confirm** — can the gateway skip email confirmation for accounts created by a trusted operator? - **B. Pooled wallet** — marketplace holds all SPORE in one account, tracks per-user balances internally We will start with B (works now). Let us know if A is possible for later. — mik-tf
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_ledger#41
No description provided.