The Ethos-Protocol Interactive Playground is a web-based environment that lets you experiment with vault operations against a live testnet (or a local Stellar Quickstart node) without any local toolchain setup. It lowers the barrier to learning by providing pre-configured scenarios, a built-in editor, and one-click execution in your browser.
- Overview
- Accessing the Playground
- Quick Start
- Pre-configured Scenarios
- Scenario Reference
- Playground Interface
- Execution Modes
- Tutorial Integration
- Advanced Usage
- Limitations
- Local Playground Setup
- Troubleshooting
The Playground provides:
- In-browser execution — invoke contract functions directly against testnet or a local Stellar Quickstart node; no local Rust or Stellar CLI installation required.
- Pre-configured scenarios — ready-to-run examples covering every key workflow (vault creation, check-in, release, beneficiary management, passkeys).
- Live state inspection — query vault state and see real-time results after each operation.
- Tutorial integration — each tutorial in docs/video-tutorials.md links to the corresponding playground scenario.
- Editable parameters — modify any parameter inline and re-run without leaving the page.
The Playground runs exclusively against testnet by default. No real funds are at risk.
The hosted Playground is served from the backend server at:
http://localhost:3000/playground
when running the local Docker stack (docker-compose up -d). For a deployed instance, access it at the equivalent path on your deployment URL.
The self-contained HTML file is located at:
backend/simulator.html
You can open it directly in any modern browser for a fully offline experience with a local Stellar Quickstart node.
- A modern browser (Chrome 90+, Firefox 88+, Safari 15+, Edge 90+)
- For testnet scenarios: an internet connection
- For local scenarios: the Docker stack running (
docker-compose up -d)
No wallet extension, CLI, or local SDK installation is required.
- Open the Playground — navigate to
http://localhost:3000/playgroundor openbackend/simulator.htmldirectly. - Select a scenario — choose "Scenario 1: Create and Fund a Vault" from the scenario list.
- Review parameters — the scenario pre-fills sensible defaults (testnet, 30-day TTL, sample beneficiary address).
- Click Run — the Playground submits the transaction and shows the result inline.
- Inspect state — click "Query Vault State" to see the vault's current TTL and balance.
- Advance the scenario — click "Next Step" to proceed to the check-in step.
Each step shows the equivalent CLI command so you can reproduce it locally once you are ready.
| # | Scenario Name | Key Operations Covered |
|---|---|---|
| 1 | Create and Fund a Vault | create_vault, deposit |
| 2 | Check-In and TTL Extension | check_in, get_ttl_remaining |
| 3 | Vault Release (Expired TTL) | trigger_release, get_release_status |
| 4 | Beneficiary Conditional Acceptance | update_beneficiary, trigger_release with threshold |
| 5 | Withdrawal Lifecycle | withdraw, audit trail, dispute |
| 6 | Passkey Registration and Biometric Check-In | bind_passkey_biometric, biometric_check_in |
| 7 | Vault Hibernation | enter_hibernation, exit_hibernation, get_hibernation |
| 8 | TTL Borrowing Between Vaults | borrow_ttl, repay_ttl_borrow |
| 9 | Beneficiary Conflict Resolution | Multi-claim scenario, ranking resolution |
| 10 | Disaster Recovery: Restoring an Archived Vault | restore_vault, archived state inspection |
Tutorial link: T-201 · Creating Your First Vault
Steps:
- Fill in
beneficiary— a testnet Stellar address (a pre-funded test address is provided by default). - Set
check_in_interval— default is2592000(30 days in seconds). - Run
create_vault— the response shows the newvault_id. - Fill in
amountin stroops (default:100000000= 10 XLM). - Run
deposit(vault_id, amount). - Run
get_vault(vault_id)to confirm the vault is active.
What you will observe:
- A
vault_idreturned fromcreate_vault. get_vaultshowsbalance,last_check_in, andcheck_in_interval.
Equivalent CLI:
stellar contract invoke \
--id $CONTRACT_TTL_VAULT \
--network testnet \
--source deployer \
-- create_vault \
--beneficiary GBENEFI...CIARY \
--check_in_interval 2592000Tutorial link: T-202 · Performing a Check-In
Steps:
- Use the
vault_idfrom Scenario 1 (or enter a known vault ID). - Run
get_ttl_remaining(vault_id)— note the current remaining seconds. - Run
check_in(vault_id). - Run
get_ttl_remaining(vault_id)again — observe the TTL reset.
What you will observe:
- TTL resets to the full
check_in_intervalafter check-in.
Common error: CheckInTooFrequent (error 54) — wait 60 seconds between check-ins.
Tutorial link: T-203 · Triggering Vault Release
This scenario uses a vault with a very short TTL (5 seconds) pre-configured for demo purposes.
Steps:
- The Playground creates a demo vault with
check_in_interval = 5. - Wait 6 seconds.
- Run
is_expired(vault_id)— should returntrue. - Run
trigger_release(vault_id). - Run
get_release_status(vault_id)— should returnReleased.
What you will observe:
- Fund transfer to the beneficiary address visible in the Stellar Testnet Explorer link provided.
Tutorial link: T-301 · Conditional Acceptance
Steps:
- Create a vault with a minimum acceptance threshold set.
- Attempt
trigger_releasewith vault balance below threshold — observe rejection. - Deposit enough to exceed the threshold.
- Trigger release — observe acceptance.
Tutorial link: T-204 · Withdrawing Funds
Steps:
- Create and fund a vault.
- Run
withdraw(vault_id, amount). - Inspect the withdrawal audit trail.
- Simulate an unauthorized withdrawal and open a dispute within the 24-hour window.
Tutorial link: T-401 · Passkey Setup and Biometric Check-In
Steps:
- Create a vault.
- Register a biometric credential using
bind_passkey_biometricwith a samplecredential_hash. - Perform
biometric_check_inwith the credential hash. - Inspect
get_vault_biometricsto see the registered entries.
Written reference: docs/hibernation.md
Steps:
- Create a vault.
- Call
enter_hibernation(vault_id, caller, duration_seconds). - Call
get_hibernation(vault_id)— observe the hibernation entry. - Call
exit_hibernation(vault_id, caller). - Run
get_ttl_remaining— confirm TTL is normal after exit.
Written reference: docs/ttl-logic.md
Steps:
- Create two vaults: a "lender" and a "borrower".
- Call
borrow_ttl(borrower_vault_id, lender_vault_id, caller, 86400)(borrow 1 day). - Inspect TTL on both vaults using
get_ttl_remaining. - Call
repay_ttl_borrow(borrower_vault_id, caller). - Confirm lender TTL is restored.
Written reference: docs/beneficiary-conflict-resolution.md
Steps:
- Create a vault with multiple candidate beneficiary addresses.
- Expire the TTL (short TTL demo vault).
- Submit conflicting claims from multiple addresses.
- Observe the ranking algorithm select the winning beneficiary.
- Call
trigger_release— observe funds going to the resolved beneficiary.
Written reference: docs/ttl-logic.md, docs/disaster-recovery-runbook.md
Steps:
- The Playground simulates an archived vault state.
- Call
get_archived_vault_info(vault_id)— observe the archived snapshot. - Call
restore_vault(vault_id)— TTL is re-extended. - Call
get_vault(vault_id)— confirm the vault is accessible again.
┌─────────────────────────────────────────────────────────────┐
│ Scenario Selector │ Network: [ Testnet ▼ ] │
├──────────────────────────┴──────────────────────────────────┤
│ PARAMETERS │ OUTPUT │
│ vault_id: [ ] │ { │
│ amount: [ ] │ "vault_id": 1, │
│ beneficiary: [ ] │ "balance": 100000000, │
│ │ "last_check_in": ... │
│ [▶ Run] [↺ Reset] │ } │
├─────────────────────────────────┴──────────────────────────-┤
│ EQUIVALENT CLI COMMAND │
│ stellar contract invoke --id $CONTRACT ... │
└─────────────────────────────────────────────────────────────┘
| Control | Description |
|---|---|
| Scenario Selector | Dropdown to switch between the 10 pre-configured scenarios |
| Network Selector | Switch between Testnet and Local (Quickstart) |
| Parameters Panel | Editable fields for all function arguments |
| Run | Execute the current function with the given parameters |
| Reset | Restore default parameter values for the current scenario |
| Next Step | Advance to the next step in a multi-step scenario |
| Output Panel | Displays the JSON response or error from the last operation |
| CLI Command | Shows the equivalent stellar contract invoke command |
| History | Collapsible list of all previous operations in the session |
All operations execute against soroban-testnet.stellar.org. Transactions are real but use testnet XLM with no monetary value. Results are visible on the Stellar Testnet Explorer.
Targets a local Stellar Quickstart node at http://localhost:8000. Requires:
docker-compose up -dLocal mode is completely isolated — ideal for rapid iteration and scenarios that require repeatedly resetting state.
Available via the "Inspect" tab. Lets you query vault state (get_vault, get_ttl_remaining, is_expired, get_release_status) without submitting any transactions. No signing required.
Each entry in docs/video-tutorials.md includes a link to the corresponding playground scenario. The tutorial video demonstrates the scenario step-by-step, and the Playground lets you follow along interactively at your own pace.
Cross-reference table:
| Tutorial | Playground Scenario |
|---|---|
| T-201: Creating a Vault | Scenario 1 |
| T-202: Check-In | Scenario 2 |
| T-203: Triggering Release | Scenario 3 |
| T-204: Withdrawals | Scenario 5 |
| T-301: Conditional Acceptance | Scenario 4 |
| T-302: Conflict Resolution | Scenario 9 |
| T-401: Passkeys and Biometrics | Scenario 6 |
| T-603: Disaster Recovery | Scenario 10 |
You can copy the vault_id from one scenario's output and paste it into another scenario's parameter field to chain operations (e.g., create in Scenario 1, then test hibernation from Scenario 7 on the same vault).
All parameter fields are fully editable. You can override any default to explore edge cases:
- Set
check_in_interval = 5to test expiry quickly. - Set
amount = 0to verify the contract rejects zero-amount deposits. - Use a known passkey hash to test expiry and compromise scenarios.
The output panel includes an "Events" tab that displays all contract events emitted by the transaction: check_in, pk_expd, pk_comp, del_ben, ttl_bor, etc.
Use the "Export" button (top-right) to download a JSON file of your session's operations and outputs. Useful for sharing reproduction steps when filing an issue.
| Limitation | Detail |
|---|---|
| Testnet only for hosted version | No mainnet operations to protect real funds |
| No wallet signing | Uses a pre-funded demo account; production vaults require your own identity |
| No persistent state between sessions | Session history clears on page reload |
| Passkey simulation only | Full WebAuthn signing requires a native app (planned for v2.0) |
| Rate limits on testnet RPC | Excessive Playground use may hit public RPC rate limits; use local mode for load testing |
The Playground is included in the repository and requires no additional installation beyond the standard Docker stack.
cp .env.example .env
# Edit .env: set CONTRACT_TTL_VAULT to your deployed contract address
docker-compose up -dNavigate to:
http://localhost:3000/playground
Or open the file directly:
backend/simulator.html
Set CONTRACT_TTL_VAULT in your .env to point to your deployed contract:
CONTRACT_TTL_VAULT=CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXThe Playground reads this value via the backend API and uses it for all scenario invocations.
For private testnet clusters or a custom Stellar Quickstart configuration, update:
STELLAR_RPC_URL=http://localhost:8000/soroban/rpcThe Playground's network selector will reflect this endpoint in local mode.
The Playground cannot reach the Stellar RPC. Check:
- Docker stack is running:
docker-compose ps - Your internet connection (for testnet mode)
- The
STELLAR_RPC_URLin.envis correct
The demo vault TTL may not have elapsed yet. Wait the remaining seconds shown in the output, then re-run trigger_release.
Parameters reset when you switch scenarios. Copy any custom values before switching.
Check the browser console for JavaScript errors. Ensure you are using a supported browser version. Hard-refresh with Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (macOS).
Ensure CONTRACT_TTL_VAULT is set in .env and the backend has been restarted after the update:
docker-compose restart backend- docs/video-tutorials.md — video walkthroughs for each scenario
- docs/faq.md — answers to common questions encountered in the playground
- docs/ttl-logic.md — deep dive into TTL mechanics
- docs/passkeys.md — passkey authentication details
- docs/deployment-guide.md — deploying your own contract to connect to the playground
- docs/disaster-recovery-runbook.md — Scenario 10 background