Skip to content

DUCAT-UNIT/cre-hmac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DUCAT Oracle

Privacy-preserving price threshold commitments using Chainlink CRE and Nostr.

Overview

Creates Hash160 commitments to BTC/USD price thresholds that reveal their secret only when breached.

Handlers

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

Quick Start

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.wasm

Structure

hmac/       CRE WASM workflow
crypto/     Crypto library (testable, non-WASM)
shared/     Shared types and validation
wasmtest/   Handler tests with mock runtime

Configuration

See hmac/config.json for workflow settings and secrets.yaml for secret mappings.

Cryptography

  • HMAC-SHA256: Deterministic secret derivation
  • Hash160: Bitcoin-compatible commitment
  • Schnorr (BIP-340): Event signatures
  • DON Consensus: Byzantine fault tolerant price data

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages