PRISM-INSIGHT
13개의 특화 AI 에이전트가 한국·미국 주식을 실시간 분석합니다. 오픈소스, 무료
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Zcash Discreet Log Contract
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗zdlc is oracle-settled contracts on Zcash, entered and exited through Ironwood. Two parties lock ZEC in a transparent 2-of-2 for the life of one contract, pre-sign one payout per outcome and a refund, and normally close straight back to Ironwood. Every transaction is v6, built through pczt.
@zdlc/client, Node or browser SDK) and a template, and walks through an escrow in about 100 lines (examples/first_app.rs).npm install https://github.com/mayohalo/zdlc/releases/download/v0.1.1/zdlc-client-0.1.1.tgz, or zdlc-kit = { git = "https://github.com/mayohalo/zdlc", tag = "v0.1.1" } in Cargo.toml. See docs/first-app.md.just dev (regtest, the desk, two oracles, two nodes), then just room for the three demos at http://127.0.0.1:8080/escrow, /hedge and /auction.| File | What it covers |
|---|---|
| docs/design.md | The contract, what Zcash changes, privacy model, architecture tiers |
| docs/core.md | rust-dlc reuse map, TEE oracle network, Ironwood payout spike |
| docs/applications.md | Shielded payments, private markets, cross-chain, Zcash-native extensions |
| docs/plan.md | Phased plan with gates, open questions, sources |
| docs/beneficiaries.md | Multi-beneficiary payouts: splits, per-outcome overrides, multi-output CETs and closes |
| site/index.html | The landing page: open it in a browser |
| docs/kit.md | Developer kit: the Zdlc object, templates, zdlc-node REST API, zdlc-cli, @zdlc/client |
| docs/first-app.md | Build your first zDLC app: ways in, templates, the flow in Rust and TypeScript, from demo to real app |
| demos/ | The three private market demos: one README each, the code layout, running them |
| docs/room.md | Hosting the demos: the escrow room and auction in detail, the kit calls behind them, deploying to a server |
A stable-value ZEC payment on the local regtest node: Alice is owed $100 and holds 2 ZEC at $50.00, Bob hedges with 2 ZEC, and an oracle attests the ZEC/USD price at maturity.
infra/zakura/scripts/up.sh
cargo run -p zdlc --release --bin zdlc-demo -- --price 60.00 --settle close # cooperative close to Ironwood
cargo run -p zdlc --release --bin zdlc-demo -- --price 40.00 --settle cet # Bob goes silent, Alice uses the CET
cargo run -p zdlc --release --bin zdlc-demo -- --settle refund # the oracle never attests
Each run uses fresh keys and coins, so they can follow each other on one chain.
zdlc-live runs the contract on Zcash testnet or mainnet through any Zakura JSON-RPC endpoint, given as --node URL or ZDLC_RPC (never stored in the repo). The network and its upgrade heights come from the node; mainnet needs --mainnet. Collateral is capped at 0.05 TAZ (testnet) and 0.01 ZEC (mainnet) a side.
zdlc-oracled is one oracle of a 2-of-2 pair, built to run in a TEE: it attests ZEC/USD (the median close of one minute across four exchanges) and shielded payments (by viewing key), with its keys and nonce counter in sealed state.
export ZDLC_RPC=<your Zakura RPC URL>
cargo run -p zdlc --release --example wallet -- testnet # seed at ~/.zdlc/testnet-seed.hex; prints the address to fund
cargo run -p zdlc --release --bin zdlc-oracled -- --listen 127.0.0.1:7801 --state a.sealed --sealing-key a.key --node $ZDLC_RPC
cargo run -p zdlc --release --bin zdlc-oracled -- --listen 127.0.0.1:7802 --state b.sealed --sealing-key b.key --node $ZDLC_RPC
cargo run -p zdlc --release --bin zdlc-live -- status
cargo run -p zdlc --release --bin zdlc-live -- run --settle cet --oracles http://127.0.0.1:7801,http://127.0.0.1:7802
cargo run -p zdlc --release --bin zdlc-live -- run --settle refund # seed-only refund recovery
cargo run -p zdlc --release --bin zdlc-live -- sweep # return transparent payouts to the treasury
zdlc-desk is a quote board and a sealed mailbox (put it behind TLS). zdlc-trader runs a maker (hedger) or a taker (recipient), each with its own seed; they meet only through the desk, the oracles and the chain.
cargo run -p zdlc --release --bin zdlc-desk -- --listen 127.0.0.1:7900 --state desk.json --node $ZDLC_RPC
cargo run -p zdlc --release --bin zdlc-trader -- address --seed maker.seed # fund the printed treasury
cargo run -p zdlc --release --bin zdlc-trader -- maker --seed maker.seed --desk http://127.0.0.1:7900 --oracles $ORACLES --premium-bps 50
cargo run -p zdlc --release --bin zdlc-trader -- taker --seed taker.seed --desk http://127.0.0.1:7900 --oracles $ORACLES --collateral 1000000 --settle close
# private quote by memo invitation: no public RFQ
cargo run -p zdlc --release --bin zdlc-trader -- maker ... --invite <taker inbox hex> --invite-collateral 1000000
cargo run -p zdlc --release --bin zdlc-trader -- taker ... --invitations-from <height>
# the taker's side paid 60 % to itself, 40 % to a partner (Ironwood on the close)
cargo run -p zdlc --release --bin zdlc-trader -- taker ... --split self:6000,<tm address>+<raw Ironwood hex>:4000
Build apps on zDLC without touching the protocol (docs/kit.md):
Zdlc object (crates/zdlc-kit).zdlc-node, a REST node (OpenAPI spec), driven by zdlc-cli.@zdlc/client.@zdlc/sdk. It runs a full node inside Node.js, and its WebAssembly core runs the stateless protocol in browsers.Templates: stable payment, escrow, bet.
cargo run -p zdlc-kit --release --bin zdlc-node -- --seed alice.seed --node $ZDLC_RPC --desk http://127.0.0.1:7900 --oracles $ORACLES
cargo run -p zdlc-kit --release --bin zdlc-cli -- --token-file alice.seed.token offer escrow --to <identity> --amount 1.5 --question "Delivered?"
A user funds a contract from any Zcash wallet by scanning a ZIP 321 link (see docs/funding.md):
# the taker funds its side from a shielded deposit: it prints a link and QR, any wallet pays it
cargo run -p zdlc --release --bin zdlc-trader -- taker ... --fund deposit
cargo run -p zdlc --release --bin zdlc-trader -- balance --seed taker.seed
cargo run -p zdlc --release --bin zdlc-trader -- shield --seed taker.seed # CET payouts into the shielded balance
cargo run -p zdlc --release --bin zdlc-trader -- withdraw --seed taker.seed --to <unified address>
A contract can pay up to 16 beneficiaries who never sign: each side's payout splits by basis points, and enumerated outcomes can carry fixed output lists (see docs/beneficiaries.md).
Rust 1.97.1 (pinned in rust-toolchain.toml), Docker for the regtest node.
cargo test -p zdlc --release # unit + offline contract tests
infra/zakura/scripts/down.sh; infra/zakura/scripts/up.sh # fresh Zakura regtest, NU7 at 200
cargo test -p zdlc --release --test regtest -- --ignored --nocapture # Phase 0 gate (needs a fresh chain)
cargo test -p zdlc --release --test phase1 -- --ignored --nocapture # Phase 1 gate
cargo test -p zdlc --release --test phase2 -- --ignored --nocapture # Phase 2 gate (needs a fresh chain)
cargo test -p zdlc --release --test phase3 -- --ignored --nocapture # two oracle daemons, 2-of-2 (needs internet)
cargo test -p zdlc --release --test phase4 -- --ignored --nocapture # maker and taker processes trade through the desk
cargo test -p zdlc --release --test products -- --ignored --nocapture --test-threads=1 # invitation, escrow, payroll roll
cargo test -p zdlc --release --test beneficiaries -- --ignored --nocapture # team escrow: 3 payees by CET and by close
cargo test -p zdlc --release --test funding -- --ignored --nocapture --test-threads=1 # funding by QR: deposits, legs, desk trade
cargo test -p zdlc-kit --release --test kit -- --ignored --nocapture --test-threads=1 # zdlc-cli, @zdlc/client, @zdlc/sdk, templates, agents
scripts/build-node.sh && scripts/build-wasm.sh && (cd sdk/sdk && npm install && npm test) # @zdlc/sdk: native addon and WebAssembly core
cargo run -p zdlc --release --bin zdlc-oracle -- announce zecusd-1 # dev oracle
cargo run -p zdlc --release --bin zdlc-watch -- kit.json # refund watcher
Results: Phase 0, Phase 1, Phase 2, testnet, Phase 3, Phase 4, beneficiaries, funding by QR, developer kit.
| docs/funding.md | Shielded funding by QR: deposit links (path A), legs paid from any wallet (path B), auto-shield and withdraw |