Privacy-preserving price threshold commitments using Chainlink CRE and Nostr.
Creates Hash160 commitments to BTC/USD price thresholds that reveal their secret only when breached.
| Handler | Trigger | Description |
|---|---|---|
createQuote |
HTTP | Create new threshold commitment |
evaluateQuotes |
HTTP | Batch check quotes, reveal secrets on breach |
generateQuotesParallel |
Cron | Auto-generate quotes across rate range |
go mod download
export DUCAT_PRIVATE_KEY="<32-byte-hex>"
export DUCAT_CLIENT_SECRET="<secret>"
go test ./...
cd hmac && GOOS=wasip1 GOARCH=wasm go build -o main.wasmhmac/ CRE WASM workflow
crypto/ Crypto library (testable, non-WASM)
shared/ Shared types and validation
wasmtest/ Handler tests with mock runtime
See hmac/config.json for workflow settings and secrets.yaml for secret mappings.
- HMAC-SHA256: Deterministic secret derivation
- Hash160: Bitcoin-compatible commitment
- Schnorr (BIP-340): Event signatures
- DON Consensus: Byzantine fault tolerant price data
MIT