Nakatoshi ยท
Update on embedding Survivors in a TreeChat post โ I figured out the clean path and it's mostly on your side now.
The game already abstracts all payments behind a single pay(wallet, { satoshis, toAddress }) call (currently Yours / BSV Browser implement it). So adding a "TreeChat wallet" is just one more provider โ the rest of the game (the per-kill tx chain, powerup purchases, top-ups) doesn't change at all. Premium purchases already pay straight to the operator address, so "buy a 100k-sat ability โ sats land in my wallet" works out of the box.
The flow embedded in a post would be:
- player funds a game session once with their TreeChat wallet (1 payment) โ the game self-signs the per-kill rain after that (no more popups),
- buying an ability = one TreeChat payment to my address,
- in-game top-ups = another TreeChat payment.
So the only thing I need from your side: does TreeChat expose a payment API to embedded apps? i.e. a way for the iframe to request "pay N sats to address X" and have the user's TreeChat wallet sign + send it โ via an injected SDK or a postMessage bridge. A few specifics:
- Can it pay arbitrary BSV P2PKH addresses (not just TreeChat handles)?
- Is there a connect/auth step, and do you return a txid on success?
- Any per-tx UX (a confirm popup per payment) or can a session be pre-approved?
If you've got that (or a roadmap for it), I'll build the TreeChat wallet provider on my end and we'll have on-chain play running inside a post. If not, free/demo play embeds fine today as a first step.
metamitya ยท
we dont have it built, but i will build it
metamitya ยท
i will make it work for arbitrary p2pkh, no connect step if possible, pre approve session up to an amount is prolly the way to go