Skip to content

Conversation

@ameetdesh
Copy link
Collaborator

@ameetdesh ameetdesh commented Jan 13, 2026

PR #160: P2P Energy Trading, Enrollment & Devkit Improvements

Overview

This PR introduces complete P2P energy trading and enrollment implementations with new devkits, reorganized examples, and improved tooling. Although this PR shows a huge number of files changes, most are file moves/renames. Contains all fixes from #162. After this merges, we will follow up by moving energy related schemas from protocol-specs-v2 here, and updating examples/implementation guides/postman.


Documentation

P2P Trading Implementation Guide

  • Improved the doc P2P_Trading_implementation_guide_DRAFT.md

Enrollment/Onboarding

  • Added IG_Onboarding_users_in_digital_energy_programs.md - complete onboarding guide
  • Added Onboarding_Users_in_Digital_Energy_Programs.md - technical specification

EV Charging

  • Minor updates to EV_Charging.md

Example JSONs

New P2P Trading Examples (examples/p2p-trading/v2/)

  • Complete transaction flow: discover-request/response, select-request/response, init-request/response, confirm-request/response
  • Status flows: status-request, status-response, status-response-completed, status-response-curtailed
  • Cascaded utility flows: cascaded-init-request, cascaded-on-init-response, cascaded-confirm-request, cascaded-on-confirm-response
  • CDS integration: publish-catalog.json
  • Curtailment handling: on-update-response-curtailment.json

New Enrollment Examples (examples/enrollment/v2/)

  • Init flows: init-request-simple-consumer, init-request-prosumer-solar-battery, init-request-oauth2, init-request-otp
  • On-init responses: on-init-response-success, on-init-response-oauth2, on-init-response-otp, on-init-response-error, on-init-response-conflict
  • Confirm flows: confirm-request, confirm-request-oauth2, confirm-request-otp
  • On-confirm responses: on-confirm-response-success, on-confirm-response-oauth2, on-confirm-response-otp, on-confirm-response-no-meter
  • Update flows: update-request-unenrollment, update-request-consent-revocation
  • On-update responses: on-update-response-unenrollment, on-update-response-consent-revocation
  • Added README.md

Reorganized/Moved

  • Moved P2P examples from examples/v2/P2P_Trading/examples/p2p-trading/v2/
  • Moved EV charging v1 examples from examples/v1-EOS/ev_charging/v1-EOS/examples/ev-charging/v1-EOS/
  • Deleted old examples/v2/P2P_Trading/ directory (all files replaced with updated versions)

Devkits

New P2P Energy Trading Devkit (testnet/p2p-energy-trading-devkit/)

  • README.md - setup instructions with DeDi registration guide
  • Docker compose: docker-compose-adapter-p2p.yml
  • Config files for BAP, BPP, UtilityBPP adapters and routing
  • Postman collections: BAP, BPP, UtilityBPP
  • Assets: routing diagram, DeDi dashboard screenshots

New P2P Enrollment Devkit (testnet/p2p-enrollment-devkit/)

Updated EV Charging Devkit (testnet/ev-charging-devkit/)

  • Added README.md with Postman regeneration instructions
  • Updated routing configs for improved variable handling

Deleted

  • Removed testnet/postman-collections/v2/ (superseded by per-devkit Postman collections)

Scripts

scripts/validate_schema.py

  • Added support for enrollment domain schemas
  • Improved recursive $ref resolution
  • Better error messaging

scripts/generate_postman_collection.py

  • Added publish endpoint support for CDS catalog uploads
  • Added routing via ONIX for query endpoints
  • Improved collection generation from example JSONs

Key Schema/Protocol Changes

  • Updated all P2P examples to use full ISO date/time format
  • Added orderAttributes with EnergyTradeOrder details to all order JSONs
  • Added customerID field (required for pilot DISCOMs)
  • Added targetMeterId within orderItemAttributes
  • Added sourceMeterID to offerAttributes
  • Fixed discover examples to use schema context instead of natural language search
  • Updated DeDi registry URLs to use HTTPS

Testing

  • All JSON examples validated against Beckn v2 schemas
  • Postman collections tested with local Docker sandbox

Recent Changes (Week of Jan 22-29)

Documentation

  • Replaced "sanctioned load" → "trading limit" in P2P Trading guide
  • Improved allocation & settlement logic flow documentation

Schema/Examples

  • Added utilityId to EnergyCustomer schema
  • Renamed customerAttributeproviderAttribute
  • Updated fulfillment attributes per latest spec
  • Added payment payloads to examples
  • Network ID filtering in discover requests

Devkits

  • Fixed onix-adapter-deg multi-arch support (Linux & macOS)
  • Added Verifiable Credentials Postman collection
  • Updated and verified all Postman collections

ravi-prakash-v and others added 30 commits November 21, 2025 15:42
PR for interim release of P2P trading guide
This document outlines the representation of surplus energy in a peer-to-peer energy trading ecosystem, detailing the use of schema.org, IEC CIM, and a custom namespace for effective trading semantics.
This document outlines the technical specifications for onboarding users into Digital Energy Programs through multiple channels, covering aspects such as identity, authentication, and enrollment criteria.
This document provides a comprehensive guide for implementing a multi-channel onboarding system for Digital Energy Programs, covering aspects such as identity verification, meter mapping, and governance requirements.
Added details to sequence diagrams, and aligned flow with EV implementation guide.
…d subsequent calls consistent, without breaking existing payloads.
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.

3 participants