A modern, protocol-first DogeConnect debugging platform.
This repository gives developers a practical toolkit to validate DogeConnect payloads, exercise relay behavior safely, and understand the protocol deeply enough to ship robust wallet and merchant integrations.
- What This Project Is
- Why DogeConnect Matters
- Core Capabilities
- Architecture
- Tech Stack
- API Surface
- OpenAPI
- Quick Start
- Deployment on Vercel
- Examples
- Testing
- Tooling
- Contributing
- Roadmap
- Security and Scope
- Protocol References
- License
OnlyDoge is an OSS developer platform for DogeConnect that provides:
- Strict QR URI validation
- Strict Payment Envelope validation (including cryptographic verification)
- A no-op relay simulator that follows real relay contract shapes
- An API-first workflow with generated OpenAPI documentation
- A polished web UI built for debugging speed
Dogecoin by itself is simple to transfer, but production-grade checkout flows need more than a raw payment URI. DogeConnect introduces standardized handshake and relay semantics so wallets, merchants, and relays can communicate with less ambiguity.
- Better interoperability between wallet and merchant implementations
- Better status visibility (
accepted,confirmed,declined) for user-facing UX - Better safety compared with URI-only flows by requiring structured relay contracts
- Better testability through deterministic payloads and validation rules
Wider DogeConnect adoption can increase the utility of Dogecoin by reducing integration friction and improving payment reliability. Better developer tooling accelerates this adoption by making failures explicit and reproducible.
- Parses
dogecoin:URIs - Enforces DogeConnect
dc/hpair behavior - Distinguishes non-connect URIs from malformed connect URIs
- Optionally fetches envelope from relay endpoint and validates it end-to-end
- Includes live QR code preview as URI text changes
- Includes branded QR image download for sharing/testing artifacts
- Validates envelope structure (
version,payload,pubkey,sig) - Decodes and validates payment payload shape
- Verifies BIP-340 Schnorr signature using noble crypto libs
- Supports optional expected hash matching against URI
h
- Register scenario per payment ID (
accepted,confirmed,declined,error) - Exercise
relay/payandrelay/statusexactly through API contracts - Inspect scenario transitions and in-memory state in the UI
- Reset state quickly for iterative integration testing
- Generates valid DogeConnect QR URIs on demand
- Returns matching signed envelopes for
dcfetch testing - Accelerates wallet/merchant integration and regression debugging
This project is a modular monolith with Hexagonal (Ports and Adapters) boundaries and DDD-inspired layering.
Dependency direction is intentionally one-way:
domain<-application<-adapters
Mermaid overview:
flowchart LR
UI["TanStack Start UI"] --> APP["Application Use Cases"]
API["Elysia HTTP Adapter"] --> APP
APP --> DOMAIN["Domain Value Objects and Rules"]
APP --> PORTS["Ports"]
PORTS --> CRYPTO["Crypto Adapter\n@noble/hashes + @noble/curves"]
PORTS --> FETCH["Envelope Fetch Adapter"]
PORTS --> STORE["Relay State Store Adapter\nIn-memory"]
Current module layout:
src/modules/dogeconnect/
domain/
entities/
shared/
value-objects/
application/
use-cases/
contracts.ts
ports/
adapters/
crypto/
outbound/
relay/
http/
presentation/
Key domain concepts implemented as value objects and invariants include:
DogeUriRelayUrlRelayPubKeyHashConnectEnvelopeConnectPaymentPaymentSubmissionPaymentStatusKoinuAmountRfc3339Timestamp
- Frontend: React 19, TanStack Start, TanStack Router, TanStack Query, TanStack Form
- UI: Shadcn-style components, Tailwind CSS v4
- API: Elysia +
@elysiajs/openapi - Crypto:
@noble/hashes,@noble/curves - Runtime and language: Bun + TypeScript
- Testing: Vitest + Testing Library
- Lint and format: Biome
Base URL: /api
-
POST /api/tools/validate-qr- Request:
{ uri: string, fetchEnvelope?: boolean } - Response:
{ verdict, parsed, checks, errors, envelopeValidation? }
- Request:
-
POST /api/tools/validate-envelope- Request:
{ envelope: unknown, expectedHash?: string } - Response:
{ verdict, envelope, payment, checks, errors }
- Request:
-
POST /api/tools/mock-qr- Request:
{ paymentId?: string } - Response:
{ uri, paymentId, dc, h, envelope, payment, ... } - Purpose: return a ready-to-scan/test QR URI whose
dcpoints to this app's mock envelope endpoint
- Request:
-
GET /api/tools/mock-envelope/:paymentId- Response:
ConnectEnvelope({ version, payload, pubkey, sig }) - Purpose: backing endpoint referenced by generated mock
dcvalues
- Response:
-
POST /api/relay/pay- Request:
{ id, tx, refund?, relay_token? } - Response:
PaymentStatusResponse | ErrorResponse
- Request:
-
POST /api/relay/status- Request:
{ id } - Response:
PaymentStatusResponse | ErrorResponse
- Request:
POST /api/relay/debug/paymentGET /api/relay/debug/paymentsPOST /api/relay/debug/reset
- Interactive docs:
/api/openapi - JSON spec:
/api/openapi/json
OpenAPI is generated directly from Elysia route contracts, so docs stay synchronized with handler schemas.
- Node.js
>=20.19(needed by crypto dependencies) - Bun
>=1.3
bun installbun run devThen visit:
- App: http://localhost:3000
- Tools page: http://localhost:3000/tools
- OpenAPI docs: http://localhost:3000/api/openapi
This project is intended to be hosted on Vercel.
Recommended settings:
- Install command:
bun install - Build command:
bun run build - Node.js runtime:
20+
After importing the repository into Vercel, keep framework detection defaults unless your team needs custom overrides.
curl -X POST http://localhost:3000/api/tools/mock-qr \
-H 'Content-Type: application/json' \
-d '{"paymentId":"demo-001"}'You can extract only the URI value with:
curl -s -X POST http://localhost:3000/api/tools/mock-qr \
-H 'Content-Type: application/json' \
-d '{}' | jq -r '.uri'curl -X POST http://localhost:3000/api/tools/validate-qr \
-H 'Content-Type: application/json' \
-d '{
"uri": "dogecoin:DPD7uK4B1kRmbfGmytBhG1DZjaMWNfbpwY?amount=12.25&dc=example.com%2Fdc%2Fid&h=72b-LVh5K_mm7zyN9PXO",
"fetchEnvelope": true
}'curl -X POST http://localhost:3000/api/tools/validate-envelope \
-H 'Content-Type: application/json' \
-d '{
"expectedHash": "72b-LVh5K_mm7zyN9PXO",
"envelope": {
"version": "1.0",
"payload": "<base64>",
"pubkey": "<hex32>",
"sig": "<hex64>"
}
}'curl -X POST http://localhost:3000/api/relay/debug/payment \
-H 'Content-Type: application/json' \
-d '{"id":"pay-101","scenario":"accepted","required":6,"dueSec":600}'
curl -X POST http://localhost:3000/api/relay/pay \
-H 'Content-Type: application/json' \
-d '{"id":"pay-101","tx":"deadbeef"}'
curl -X POST http://localhost:3000/api/relay/status \
-H 'Content-Type: application/json' \
-d '{"id":"pay-101"}'Run the full test suite:
bun run testCurrent coverage includes:
- Domain value object parsing and invariants
- Envelope validation use-case behavior
- Elysia API integration paths (relay and OpenAPI)
- Tools page server-render sanity
This project uses Biome for linting and formatting.
Available scripts:
bun run devbun run buildbun run previewbun run typecheckbun run testbun run lintbun run formatbun run check
Contributions are welcome.
Recommended flow:
- Fork the repository.
- Create a feature branch.
- Implement your change with tests.
- Run quality gates.
- Open a PR with context and evidence.
Quality gate commands:
bun run check
bun run typecheck
bun run testContribution expectations:
- Respect architecture boundaries (
domainshould not depend on adapters) - Implement behavior in explicit use-case services, not route-level ad-hoc logic
- Include tests for protocol behavior changes
- Keep API contracts reflected in OpenAPI
See full contribution guidelines in CONTRIBUTING.md.
- Persistence adapter for relay state (SQLite/Postgres)
- More protocol fixtures aligned with
dogeconnect-gotest vectors - Additional UI workflows for batch validation and replay
- Optional import/export of debug sessions
- Stronger contract-level compatibility test suite
- This project is a developer tool, not a production wallet.
- Treat simulator output as test feedback, not settlement truth.
- Validate all integrations in secure staging before mainnet use.
If you discover a security issue, please report responsibly rather than opening a public exploit issue.
- DogeConnect intro: https://connect.dogecoin.org/getting_started/introduction.html
- QR URI spec: https://connect.dogecoin.org/payment_gateway/qrcode_uri.html
- Payment envelope spec: https://connect.dogecoin.org/payment_gateway/payment_envelope.html
- Relay contract: https://connect.dogecoin.org/payment_relay/relay.html
This project is licensed under the MIT License.
See LICENSE.