Skip to content

P2P Trading: DEG Plugins (Ledger Recorder & Policy Enforcer)#191

Open
ameetdesh wants to merge 1 commit intomainfrom
p2p-trading-plugins
Open

P2P Trading: DEG Plugins (Ledger Recorder & Policy Enforcer)#191
ameetdesh wants to merge 1 commit intomainfrom
p2p-trading-plugins

Conversation

@ameetdesh
Copy link
Collaborator

Summary

Modular PR 2/3 from #160 — focused on plugins and build infrastructure.

  • degledgerrecorder: Go plugin that records energy trade transactions to a ledger service, with beckn payload signing
  • policyenforcer: Go plugin that enforces network policy rules via OPA/Rego evaluation against incoming beckn messages
  • Rego policy: P2P trading interdiscom policy file with domain validation, version checks, and trade-specific rules
  • Build: Dockerfile for building onix-adapter with DEG plugins + multi-arch build script

Files (19 changed)

  • plugins/degledgerrecorder/ — Ledger recorder plugin (Go)
  • plugins/policyenforcer/ — Policy enforcer plugin (Go) with tests
  • plugins/go.mod, plugins/go.sum — Go module dependencies
  • specification/policies/p2p-trading-interdiscom.rego — OPA policy rules
  • build/ — Dockerfile, README, multi-arch build script

Related PRs

Test plan

  • Run go test ./... in plugins/ directory
  • Verify Rego policy evaluation with sample beckn payloads
  • Test Docker build with build/Dockerfile.onix-adapter-deg

🤖 Generated with Claude Code

…ucture

- degledgerrecorder plugin: records energy trade transactions to a ledger service
- policyenforcer plugin: enforces network policy rules via OPA/Rego evaluation
- P2P trading interdiscom Rego policy file with domain, version, and trade rules
- Dockerfile for building onix-adapter with DEG plugins
- Multi-arch build script for container images
- Go module dependencies for both plugins

Part of PR #160 decomposition — Plugins

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant