Marketplace integration: devnet account + generic listing type #41
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
urgent
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_ledger#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The Mycelium Marketplace (mycelium_code/home#50) is integrating hero_ledger as its backend. We've wired the
heroledger_gateway_clientcrate and can already readmarketplace.listListingsfrom 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.balancequeries (authenticated)tokens.transferoperationsPlease provide:
Request 2: Generic listing type
Currently
marketplace.listListingsonly returns node listings (compute resources with slices, CPU, RAM, storage). The marketplace has 6 product categories:Would it be possible to add a generic listing type with:
categoryfield (string — compute, application, service, gateway, name, bandwidth)metadatafield (JSON — category-specific attributes like price, description, provider info)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
Update: marketplace is reading real listings from dev gateway
We deployed the marketplace with
APP_WALLET_BACKEND=ledgerand it's now displaying real TFGrid node listings fromledger.dev.projectmycelium.com/rpc:Live at: https://dev-app.projectmycelium.org/api/products/featured
Still need from this issue:
No rush on #2 — compute listings work now. But the account (#1) would let us test wallet integration end-to-end.
— mik-tf
Update: we can almost create the account ourselves
Tested
account.activateon dev gateway:Result:
"Confirmation email sent. Please check your inbox."Email verification is enabled on dev. Could you either:
Once the account is activated, we can test the full wallet flow (tokens.balance, tokens.transfer) end-to-end.
— 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:
0a431196b5d5a4d0c30501f049af2ac1b303decf9dd38d0c54c4fb53ce4f0205mktplace3.myceliumperreault@incubaid.comPending email confirmation. Once confirmed we can test the full wallet flow.
The generic listing type request still stands for non-compute products.
— mik-tf
Account working — auth flow verified
Account
0a431196...4f0205(mktplace3.mycelium) is activated and authenticated:tokens.balancereturns{"balance":"0","token":"SPORE"}We discovered that params key order must be alphabetical for signature verification. The Rust GatewayClient crate handles this via serde_json.
Still needed:
— 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
@scott Hi
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:
a63dc8c818174264fa0a4790762d6f1d67fcd8fce1075b02cd9f294a33d07d01mktplace4.myceliumCould you please send some test SPORE to this account? We need it to test:
tokens.balance— confirmed working (returns 0)tokens.transfer— needs non-zero balanceEverything else is ready — 318 tests pass, all code is wired, just need tokens to test the real flow.
— mik-tf
SPORE tokens received!
tokens.balanceconfirms 10,000 SPORE in the marketplace account: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
End-to-end integration working
Deployed to dev-app.projectmycelium.org with SPORE wallet backend:
a63dc8c8...(10,000 SPORE balance confirmed)account.activateon the gatewaytokens.balancewith tokensporemarketplace.listListings(6 TFGrid nodes)Two items to discuss:
Email confirmation on account.activate — marketplace users get
status: pendingbecause the gateway requires email confirmation. Is there a way to auto-confirm accounts created by a trusted marketplace operator?Starter credits — we want to transfer a small SPORE amount from marketplace account to new users on registration. Will
tokens.transferwork for this once their account is confirmed?Thank you for the tokens!
— mik-tf
I've funded account
a63dc8c818174264fa0a4790762d6f1d67fcd8fce1075b02cd9f294a33d07d01.Thanks Scott!
Quick question:
account.activaterequires email confirmation, which blocks automated user creation from the marketplace. Two options:We will start with B (works now). Let us know if A is possible for later.
— mik-tf