Schlaus Kwab's avatar
Schlaus Kwab
wavefunc.live
npub182jc...m4rf
https://wavefunc.live https://earthly.city (🌽+⚑+πŸ₯œ) * πŸ•ΈοΈ = β™₯️
Schlaus Kwab's avatar
Schlaus Kwab 1 week ago
First the came for the smokers. Then came for the vapers. And when they came for beverage and drive enjoyers there was none to stand up for me. View quoted note β†’
Schlaus Kwab's avatar
Schlaus Kwab 1 week ago
"To learn who rules over you, simply find out who you are not allowed to criticize." ...while in the west you are permitted and even encouraged to criticize the politicians. image
Schlaus Kwab's avatar
Schlaus Kwab 2 weeks ago
GM What if #nostr is good for everything except social networking?
Schlaus Kwab's avatar
Schlaus Kwab 2 weeks ago
πŸ†• I've built two more demos for state machines on #nostr β€” this time involving #cashu, with a few interesting use cases around custody and betting. ⚑ In addition I've made the explanations more verbose and understandable, and rendered a video for every demo with Remotion 🎬. The actors are now generatable per demo and persist across sessions. Enjoy on https://schlaustronics.com/nsm πŸš€ Source: πŸ”— β€” /nsm/wager - Wager Β· decentralized escrow The custodian holds nothing. Bettors lock stakes into 2-of-2 Cashu multisig and pre-sign every possible outcome; the oracle's only power is choosing which pre-signed package gets the second signature. The mint enforces β€” no party can steal. /nsm/bet - Bet Β· oracle-resolved betting Two bettors stake Cashu against an outcome. An oracle publishes what happened, and a payout scroll computes the winnings deterministically. Anyone replaying the chain can re-run the scroll and get the same numbers. /nsm/counter - Counter Β· the smallest interesting state machine Two players race to a target on a shared counter. Every interaction is a signed Nostr event on a single relay β€” no APIs, no shared database, no off-band coordination. /nsm/rps - Rock Paper Scissors Β· fair play via commit-reveal Both players publish a sha256 commit of their move before either reveals. The custodian re-hashes each reveal to verify it matches the prior commit before snapshotting. /nsm/vote - Vote Β· time-driven voting A roster of voters casts yes/no until the deadline. The custodian fires CLOSE_VOTING and FINALIZE herself β€” but both are gated by the SM's own deadline guard, so any watchtower can verify she didn't close early. /nsm/badges - Badges Β· transferable digital assets One shared kind:7500 ownership state machine, many minted kind:7503 badges, each with its own ownership chain under d-tag = imageHash. Transfers require m-of-n validator cosigns. /nsm/scroll-counter - Scroll Counter Β· state machine with pluggable rules Counter shape, but guards and actions are AssemblyScript-compiled WASM blobs (scrolls) published as kind:1227 events. Swap the engine tag, get different rules β€” the SM definition itself never changes. /nsm/negotiator - Negotiator Β· propose, agree, spawn Two parties iterate on a state machine definition until they agree, then a jukebox spawns the negotiated SM and reports the new machineId back. The negotiation transcript IS the contract. /nsm/nested - Nested Β· parent + child state machines A tournament parent SM invokes two child match SMs. Every snapshot carries the children's live state alongside the parent's β€” readable straight off the relay, no extra subscriptions. /nsm/pool - Pool Β· decentralized-custody crowdfunding Three stakers lock Cashu P2PK to a target with a refund timelock back to themselves. Majority yes funds the target; the custodian never touches the money β€” the mint enforces everything. View quoted note β†’
Schlaus Kwab's avatar
Schlaus Kwab 2 weeks ago
I hope you guys keep your tone in check while criticizing the #EU and have your facts well checked and verified. Just saying. image
Schlaus Kwab's avatar
Schlaus Kwab 3 weeks ago
Gm #amethyst are notes supposed to disappear after you touched/observed them? Is that like a quantum thing?
Schlaus Kwab's avatar
Schlaus Kwab 3 weeks ago
So guys, whos getting verified for a social network governed by democratic European law? image
Schlaus Kwab's avatar
Schlaus Kwab 3 weeks ago
This weekend i have implement a basic library/feature folder and vibed a few demos for @Gzuuus state machine spec to: - wrap my head around it - see what can be done with it - see if my instincts are right that this can be used as a basic smart contract vehicle - what is the potential if we combine it with nostr-scrolls or just wasm snippets in general and where they belong - have autistic discussions about it All demos have a event/timeline inspector so we can see what's happening under the hood. Check it out at: https://schlaustronics.com/nsm/ Source: Here is a short description for each demo: #counter β€” Counter The smallest possible Nostr state machine: two players, one shared counter, race to 5. Every TICK is a signed kind:7501; a 3rd-party custodian validates it against the SM definition and publishes a signed kind:30078 snapshot. Click TICK out of turn and watch the custodian reject it with NO_TRANSITION β€” no off-chain coordination, no shared backend. #rps β€” Rock-Paper-Scissors Commit-reveal RPS over Nostr. Both players publish a hash of their move first; only after both commitments land do they reveal the cleartext, so no one can peek and play accordingly. The SM enforces the order: REVEAL inputs are rejected before both commits exist. #badges β€” Mint + Transfer Mint a badge from any image β€” the asset id is sha256(image_bytes), content-addressable by construction. Transfers run through a shared "Ownership" state machine that requires the validator to cosign before the transfer settles, blocking double-spends. Open the "ownership proof" panel on a transferred badge to see the cryptographic chain you can verify offline. #scroll-counter β€” Counter, but the action is a WASM scroll Same counter, but the increment isn't hardcoded β€” it's a WebAssembly module published as a kind:1227 event ("a scroll"). Pick plus-one or times-two, the custodian fetches the scroll off the relay and runs it on every TICK. Actions are now content-addressed bytecode anyone can author, publish, and audit. #bet β€” Time-driven betting with oracle + payout scrolls Two parties stake, the match has wall-clock start/end times, and the SM advances itself: the custodian schedules START_MATCH / CANCEL_BET / TIMEOUT inputs from a schedule table. Resolution is two scrolls β€” an oracle scroll that names the winner, a payout scroll that computes splits. Optionally, the custodian delegates scroll execution to a remote CVM scroll-executor over MCP-over-Nostr (per CEP-15). #vote β€” Deadline-driven voting Open a question with a deadline; voters cast kind:7501 YES/NO/ABSTAIN inputs. The custodian schedules a synthetic FINALIZE input at the deadline, tallies votes against a configurable threshold, and snapshots the result β€” no one needs to "close the poll" manually. Watch the countdown tick, then watch the SM transition itself. #negotiator β€” Two parties agree on a SM, a jukebox spawns it Alice and Bob exchange kind:7500 proposals over Nostr (machine definition + scroll source) until both sign the same one. The agreed bundle is then handed to a "jukebox" β€” a CVM/MCP server that spawns + custodians the machine on demand. The whole negotiation is on-relay; the jukebox tool call rides MCP-over-Nostr per CEP-15, encrypted via NIP-44 gift-wraps. #nested β€” Parent SM invokes child SMs A tournament parent SM uses XState's invoke to spawn two child match SMs (counter-style, race to 4). Alice TICKs match A, bob TICKs match B; each child's onDone flips a flag in the parent, and an always transition fires FINISHED once both children complete. The interesting bit: each child's nested state (count, value, etc.) round-trips through kind:30078 verbatim β€” getPersistedSnapshot().children is what makes it work. View quoted note β†’
Schlaus Kwab's avatar
Schlaus Kwab 1 month ago
> China's AI is on par with the US Him admitting that is almost it's own story.
↑