Skip to main content

Playground

Open the app

Full UI experience in your browser.

Open standalone playground

Open the full browser playground in its own route.

SDK package

Review package details and releases.

API quickstart

Step-by-step with copy-paste commands.

Yellow channels

Try private channel creation.

Note

This playground runs @specterpq/sdk in WebAssembly in your browser. Secret keys stay in your local session.

SDK Playground

Use the standalone playground route when you want the cleanest testing loop, and use the embedded version below when you want to stay inside the docs.

  • Generate recipient spending and viewing keys
  • Build a publishable meta-address
  • Create a stealth payment announcement
  • Scan announcements and verify matches
  • Run editable SDK snippets in the code editor
Note

The embedded playground below is an iframe pointed at the standalone Docusaurus-hosted app route, so it is easier to debug and deploy than the old Mintlify inline-script setup.

Open standalone route

Launch the playground in a full browser tab for day-to-day testing.

Read the quickstart

Compare the in-browser flow with the hosted API walkthrough.

Warning

If the embedded playground feels cramped on a small screen, open /playground-app/ directly for the full experience.


Interactive API playground

Base URL: https://backend.specterpq.com

No setup required. Hit the live API and see stealth addresses in action.

Run these in order. Each step feeds into the next.

Generate a fresh ML-KEM-768 keypair. This gives you everything needed to receive private payments.

curl -s -X POST https://backend.specterpq.com/api/v1/keys/generate \
| tee /tmp/specter-keys.json | jq '{meta_address: .meta_address[0:40], spending_pk: .spending_pk[0:40], viewing_pk: .viewing_pk[0:40]}' && echo "... (truncated, full keys saved to /tmp/specter-keys.json)"

Save the variables for the next steps:

META_ADDRESS=$(jq -r '.meta_address' /tmp/specter-keys.json)
VIEWING_SK=$(jq -r '.viewing_sk' /tmp/specter-keys.json)
SPENDING_PK=$(jq -r '.spending_pk' /tmp/specter-keys.json)
SPENDING_SK=$(jq -r '.spending_sk' /tmp/specter-keys.json)

Yellow channel playground

Test the private channel flow:

01

Create a private channel

curl -s -X POST https://backend.specterpq.com/api/v1/yellow/channel/create \
-H "Content-Type: application/json" \
-d '{"recipient":"bob.eth","token":"USDC","amount":"1000"}' | jq .
02

Discover incoming channels

curl -s -X POST https://backend.specterpq.com/api/v1/yellow/channel/discover \
-H "Content-Type: application/json" \
-d '{"viewing_sk":"<HEX>","spending_pk":"<HEX>","spending_sk":"<HEX>"}' | jq .
03

Check channel config

curl -s https://backend.specterpq.com/api/v1/yellow/config | jq .
Warning

/yellow/channel/fund and /yellow/channel/close currently return placeholder values. They demonstrate the API shape but don't submit real L1 settlement transactions.


Multi-language examples

Here's how the core flow looks in different languages:

# Generate keys
curl -s -X POST https://backend.specterpq.com/api/v1/keys/generate | jq .

# Create stealth payment
curl -s -X POST https://backend.specterpq.com/api/v1/stealth/create \
-H "Content-Type: application/json" \
-d '{"meta_address":"<META_ADDRESS_HEX>"}' | jq .

Quick health check

Make sure the backend is alive:

curl -s https://backend.specterpq.com/health | jq .

Questions? Email pranshurastogi3196@gmail.com or reach out on X @pranshurastogii.