Infrastructure Module (OC4IDS)

Implements the Open Contracting for Infrastructure Data Standard (OC4IDS) on-chain.

Create ProjectUpdate ProjectUpdate ProgressAttach DocsLink Procurement
Authorization

The creator of CreateProject becomes the project owner. Only the owner or addresses in authorized_publishers can update the project, attach documents, record progress, or link contracting processes.

1

Create a Project

json
// POST /govchain.infrastructure.v1.Msg/CreateProject
{
  "@type": "/govchain.infrastructure.v1.MsgCreateProject",
  "creator": "cosmos1abc...",
  "project_id": "oc4ids-ph-dpwh-2024-infra-0001",
  "title": "Bataan Provincial Road Rehabilitation",
  "description": "Complete rehabilitation of 12.5km provincial road",
  "status": "preparation",
  "project_type": "rehabilitation",
  "sector": ["transport", "transport.road"],
  "purpose": "Improve connectivity in Bataan province",
  "budget": {
    "amount": { "amount": "50000000", "currency": "PHP" }
  },
  "period": {
    "start_date": "2024-05-01T00:00:00Z",
    "end_date": "2025-05-01T00:00:00Z"
  },
  "locations": [{
    "description": "Dinalupihan-Hermosa Road, Bataan",
    "geometry": { "type": "Point", "coordinates": ["120.4632", "14.8645"] },
    "gazetteer": { "scheme": "PSGC", "identifiers": ["030800000"] }
  }],
  "parties": [
    { "id": "PH-SEC-CS200901234", "name": "DPWH Region III",
      "roles": ["publicAuthority", "procuringEntity"] }
  ],
  "public_authority": { "id": "PH-SEC-CS200901234", "name": "DPWH Region III" }
}
typescript
const msg = {
  typeUrl: "/govchain.infrastructure.v1.MsgCreateProject",
  value: {
    creator: account.address,
    projectId: "oc4ids-ph-dpwh-2024-infra-0001",
    title: "Bataan Provincial Road Rehabilitation",
    description: "Complete rehabilitation of 12.5km provincial road",
    status: "preparation",
    projectType: "rehabilitation",
    sector: ["transport", "transport.road"],
    purpose: "Improve connectivity in Bataan province",
    budget: { amount: { amount: "50000000", currency: "PHP" } },
    period: { startDate: "2024-05-01T00:00:00Z", endDate: "2025-05-01T00:00:00Z" },
    locations: [{
      description: "Dinalupihan-Hermosa Road, Bataan",
      geometry: { type: "Point", coordinates: ["120.4632", "14.8645"] },
    }],
    parties: [{ id: "PH-SEC-CS200901234", name: "DPWH Region III",
      roles: ["publicAuthority", "procuringEntity"] }],
    publicAuthority: { id: "PH-SEC-CS200901234", name: "DPWH Region III" },
  },
};
const result = await client.signAndBroadcast(account.address, [msg], "auto");
2

Update a Project

Only non-empty fields are updated (partial update). Empty strings and empty arrays are skipped.

json
// POST /govchain.infrastructure.v1.Msg/UpdateProject
{
  "@type": "/govchain.infrastructure.v1.MsgUpdateProject",
  "creator": "cosmos1abc...",
  "project_id": "oc4ids-ph-dpwh-2024-infra-0001",
  "status": "implementation",
  "title": "",
  "description": "",
  "project_type": "",
  "sector": [],
  "purpose": ""
}
3

Update Progress (Metrics)

New metrics are appended; existing metrics (matching id) have their observations merged.

json
// POST /govchain.infrastructure.v1.Msg/UpdateProgress
{
  "@type": "/govchain.infrastructure.v1.MsgUpdateProgress",
  "creator": "cosmos1abc...",
  "project_id": "oc4ids-ph-dpwh-2024-infra-0001",
  "metrics": [
    {
      "id": "physical-progress",
      "title": "Physical Progress",
      "observations": [{
        "id": "obs-2024-06",
        "measure": "35",
        "unit": { "name": "percent", "scheme": "UNCEFACT", "id": "P1" },
        "period": {
          "start_date": "2024-06-01T00:00:00Z",
          "end_date": "2024-06-30T00:00:00Z"
        },
        "note": "Subgrade and drainage works completed for first 4km"
      }]
    },
    {
      "id": "financial-progress",
      "title": "Financial Disbursement",
      "observations": [{
        "id": "obs-fin-2024-06",
        "measure": "10000000",
        "unit": { "name": "Philippine Peso", "scheme": "UNCEFACT", "id": "PHP" },
        "note": "First disbursement for mobilization and earthworks"
      }]
    }
  ]
}
4

Attach a Document

json
// POST /govchain.infrastructure.v1.Msg/AttachDocument
{
  "@type": "/govchain.infrastructure.v1.MsgAttachDocument",
  "creator": "cosmos1abc...",
  "project_id": "oc4ids-ph-dpwh-2024-infra-0001",
  "document": {
    "id": "doc-eia-001",
    "document_type": "environmentalImpact",
    "title": "Environmental Impact Assessment",
    "url": "https://dpwh.gov.ph/eia/2024-0001.pdf",
    "format": "application/pdf",
    "language": "en",
    "ipfs_cid": "QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy"
  }
}
5

Link a Contracting Process

Link an OCDS procurement process to the infrastructure project, creating the OC4IDS-to-OCDS bridge.

json
// POST /govchain.infrastructure.v1.Msg/LinkContractingProcess
{
  "@type": "/govchain.infrastructure.v1.MsgLinkContractingProcess",
  "creator": "cosmos1abc...",
  "project_id": "oc4ids-ph-dpwh-2024-infra-0001",
  "contracting_process": {
    "ocid": "ocds-abc123-ph-dpwh-2024-0001",
    "summary": {
      "tender": {
        "procurement_method": "open",
        "procurement_method_details": "Public Bidding per RA 9184",
        "status": "complete"
      },
      "contract": {
        "status": "active",
        "value": { "amount": "47500000", "currency": "PHP" }
      }
    }
  }
}

Query Infrastructure Data

bash
# List all projects
curl "$API/govchain/infrastructure/v1/project?pagination.limit=10"

# Get a single project
curl "$API/govchain/infrastructure/v1/project/oc4ids-ph-dpwh-2024-infra-0001"

# Filter by sector
curl "$API/govchain/infrastructure/v1/projects_by_sector/transport"

# Filter by status (identification|preparation|implementation|completion|cancelled)
curl "$API/govchain/infrastructure/v1/projects_by_status/implementation"

# Filter by region
curl "$API/govchain/infrastructure/v1/projects_by_region/Central%20Luzon"

# Module parameters
curl "$API/govchain/infrastructure/v1/params"