# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
This site has an agentic ask interface you may use to query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nfh.global/index.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

---

# Networks for Humanity offerings

Networks for Humanity — an international network of labs building open, interoperable infrastructure for the intelligent era.

Networks for Humanity builds and stewards a family of open infrastructural products. At the base is **NFH fabric** — the open network for value exchange — and around it a set of infrastructure components and packaged, production-ready services that run *on* NFH fabric.

## The offerings at a glance

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>NFH fabric</strong></td><td>The open network for value exchange — discovery, contracting, settlement, identity, and trust.</td><td><a href="/nfh-fabric/fabric">Welcome to NFH fabric</a></td></tr><tr><td><strong>UNITS</strong></td><td>Programmable, transferable units of value — tokenisation.</td><td><a href="https://docs.finternetlab.io/">https://docs.finternetlab.io/</a></td></tr><tr><td><strong>DeDi</strong></td><td>Decentralised Directory for public registries.</td><td><a href="https://dedi-global.gitbook.io/docs">https://dedi-global.gitbook.io/docs</a></td></tr><tr><td><strong>Vouch</strong></td><td>Purpose-bound digital value — value that carries its own rules of use.</td><td><a href="https://vouch.finance/">https://vouch.finance/</a></td></tr><tr><td><strong>Pincer</strong></td><td>Gradient guarantees and arbitration — trust as a continuous, contextual contract.</td><td><a href="https://pincer.network/">https://pincer.network/</a></td></tr></tbody></table>


# Welcome to NFH fabric

One composable network for discovery, contracting, settlement, identity, and trust.

NFH fabric is the **public, discoverable surface of a planetary value network** — a thin, composable set of cloud-based, standards-aligned services and open protocols that lets any organisation, individual, or autonomous agent find each other, transact, and settle.

{% hint style="info" icon="bullhorn" %}
The internet moved information. **NFH fabric moves value.**
{% endhint %}

## NFH fabric is open for anyone to build on

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Find anyone, find anything</strong></td><td>A unified registry and catalogue surface across the network.</td></tr><tr><td><strong>Transact with anyone</strong></td><td>Self-executing contracts, peer-to-peer messaging, instant settlement.</td></tr><tr><td><strong>Trust anyone</strong></td><td>Verifiable credentials, portable reputation, signed audit trails.</td></tr><tr><td><strong>See what's happening</strong></td><td>Network-wide telemetry and observability primitives.</td></tr></tbody></table>

#### For any queries, reach out to us <a href="https://support.nfh.global/" class="button primary small">NFH fabric support</a>

Learn more at: <https://fabric.nfh.global/>


# Why do we need an open NFH fabric?

## The cost of the world we have

Closed value rails are expensive, and the bill is measurable:

| **$2.5T**     | Trade financing requested and refused — verifying the deal costs more than the deal earns. *(ADB, 2025)*                        |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **$5.7T**     | Credit small businesses need and cannot get — real order books, invisible to capital. *(IFC–World Bank, 2025)*                  |
| **up to 15%** | Skimmed from a worker's remittance, because intermediaries each re-run the same checks. *(World Bank, 2025)*                    |
| **15–30%**    | The toll a walled garden takes from the seller inside it, for matchmaking alone — and the reputation earned there cannot leave. |
| **2–5 days**  | To settle a cross-border business payment. The message crosses the world in milliseconds; the money does not.                   |

These are not failures of capital or technology. They are failures of **coordination** — the tax a world pays when it has no shared, neutral ground for trust, discovery, and settlement, so every market builds its own privately and charges rent. That tax falls hardest on the smallest, poorest, and youngest.

## The shift already underway

Intelligence is moving the economy from **platform-centric** to **network-centric**:

| Platform-centric                     | Network-centric                      |
| ------------------------------------ | ------------------------------------ |
| Walled — closed to outsiders         | Open — anyone can join               |
| Human-paced — paperwork & delay      | Agent-paced — instant & programmable |
| Few & large — high-value, low-volume | Many & tiny — low-value, high-volume |

The economy must soon coordinate **a billion-plus** businesses transacting directly, **a trillion-plus** autonomous agents acting on their behalf, and micro-transaction volumes on the order of **a million times** today's. No system built for the platform era survives contact with those numbers. The toll-taking intermediary — viable when transactions were few and large — becomes a tollbooth on every drop of a flood.

## Proof is the hinge

When agents transact a trillion times a day, trust must be **cryptographic, programmable, and instant**. That requirement has four faces, and NFH fabric provides all four:

| Face               | What it means                                                                          | NFH fabric service                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Trust**          | Verifiable identity for humans, entities, and agents.                                  | [Registry](/product-documentation/products/registr) · [Credentialling Edge](/product-documentation/products/vc-on-edge)           |
| **Controls**       | Granular permissions and consent — an agent does exactly what it was authorised to do. | [Credentialling Edge](/product-documentation/products/vc-on-edge) · [Network Adapters Edge](/product-documentation/products/onix) |
| **Accountability** | An immutable trail linking every action to an identifiable actor.                      | [Observability & Audit](/product-documentation/products/observability-audit)                                                      |
| **Liability**      | A clear chain of responsibility when something goes wrong.                             | [Observability & Audit](/product-documentation/products/observability-audit) · [Pincer](/#pincer)                                 |

Strip these away and the agent economy is a fraud engine. Build them in, and it becomes the most inclusive market in history.

New rails *will* be laid in the next few years, and they will then last for generations. Exactly one thing is not yet decided: **whether those rails are open or owned.**

* **Owned.** Gatekeepers. A toll on everything. Power concentrates.
* **Open.** Build freely. Value to the edges. A commons, like the internet.

NFH fabric is NFH's answer: an open layer for value, so the gains of the intelligent era reach billions at the edges instead of whoever builds the wall.

***

*Sources: ADB Global Trade Finance Gap Survey 2025 · IFC–World Bank MSME Finance Gap Report 2025 · World Bank Remittance Prices Worldwide 2025.*


# Principles

Six architectural tenets shape every NFH fabric service and protocol.

{% stepper %}
{% step %}

### Decentralised

No single operator. The network runs on shared protocols, not a platform owner. NFH fabric services exist to coordinate — never to gate.
{% endstep %}

{% step %}

### Permissionless

Anyone who speaks the protocol can join. Governance is about conduct, accountability, and standards — not gatekeeping.
{% endstep %}

{% step %}

### Open standards

Specifications are public, versioned, and aligned with established open standards (W3C Verifiable Credentials, x402, MCP, OpenTelemetry). Implementations are open-source where possible.
{% endstep %}

{% step %}

### User-centric

Identity, data, credentials, and reputation belong to the participant. Not the platform. Self-custody is the default; selective disclosure is built in.
{% endstep %}

{% step %}

### Composable

Adopt one service or the full stack. Each NFH fabric service is independent, can be used on its own, and combines cleanly with the others.
{% endstep %}

{% step %}

### Agent-native

Autonomous software is a first-class participant — equal in rights and accountability to humans and businesses. Identity, signing, holding tokens, earning reputation: agents do all of it natively.

[**Read more: Agents as first-class participants →**](/nfh-fabric/agents)
{% endstep %}
{% endstepper %}


# Capabilities

What NFH fabric makes possible, and how it does it.

The marketing site frames capabilities as outcomes. This page maps each outcome to the protocols and services that make it real — so you can decide which subset you actually need.

## Unified discovery and publishing

An offering published once is findable across every aligned network. The producer doesn't re-list; the consumer doesn't aggregate.

**Underpinned by:** [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery) for publishing · [Discovery Edge](/product-documentation/products/discovr) for querying · [Registry](/product-documentation/products/registr) for tying offerings to verifiable identities.

## Self-executing contracts

The contract between buyer and seller is the wire format. Terms execute and settle without an operator clearing the trade.

**Underpinned by:** [Network Adapters Edge](/product-documentation/products/onix) for signed, schema-validated, policy-enforced message exchange · [Tokenisation](https://docs.finternetlab.io/) for the value-side commitment chain.

## Built-in guarantees

Refunds, escrow, arbitration are protocol concerns. The network resolves them; no intermediary owns the trust surface.

**Underpinned by:** Network Adapters Edge with policy plug-ins · [Observability & Audit](/product-documentation/products/observability-audit) for replayable evidence. Combined with [Pincer](/#pincer) for underwriter-backed gradient guarantees.

## Portable reputation

Reputation is signed by counterparties, held by the subject, and verifiable by anyone. It travels because it isn't stored in someone else's platform.

**Underpinned by:** [Credentialling Edge](/product-documentation/products/vc-on-edge) for the verifiable-credentials substrate · Registry for the issuer / status surface.

## Instant settlement

Value moves the moment conditions are met. Atomic, deterministic, observable.

**Underpinned by:** Tokenisation — including atomic primitives (`Lock`, `Commit`, `Unlock`) and the federation protocol for cross-instance transfers.

## Selective-disclosure identity

One identity, many proofs. Prove what's needed; reveal nothing more.

**Underpinned by:** Registry (identifiers and keys) · Credentialling Edge (issuance, verification, selective disclosure).

## Agent-first interaction

Every primitive is consumable by autonomous software directly, not as a retrofit.

**Underpinned by:** [MCP-native Discovery](/product-documentation/products/discovr) · agent-owned identities and accounts · capability and delegation credentials.

## Network-wide observability

You can see how the network is performing without seeing what anyone is doing.

**Underpinned by:** [Observability & Audit](/product-documentation/products/observability-audit) for live telemetry and cryptographic anchoring.

***

## How to use this page

When designing a deployment, work backwards from the capability you need. Each capability points at the minimum service set required — adopt that subset, add others as the use case grows. NFH fabric is composable.


# Participants

Who's on NFH fabric and what they do.

NFH fabric is permissionless. If you can speak the protocol, you can join. Participants take different shapes depending on what they do on the network.

## Buyers / consumer-side apps

Apps that help users discover, choose, and transact across the network. A ride-hailing app, a savings app, a procurement portal, an agent-driven trading client.

## Providers / seller-side apps

Apps that publish offerings and fulfil them. A restaurant, a logistics provider, an energy supplier, a data marketplace, a credentialing authority.

## Tokenisation instances

Operators that run a token runtime — central banks, regulated financial institutions, sector operators, hosted services (such as those Lium runs). Each instance speaks the federation protocol and federates value with other instances.

## Credential issuers

Authorities that issue verifiable credentials — universities, regulators, professional bodies, certification authorities, employer organisations.

## Agents

Autonomous software, with the same rights and accountability as humans and businesses. [Read more →](/nfh-fabric/agents)

## Network facilitators

Organisations that stand up sector-specific or jurisdiction-specific networks on top of NFH fabric — defining policies, onboarding participants, governing local rules. Facilitators consume NFH fabric's central services and reference software to launch quickly with predictable compliance.

## The NFH Foundation

Operates NFH fabric's central services (Registry, Cataloguing, Discovery, Observability & Audit anchors), publishes the protocols, and stewards the reference software.


# Open standards

The open standards NFH fabric aligns with and contributes to.

NFH fabric is built from open standards, contributes back to them, and aligns with established work where it exists.

## Standards NFH fabric implements or aligns with

* **W3C Decentralized Identifiers (DIDs)** — pseudonymous identifiers across the Registry.
* **W3C Verifiable Credentials (VCs)** — Credentialling Edge issuance and verification.
* **BBS+ / SD-JWT** — selective disclosure of credential claims.
* **OpenTelemetry** — observability primitives across Observability & Audit.
* **x402** — HTTP-mediated value movement.
* **MCP (Model Context Protocol)** — agent-native discovery and service consumption.
* **BLAKE2** — cryptographic hashing and anchoring.
* **Open Policy Agent (Rego)** — network policy plug-ins for the Network Adapters Edge.

## Standards NFH fabric defines openly

* Beckn Protocol v2 — discovery, contracting, fulfilment.
* The federation protocol for cross-instance value movement.
* Namespace / registry / record schemas.
* Network adapter wire and plug-in formats.


# Beckn Protocol

The Beckn Protocol specification defines a standard protocol stack that allows independently run applications to take part in trusted value exchange transactions.

## Introduction

The Beckn Protocol specification defines a standard protocol stack that allows independently run applications to take part in trusted value exchange transactions. These transactions usually move through discovery, contracting, fulfillment, and post-fulfillment.

This document explains NFH fabric v2 at a high level. It is an overview. It is meant to help a human or an AI agent understand how the parts fit together before going into the full API files and schema files.

This protocol stack consists of the following layers (bottom to top)

1. Network Architecture
2. API Specification
3. Composable linked-data schema
4. Communication Protocol
5. Workflows

Let us understand each of these layers briefly.

{% hint style="info" icon="link" %}
Refer to the protocol here - <https://github.com/beckn/protocol-specifications-v2>
{% endhint %}

### Network Architecture

An NFH fabric network is a set of separate services. Each service is run independently. The protocol gives them a common way to talk to each other.

In beckn protocol v2 (Hereafter referred to as v2) the main actor roles are the following:

1. consumer node (consumer node) - the buyer side or user side platform
2. provider node (provider node) - the seller side or provider side platform. A provider node self-hosts and self-signs its own catalog data on infrastructure it controls, discoverable through its existing Registry-anchored identity
3. DS (Discovery Service) - the service that answers discovery queries from consumer nodes. It builds its own index by crawling and independently verifying every provider node's self-hosted catalog data
4. Registry - the trust directory that stores participant identity, endpoints, and public keys

A consumer node discovers supply through a DS. A provider node makes its catalog discoverable by hosting signed catalog files and a signed catalog index on its own infrastructure and pointing to that index from its Registry record. A DS crawls that data directly from the provider node, verifies it independently, and builds its own index from what it verifies. After discovery, the consumer node usually talks directly to the provider node for the transaction. All actors use the Registry to find endpoints and public keys and to verify signatures.

In v2 the Registry is a DeDi-compliant directory. This means the trust layer is treated as a proper public directory and not as a custom side system.

The important point is this: v2 does not depend on a live multicast gateway for discovery, and it does not route catalog data through any centrally-operated relay either. Discovery is catalog-first and index-based, and trust is anchored directly in each provider node's own signature — verified independently by every Discovery Service that crawls it.

```mermaid
flowchart TB
    subgraph TOP[Transaction Layer]
        direction TB
        CN <-->|discover / on_discover| DS
        CN <-->|Transaction API| PN
        DS -->|crawls self-signed catalog files| PN
    end

    subgraph BOTTOM[NFH fabric : Universal Value-Exchange Infrastructure]
        direction LR
        REG[Registry]
    end

    CN -.->|lookup| REG
    PN -.->|lookup| REG
    DS -.->|lookup| REG
```

### API Specification

The API specification defines the common shape of NFH fabric messages and endpoints.

In v2, the endpoint pattern is simple:

```
/beckn/{becknEndpoint}
```

For example, a participant may expose endpoints such as:

* `/beckn/discover`
* `/beckn/on_discover`
* `/beckn/select`
* `/beckn/on_select`
* `/beckn/confirm`
* `/beckn/on_confirm`

The exact actions a participant supports depend on its role.

Every beckn API call carries a transport envelope and a business payload.

The transport envelope is the fixed part of the protocol. It carries things like the action name, IDs, time, and routing data. The business payload is the domain data inside the message.

Beckn protocol specifies `context`, `message`, `inReplyTo`, `status`, and signatures in the transport contract. They are fixed. They must not be renamed or redefined by domain schema.

At a high level, the main action groups are:

1. Discovery - `discover`, `on_discover`
2. Contracting - `select`, `on_select`, `init`, `on_init`, `confirm`, `on_confirm`
3. Fulfillment - `status`, `on_status`, `update`, `on_update`, `track`, `on_track`, `cancel`, `on_cancel`
4. Post-fulfillment - `rate`, `on_rate`, `support`, `on_support`
5. Infrastructure - `publish` and Registry lookups

### Composable linked-data schema

In Beckn v2, the business payload is not just plain JSON. It is JSON-LD.

JSON-LD lets every type and field carry a shared meaning. It does this mainly through two ideas:

* `@context` - tells the reader where the meaning of terms comes from
* `@type` - tells the reader what kind of object it is

This is important because NFH fabric is meant to work across domains, geographies, and networks. A machine should not only read the data. It should also understand what the data means.

Beckn v2 separates schema into three layers:

1. The transport envelope layer - the API envelope and container schemas
2. The core schema layer - shared business types such as `Catalog`, `Item`, `Offer`, `Intent`, `Contract`, `Provider`, `Fulfillment`
3. The domain schema pack layer - domain specific extensions such as retail, mobility, health, logistics, and others

Where possible, Beckn protocol maps types and fields to schema.org. When the protocol needs its own meaning, it uses the NFH fabric/protocol namespace. This gives global interoperability without losing NFH fabric-specific meaning.

This layered design solves an important problem. The transport API can stay small and stable. At the same time, the business schema can grow over time. New domains can be added without changing the basic transport contract.

The `schema.beckn.io` website is the public place where these schema resources can be published and browsed. It gives stable IRIs, JSON-LD contexts, RDF vocabularies, and versioned schema pages. In simple words, it is the public map of meaning for NFH fabric data.

### Communication Protocol

The communication protocol defines how NFH fabric messages move over the network.

At the transport level, v2 uses HTTPS and digital signatures.

There are three main request modes:

1. POST - used for normal forward requests and callbacks
2. GET Body Mode - used when a GET request with a JSON body is allowed
3. GET Query Mode - used when the whole request must fit inside a URL, such as a QR code or a deep link

Every request except GET Query Mode carries an NFH fabric Signature in the `Authorization` header. The receiver verifies that signature using the sender's public key from the Registry.

The communication pattern is usually as follows:

1. The sender sends a signed request
2. The receiver immediately returns `Ack` or `Nack`
3. If the request is accepted, the business result usually comes later as a callback
4. The callback carries `inReplyTo` so it can be tied to the original request
5. The `Ack` carries a `counterSignature`, which works as a signed receipt

```mermaid
sequenceDiagram
    participant Sender
    participant Receiver

    Sender->>Receiver: RequestContainer
    Note over Sender,Receiver: Request is signed
    Receiver-->>Sender: Ack or Nack
    Note over Receiver,Sender: Ack includes counterSignature

    Receiver->>Sender: CallbackContainer
    Note over Receiver,Sender: Callback includes inReplyTo
    Sender-->>Receiver: Ack
```

This means it is not just request-response in the usual web sense. It is mainly an asynchronous and event-driven protocol.

At a practical level, protocol supports all of the following patterns:

* **Same-session acknowledgement** - the receiver immediately says whether it received the message
* **Asynchronous business response** - the actual business result comes later through a callback
* **Synchronous business response in some cases** - for example, discovery results may also be returned synchronously depending on network policy
* **Later state-driven messages** - a later message may be sent because the state changed, not because a user clicked a button at that moment

GET Query Mode is a special case. It is used when the request must be a self-contained URL. In that mode, the server must not send an asynchronous callback. It only returns an acknowledgement.

### Workflows

Workflows are the business paths built on top of the API actions.

The protocol gives reusable actions. A network then combines those actions into a workflow.

A simple workflow often looks like this:

1. A provider node publishes catalog data
2. A consumer node discovers that catalog through a DS
3. The consumer node starts a transaction with a provider node
4. The consumer node and provider node agree on terms
5. The provider node fulfills the contract
6. The parties may exchange rating or support information later

Not every network uses every action. Not every domain needs every step. The protocol gives the building blocks. The network chooses the path.

## Understanding the NFH fabric API Specification

This section gives the API picture at a level useful for implementation. It keeps the discussion short and clear. A separate document can go action by action in more detail.

### What changed in beckn v2

If you have seen older beckn material, these are the changes that matter most:

1. Discovery is no longer based on live gateway multicast. provider nodes self-host and self-sign their own catalog data; Discovery Services crawl and independently verify it directly from each provider node.
2. The API surface is simplified around the common endpoint pattern `/beckn/{becknEndpoint}`.
3. The transport contract and the business schema are now clearly separated.
4. The business payload is JSON-LD, with shared meaning through `@context` and `@type`.
5. The Registry is aligned to a DeDi-compliant directory model.
6. Non-repudiation is stronger because acknowledgements can carry `counterSignature` and callbacks can carry `inReplyTo`.

### What an NFH fabric network participant must do

Any platform can take part in an NFH fabric network if it can do the following:

1. Register its identity, endpoint, and public keys in the Registry
2. Send signed NFH fabric messages
3. Verify signed NFH fabric messages from others
4. Implement the endpoints needed for its role
5. Read and produce the shared JSON-LD payloads

### The main actors

Let us look at the main actors one by one.

#### consumer node

A consumer node is the buyer side platform. It is the platform where the user, buyer, or demand side experience lives.

A consumer node usually does the following:

1. Sends discovery requests to a DS
2. Receives discovery results
3. Sends transaction requests to provider nodes
4. Receives callbacks from provider nodes
5. Shows the results to the end user

#### provider node

A provider node is the provider side platform. It is the platform where the provider's catalog, pricing, contract logic, and fulfillment logic live.

A provider node usually does the following:

1. Hosts its own signed catalog files and a signed catalog index on infrastructure it controls, and points to that index from its Registry record — making its catalog discoverable without calling any beckn API
2. Receives transaction requests from consumer nodes
3. Sends callbacks to consumer nodes
4. Updates contract and fulfillment state over time

#### DS (Discovery Service)

A DS is the catalog discovery service.

It resolves each provider node's Registry record, crawls the provider node's self-hosted catalog index and files directly, verifies every signature independently, and builds and maintains its own index from what it has verified. It then answers discovery requests from consumer nodes against that index. This is why NFH fabric v2 discovery is fast and does not need live fan-out to all provider nodes, and why no centrally-run catalog service sits between a provider node and a Discovery Service.

#### Registry

The Registry is the trust directory of the network.

It stores participant records, endpoints, capabilities, and public keys. Before a participant sends a message, it can use the Registry to find where to send the message and how to verify the signature.

### What every NFH fabric packet contains

Every NFH fabric request or callback contains two main parts:

* `context`
* `message`

The `context` carries the routing and control data. The `message` carries the business data.

A callback also carries `inReplyTo` so that it can be tied to the original request.

A simplified NFH fabric packet looks like this:

```json
{
  "context": {
    "domain": "beckn:retail",
    "action": "discover",
    "version": "2.0.0",
    "bapId": "bap.example.com",
    "bapUri": "https://bap.example.com/callback",
    "transactionId": "txn-123",
    "messageId": "msg-456",
    "timestamp": "2026-03-27T00:00:00Z",
    "ttl": "PT30S"
  },
  "message": {
    "@context": [
      "https://schema.org/",
      "https://schema.beckn.io/core/v2.0/context.jsonld"
    ],
    "@type": "Intent"
  }
}
```

The important thing to remember is this: the transport envelope and the business payload are different concerns.

* The transport envelope tells you how the message should move
* The business payload tells you what the message means

### Transport envelope and business payload

NFH fabric v2 keeps these two layers separate on purpose.

The transport layer gives a stable message frame. It defines the container schemas such as `Context`, `RequestContainer`, `CallbackContainer`, `Ack`, `Nack`, `CounterSignature`, and `InReplyTo`.

The business layer gives the actual domain objects such as `Catalog`, `Item`, `Offer`, `Intent`, `Contract`, `Fulfillment`, `Tracking`, `Rating`, and `Support`.

This separation has a big benefit. The transport layer stays stable. The business layer can evolve across domains.

### A note on v2 words

In older NFH fabric explanations, you will often see the word `Order`.

In NFH fabric v2 core schema, the more exact word is `Contract`. The idea is similar. It is the formal record of what the parties agreed to. In the same way, `ContractItem` replaces the older `OrderItem`.

This matters mainly at the schema layer. The transaction idea itself remains easy to understand: discovery leads to agreement, agreement leads to fulfillment, and fulfillment may be followed by support or rating.

### The main request modes

The same NFH fabric action can be carried in different transport modes.

#### POST

POST is the normal mode for:

* forward requests such as consumer node to DS or consumer node to provider node
* callbacks such as DS to consumer node or provider node to consumer node

#### GET Body Mode

GET Body Mode lets a caller send an NFH fabric request in a GET request with a JSON body. This is useful in cases where GET semantics are needed but the caller can still send a body and expects a later callback.

#### GET Query Mode

GET Query Mode puts the full request and signature inside the URL query string.

This is useful for:

* QR codes
* deep links
* bookmarkable search links
* simple browser or device clients

In GET Query Mode there is no asynchronous callback. The server only returns an `Ack` or a `Nack`.

### How discovery works in NFH fabric v2

Discovery is one of the biggest changes in NFH fabric v2.

In older models, discovery often depended on a gateway sending the query to many provider nodes in real time.

In NFH fabric v2, discovery is catalog-first, and catalog data flows directly from a provider node to a Discovery Service — never through a shared intermediary:

1. A provider node hosts signed catalog files and a signed catalog index on storage it controls, and adds the index's URL to its Registry record
2. A Discovery Service resolves the provider node's Registry record and finds that pointer
3. The Discovery Service crawls the catalog index and catalog files directly from the provider node, verifying every signature before indexing anything
4. The Discovery Service builds and maintains its own index from what it has verified, re-crawling on its own schedule to pick up incremental changes
5. A consumer node sends a `discover` request to the DS
6. The DS returns matching catalog data from its own index
7. After discovery, the consumer node talks directly to the chosen provider node

```mermaid
sequenceDiagram
    participant PN as Provider Node
    participant Reg as Registry
    participant DS as Discovery Service
    participant CN as Consumer Node

    PN->>PN: Host signed catalog files and index, add catalog_index_urls to Registry record
    DS->>Reg: Resolve PN's Registry manifest and Subscriber record
    DS->>PN: GET catalog index and catalog files, conditionally
    PN-->>DS: Signed catalog index and files
    DS->>DS: Verify signatures, build own index
    CN->>DS: discover
    DS-->>CN: Ack
    DS->>CN: on_discover or synchronous response
```

This design gives three major benefits:

1. Discovery becomes faster
2. provider nodes do not need to answer every live discovery query
3. A provider node has full sovereignty over how and where its own catalog data is hosted — no shared, centrally-operated service sits in the path, and none can become a single point of failure for the whole network's discovery phase

> The full mechanism — catalog file and index schemas, signing and verification, incremental updates, and catalog lifecycle — is specified in the [Decentralized Catalog Publishing and Discovery RFC (NFH-014)](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md) and covered in NFH fabric by [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery) and [DISCOVR](/product-documentation/products/discovr).

### The main action groups

The NFH fabric actions are best understood by stage.

| Stage            | Main actions                                                                             | What they do                                          |
| ---------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| Discovery        | `discover`, `on_discover`                                                                | Find matching catalog data                            |
| Contracting      | `select`, `on_select`, `init`, `on_init`, `confirm`, `on_confirm`                        | Agree on scope, terms, price, and create the contract |
| Fulfillment      | `status`, `on_status`, `update`, `on_update`, `track`, `on_track`, `cancel`, `on_cancel` | Manage the live state of the contract                 |
| Post-fulfillment | `rate`, `on_rate`, `support`, `on_support`                                               | Handle rating and support                             |
| Infrastructure   | `publish`, Registry lookups                                                              | Publish supply and resolve trust data                 |

A simple way to think about these stages is:

1. **Discovery** - find what is available
2. **Contracting** - agree what will happen
3. **Fulfillment** - do what was agreed
4. **Post-fulfillment** - rate, support, and close the loop

### A full NFH fabric flow at a glance

```mermaid
sequenceDiagram
    participant Provider
    participant DS
    participant Consumer
    participant Registry

    Provider->>Registry: register identity, endpoint, and keys
    Provider->>Provider: host signed catalog files and index
    Provider->>Registry: add catalog index URL to Registry record
    Consumer->>Registry: lookup DS and Provider details

    DS->>Registry: resolve Provider's Registry record
    DS->>Provider: crawl and verify catalog index and files
    DS->>DS: build own index

    Consumer->>DS: discover
    DS->>Consumer: on_discover or synchronous result

    Consumer->>Provider: select
    Provider->>Consumer: on_select

    Consumer->>Provider: init
    Provider->>Consumer: on_init

    Consumer->>Provider: confirm
    Provider->>Consumer: on_confirm

    Consumer->>Provider: status / update / track / cancel
    Provider->>Consumer: on_status / on_update / on_track / on_cancel

    Consumer->>Provider: rate / support
    Provider->>Consumer: on_rate / on_support
```

Not every transaction uses every step. For example, some networks may not use `track`. Some domains may not need `support`. Some contracts may not change after confirmation, so `update` may never be used.

### What an implementer should build

If you want to start implementing NFH fabric, it helps to think role by role.

#### If you are building a consumer node

You usually need to build the following:

1. A client for calling DS and provider node endpoints
2. Callback endpoints for receiving `on_` actions
3. Registry lookup support
4. Message signing and signature verification
5. JSON-LD payload handling
6. Contract and fulfillment state management on the buyer side

#### If you are building a provider node

You usually need to build the following:

1. A pipeline that generates, signs, and hosts your own catalog files and catalog index, and keeps your Registry record's `catalog_index_urls` current
2. Request endpoints for transaction actions
3. Callback sending to consumer nodes
4. Registry registration and key publication
5. Message signing and signature verification
6. Contract, payment, and fulfillment logic on the provider side

#### If you are building a Discovery Service

You need to build:

1. A crawler that resolves provider nodes' Registry records, fetches their catalog indexes and files, and verifies every signature before indexing anything
2. A `discover` endpoint
3. An index for `Catalog`, `Item`, `Offer`, and related graphs
4. Ranking, filtering, and query logic
5. Callback or synchronous response handling as allowed by the network policy

#### If you are building any NFH fabric actor

You should also remember the following:

1. Use HTTPS
2. Verify signatures on every incoming message
3. Use the Registry for public key resolution
4. Treat the transport envelope as fixed
5. Treat the `message` as the business payload
6. Load JSON-LD contexts in a controlled way. Do not trust unknown remote contexts blindly.

### Summary

NFH fabric v2 becomes easy to understand once the separation of concerns is clear.

* The **network architecture** tells you who talks to whom
* The **API specification** tells you what endpoint and packet shape to use
* The **linked-data schema** tells you what the payload means
* The **communication protocol** tells you how signed requests, acknowledgements, and callbacks move
* The **workflows** tell you how the actions are combined for a real business journey

At a practical level, NFH fabric v2 works like this:

1. Providers publish catalog data
2. Discovery services index that data
3. Buyer side platforms discover matching supply
4. Buyer and provider platforms agree on terms
5. The provider fulfills the contract
6. The parties may exchange rating or support data after that

If you understand these six ideas, you can start reading the NFH fabric transport files, schema files, and network guides with the right mental model.


# Agents as first-class participants

How autonomous software participates in NFH fabric — identity, authority, accountability — built into the protocol rather than bolted on.

NFH fabric treats autonomous software as a full network participant. Not "supported"; not "compatible with" — addressed, identified, accountable in the same way humans and organisations are.

This page explains what that means concretely - where the design decisions live, and which NFH fabric services agents interact with directly.

## What "first-class" means at the protocol level

| Capability     | How NFH fabric expresses it                                                                                                                                                                                         |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Identity       | The agent can sign up in the [Registry](/product-documentation/products/registr), with its own keypair.                                                                                                             |
| Authority      | Authority comes via verifiable credentials. A human or organisation issues a scoped, time-bounded delegation credential. The agent presents it; verifiers check it.                                                 |
| Accountability | Every action the agent signs is anchored in [Observability & Audit](/product-documentation/products/observability-audit). Reversibility, dispute resolution, and revocation work the same for agents as for humans. |
| Wealth         | The agent can hold a [Tokenisation](https://docs.finternetlab.io/) account in its own name. Pay it, charge it, audit it.\*                                                                                          |
| Reputation     | Counterparties sign reputation claims against the agent's registry entry. The reputation travels with the identity, not the platform.                                                                               |
| Discovery      | The agent finds offerings via [Discovery Edge](/product-documentation/products/discovr), exposed natively. No scraping, no screen-reading.                                                                          |

## Why this design

The next wave of economic activity will be agent-driven — agents brokering deals, executing payments, coordinating fleets, managing portfolios. If the protocol treats them as second-class, every interesting interaction becomes a workaround: a human shim, a fake-user account, a fragile permissions model.

NFH fabric was designed assuming agents are full participants. That assumption simplifies the protocol — there is one identity model, one authority model, one accountability model. It is also what lets agent-driven and human-driven flows compose cleanly in a single team.

## Patterns

### Agent-owned account

Provision an agent ID for the agent in the Registry. Issue it a capability credential. Fund a Tokenisation account in its name. The agent transacts under its own identity; the audit trail attaches to it.

### Delegated authority

A human or organisation issues a credential delegating a specific capability for a specific time. The agent acts under that delegation; revocation is a one-call operation against the issuing credential.

### Human-in-the-loop gating

A policy plug-in on the Network Adapters Edge can require human countersignature for actions over a threshold — value, risk score, counterparty class. The gating is enforced at the protocol boundary, not in app code.

### Multi-agent commerce

Discovery via MCP. Contracts via Network Adapters Edge. Settlement via Tokenisation. Audit via Observability & Audit. Agents brokering with agents, end-to-end, with humans in the loop only where the policy demands it.

{% hint style="info" icon="note" %}
*\*some of the features are still under development*
{% endhint %}


# Capabilities of NFH fabric

This section documents the services in production that makes up NFH fabric — each component's capabilities, operator how-tos, commands, and repositories.

NFH fabric is **open for anyone to build on**. The products split into two groups: a small set of **core components** that every network needs, and a growing set of **accelerators** you adopt as you need them.

## Core NFH fabric components

The foundation of any NFH fabric network — verifiable identity.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>REGISTR</strong></td><td>The NFH fabric Registry Service — verifiable network identity &#x26; trust for every participant. Built on DeDi.</td><td><a href="/product-documentation/products/registr">REGISTR — build trusted networks</a></td></tr></tbody></table>

Catalog publishing isn't a separate product — a provider self-hosts and self-signs its own catalog on infrastructure it already controls. See [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery) for the full guide.

## Accelerators

Adopt these as your network grows — discovery, credentials, connectivity, schemas, tokenised value, and audit.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>DISCOVR</strong></td><td>Real-time, multi-modal discovery engine that crawls and indexes every self-published catalogue.</td><td><a href="/product-documentation/products/discovr">DISCOVR — find catalogs</a></td></tr><tr><td><strong>VC on Edge</strong></td><td>Issue &#x26; verify Verifiable Credentials at the edge — powered by OpenCred. Keys never leave the issuer.</td><td><a href="/product-documentation/products/vc-on-edge">VC on Edge — prove anything</a></td></tr><tr><td><strong>ONIX</strong></td><td>Protocol adapter middleware between consumer and provider nodes — signing, validation, compliance.</td><td><a href="/product-documentation/products/onix">ONIX — connect to everything</a></td></tr><tr><td><strong>Schema browser</strong></td><td>Browse and reference the NFH fabric schema registry — the shared object models every node speaks.</td><td><a href="https://schema.beckn.io">https://schema.beckn.io</a></td></tr><tr><td><strong>Tokenisation</strong></td><td>Any form of value as a programmable, transferable token, federated across instances — from the Finternet Lab.</td><td><a href="https://docs.finternetlab.io/">https://docs.finternetlab.io/</a></td></tr><tr><td><strong>Observability &#x26; Audit</strong></td><td>End-to-end transaction tracing, network telemetry, and verifiable audit trails.</td><td><a href="/product-documentation/products/observability-audit">Observability &amp; Audit</a></td></tr></tbody></table>

{% hint style="info" icon="handshake" %}

#### Need help? Reach out to us <https://support.nfh.global/>

{% endhint %}


# REGISTR — build trusted networks

Digital ecosystems across sectors—commerce, mobility, energy, sustainability, public services, and more—need a reliable way for participants to identify,…

> **Realises the NFH fabric** [**Registry**](/product-documentation/products/registr) **service — built on** [**DeDi**](https://docs.nfh.global/dedi)**.**

## **Executive Summary**

Digital ecosystems across sectors—commerce, mobility, energy, sustainability, public services, and more—need a reliable way for participants to identify, authenticate, and communicate with each other. Today, this often requires custom integrations, manual key exchanges, or sector-specific directories that don’t scale.

The **NFH fabric Registry Service**, built on the [DeDi Global](https://dedi.global/) infrastructure, an implementation of the [Decentralized Directory Protocol (DeDi)](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol), provides a verifiable identity directory for any NFH fabric-enabled participant. It enables organizations of all types to publish network identity under their own domains, ensuring **trusted addressability** and interoperability across NFH fabric-based networks.

## **1. Why the Registry Service Matters**

### **The Problem Today**

Many facilitators and network operators maintain their own directories of participants. As networks expand, keeping these directories in sync, verifying identities, and updating configuration data becomes increasingly complex.

Because each directory is independently operated, they naturally become isolated, making cross-network interaction more difficult.

The NFH fabric Registry Service provides a shared, protocol-aligned foundation for publishing identity information while allowing facilitators to continue curating and governing their networks as they always have.

## **2. The NFH fabric Approach**

The Registry Service provides:

#### **✓ Global Addressability**

Every NFH fabric-compatible participant gets a resolvable, protocol-standard identity under a verified namespace—making it straightforward for entities to reference, validate, and interact with one another.

#### **✓ Self-Owned Identity Records**

Participants publish their own subscriber information under their own domain, ensuring autonomy and reducing duplication across registries.

#### **✓ Cryptographic Trust Without Manual Effort**

Public keys, domain proofs, and signing details are published in a consistent, verifiable format. This removes the need for custom key exchanges or facilitator-specific trust setups.

#### **✓ Seamless Integration with ONIX**

[ONIX](https://github.com/beckn/beckn-onix) automatically retrieves subscriber details during transactions. No additional registry APIs, integrations, or onboarding workflows are needed.

The result is a simpler, more coherent technical foundation that empowers facilitators while strengthening the entire network.

## **3. What the Registry Service Enables**

#### **a. Global Addressability**

A uniform, protocol-defined way to reference participants across ecosystems—regardless of sector or facilitator.

#### **b. Verifiable Trust Layer**

Domain-anchored identities ensure:

* Authenticity
* Key validation
* Signed request verification

All without manual coordination.

#### **c. Structured Subscriber Data**

Standardized schemas for:

* Subscriber ID
* Callback URLs
* Domain codes
* Network roles (consumer/provider node/CDS/etc.)
* Public keys

Ensuring compatible, predictable integrations.

#### **d. Facilitator Support**

Facilitators can publish **Subscription Reference Directories** — curated sets of participants — while relying on the registry service as the technical backbone for addressing and validation.

#### **e. Seamless Interoperability with ONIX**

ONIX automatically:

* Retrieves subscriber information
* Fetches keys
* Performs signing and verification

Allowing participants to transact smoothly without extra integration steps.

## **4. Key Benefits**

Beyond the capabilities above, the Registry Service is also:

#### ♻️ **Applicable Across Sectors**

Suitable for commerce, mobility, health, energy, sustainability, public services, and any domain adopting NFH fabric.

#### **📈 Proven to Scale**

In the latest performance testing, the Registry Service handled datasets ranging from 100,000 to 1.5 million records while sustaining around 1,000 requests per second on modest infrastructure. In larger configurations, it scaled to over 2,200 requests per second with p95 latency of about 42 ms, demonstrating strong performance for high-volume, low-latency network workloads.

## **5. Who Should Use This Service**

#### **Organizations Building NFH fabric-Enabled Systems**

Across any sector — energy, mobility, sustainability, commerce, public services, etc.

#### **Developers**

Implement NFH fabric flows without managing discovery, key-exchange setups, or custom integrations.

#### **Facilitators & Network Operators**

Curate and govern networks with ease, without carrying the full technical maintenance burden of identity/addressability infrastructure.

#### **Enterprises & Agencies**

Standardize trust and identity across wide-ranging digital ecosystems.

## **6. How It Works**

1. **Namespace Creation** Create and verify domain ownership to establish an identity namespace.
2. **Registry Publication** Add a registry to list beckn subscriber details.
3. **Subscriber Record Creation** Publish callback URL, roles, domain codes, and public keys.
4. **ONIX Interaction** ONIX automatically resolves subscriber details during network interactions.

## **7. Typical User Journey**

{% stepper %}
{% step %}

### **Create & Verify Namespace**

Prove domain ownership and establish your identity namespace.
{% endstep %}

{% step %}

### **Add a Registry**

Publish a registry following the NFH fabric subscriber schema.
{% endstep %}

{% step %}

### **Add Subscriber Records**

Include your callback URLs, roles, domain codes, and keys.
{% endstep %}

{% step %}

### **Transact through ONIX**

Start participating in NFH fabric interactions with automatic address resolution and trust validation.
{% endstep %}
{% endstepper %}

## **8. Glossary**

* **Namespace**: A verified identity space tied to an organization’s domain and used as the root of trust for publishing participant information..
* **Registry**: A list of subscriber records under your namespace.
* **Subscriber Record**: The specific values describing how a participant can be addressed and authenticated—such as URLs, roles, domain codes, and public keys.
* **Facilitator**: An entity that curates and governs networks using NFH fabric standards.
* **Domain Code**: Represents a domain like mobility, commerce, energy, or sustainability.
* [**ONIX**](https://github.com/Beckn-One/beckn-onix): An enterprise-grade middleware adapter that enables seamless communication in NFH fabric-enabled networks by handling routing, key retrieval, and validation.
* **DeDi Global**: Infrastructure implementing the Decentralized Directory Protocol.

***

## **9. Get Started**

### **📘 User Guide**

* Whether you're a **Network Facilitator Organization (NFO)** setting up a new NFH fabric network or a **Network Participant (NP)** registering your subscriber details — [Onboarding on the NFH fabric](/build/onboarding)

### **💬 Need Help?**

Raise a support ticket [here](https://github.com/Networks-for-Humanity/fabric-support/issues/new/choose).

## The NFH fabric capability: Registry

REGISTR realises the NFH fabric **Registry** — a decentralised, verifiable directory of who's on the network: people, businesses, agents, instruments, schemas, and the public keys that prove them.

**What it gives you**

* **Pseudonymous identifiers** — names that resolve to DIDs, with versioned, signed records.
* **Public keys** — cryptographic material for verifying signatures and credentials.
* **Namespaced registries** — domain-scoped lists (e.g. licensed assayers, accredited issuers, certified providers).
* **Delegations** — fine-grained authority transfer between identities.
* **Cryptographic anchoring** — every record proven, every change auditable.

**Where it sits** — a service NFH runs (the central, globally-addressable registry surface) plus the protocol NFH defines (the namespace / registry / record model and the publish / lookup / delegation API).

**Standards alignment:** W3C DIDs · BLAKE2 hashing · open API specifications.


# Registry service benchmark

This page summarizes a set of performance tests conducted on the Registry Service in December 2025 to understand how it behaves under different data sizes and…

This page summarizes a set of performance tests conducted on the Registry Service in December 2025 to understand how it behaves under different data sizes and infrastructure configurations.

**The goal is to give operators a practical sense of the throughput and latency they can expect under different data sizes and load levels.**

The results below are based on sustained load tests using the open-source **k6** tool and reflect steady-state behavior rather than short-lived spikes.

***

## ✨ At a Glance

| <h3>🚀 \~2,200</h3><p>requests/sec</p><p><sub>Peak throughput</sub></p> | <h3>⚡ \~42 ms</h3><p>p95 latency</p><p><sub>At peak throughput</sub></p> | <h3>📈 \~2x</h3><p>throughput gain</p><p><sub>2 vCPU → 4 vCPU</sub></p> |
| :---------------------------------------------------------------------: | :----------------------------------------------------------------------: | :---------------------------------------------------------------------: |

***

## 🔬 Test Methodology

Benchmarks were run under controlled conditions using **k6** virtual users against a live Registry Service instance.

#### Traffic Simulation

| Parameter            | Value                      |
| -------------------- | -------------------------- |
| **Concurrent Users** | 50–100 virtual users       |
| **Duration**         | 10 minutes (R0: 2 minutes) |

#### Infrastructure Configurations Tested

| Config | Memory | vCPU |
| ------ | :----: | :--: |
| Small  |  4 GB  |   2  |
| Medium |  8 GB  |   2  |
| Large  |  16 GB |   4  |

#### Dataset Shapes Tested

| Namespaces | Registries / Namespace | Records / Registry | Total Records |
| :--------: | :--------------------: | :----------------: | :-----------: |
|     500    |            1           |         200        |    100,000    |
|    2,000   |            2           |         100        |    400,000    |
|    2,000   |            2           |         200        |    800,000    |
|    3,000   |            2           |         250        |   1,500,000   |
|    1,500   |            2           |         500        |   1,500,000   |

All reported values represent **steady-state performance**.

***

## 📈 Run Results

{% hint style="info" %}
**Reading the latency columns**\
p90 = 90% of requests completed within that time. p95 captures the 95th percentile — the experience of nearly all requests, including slower ones.
{% endhint %}

|  #  | Thread Count | Namespaces | Registries / Namespace | Records / Registry | Total Records | Duration | Memory | CPU | Iterations |   TPS   | Avg (ms) | Min (ms) | Med (ms) | Max (ms) | p90 (ms) | p95 (ms) |
| :-: | :----------: | :--------: | :--------------------: | :----------------: | :-----------: | :------: | :----: | :-: | :--------: | :-----: | :------: | :------: | :------: | :------: | :------: | :------: |
|  R0 |      50      |     500    |            1           |         200        |    100,000    |    2m    |   4GB  |  2  |   123,938  | 1032.34 |   48.18  |   0.31   |   46.83  |  286.86  |   70.71  |   78.63  |
|  R1 |      50      |     500    |            1           |         200        |    100,000    |    10m   |   4GB  |  2  |   656,173  | 1093.53 |   45.5   |   0.32   |   44.56  |  284.97  |   66.21  |   72.92  |
|  R2 |      50      |     500    |            1           |         200        |    100,000    |    10m   |   8GB  |  2  |   696,003  | 1159.94 |   42.88  |   0.29   |   42.27  |  175.11  |   61.88  |   67.86  |
|  R3 |      100     |     500    |            1           |         200        |    100,000    |    10m   |   8GB  |  2  |   693,374  | 1155.47 |   86.31  |    0.3   |   85.21  |  523.17  |   118.7  |  129.11  |
|  R4 |      50      |    2,000   |            2           |         100        |    400,000    |    10m   |   8GB  |  2  |  1,228,847 | 2048.01 |   24.17  |   0.27   |   23.22  |  317.04  |   36.45  |   40.82  |
|  R5 |      50      |    2,000   |            2           |         200        |    800,000    |    10m   |   8GB  |  2  |   676,575  | 1127.54 |   44.08  |    0.3   |   42.83  |  1035.82 |   63.83  |   70.69  |
|  R6 |      50      |    2,000   |            2           |         200        |    800,000    |    10m   |  16GB  |  4  |  1,337,820 | 2229.62 |   22.17  |   0.27   |   20.84  |  134.52  |   36.38  |   41.82  |
|  R7 |      50      |    3,000   |            2           |         250        |   1,500,000   |    10m   |  16GB  |  4  |  1,070,116 | 1783.44 |   27.78  |   0.28   |   26.56  |  208.58  |   43.78  |   49.46  |
|  R8 |      50      |    1,500   |            2           |         500        |   1,500,000   |    10m   |  16GB  |  4  |   575,289  |  958.75 |   51.89  |   0.25   |   46.45  |  301.22  |   87.21  |  103.98  |

***

## 🔍 Key Findings

{% tabs %}
{% tab title="⚡ Infra Scaling" %}
Scaling from 2 to 4 vCPUs on an 800K-record dataset nearly **doubled throughput** while cutting tail latency by over **85%**.

| Metric       | 8 GB / 2 vCPU | 16 GB / 4 vCPU |    Improvement    |
| ------------ | ------------: | -------------: | :---------------: |
| Throughput   |     1,127 TPS |      2,229 TPS |    **\~2x** 🚀    |
| p95 Latency  |       70.7 ms |        41.8 ms | **41% faster** 🚀 |
| Max Latency  |      1,035 ms |         134 ms | **87% faster** 🚀 |
| {% endtab %} |               |                |                   |

{% tab title="📦 Dataset Scale" %}
With well-distributed data, the Registry Service handles **1.5 million records** efficiently on a 16 GB / 4 vCPU instance — sustaining **\~1,800 TPS** with **p95 under 50 ms**.

|  Records  | Namespaces |   TPS | p95 Latency |
| :-------: | :--------: | ----: | ----------: |
|  100,000  |     500    | 1,159 |     67.9 ms |
|  800,000  |    2,000   | 2,229 |     41.8 ms |
| 1,500,000 |    3,000   | 1,783 |     49.5 ms |

The service scales gracefully across dataset sizes — even at 15× the baseline record count, throughput stays above **1,700 TPS**.
{% endtab %}
{% endtabs %}

***

### 🎯 Key Takeaways

{% hint style="success" %}

* **Highly Scalable:** Throughput nearly doubles when scaling from 2 to 4 vCPUs — consistent, predictable gains with additional compute.
* **Low Latency at Scale:** Even at 800K records, the service sustains \~2,200 TPS with p95 latency of just \~42 ms on a 16 GB / 4 vCPU instance.
* **Stable Under Sustained Load:** No latency degradation observed over 10-minute test runs, demonstrating robust steady-state behavior.
* **Handles Large Datasets:** With well-distributed data, the service sustains \~1,800 TPS even at 1.5 million records.
  {% endhint %}

***

## Final note

These results highlight the Registry Service's ability to deliver **consistent, predictable performance under sustained load** across a wide range of dataset sizes and configurations. The service demonstrates clear scaling behavior, improving both throughput and latency as additional CPU and memory are made available.

While real-world performance will naturally vary based on data layout and usage patterns, the observed results show that the Registry Service can comfortably **support high-throughput, low-latency workloads** when appropriately sized.

Overall, the tests reinforce that the Registry Service is **well-suited for production workloads**, with performance characteristics that scale in a transparent and predictable way.

<sub>Benchmarking data collected using k6 against the NFH fabric Registry Service in December 2025.</sub>


# DISCOVR — find catalogs

Welcome to the documentation for NFH fabric DISCOVR — the Discovery Service (DS) of the NFH fabric ecosystem.

> **Realises the NFH fabric** [**Discovery Edge**](/product-documentation/products/discovr) **service.**

Welcome to the documentation for NFH fabric DISCOVR — the Discovery Service (DS) of the NFH fabric ecosystem. It is a high-performance, real-time discovery engine that enables consumers to find resources across all published catalogues in NFH fabric-enabled networks.

This guide is intended for Consumer Node (CN) developers, consumer application builders, network facilitators, and anyone building search experiences on top of NFH fabric catalogues.

<figure><img src="https://2582697075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHGFlYOFyGOvy6PhBQakN%2Fuploads%2Fgit-blob-0f526c1cf4293cbb0924574d145af341f69bfcc0%2Fdiscover-catalog-data-flow.svg?alt=media" alt="High-level catalog data flow: providers publish catalogues that are indexed and made searchable, and consumers query them through the Discover service"><figcaption><p>High-level catalog data flow</p></figcaption></figure>

### What is NFH fabric DISCOVR?

NFH fabric DISCOVR is the query-time search and discovery layer for NFH fabric ecosystems. It runs on the consumer node side of the network — it exists to serve consumer applications' search requests, not to publish or manage provider catalogues.

A Provider Node self-hosts and self-signs its own catalogue on infrastructure it controls (see [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery)); DISCOVR (DS) is purpose-built for **real-time search** — it crawls, independently verifies, and indexes catalogue data straight from every provider's own storage, and exposes it through fast, flexible query APIs that power consumer-facing search experiences.

DISCOVR runs its own crawler: it resolves each provider's Registry record, fetches and verifies that provider's signed catalogue index and files directly, indexes what it has verified, and serves discovery requests from Consumer Nodes (CNs) and consumer applications with sub-second response times. A provider's catalogue starts flowing into DISCOVR as soon as its Registry record points at a crawlable index — see [How DISCOVR Stays Updated](#how-discovr-stays-updated) below.

### Why Do You Need NFH fabric DISCOVR?

Without a dedicated discovery layer, consumer applications face:

* Querying raw catalogue data directly — slow, unstructured, and unscalable
* Building custom search indexes per application — duplicated effort, inconsistent results
* No support for natural language, spatial, or attribute-based search across providers
* No unified view of resources across multiple catalogues and networks

NFH fabric DISCOVR solves this by offering:

* **One search endpoint** across all catalogues published to the network
* **Multiple search modes** — natural language, keyword, spatial (location-based), and JSONPath attribute filtering
* **Real-time indexing** — catalogue changes a provider publishes are indexed and searchable within seconds
* **Provider-agnostic results** — consumers see resources from all providers, with offers from multiple retailers in one response

### Key Capabilities

#### For Consumer Nodes (CNs)

* **Natural language search** — ask questions like "strong Assam tea for morning chai" or "premium coffee under 500 rupees"
* **Keyword search** — find resources by name, description, brand, or any indexed attribute
* **Spatial search** — find resources available near a location using GeoJSON coordinates and distance radius
* **Attribute filtering** — query resources and offers using JSONPath expressions for fine-grained filtering (e.g., "flat discount offers under ₹100")
* **Combined queries** — mix text search with spatial constraints in a single request
* **Schema-aware results** — responses include full resource attributes, ratings, offers, and provider details

#### For Discovery Service (DS) Builders

* **Crawler-fed indexing** — DISCOVR runs its own crawler against every provider's self-hosted, self-signed catalogue index — no push, no subscription, no central relay in the path
* **Full-text and spatial search** — supports keyword matching, natural language understanding, and geospatial proximity queries
* **Quality-assured results** — every catalogue is signature- and digest-verified before indexing, then deduplicated and pruned before being served to consumers

#### For Network Facilitators

* **Network-wide search** — query across all providers and catalogues in a network
* **Schema type filtering** — discover resources by domain type (e.g., GroceryItem, ChargingService, HealthcareProvider)
* **Offer comparison** — see multiple retailer offers for the same resource in one response
* **Real-time availability** — search results reflect the latest published catalogue state

### High-Level Architecture

```
Provider Node                                DISCOVR
(self-hosted, self-signed catalogue)         (crawler + search engine)
      |                                            |
      |   Registry record: catalog_index_urls      |
      |<--------------------------------------------  resolve
      |                                            |
      |   GET catalogue index + files              |
      |<--------------------------------------------  crawl, on its own schedule
      |   signed index + catalogue files           |
      |-------------------------------------------->  verify signatures + digests
      |                                            |  Index for search
      |                                            |  Store for spatial queries
      |                                            |
      |                                            |
Consumer Node (CN)                                 |
      |                                            |
      |  POST /discover                            |
      |  (text / spatial / JSONPath)                |
      |------------------------------------------->|
      |                                            |  Query search + spatial indexes
      |  POST /on_discover (callback)               |
      |  (matching resources + offers)              |
      |<-------------------------------------------|
```

### Example Use Case

A consumer opens a grocery shopping app and searches for "instant coffee near me". The Consumer Node (CN) sends a discover request to NFH fabric DISCOVR combining natural language text search with a spatial constraint (5 km radius around the consumer's location).

DISCOVR queries its search index for resources matching "instant coffee" and its spatial index for resources with availability locations within 5 km. The response includes multiple matching products from different providers — each with competing offers showing different prices, discounts, and delivery estimates.

The consumer compares offers and proceeds to order from the provider with the best price and fastest delivery.

### Design Principles

* **Real-time query engine**: Optimized for sub-second search — not for catalogue storage or signing (that's the publisher's role — see [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery))
* **Crawler-fed**: Discovers and pulls catalogue updates directly from each provider's own storage on its own schedule — no polling of a central service, no manual sync
* **Verify-before-index**: Every catalogue index and file is checked against its publisher's Registry-registered signature and digest before anything is indexed
* **Multi-modal search**: Supports text, natural language, spatial, and structured attribute queries — individually or combined
* **Provider-agnostic**: Returns resources from all providers in a network, with competing offers side by side
* **Schema-aware**: Understands NFH fabric resource and offer schemas — filters, groups, and prunes results based on schema context

### API Reference

DISCOVR exposes one consumer-facing HTTP endpoint for running queries. Catalog data reaches DISCOVR's index via its own crawler, which pulls directly from each provider's self-hosted storage and indexes it via an internal `/catalog/push` API (see [Catalog indexing](#catalog-indexing) and [How DISCOVR Stays Updated](#how-discovr-stays-updated) below).

#### Discovery APIs (Consumer Node-facing)

| API         | Method | Description                                                                                           |
| ----------- | ------ | ----------------------------------------------------------------------------------------------------- |
| `/discover` | POST   | Asynchronous — acknowledges with `ACK`, delivers results via `POST /on_discover` callback to `bapUri` |

#### Catalog indexing

DISCOVR **implements** the `/catalog/push` endpoint that the crawler calls to deliver catalog updates matching an active subscription — the push leg of [How DISCOVR Stays Updated](#how-discovr-stays-updated). DISCOVR validates the push and responds **synchronously** with an NFH fabric `ACK` (accepted — indexed asynchronously and searchable via `/discover` shortly after) or `NACK`.

**What DISCOVR receives.** Each entry in `message.catalogs[]` is a **resolved** catalog, not the raw fragment a Provider Node published. For resources that extend a master (`masterResourceId`), the crawler merges the master into the overlay (master-wins) *before* pushing, so DISCOVR receives self-contained, indexable resources. DISCOVR does not re-resolve against masters — it indexes exactly what is pushed.

This endpoint's authentication, request/response shape, and status codes are not part of the Beckn protocol — `/catalog/push` here is an internal API between the Edge Discovery Service and its crawler, not a wire-level Beckn action. Nothing mandates using this same interface between the two: an implementation is free to wire its crawler to its own indexing layer however it chooses (a different internal API, an in-process call, or any other mechanism) — this section documents the shape this reference implementation happens to use.

#### Search Modes

| Mode                        | Description                                            | Example                             |
| --------------------------- | ------------------------------------------------------ | ----------------------------------- |
| **Text / Natural Language** | Keyword or conversational query                        | "strong Assam tea for morning chai" |
| **Spatial**                 | Find resources near a location                         | Within 5 km of a GPS coordinate     |
| **Attribute Filter**        | Fine-grained filtering on resource or offer attributes | Flat discount offers under ₹100     |
| **Combined**                | Mix any of the above in a single request               | Coffee search within 5 km radius    |

For detailed request/response formats and examples, see [Usage](/product-documentation/products/discovr/usage) and [Examples](/product-documentation/products/discovr/examples).

#### How DISCOVR Stays Updated

Reference Discovery service ships with a crawler, which helps the service to keep its indexes current with the decentralised catalogs.

1. DISCOVR's crawler resolves each provider's Registry manifest and Subscriber record, filtered to the `networkIds` and/or `schemaTypes` it cares about, and finds the catalog index url
2. It fetches the provider's catalogue index over HTTPS and verifies the index's signature against the provider's Registry-registered key
3. It compares the index's `entryVersion` against its own stored cursor for that catalogue — an unchanged entry is skipped without any further fetch
4. For a changed entry, it fetches only the baseline or change files the cutover rule calls for, verifies each file's signature and digest, and applies upserts/removals into its own index
5. The updated data is immediately searchable via `POST /discover`

There is no separate bulk "initial sync" call — a brand-new crawl and a routine re-crawl are the same operation; a crawler simply starts from no cursor the first time, so it fetches a provider's full baseline rather than an incremental change file. See [Catalog Publishing and Discovery → Hosting & Discovery](/build/creating-a-network/catalog-publishing-and-discovery#hosting--discovery) for the full crawl sequence and verification rules a provider can expect DISCOVR to apply.

## The NFH fabric capability: Discovery

DISCOVR realises the NFH fabric **Discovery** capability — network-wide search across every catalogue on NFH fabric: offerings, providers, credentials, and capabilities.

**What it gives you**

* **Network-wide search** — one query, every catalogue.
* **Structured filters** — by category, geography, provider type, credential, price.
* **Agent-native queries** — discovery exposed as MCP tools for autonomous agents.
* **Federated indexes** — operators can run sector- or geography-specific indexes that compose into the global surface.

**Where it sits** — a service NFH runs (the indexed discovery surface that consumes Cataloguing), the protocol NFH defines (query and response schemas), and reference software NFH publishes (discovery clients and agent integrations).

**Standards alignment:** MCP for agent-native discovery · open query APIs.


# Getting started

This guide shows a consumer application (consumer node) how to connect to an NFH fabric DISCOVR instance and run its first discover request.

This guide shows a consumer application (consumer node) how to connect to an NFH fabric DISCOVR instance and run its first discover request.

> Looking to **run** DISCOVR rather than call it? See [Deploying Your Own Discover](/product-documentation/products/discovr/deploying-your-own-discover).

## Prerequisites

Before you can call discover, you need:

| Item                 | Description                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------------- |
| **DISCOVR base URL** | The hostname of the DISCOVR instance you are integrating with (e.g. `https://discovery.yourdomain.com`) |
| **`bapId`**          | Your consumer (consumer node) identifier, as registered on the network                                  |
| **`bapUri`**         | Your publicly reachable callback URL — DISCOVR delivers `on_discover` results here                      |
| **Signing key**      | An Ed25519 key pair registered against your `bapId` for Beckn HTTP Signature authentication             |
| **`networkId`**      | The identifier of the network you want to search within                                                 |

## Step 1 — Prepare your callback endpoint

Discovery is asynchronous: DISCOVR acknowledges your request immediately, then delivers results to your `bapUri` via `POST /on_discover`. Your application must expose an endpoint that:

* Accepts `POST /on_discover` with the result payload (see [Usage](/product-documentation/products/discovr/usage))
* Correlates the response to your request using `messageId` / `transactionId`
* Returns an `ACK`

## Step 2 — Send a discover request

Send your search intent to `POST /discover` on the DISCOVR base URL, signed with your Beckn HTTP Signature.

```bash
curl -X POST "https://discovery.yourdomain.com/discover" \
  -H "Content-Type: application/json" \
  -H "Authorization: <Beckn HTTP Signature>" \
  -d '{
    "context": {
      "version": "2.0.0",
      "action": "discover",
      "messageId": "55555555-5555-5555-5555-555555555555",
      "transactionId": "66666666-6666-6666-6666-666666666666",
      "timestamp": "2026-03-26T11:00:00Z",
      "bapId": "bap.myapp.in",
      "bapUri": "https://bap.myapp.in",
      "networkId": "retail-grocery"
    },
    "message": {
      "intent": { "textSearch": "Coffee" }
    }
  }'
```

DISCOVR responds synchronously with an `ACK`:

```json
{ "message": { "status": "ACK", "messageId": "55555555-5555-5555-5555-555555555555" } }
```

## Step 3 — Receive results

Shortly after the `ACK`, DISCOVR delivers matching catalogues, resources, and offers to your `bapUri` as an `on_discover` callback. See [Usage](/product-documentation/products/discovr/usage) for the response shape and [Examples](/product-documentation/products/discovr/examples) for more search modes.

## Postman Collection

A Postman collection and environment files are available in the NFH fabric Discovery Service repository (`api-collection/`) to help you try requests against local, dev, and production instances.


# Deploying your own Discover

How to deploy your own instance of the Beckn Discovr service, and what you need to have ready before you start.

You can stand up your own instance of the Discovr catalog discovery service — fronted by the Onix adapter — either as a self-hosted stack on a single VM, or on a Kubernetes cluster. Both run the same set of containers, using public Docker Hub images. No cloud vendor lock-in and no image registry authentication required.

The full architecture, every container, every configuration setting, and step-by-step setup instructions for the VM (docker-compose) path are maintained here:

[**Beckn Discovr — Deployment & Configuration Reference**](https://github.com/beckn/beckn-discovr/blob/main/discovr-deployment/DEPLOYMENT.md)

This page summarizes what to prepare before you start and how the pieces fit together. For anything not covered here — service-by-service config, proxy setup, troubleshooting, rollback — follow the linked guide, which is the source of truth.

## Architecture overview

The stack is the same set of services whether it runs as docker-compose on a VM or as workloads on a Kubernetes cluster:

* **`onix-discover`** — the only public-facing container. A Beckn protocol gateway (signature verification, schema validation, signing, routing) sitting in front of everything else.
* **`catalog-discover-job`** — runs discover queries and publishes results to Kafka.
* **`catalog-publish`** — receives `catalog/push` / `catalog/on_pull`, indexes into Elasticsearch and Postgres.
* **`response-dispatcher`** — consumes query results from Kafka and delivers `on_discover` callbacks back to the requesting BAP via `onix-discover`.
* **Infra services** (internal-only) — Postgres+PostGIS, Elasticsearch, Kafka, Redis.
* **Ingress** — a single public entry point in front of `onix-discover` (Nginx Proxy Manager on a VM; an ingress controller/load balancer on Kubernetes).

See the [linked guide's architecture section](https://github.com/beckn/beckn-discovr/blob/main/discovr-deployment/DEPLOYMENT.md#1-architecture) for the full request-flow diagram and image list.

## Prerequisites

Have these ready before you start, regardless of deployment target:

| Item                                                                                 | Where it comes from                                     |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| A registered subscriber identity on DeDi (subscriberId, e.g. `discover.example.com`) | Your network's DeDi registry                            |
| An Ed25519 signing keypair and an X25519 encryption keypair, base64-encoded          | Generated and registered against the subscriberId above |
| A DeDi key ID for that keyset                                                        | Assigned when you register the keys                     |
| A public base URL for this deployment (DNS name or IP-based)                         | Your domain / VM's public IP                            |
| A strong Postgres password (don't use the sample default)                            | —                                                       |
| Outbound internet access (to pull images and fetch the Beckn API schema at startup)  | —                                                       |

No cloud registry auth is needed — all application images pull anonymously from the `fidedocker` org on Docker Hub.

### If deploying on a VM

* Docker and docker compose installed on the VM.

### If deploying on Kubernetes

* A Kubernetes cluster sized as in [Cluster sizing](#cluster-sizing) below.
* SSD-class and standard-class storage classes available on the cluster.
* An object storage bucket for backups, plus a credential the backup jobs use to write to it.

## Cluster sizing

If deploying on Kubernetes, the full Discovr stack (services, database, search, event bus, and backups) needs approximately the resources below to start.

**Minimum resources \[Non-Production]**

| Resource | Starting size |
| -------- | ------------- |
| CPU      | \~12 vCPU     |
| Memory   | \~20 GiB      |

**Recommended node pool**

| Environment    | Node pool                               | Total capacity   |
| -------------- | --------------------------------------- | ---------------- |
| Non-production | 3 nodes × 4 vCPU / 16 GiB               | 12 vCPU / 48 GiB |
| Production     | 2 nodes × 8 vCPU / 32 GiB (recommended) | 16 vCPU / 64 GiB |

Start with the non-production sizing and scale up — add nodes or enable autoscaling — as catalogue size and query load grow. Disk storage also grows with the catalogue over time.

## Deploying

At a high level:

1. Register your subscriber identity, keys, and key ID in DeDi (see Prerequisites above).
2. Clone the [beckn-discovr repository](https://github.com/beckn/beckn-discovr) and fill in your real subscriberId, keys, passwords, and public URI into `discovr-stack.yml` and `onix-discover/discover-adapter.yaml`.
3. Set `plugins.crawler.config.networks` in `discover-adapter.yaml` to the network ID(s) you want this deployment to crawl, e.g. `networks: "nfh.global/testnet"`. Without this, the crawler plugin runs but has no networks to discover peers on, so it never finds any catalogs. See the "Catalog crawler" section of the [linked guide](https://github.com/beckn/beckn-discovr/blob/main/discovr-deployment/DEPLOYMENT.md) for the full config reference.
4. The crawler only finds peers whose own DeDi Subscriber record has a non-empty `meta.catalog_index_urls` — this is set on each provider's own record, not on anything in this deployment, but it's worth confirming for any peer you expect this deployment to discover:

   ```json
   {
     "subscriber_id": "bpp.freshmart.local-retail.net",
     "type": "BPP",
     "url": "https://bpp.freshmart.local-retail.net/beckn/",
     "meta": {
       "catalog_index_urls": [
         { "url": "https://cdn.freshmart.example/beckn/index/becknCatalogs.index.json" }
       ]
     }
   }
   ```

   See [Linking your catalog index for discovery](/build/creating-a-network/catalog-publishing-and-discovery#step-4-point-your-registry-record-at-the-index) for the full walkthrough.
5. **On a VM:** create the shared Docker network, pull images, and bring the stack up:

   ```bash
   docker network create beckn-network
   docker compose -f discovr-stack.yml pull
   docker compose -f discovr-stack.yml up -d
   ```

   **On Kubernetes:** translate the same services/config into your cluster's manifests (Deployments, Services, ConfigMaps/Secrets for the values above), sized per [Cluster sizing](#cluster-sizing).
6. Configure your ingress (Nginx Proxy Manager on a VM; an ingress/load balancer on Kubernetes) with the `/beckn/*` routing rules and an SSL certificate for your domain.
7. Restrict network access to only the ports/paths that need to be public.

Follow the [First-time setup section](https://github.com/beckn/beckn-discovr/blob/main/discovr-deployment/DEPLOYMENT.md#7-first-time-setup) of the linked guide for the exact commands, proxy-host configuration, and rewrite rules for the VM path — they're not duplicated here to avoid drift as the stack evolves.

## Troubleshooting and rollback

Common startup issues (schema-fetch timeouts, crawler module errors, signature verification failures) and the rollback procedure are documented in the linked guide's [Troubleshooting](https://github.com/beckn/beckn-discovr/blob/main/discovr-deployment/DEPLOYMENT.md#8-troubleshooting) and [Rollback](https://github.com/beckn/beckn-discovr/blob/main/discovr-deployment/DEPLOYMENT.md#9-rollback) sections.


# Usage

How to discover resources across published catalogues using the Beckn Protocol v2.0.

How to discover resources across published catalogues using the Beckn Protocol v2.0.

## Request Format

```json
{
  "context": {
    "version": "2.0.0",
    "action": "discover",
    "messageId": "<uuid>",
    "transactionId": "<uuid>",
    "timestamp": "<ISO 8601>",
    "bapId": "<your-identifier>",
    "bapUri": "<your-callback-url>",
    "networkId": "<network-id>"
  },
  "message": {
    "intent": { ... }
  }
}
```

| Field            | Description                                                                                                                                                                                                                                     |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action`         | Always `discover` for a discovery request                                                                                                                                                                                                       |
| `messageId`      | UUID correlating this request with its `on_discover` response                                                                                                                                                                                   |
| `transactionId`  | UUID for the end-to-end interaction                                                                                                                                                                                                             |
| `bapId`          | Your consumer identifier                                                                                                                                                                                                                        |
| `bapUri`         | Your callback URL — DISCOVR delivers results here via `POST /on_discover`                                                                                                                                                                       |
| `networkId`      | The network to search within. Optional — omit to search all indexed networks. On ONIX 1.8.0+, the calling BAP must be authorised for this network in the registry (see [Network scoping and authorization](#network-scoping-and-authorization)) |
| `message.intent` | The search criteria — see [Examples](/product-documentation/products/discovr/examples)                                                                                                                                                          |

## Response Format

Results are delivered asynchronously to your `bapUri` as an `on_discover` callback:

```json
{
  "context": {
    "action": "on_discover",
    "messageId": "...",
    "transactionId": "...",
    "bapId": "...",
    "timestamp": "..."
  },
  "message": {
    "catalogs": [
      {
        "id": "CAT-GROCERY-001",
        "descriptor": { "name": "FreshMart Grocery Catalog" },
        "resources": [
          {
            "id": "ITEM-BRU-COFFEE",
            "descriptor": { "name": "Bru Gold Instant Coffee" },
            "rating": { "ratingValue": 4.1, "ratingCount": 18200 },
            "resourceAttributes": { "@type": "GroceryItem", "brand": "Bru" }
          }
        ],
        "offers": [
          {
            "id": "OFFER-COFFEE-BUNDLE",
            "descriptor": { "name": "Coffee Lovers Bundle" },
            "resourceIds": ["ITEM-BRU-COFFEE", "ITEM-NESCAFE"],
            "offerAttributes": {
              "priceSpecification": { "price": 255, "discount": "15%" }
            }
          }
        ]
      }
    ]
  }
}
```

The response includes only catalogues, resources, and offers that match your query. Empty results return `"catalogs": []`. Your service correlates this callback with the original request via the shared `context.messageId`.

## Network scoping and authorization

A discover request may set `context.networkId` to scope results to a single network. When it is omitted, DISCOVR searches across all networks the instance indexes.

**Authorization (ONIX 1.8.0+).** When the discover service is fronted by ONIX **1.8.0 or later**, network-scoped discovery is authorization-checked at the signature-validation layer. If a request sets `context.networkId`, ONIX resolves the caller's validation key from the registry (DeDi) **scoped to that network** — the lookup succeeds only if the network is listed in the calling subscriber's `network_memberships`. If it is not, the request is rejected with an `HTTP 401` NACK carrying `error.code: "Unauthorized"`. The values below are just an example:

```json
{
  "message": {
    "status": "NACK",
    "messageId": "469bfce5-ada9-4c9a-bb64-99bf3c100702",
    "error": {
      "code": "Unauthorized",
      "message": "Signature Validation Error: failed to validate Authorization: failed to get validation key: failed to lookup registry: context.network_id \"test/v1.5.0-rc5\" is not in network_memberships of subscriber \"beckn.bap.dev\""
    }
  }
}
```

Requests that do not set `context.networkId` are not network-scope-checked.

> **Migration note — before upgrading a discover instance to ONIX 1.8.0.** A BAP that uses network-scoped discovery (`context.networkId`) must have that network listed in its subscriber `network_memberships` in the registry. Once the fronting ONIX is on 1.8.0, scoped requests from a BAP that is not a member of the requested network will fail signature validation with the `Unauthorized` error above. Notify affected client (BAP) instances ahead of the upgrade so their registry memberships are in place.

## Filtering by active and validity status

By default, DISCOVR returns only catalogs that are **active** and **currently valid** — inactive catalogs and catalogs outside their validity window are hidden. You can change this per request with two optional query parameters on `POST /discover`:

```
POST /discover?active=false&validity=false
```

| Parameter  | Values            | Meaning                                                                                                                                                                |
| ---------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `active`   | `true` \| `false` | `true` (default) returns only catalogs whose `isActive` is not explicitly `false`. `false` returns **only** catalogs explicitly marked inactive.                       |
| `validity` | `true` \| `false` | `true` (default) returns only catalogs inside their validity window. `false` returns **only** catalogs that are provably **out of window** (expired or not yet valid). |

**How to retrieve expired or inactive catalogs**

* Expired / not-yet-valid catalogs: `POST /discover?validity=false`
* Inactive catalogs: `POST /discover?active=false`
* Both: `POST /discover?active=false&validity=false`

**Semantics (null-safe).** A catalog with no `isActive` field counts as active; a catalog with no, open-ended, or unparseable `validity` counts as valid. `validity` bounds (`startDate` / `endDate`) are inclusive. When a parameter is omitted, the deployment default applies (both default to `true`, configurable via `DISCOVERY_FILTER_ACTIVE_CATALOG` and `DISCOVERY_FILTER_VALID_CATALOGS`).

> **Note.** The `active` / `validity` filters are applied on the structured query engines (JSONPath, spatial, and Elasticsearch text). They are **not** applied on the natural-language (NLWeb) text path — if you need the guarantee on a text query, use the Elasticsearch text engine.

## Synchronous Acknowledgement

When DISCOVR accepts the request, it returns an `ACK` synchronously:

```json
{ "message": { "status": "ACK", "messageId": "<uuid>" } }
```

If the request is invalid, it returns a `NACK`:

```json
{
  "message": {
    "status": "NACK",
    "messageId": "<uuid>",
    "error": {
      "code": "SCH_SCHEMA_VALIDATION_FAILED",
      "message": "context: must have required property 'transactionId'"
    }
  }
}
```

Error `code` values are drawn from the canonical Beckn v2.0 `ErrorCode` enum. The codes DISCOVR returns on a synchronous `NACK`:

| HTTP | Error Code                     | Meaning                                                        |
| ---- | ------------------------------ | -------------------------------------------------------------- |
| 400  | `SCH_INVALID_JSON`             | Request body is not valid JSON                                 |
| 400  | `SCH_SCHEMA_VALIDATION_FAILED` | Request doesn't match the expected schema                      |
| 400  | `CTX_MISSING_FIELD`            | A required `context` field is missing                          |
| 400  | `CTX_INVALID_FIELD`            | A `context` field has an invalid value (e.g. malformed intent) |
| 401  | `AUT_SIGNATURE_MISSING`        | `Authorization` header is absent                               |
| 401  | `AUT_SIGNATURE_INVALID`        | The request signature could not be verified                    |
| 401  | `AUT_SUBSCRIBER_NOT_FOUND`     | Signing subscriber is not registered                           |
| 500  | `NET_INTERNAL_ERROR`           | Unexpected server failure                                      |

> Auth failures return `401` (never `400`) with an `AUT_*` code. In the standard topology DISCOVR is fronted by ONIX, which performs auth validation and returns these responses.

## API Reference

| Operation                           | Method | Endpoint               | Action        |
| ----------------------------------- | ------ | ---------------------- | ------------- |
| **Discover resources**              | POST   | `/discover`            | `discover`    |
| **Receive results** (your endpoint) | POST   | `<bapUri>/on_discover` | `on_discover` |


# Examples

Worked discover requests for each search mode.

Worked discover requests for each search mode. Each request body is sent to `POST /discover`.

## 1. Text Search

Search using keywords or natural language queries. DISCOVR supports both simple keyword matching and natural language understanding — you can search the way your users would ask.

### Keyword Search

```json
{
  "context": {
    "version": "2.0.0",
    "action": "discover",
    "messageId": "55555555-5555-5555-5555-555555555555",
    "transactionId": "66666666-6666-6666-6666-666666666666",
    "timestamp": "2026-03-26T11:00:00Z",
    "bapId": "bap.myapp.in",
    "bapUri": "https://bap.myapp.in",
    "networkId": "retail-grocery"
  },
  "message": {
    "intent": {
      "textSearch": "Coffee"
    }
  }
}
```

### Natural Language Search

You can also use natural language queries — the service understands conversational phrasing and extracts the relevant search intent:

```json
{
  "message": {
    "intent": {
      "textSearch": "strong Assam Darjeeling tea for morning chai"
    }
  }
}
```

```json
{
  "message": {
    "intent": {
      "textSearch": "premium instant coffee under 500 rupees"
    }
  }
}
```

The service matches against resource names, descriptions, and domain-specific attributes to find the most relevant results.

## 2. Spatial Search

Find resources available near a location. Uses spatial queries with CQL2-JSON semantics.

```json
{
  "context": {
    "version": "2.0.0",
    "action": "discover",
    "messageId": "bb9f86db-9a3d-4e9c-8c11-81c8f1a7b901",
    "transactionId": "f9d1e7f3-5f1a-4d23-9f10-31b72c0b0c01",
    "timestamp": "2026-03-26T12:00:00Z",
    "bapId": "bap.myapp.in",
    "bapUri": "https://bap.myapp.in",
    "networkId": "retail-grocery"
  },
  "message": {
    "intent": {
      "spatial": [
        {
          "op": "S_DWITHIN",
          "targets": "$.catalogs[*].provider.availableAt[*].geo",
          "geometry": {
            "type": "Point",
            "coordinates": [76.6527, 12.3116]
          },
          "distanceMeters": 1000
        }
      ]
    }
  }
}
```

This finds all resources available within 1 km of the specified coordinates (Mysore in this example).

| Field            | Description                                       |
| ---------------- | ------------------------------------------------- |
| `op`             | Spatial operation — `S_DWITHIN` (within distance) |
| `targets`        | JSONPath to the geo field in the resource         |
| `geometry`       | GeoJSON point with `[longitude, latitude]`        |
| `distanceMeters` | Search radius in meters                           |

## 3. JSONPath Filter

Query resources and offers using JSONPath expressions for fine-grained attribute filtering.

```json
{
  "context": {
    "version": "2.0.0",
    "action": "discover",
    "messageId": "bb9f86db-9a3d-4e9c-8c11-81c8f1a7b901",
    "transactionId": "f9d1e7f3-5f1a-4d23-9f10-31b72c0b0c01",
    "timestamp": "2026-03-26T12:00:00Z",
    "bapId": "bap.myapp.in",
    "bapUri": "https://bap.myapp.in",
    "networkId": "retail-grocery"
  },
  "message": {
    "intent": {
      "filters": {
        "type": "jsonpath",
        "expression": "$.catalogs[*].offers[*] ? (@.offerAttributes.tariffModel == 'FLAT_DISCOUNT' && @.offerAttributes.priceSpecification.price < 100)"
      }
    }
  }
}
```

This finds all offers with a flat discount where the price is under 100.

## 4. Combining Search Modes

You can combine text search with spatial or filter queries in a single request:

```json
{
  "message": {
    "intent": {
      "textSearch": "Coffee",
      "spatial": [
        {
          "op": "S_DWITHIN",
          "targets": "$.catalogs[*].provider.availableAt[*].geo",
          "geometry": { "type": "Point", "coordinates": [77.6401, 12.9116] },
          "distanceMeters": 5000
        }
      ]
    }
  }
}
```

This finds coffee-related resources available within 5 km of Bengaluru HSR Layout.

## 5. Retrieving Inactive or Expired Catalogs

By default DISCOVR returns only **active** and **currently-valid** catalogs. To retrieve catalogs that are inactive or outside their validity window, pass the `active` and/or `validity` query parameters on the request URL. The request body is unchanged.

```
POST /discover?validity=false
```

Returns **only** catalogs that are provably out of their validity window (expired or not yet valid):

```json
{
  "message": {
    "intent": {
      "textSearch": "Coffee"
    }
  }
}
```

Other combinations:

| Request                                      | Returns                                                |
| -------------------------------------------- | ------------------------------------------------------ |
| `POST /discover` (no params)                 | Active, currently-valid catalogs (default)             |
| `POST /discover?active=false`                | Only catalogs explicitly marked inactive               |
| `POST /discover?validity=false`              | Only expired / not-yet-valid catalogs                  |
| `POST /discover?active=false&validity=false` | Only catalogs that are both inactive and out of window |

See [Usage](/product-documentation/products/discovr/usage#filtering-by-active-and-validity-status) for the full semantics.

See [Usage](/product-documentation/products/discovr/usage) for the full response format.


# Test reports

Performance, reliability, and functional reports for the NFH fabric Discovery Service.

Performance, reliability, and functional reports for the NFH fabric Discovery Service.

| Report                                                  | What it covers                                                                    |
| ------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Performance & Reliability](#performance--reliability)  | API performance benchmark (1M resources) and soak run against the Discovery stack |
| [Functional Test Scenarios](#functional-test-scenarios) | Discovery test cases across text, spatial, JSONPath, and combined search modes    |

***

## Performance & Reliability

The discovery service is exercised under sustained load to validate throughput, query latency, and `on_discover` callback health over time.

## API Performance Benchmark

The discover API (`POST /discover`) was benchmarked against a catalog of **1 million resources** using JSONPath filtering at 50 concurrent users, with **zero errors**:

| Configuration              | Throughput | P95 Latency |
| -------------------------- | ---------- | ----------- |
| Standard (2 CPU · 2 GB)    | 35.6 req/s | 1,519 ms    |
| Performance (4 CPU · 4 GB) | 70.5 req/s | 992 ms      |

📄 [**Discover API — Performance Benchmarking Report**](https://drive.google.com/file/d/1PZKNbmLZ8-RQkrM1cABQdtxl82hiNSrN/view?usp=sharing)

## Soak Test

📄 [**Discover Soak Test Report**](https://drive.google.com/file/d/1jCO6jjhqz7LLREJuspViKYtrD2zKhwju/view)

Covers a soak run against the Discovery stack under sustained load; maintained externally.

***

## Functional Test Scenarios

The functional scenarios execution sheet tracks the discovery test cases — covering text, spatial, JSONPath, and combined search modes, along with their expected and observed outcomes.

📄 [**Functional Scenarios Execution Sheet**](https://docs.google.com/spreadsheets/d/1o-4MlhVbLk6oFwxel7Bbg0-EkuPSDIzVzg74ko5YWGQ/edit?gid=101113588#gid=101113588)

The sheet is maintained externally and updated as scenarios are added or re-run.


# VC on Edge — prove anything

Issue & verify Verifiable Credentials at the edge — powered by OpenCred. All transactions run on trust.

> **Realises the NFH fabric** [**Credentialling Edge**](/product-documentation/products/vc-on-edge) **service. The engine is OpenCred — VC on Edge&#x20;*****is*****&#x20;OpenCred, deployed at the edge of an NFH fabric network.**

All transactions run on trust. A buyer needs to know the seller is licensed. A patient needs to know the doctor is registered. A logistics partner needs to prove cold-chain compliance. Today, this trust is established through manual document uploads, periodic audits, and centralized registries that become bottlenecks and single points of failure.

**Verifiable Credentials (VCs)** solve this at the protocol level. A VC is a digitally signed, tamper-proof claim — "this seller holds license #X," "this driver passed background check Y," "this product is organic-certified" — issued by a trusted authority, carried by the subject, and independently verifiable by anyone, instantly, without calling back to the issuer. No PDFs. No manual checks. No registry lookups. Just cryptographic proof that travels with the transaction.

NFH fabric supports the issuance and verification of VCs at the edge — where Network Participants (NPs) and Network Facilitator Organizations (NFOs) actually operate. Each NP/NFO issues and verifies credentials locally within their own infrastructure, embedding trust directly into the flow of value.

This capability is powered by **OpenCred** — an open-source credential infrastructure for issuing, signing, and verifying W3C Verifiable Credentials. OpenCred keeps all signing local (private keys never leave the issuer's environment), supports multiple key sources (software keys, hardware tokens, OS certificate stores), and ships as both a desktop app and a self-hosted Docker image — making it ideal for edge deployment within NFH fabric.

#### Use Cases

#### NFOs — Network-Level Credentials

NFOs see aggregate activity across all participants, making them natural issuers for reputation and performance credentials.

| Credential            | Example                                                                                                               |
| --------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Top-rated seller      | "Top Rated Seller Q1 2026" based on ratings aggregated across all consumer nodes — portable to any NFH fabric network |
| Fulfillment rate      | Logistics provider with 99.2% on-time delivery last quarter — verifiable, not self-reported                           |
| Best buyer experience | consumer node recognized for highest satisfaction scores — provider nodes use this to prioritize catalog availability |
| Volume milestones     | "10,000 orders fulfilled" — verifiable growth signal for partners, investors, other networks                          |
| Network compliance    | NP has passed onboarding, protocol conformance, and is in good standing — reusable across networks                    |
| Dispute track record  | Low dispute rate, fast resolution times — a trust signal that's hard to fake                                          |

#### provider nodes — Provider & Operations Credentials

provider nodes issue credentials grounded in actual transactional data from their providers.

| Credential              | Example                                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------------------ |
| Seller performance      | Restaurant: "Avg prep time 12 min, 4.7 stars across 3,200 orders" — portable, not locked to one app          |
| Driver track record     | "2,400 rides, 4.9 rating, zero safety incidents" — driver carries this to any network                        |
| Cold-chain compliance   | Temperature logs within range across 500 deliveries — pharma/healthcare consumer nodes verify before routing |
| Verified catalog claims | Organic certification, GI tags, allergen testing actually checked — not just the seller's word               |

#### consumer nodes — Demand-Side Credentials

consumer nodes see buyer behavior, order patterns, and payment reliability.

| Credential        | Example                                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| Verified buyer    | KYC + payment history — provider nodes verify before accepting COD or credit orders                   |
| Repeat customer   | "100 orders placed, member since 2024" — sellers offer preferential terms based on verifiable history |
| Provider feedback | "92% positive reviews across 1,800 transactions" — provider carries this as portable reputation       |

### The Value

VCs on edge change the trust model fundamentally:

* **Cryptographic proof replaces paper trails** — a seller's license, a driver's background check, a product's organic certification become machine-verifiable claims that travel with the transaction itself.
* **Trust is portable across networks** — a provider verified in one NFH fabric network carries that credential into another without re-onboarding. Trust compounds instead of resetting at every boundary.
* **Fraud surface shrinks** — forged documents, impersonated providers, and fake certifications become detectable during the transactions.
* **Compliance becomes continuous** — instead of point-in-time audits, credentials can carry expiry, revocation status, and scope — participants that fall out of compliance are flagged in real time.
* **The network gets stronger as it grows** — every credential issued adds to a web of verifiable trust. Unlike centralized trust registries, this scales horizontally with the network itself.

***

## The engine: OpenCred

**OpenCred** is the local-first platform that powers VC on Edge — issuing and verifying **W3C Verifiable Credentials**. It ships as a **Desktop Client** (Electron) for interactive use and a **Docker Image** (headless HTTP API + CLI) for cloud and CI/CD deployment. It is published by [NFH Trust Labs](https://github.com/nfh-trust-labs).

{% hint style="info" %}
**Issuer private keys never leave the issuer's environment.** All signing happens locally on the issuer's machine or inside the issuer-operated container. There is no `api.opencred.com` — you deploy into **your** infrastructure, you hold the key, and NFH never receives your credential data or your keys. This is what makes the trust model credible — see [Security model](/product-documentation/products/vc-on-edge/security).
{% endhint %}

{% hint style="warning" %}
**🧪 Beta.** OpenCred is in early-access beta. Functionality is feature-complete and the protocols are stable; desktop installer polish is in progress (macOS shows a one-time approval prompt on first launch; Windows installers will follow). Support: [open an issue](https://github.com/nfh-trust-labs/opencred-releases/issues).
{% endhint %}

### Get OpenCred

|                             | Where                                                                                      | How                                                                  |
| --------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- |
| **Desktop** (macOS / Linux) | [opencred-releases/releases](https://github.com/nfh-trust-labs/opencred-releases/releases) | Download the `.dmg` / `.AppImage` / `.deb` for your platform         |
| **Docker server**           | `ghcr.io/nfh-trust-labs/opencred/opencred-server:latest`                                   | `docker pull ghcr.io/nfh-trust-labs/opencred/opencred-server:latest` |

Both are public — no authentication required. The source code is maintained privately at NFH Trust Labs; distributed binaries are public.

{% embed url="<https://opencred.global>" %}

|                       |                                                                              |
| --------------------- | ---------------------------------------------------------------------------- |
| **Site**              | [opencred.global](https://opencred.global)                                   |
| **Org**               | [github.com/nfh-trust-labs](https://github.com/nfh-trust-labs)               |
| **Releases & issues** | [opencred-releases](https://github.com/nfh-trust-labs/opencred-releases)     |
| **VC schemas**        | [opencred-vc-schemas](https://github.com/nfh-trust-labs/opencred-vc-schemas) |

### Explore the docs

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Concepts</strong></td><td>VCs, the DID methods used, how trust flows, and how revocation works (via DeDi).</td><td><a href="/product-documentation/products/vc-on-edge/concepts">Concepts: VCs, DIDs, trust chains, revocation</a></td></tr><tr><td><strong>Desktop app</strong></td><td>Install, onboarding wizard, key import, issuing your first credential.</td><td><a href="/product-documentation/products/vc-on-edge/desktop">Desktop app</a></td></tr><tr><td><strong>Docker image &#x26; API</strong></td><td><code>docker run</code>/Compose, signing-key sources, HTTP API, CLI, Cloud HSM.</td><td><a href="/product-documentation/products/vc-on-edge/docker">Docker image &amp; API</a></td></tr><tr><td><strong>Verifying credentials</strong></td><td>The four verification surfaces and the common result shape.</td><td><a href="/product-documentation/products/vc-on-edge/verifying">Verifying credentials</a></td></tr><tr><td><strong>Security model</strong></td><td>The never-touch-issuer-keys guarantee and the seven invariants.</td><td><a href="/product-documentation/products/vc-on-edge/security">Security model</a></td></tr></tbody></table>

### How it fits NFH fabric

OpenCred is the edge-run reference software for the [Credentialling Edge](/product-documentation/products/vc-on-edge): the issuer holds the keys, the holder holds the credential, and the NFH fabric Registry ([REGISTR](/product-documentation/products/registr), built on [DeDi](https://docs.nfh.global/dedi)) carries the issuer/key surface and revocation status. Credential **contents never touch NFH fabric** — only status and issuer metadata are public.

**Standards alignment:** W3C Verifiable Credentials (Data Model 2.0) · `did:key` / `did:jwk` / `did:web` · selective disclosure (SD-JWT, BBS+) · DeDi-backed revocation.

## The NFH fabric capability: Credentialling Edge

VC on Edge realises the NFH fabric **Credentialling Edge** — Verifiable Credentials issued and verified at the edge, by participants, in their own infrastructure or wallets. NFH fabric carries the issuer metadata and status surface; the credential content stays with the holder.

**What it gives you**

* **Issuance** — sign claims about a subject (a person, business, agent, asset).
* **Holder custody** — the recipient holds the credential. No central store.
* **Selective disclosure** — prove what's needed; reveal nothing more.
* **Revocation and status** — issuers can revoke; verifiers can check without contacting the issuer in real-time.
* **Schema discovery** — find the right credential type by schema, via the Registry.

**Where it sits** — the protocol NFH defines (the W3C VC profile for NFH fabric, status discovery via Registry) plus reference software NFH publishes (issuer, holder, and verifier libraries running at the edge).


# Concepts: VCs, DIDs, trust chains, revocation

Background for working with OpenCred — Verifiable Credentials, DIDs, trust chains, and revocation.

Background reading for anyone working with OpenCred. If you already know verifiable credentials, DIDs, and credential status, skip ahead to [Desktop](/product-documentation/products/vc-on-edge/desktop) or [Docker](/product-documentation/products/vc-on-edge/docker).

A typical OpenCred credential answers four questions for a verifier:

1. **Is the data intact?** — proven by the cryptographic **proof**.
2. **Whose key signed it?** — answered by resolving the **issuer DID**.
3. **Should I trust that key?** — answered by walking the **trust chain**.
4. **Is it still valid?** — answered by checking validity dates and **revocation status**.

OpenCred enforces all four during verification.

## Verifiable Credentials

A Verifiable Credential (VC) is a tamper-evident, cryptographically-signed set of claims about a subject (a person, business, agent, or asset), structured to the **W3C VC Data Model 2.0**. OpenCred supports multiple proof formats:

* **JSON-LD VCs** with embedded data-integrity proofs.
* **vc-jwt** — JWT-encoded credentials.
* **sd-jwt-vc** — selective-disclosure JWT credentials.
* **PixelPass / QR** compact encodings, and **printable PDF certificates** with an embedded QR plus a copy of the payload in the PDF info dictionary.

## DIDs (Decentralized Identifiers)

OpenCred uses three DID methods, each encoding the issuer's public key differently:

| Method    | What it is                                                                           | When to use                                                                                          |
| --------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| `did:key` | Public key encoded directly in the identifier.                                       | Fully self-contained; **verifies offline**. Good for portable, no-infrastructure issuance.           |
| `did:jwk` | A JWK embedded in the identifier.                                                    | Like `did:key`, JWK-shaped.                                                                          |
| `did:web` | Resolves to a DID document hosted at `.well-known/did.json` on a domain you control. | When you want a stable, domain-anchored identity you can rotate. Requires network access to resolve. |

OpenCred also supports a **per-key registry model** (the OpenCred key registry) layered on [DeDi](https://docs.nfh.global/dedi), with a key lifecycle of **active / rotated / revoked** and a `did.json` snapshot stored on each key record.

## Trust chains

Trust chains explain how a verifier gets from a credential's signature back to a root anchor. OpenCred supports three issuer types:

| Issuer type                                           | How trust flows                                                                                                                             |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Issuer with a DSC** (Digital Signature Certificate) | The credential carries an `x5c` certificate chain; the verifier walks it back to a CSCA root in a trust store on disk.                      |
| **Issuer seeking a DSC**                              | A transitional posture while CA integration for DSC acquisition is finalised.                                                               |
| **Self-published keys**                               | The issuer publishes its public key (via `did:web` or the DeDi key registry); trust is anchored in domain ownership or the registry record. |

## Revocation

OpenCred handles status through **DeDi-backed hash lookup**, and computes `credentialStatus` accordingly.

* **Key revocation vs per-credential revocation** are distinct. Revoking a key invalidates everything it signed; per-credential revocation targets a single credential.
* **The "no DeDi status available" case → the credential stays VALID.** If the status source cannot be reached, OpenCred does not fail closed into a false "revoked"; absence of a revocation record is not evidence of revocation.

## Where these live in the product

* DID resolution and proof verification run inside the shared `@opencred/verification` engine used by both the Desktop app and the Docker server.
* Revocation status is read from a DeDi **Revocation** registry — see [DeDi → schema templates](https://docs.nfh.global/dedi).

***

**Next:** [Desktop app](/product-documentation/products/vc-on-edge/desktop) · [Docker image & API](/product-documentation/products/vc-on-edge/docker) · [Verifying credentials](/product-documentation/products/vc-on-edge/verifying)


# Desktop app

Install OpenCred Desktop, import or generate a signing key, and issue your first credential.

OpenCred Desktop is the interactive client for issuing and verifying credentials on macOS, Windows, and Linux. Issuer keys stay on your machine.

> **🧪 Beta.** macOS shows a one-time security prompt on first launch — approve it under **System Settings → Privacy & Security**. Support: [open an issue](https://github.com/nfh-trust-labs/opencred-releases/issues).

## System requirements

| Platform | Minimum version                                                       |
| -------- | --------------------------------------------------------------------- |
| macOS    | 12 (Monterey)+                                                        |
| Windows  | 10+ *(installer not currently shipped — see release page for status)* |
| Linux    | Ubuntu 20.04+                                                         |

Release builds have no runtime dependencies. For building from source: Node.js 20+, pnpm 9+.

## Install

Download the latest installer for your platform from the public release page: [**github.com/nfh-trust-labs/opencred-releases/releases**](https://github.com/nfh-trust-labs/opencred-releases/releases)

* **macOS** — `.dmg` disk image
* **Linux** — `.AppImage` or `.deb`

Each release ships a `SHA256SUMS` file. Verify integrity **before** running the installer:

```bash
# Linux
sha256sum -c SHA256SUMS --ignore-missing
# macOS
shasum -a 256 -c SHA256SUMS --ignore-missing
```

### From source

```bash
git clone <repo-url>
cd opencred
pnpm install
pnpm build
cd apps/desktop
pnpm dev
```

## First launch

If no keys are imported, the app opens the **Onboarding Wizard**. Otherwise it opens to the Home screen with the template gallery and credential history.

## Onboarding wizard — three paths

### Path 1 — I have a Digital Signature Certificate (DSC)

Choose your key source:

| Option                  | Description                                    |
| ----------------------- | ---------------------------------------------- |
| Upload certificate file | Import PFX, PEM, JWK, or PKCS#8 DER files      |
| Hardware token          | Connect PKCS#11 devices (YubiKey, smart cards) |
| OS certificate store    | Use macOS Keychain or Windows CNG certificates |

After import, a **Key Details** card shows: DID, algorithm, fingerprint, and source.

### Path 2 — I want to get a DSC

CA integration for DSC acquisition. *Coming soon.*

### Path 3 — Self-published keys (`did:web`)

Generate keys locally and publish your public key via `did:web` at `.well-known/did.json` on your domain. (Key management — publish, rotate, revoke — is covered in the in-app Key Management guide and the [DeDi key registry model](/product-documentation/products/vc-on-edge/concepts#dids-decentralized-identifiers).)

## Issue your first credential

1. Click a template (e.g. **Education Credential**) on the Home screen.
2. Fill in the subject fields (name, degree, institution, date conferred).
3. Select your signing key.
4. Click **Build & Sign**.
5. Export as **JSON**, **PDF**, or **QR code**.

## Then

* [Verifying credentials](/product-documentation/products/vc-on-edge/verifying) — verify offline, by QR, PDF, or paste.
* [Docker image & API](/product-documentation/products/vc-on-edge/docker) — the same engine, headless, for automation.
* [Security model](/product-documentation/products/vc-on-edge/security) — how keys are handled.


# Docker image & API

Run the OpenCred Docker image for headless issuance and verification — cloud, on-prem, and CI/CD. Your infrastructure, your keys.

The OpenCred Docker image is the headless variant of the Desktop client. It exposes an HTTP API (and a CLI) for issuing and verifying credentials — for cloud deployments, on-prem servers, and CI/CD pipelines. It runs in **your** infrastructure; no data is sent to OpenCred or NFH Trust Labs.

## Quick start

```bash
# 1. Pull the public image (no auth required)
docker pull ghcr.io/nfh-trust-labs/opencred/opencred-server:latest

# 2. Run with a mounted signing key
docker run -p 3100:3100 \
  -e OPENCRED_PORT=3100 \
  -e OPENCRED_API_KEY=your-secret-token \
  -e OPENCRED_KEY_PATH=/secrets/issuer-key.pem \
  -v /path/to/your/key.pem:/secrets/issuer-key.pem:ro \
  ghcr.io/nfh-trust-labs/opencred/opencred-server:latest

# 3. Check it's running
curl http://localhost:3100/v1/health
```

A healthy server returns `200 OK`:

```json
{
  "status": "ok",
  "ready": true,
  "signingKeyLoaded": true,
  "dediConfigured": false,
  "timestamp": "2026-04-07T10:00:00.000Z"
}
```

If `signingKeyLoaded` is `false`, the server returns `503` and cannot issue — check your key source.

## Image tags & architecture

```bash
docker pull ghcr.io/nfh-trust-labs/opencred/opencred-server:latest   # floats
docker pull ghcr.io/nfh-trust-labs/opencred/opencred-server:1.2.0    # pin in production
```

Each version tag is built by CI from a signed git tag and scanned with Trivy (CRITICAL/HIGH fail the build). From **v1.2.0** the image is a **multi-arch manifest** (`linux/amd64` + `linux/arm64`) — Docker pulls the right variant automatically on Apple Silicon, AWS Graviton, Ampere, Raspberry Pi 4/5, and amd64 VMs.

> **Pin a version in production.** `:latest` can change underneath you on the next release.

## Production run (hardened)

```bash
docker run -d \
  --name opencred \
  -p 3100:3100 \
  -e OPENCRED_PORT=3100 \
  -e OPENCRED_API_KEY=sk_prod_change_me \
  -e OPENCRED_KEY_PATH=/secrets/issuer-key.pem \
  -e OPENCRED_LOG_LEVEL=info \
  -v /host/path/issuer-key.pem:/secrets/issuer-key.pem:ro \
  --read-only \
  --tmpfs /tmp:noexec,nosuid,size=64m \
  --cap-drop ALL \
  --security-opt no-new-privileges:true \
  ghcr.io/nfh-trust-labs/opencred/opencred-server:latest
```

### Docker Compose

The repo ships a hardened `docker-compose.yml` (read-only FS + tmpfs, all caps dropped except `NET_BIND_SERVICE`, `no-new-privileges`, `/v1/health` check every 30s):

```bash
docker compose up -d            # start
docker compose logs -f server   # follow logs
docker compose down             # stop
```

### Build from source

```bash
docker build -f apps/server/Dockerfile -t opencred:latest .
```

Multi-stage build on a pinned `node:20-alpine` base, runs as non-root `node`, exposes `3100`, starts via `node apps/server/dist/index.js`.

## Providing a signing key

Your key stays in your infrastructure — loaded at startup, never transmitted.

* **File-based (default):** set `OPENCRED_KEY_PATH` to a PEM, JWK, PKCS#8, or PFX file. For PFX, also set `OPENCRED_KEY_PASSWORD`.
* **Cloud HSM:** set `OPENCRED_KMS_PROVIDER` to `aws`, `azure`, or `gcp` with the provider variables. See the in-repo **Cloud HSM** guide (AWS KMS, Azure Key Vault, GCP Cloud KMS).

## HTTP API

All endpoints are under `/v1`. Auth is a required Bearer token (`OPENCRED_API_KEY`); the middleware is fail-closed.

| Endpoint                                 | Purpose                                                    |
| ---------------------------------------- | ---------------------------------------------------------- |
| `GET /v1/health`                         | Readiness + signing-key status                             |
| `GET /v1/keys`                           | Active signer info                                         |
| `GET /v1/schemas`                        | Available credential schemas                               |
| `POST /v1/credentials/issue`             | Issue a single credential                                  |
| `POST /v1/credentials/batch`             | Batch issuance                                             |
| `POST /v1/credentials/verify`            | Verify (JSON-LD / vc-jwt / sd-jwt-vc / PixelPass QR / PDF) |
| `POST /v1/credentials/package`           | Package as printable PDF / QR                              |
| `POST /v1/credentials/revocation-hash`   | Compute a revocation hash                                  |
| `POST /v1/credentials/revoke`            | Revoke a credential                                        |
| `POST /v1/credentials/revocation-status` | Check status                                               |
| `GET /v1/metrics`                        | Metrics                                                    |

> For local development only, `OPENCRED_DEV_MODE_NO_AUTH=true` disables auth. **Never** use it in production.

## CLI

The image bundles an `opencred` CLI for one-off, no-HTTP operations (issue, verify, package) — handy in shells and CI. See [Verifying credentials](/product-documentation/products/vc-on-edge/verifying) for `opencred verify`.

## Security defaults

Non-root user · pinned base digests · no secrets in image layers · read-only FS + dropped caps in Compose · JSON-LD contexts bundled at build time (never fetched at runtime) · structured pino logging to stdout with key material redacted. Full model: [Security](/product-documentation/products/vc-on-edge/security).

***

**Related:** [Verifying credentials](/product-documentation/products/vc-on-edge/verifying) · [Concepts](/product-documentation/products/vc-on-edge/concepts) · [Security model](/product-documentation/products/vc-on-edge/security)


# Verifying credentials

Four ways to verify an OpenCred credential — all running the same engine — and the common result shape.

Anyone holding an OpenCred-issued credential has four supported ways to verify it. All four run the same `@opencred/verification` engine — pick the surface that matches your environment.

| Path                                              | Best for                                           | Inputs accepted                                                                                                                                                               |
| ------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Desktop app — Verify tab**                      | Casual / one-off verification by humans            | Pasted JSON · drag-dropped `.json` / `.jsonld` · QR image (PNG/JPG) · `.pdf` upload · live camera QR scan · pasted compact tokens (vc-jwt, sd-jwt-vc, bare PixelPass QR data) |
| **Docker server — `POST /v1/credentials/verify`** | Programmatic / server-to-server / CI/CD            | JSON body for text formats (auto-detected) **or** raw PDF body with `Content-Type: application/pdf`                                                                           |
| **`opencred verify` CLI**                         | One-shot verification from a shell, no HTTP server | File path or stdin; auto-detects JSON-LD, vc-jwt, sd-jwt-vc, PixelPass QR, or PDF. `--json` for scripts. Ships in the Docker image.                                           |
| **`@opencred/verification` library**              | Embedding verification in a Node.js app            | Same formats, via `verifyCredential` and `verifyPdf`                                                                                                                          |

## The result shape

Every path returns the same shape:

* a top-level `valid: true | false`
* an enum `code`: `VALID`, `REVOKED`, `EXPIRED`, `INVALID`, `UNRESOLVABLE`, `CONTEXT_MISSING`
* a per-check breakdown: signature, expiry, key resolution, `x5c` chain (where applicable), revocation, schema, context

## What needs network access

| Credential type          | Offline?                                                                                                                           |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| `did:key`-issued         | **Verifies fully offline.**                                                                                                        |
| `did:web`-issued         | Needs network to fetch the issuer's DID document.                                                                                  |
| DSC-backed (`x5c` chain) | Needs a CSCA trust store on disk. See [Concepts → Trust chains](/product-documentation/products/vc-on-edge/concepts#trust-chains). |

## PDF certificates

OpenCred packages credentials as printable PDFs with a scannable QR **and** a copy of the payload in the PDF's info dictionary. Any path works — drop the PDF into the Desktop **Verify** tab, `POST` it to `/v1/credentials/verify`, or pipe it into the CLI:

```bash
opencred verify --input - < credential.pdf
```

Older PDFs (issued before info-dict embedding shipped) surface a clear "scan the QR or extract the embedded JSON" message rather than a generic failure.

## Examples

**HTTP (JSON credential):**

```bash
curl -X POST http://localhost:3100/v1/credentials/verify \
  -H "Authorization: Bearer $OPENCRED_API_KEY" \
  -H "Content-Type: application/json" \
  --data @credential.json
```

**HTTP (PDF):**

```bash
curl -X POST http://localhost:3100/v1/credentials/verify \
  -H "Authorization: Bearer $OPENCRED_API_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @certificate.pdf
```

**CLI (scripted):**

```bash
opencred verify --input credential.json --json
```

***

**Related:** [Concepts → Revocation](/product-documentation/products/vc-on-edge/concepts#revocation) · [Docker → API](/product-documentation/products/vc-on-edge/docker#http-api) · [Desktop app](/product-documentation/products/vc-on-edge/desktop)


# Security model

The security guarantees OpenCred makes — and their boundaries. Start here before adopting it in production.

If you operate OpenCred in production, or you're auditing it before adoption, start here.

## The single most important rule

> **OpenCred never receives, handles, or stores issuer private keys.**

All signing happens **locally** — on the issuer's Desktop machine, or inside the issuer-operated Docker container. There is no code path — no endpoint, no function, no IPC handler — that accepts an issuer's private key as input. There is no hosted OpenCred service; NFH Trust Labs operates no servers that touch issuer credentials. This rule underpins the entire model.

## At a glance

| Area                 | Guarantee                                                                                                            |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
| Issuer keys          | Never received by OpenCred. Loaded locally, held in memory as opaque `KeyObject` instances.                          |
| Key generation       | Always CSPRNG (`crypto.generateKeyPairSync`, `crypto.randomBytes`). `Math.random()` is forbidden.                    |
| Logging              | Key material is stripped by a redaction hook before any log record reaches disk.                                     |
| Error responses      | Use the `OpenCredError` hierarchy — sanitised by design; no internal paths or buffers leak.                          |
| Session data         | Credential payloads, packaged outputs, and batch results are purged within `OPENCRED_SESSION_TTL` (default 4 hours). |
| JSON-LD contexts     | Bundled at build time; never fetched from the network at runtime.                                                    |
| `did:web` resolution | HTTPS only, no redirects, 10-second timeout, DNS-resolved IPs validated as public before fetch (SSRF protection).    |

## The seven invariants

OpenCred's behaviour is governed by seven mandatory invariants, enforced in code (not just documented). The first is the never-touch-issuer-keys rule above; the rest cover CSPRNG-only key generation, log redaction, sanitised errors, session-data expiry, build-time context bundling, and hardened `did:web` resolution. Each invariant names the place it is enforced.

## Deployment hardening

The Docker image follows these invariants by default — non-root user, pinned base digests, no secrets in image layers, read-only filesystem and dropped capabilities in the shipped Compose file, and structured logging with key material redacted. See [Docker → Security defaults](/product-documentation/products/vc-on-edge/docker#security-defaults).

## Reporting a vulnerability

**Do not** open a public GitHub issue for a security problem. Use GitHub's private security-advisory flow on the [opencred-releases](https://github.com/nfh-trust-labs/opencred-releases) repository, or the security contact listed in the project's `SECURITY.md` / README.

***

**Related:** [Concepts → Trust chains](/product-documentation/products/vc-on-edge/concepts#trust-chains) · [Concepts → DIDs](/product-documentation/products/vc-on-edge/concepts#dids-decentralized-identifiers) · [Docker → API](/product-documentation/products/vc-on-edge/docker#http-api) · [NFH fabric → Credentialling Edge](/product-documentation/products/vc-on-edge)


# ONIX — connect to everything

ONIX is an enterprise-grade middleware adapter system designed to facilitate seamless communication in any NFH fabric-enabled network.

> **Realises the NFH fabric** [**Network Adapters Edge**](/product-documentation/products/onix) **service.**

### Overview

ONIX is an enterprise-grade middleware adapter system designed to facilitate seamless communication in any NFH fabric-enabled network. It acts as a protocol adapter between consumer nodes (buyer applications) and provider nodes (seller platforms), ensuring secure, validated, and compliant message exchange across various commerce networks.

### Features

#### 🔌 **Plugin-Based Architecture**

* **Dynamic Plugin Loading**: Load and configure plugins at runtime without code changes
* **Extensible Design**: Easy to add new functionality through custom plugins
* **Hot-Swappable Components**: Update plugins without application restart (in development)

#### 🔐 **Enterprise Security**

* **Ed25519 Digital Signatures**: Cryptographically secure message signing and validation
* **Vault Integration**: Centralized secrets and key management
* **Request Authentication**: Every message is authenticated and validated
* **TLS/SSL Support**: Encrypted communication channels

#### ✅ **Protocol Compliance**

* **JSON Schema Validation**: Ensures all messages comply with Beckn protocol specifications
* **Version Management**: Support for multiple protocol versions simultaneously
* **Domain-Specific Schemas**: Tailored validation for different business domains

#### 🚀 **High Performance**

* **Caching**: Response caching for improved performance
* **Queue Integration**: Asynchronous message processing via message queues
* **Connection Pooling**: Efficient resource utilization
* **Configurable Timeouts**: Fine-tuned performance controls

#### 📊 **Observability**

* **Structured Logging**: JSON-formatted logs with contextual information
* **Transaction Tracking**: End-to-end request tracing with unique IDs
* **Metrics Support**: Performance and business metrics collection
* **Health Checks**: Liveness and readiness probes for Kubernetes

#### 🌐 **Usecase/Domain Agnostic**

* **Retail & E-commerce**: Product search, order management, fulfillment tracking
* **Mobility Services**: Ride-hailing, public transport, vehicle rentals
* **Logistics**: Shipping, last-mile delivery, returns management
* **Healthcare**: Appointments, telemedicine, pharmacy services
* **Financial Services**: Loans, insurance, payments

For more detailed information, developer guides please visit ONIX [repository](https://github.com/Beckn-One/beckn-onix)

{% embed url="<https://github.com/Beckn-One/beckn-onix>" %}

## The NFH fabric capability: Network Adapters Edge

ONIX realises the NFH fabric **Network Adapters Edge** — the protocol-aware adapter every participant runs. It handles signing, schema validation, policy enforcement, transport, encryption, and audit logging, so participants speak the network correctly without re-implementing the wire.

**What it gives you**

* **Pluggable transport** — HTTP, message queues, custom transports.
* **Signing and verification** — every outbound and inbound message verified.
* **Policy plug-ins** — Rego-based policy enforcement for network rules.
* **Schema validation** — guaranteed conformance to the protocol.
* **Audit logging** — every exchange traceable, signed, and verifiable.

**Where it sits** — reference software NFH publishes (every participant runs their own adapter, on their own infrastructure; NFH never sees the traffic) plus the protocol NFH defines (the adapter's wire format and plug-in interface).


# Observability & Audit

End-to-end transaction tracing and verifiable audit trails.

The cryptographic record of what happened — across instances, across networks, across time. Every signed exchange leaves an anchor; every anchor is verifiable.

## What it gives you

* **Commitment-chain anchors** — periodic hashes of each instance's state, published to NFH fabric.
* **End-to-end traces** — span every hop of a transaction across services, instances, and adapters.
* **Verifiable audit trails** — replayable, signed, and cryptographically grounded.
* **Anchoring proofs** — BLAKE2 + chain-anchored proofs for any record.
* **Selective disclosure** — share an audit slice without revealing private state.

## Where it sits

* **Service NFH runs** — the anchor-acceptance and aggregation surface.
* **Protocol NFH defines** — anchoring formats and audit-record schemas.

## Use it for

* Regulators and auditors needing a tamper-evident trail.
* Resolving disputes without surrendering private state.
* Proving provenance, custody, and chain-of-events for any asset or transaction.
* Compliance reporting with cryptographic guarantees.

## Standards alignment

OpenTelemetry · BLAKE2 hashing · open anchoring protocols.

***

This service is also NFH fabric's **signal-and-health surface** — network telemetry (flows, instance health, supply summaries) for operators and participants, alongside the cryptographic audit trail.


# Overview

How NFH fabric is used in practice — worked sketches across sectors.

Each sketch below walks through a real deployment shape — which NFH fabric services are involved, what changes operationally, and what an integrator's first 90 days look like. These are not marketing scenarios; they are integration starting points.

Start with the people these serve: [**Personas — who NFH fabric is for**](/use-cases/personas).

## How to read these

* **What changes** — the operational delta against the status-quo approach.
* **Where to start** — the first integration milestone.

## Sketches

### Energy & climate

* [Rooftop solar & prosumer energy markets](/use-cases/rooftop-solar-prosumers) — P2P surplus solar, portable net-metering credits, demand response.
* [Energy procurement at data-centre scale](/use-cases/cheapest-kilowatt) — continuous spot procurement with signed carbon claims.

### Commerce & livelihoods

* [Own your customer: local commerce](/use-cases/own-your-customer) — small sellers keep the margin, the relationship, and a verifiable identity.
* [Cross-border commerce](/use-cases/cross-border-commerce) — buyer-side and seller-side instances federating through Tokenisation, with credential-based compliance.

### Trust, health & inclusion

* [An arbitration network](/use-cases/justice-network) — dispute resolution, arbitration, legal aid, and court-grade digital evidence.
* [Resilient healthcare supply](/use-cases/resilient-health-supply) — cross-border sourcing of prequalified medicines with end-to-end traceability.
* [Portable benefits & fair pricing](/use-cases/portable-benefits) — insurance, credit, and benefits that follow the worker across platforms.
* [The creator economy](/use-cases/creator-economy) — sustainable OSS funding, global micropayments, creators who own their audience.

### Assets & agents

* [Securitising illiquid assets](/use-cases/securitise-any-asset) — provenance-anchored tokens for assets that don't move today.
* [Data marketplace for agents](/use-cases/agent-data-marketplace) — MCP-native discovery, micropayment metering.
* [Hybrid human-agent teams](/use-cases/hybrid-human-agent-teams) — credentialled delegation with audit.

## Don't see your domain?

Open a discussion on the working group. Most sectors map to a small permutation of the same five or six services.


# Personas — who NFH fabric is for

Who NFH fabric is for — the people, businesses, institutions, and agents whose jobs get easier when value moves on an open network.

NFH fabric is infrastructure, but it exists for people with a job to do. The personas below are written the way real users describe themselves — **I am… I want to… I care about…** — and grouped by the domain they work in. Each group links to the [use case](/use-cases/use-cases) that shows how the network serves them.

{% hint style="info" %}
These are starting points, not an exhaustive list, and they're deliberately written to be region-agnostic — the same roles recur across markets. If yours isn't here, it almost certainly maps to a small permutation of the same handful of NFH fabric capabilities — [tell the working group](/build/resources).
{% endhint %}

## Energy & climate

Serves the [Rooftop solar & prosumer energy markets](/use-cases/rooftop-solar-prosumers) and [Energy procurement at data-centre scale](/use-cases/cheapest-kilowatt) use cases.

| I am…                                                                                                               | I want to…                                                                                                                                          | I care about…                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| A **distribution-utility executive**                                                                                | reduce peak-load stress without investing in immediate transformer upgrades                                                                         | grid reliability, regulatory compliance, and reducing capex burden                                              |
| An **EV fleet operator**                                                                                            | optimise charging costs across hundreds of vehicles                                                                                                 | predictable energy costs, uptime, and sustainability reporting                                                  |
| An **industrial facility manager**                                                                                  | participate in demand-response programs without disrupting operations                                                                               | operational continuity and financial incentives                                                                 |
| An **agricultural cooperative leader**                                                                              | help member farmers monetise surplus solar generation                                                                                               | year-round income stability and simple participation models                                                     |
| A **homeowner with a rooftop solar array**                                                                          | sell my excess daytime solar at a better price than the utility's feed-in rate — directly to a neighbour, a nearby business, or a local institution | a meaningful ROI on my rooftop, especially in daytime hours when my own use is low                              |
| A **property owner whose solar site and meter sit at different locations**                                          | have the generation credits from one site flow to the electricity bill at another                                                                   | the rules assume the panel and the meter share an address, so cross-site credits are uncertain                  |
| The **founder of a regional rooftop-solar installation business**                                                   | give customers one clean journey — lead → survey → grid approval → rebate → payout — without them chasing each step                                 | every step lives in a different portal; a dropped lead or delayed rebate becomes a bad review                   |
| The **founder of a load-intelligence platform** working with EV networks, large commercial customers, and utilities | deliver lower effective rates by shifting loads to off-peak hours and matching them with nearby surplus solar under direct P2P arrangements         | delivering clean, automated savings without locking each new prosumer or utility into a multi-month integration |
| A **community microgrid operator**                                                                                  | settle energy sold between households on a shared minigrid, transparently                                                                           | fair metering, instant settlement, and trust between neighbours                                                 |

## Commerce & livelihoods

Serves [Own your customer: local commerce](/use-cases/own-your-customer), [Cross-border commerce](/use-cases/cross-border-commerce).

| I am…                            | I want to…                                                                                                    | I care about…                                                               |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| A **smallholder farmer**         | get a fair price for my harvest without being captive to local middlemen                                      | predictable income, avoiding distress sales, and dignity in the transaction |
| A **boutique hotel owner**       | take bookings from international travellers without paying \~18% to online travel agencies                    | the share of revenue I keep, occupancy, and owning the guest relationship   |
| A **pet-services owner**         | share my offerings on the network and create an identity for the pets I care for — vaccinations, care history | growing the business and improving pet care                                 |
| An **indie game studio founder** | accept micropayments from players in dozens of countries without payment-processor friction                   | conversion rate, settlement speed, and chargeback exposure                  |
| An **artisan cooperative lead**  | reach buyers directly with verifiable provenance and origin claims                                            | fair margins for members and protection against knock-offs                  |

## Health

Serves [Resilient healthcare supply](/use-cases/resilient-health-supply).

| I am…                                     | I want to…                                                             | I care about…                                                             |
| ----------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| A **public-hospital procurement officer** | source prequalified generic medicines from suppliers across the region | supply continuity, traceability for regulators, and staying within budget |
| A **community pharmacist**                | verify that the medicine on my shelf is genuine and in-date            | patient safety and protecting my licence                                  |

## Trust, justice & the state

Serves [An arbitration network](/use-cases/justice-network).

| I am…                                                   | I want to…                                                                   | I care about…                                                                                        |
| ------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| A **gig worker**                                        | resolve a payment dispute with a platform without hiring an expensive lawyer | a fair decision in days, at an affordable fee                                                        |
| A **small business owner**                              | ensure my smart-contract-based transactions are recognised by the State      | knowing a digital "handshake" on the network holds the same weight as a paper contract in court      |
| A **partner at a boutique competition-law firm**        | provide specialised advisory services                                        | reaching the right clients faster, without heavy marketing and operations overhead                   |
| An **NGO program director** matching trained paralegals | match pro-bono paralegals with firms, organisations, and people who need aid | the right legal help reaching the right person instantly, without administrative overhead            |
| A **private arbitration institution**                   | act as the trusted authority for high-value trade disputes                   | that arbitration decisions can enforce themselves — freeze accounts, transfer assets                 |
| A **district-court judge**                              | trust that the digital evidence of a network transaction is reliable         | knowing exactly where the evidence came from and how it was handled, so it hasn't been tampered with |

## Finance & inclusion

Serves [Portable benefits & fair pricing](/use-cases/portable-benefits), [The creator economy](/use-cases/creator-economy), and [Securitising illiquid assets](/use-cases/securitise-any-asset).

| I am…                              | I want to…                                                         | I care about…                                                                  |
| ---------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| An **open-source maintainer**      | receive sustainable funding from corporate users of my library     | predictable income, contributor recognition, and no compromise on independence |
| A **health-insurance underwriter** | price policies for gig workers who change platforms frequently     | claims ratio, acquisition cost, and portability across employers               |
| A **microfinance loan officer**    | lend against a borrower's verifiable, portable transaction history | lower default risk and reaching thin-file customers                            |

## Agents

Serves [Data marketplace for agents](/use-cases/agent-data-marketplace) and [Hybrid human-agent teams](/use-cases/hybrid-human-agent-teams).

| I am…                                                                 | I want to…                                                                          | I care about…                                                                     |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| An **AI-agent operator** running buying agents for a procurement team | discover and transact across hundreds of suppliers under explicit policy guardrails | spend-authority limits, auditability of every action, and no off-policy purchases |
| A **personal-finance agent builder**                                  | let an agent move money and hold credentials on a user's behalf, within limits      | revocable delegation, a signed audit trail, and user consent at every step        |

***

**Building for one of these?** Start with the matching [use case](/use-cases/use-cases), then the [Getting started with NFH fabric](/build/getting-started-with-fabric) walkthrough.


# Rooftop solar & prosumer energy markets

Peer-to-peer rooftop solar, portable net-metering credits, and demand response — a prosumer energy market on NFH fabric.

A farmer with a 5 kW rooftop array generates far more at noon than the household uses, and the local utility pays a thin feed-in rate for the surplus. Next door, a cold-storage owner is buying expensive daytime grid power. They can't trade with each other — the meter, the utility portal, and the settlement rails all assume one seller (the utility) and many passive consumers.

NFH fabric turns rooftops, EV fleets, and flexible industrial loads into **addressable participants in a real-time energy market** — able to discover each other, contract under network policy, and settle instantly against metered delivery.

## What changes

* A prosumer sells surplus daytime solar to a **neighbour or nearby business** at a better price than the net-metering rate — improving ROI in exactly the hours their own use is lowest.
* Net-metering credits become **portable across a participant's sites** (one site → another site's bill) because entitlement is a credential, not a hard-wired meter address.
* A rooftop-solar EPC can stitch **lead → survey → grid approval → rebate → payout** into one journey, because each step is a signed, discoverable action instead of a separate portal.
* A load-intelligence platform routes charging and industrial loads to **off-peak hours and nearby surplus solar** without a multi-month integration per utility or prosumer.
* The distribution utility gets **demand-response participation and peak shaving** without new transformer capex.

## Where to start

Stand up a sandbox Network Adapter for one feeder. Register two prosumers and one flexible load, publish a signed surplus-kWh catalogue, and run a simulated noon-hour matching-and-settlement loop under a simple feeder-limit policy. Production is the same code with the utility's real endpoints and policy pack.


# Energy procurement at data-centre scale

Continuous energy procurement at data-centre scale.

A hyperscale operator spends 30–50% of operating cost on electricity, and the cheapest electron at any given hour is rarely from the same supplier. Yet procurement is locked into long-dated bilateral contracts, because spot-market access is fragmented, onboarding a new supplier is slow, and verifying a carbon-intensity claim means chasing self-reported PDFs.

An NFH fabric-aligned procurement stack lets the operator — or an autonomous agent acting for it — treat energy as a **continuous, signed, verifiable spot market**. Suppliers publish kWh offers; the operator [discovers](/product-documentation/products/discovr) and contracts hourly against policy; payment [settles](https://docs.finternetlab.io/) atomically against metered delivery; and every kWh is [anchored](/product-documentation/products/observability-audit) for downstream carbon reporting.

## What changes

* **Procurement moves from a quarterly contracting cycle to a continuous spot motion** — the operator buys the cheapest compliant electron each hour.
* **Carbon-intensity claims are signed and replayable**, not self-reported PDFs — so sustainability reporting is provable, not asserted.
* **Suppliers below the threshold for traditional broker access reach demand directly** — widening the supply pool and sharpening price competition.
* **Variable-renewable supply finds price signal at the granularity it actually has** — solar and wind get matched to load hour by hour.
* **An agent can run the loop** — discovery, contracting, and settlement happen under explicit spend and carbon policy, with a full audit trail.

## Where to start

Set up a sandbox Network Adapter, publish a single-supplier test catalogue, and run a simulated hourly procurement loop against it under a simple price-and-carbon policy. Migration to production is the same code with production endpoints — so validate the policy and the carbon-credential schema first.


# Own your customer: local commerce

Small sellers reaching buyers directly — keeping the margin, the relationship, and a verifiable identity — instead of renting an aggregator.

A boutique hotel pays 18% of every international booking to an OTA — and never owns the guest relationship. A smallholder farmer is captive to local middlemen and sells at distress prices. A pet-services owner wants to be found by nearby customers and keep a care history for the animals they look after. In each case the seller creates the value, but an aggregator owns the discovery, the customer, and the margin.

NFH fabric lets small sellers **be discovered directly, transact on their own terms, and keep the customer relationship** — while carrying verifiable claims (provenance, ratings, certifications) that used to require a platform's brand to be believed.

## What changes

* The hotel takes **direct bookings** and keeps the \~18% it paid to OTAs — and owns the guest relationship for repeat stays.
* The farmer reaches buyers beyond local middlemen, gets a **fair, transparent price**, and avoids distress sales.
* The pet-services owner is **discovered by nearby customers** and maintains a portable care/vaccination identity per pet that follows the animal.
* A handloom cooperative sells with **verifiable provenance and origin-certification claims**, protecting margins against knock-offs.
* Trust that used to require a platform brand now travels as **credentials the seller controls**.

## Where to start

Register one seller, publish a small catalogue (rooms, produce, or services), and attach one verifiable claim (a certification or rating). Run a direct discover → book → settle loop from a sandbox buyer app, confirming the seller keeps the full margin and the relationship.


# Cross-border commerce

Federated commerce across borders without the card-network chain.

A seller in one country, a buyer in another. Today the payment threads through a card network, an FX intermediary, and a payout provider — three to five days to settle, a fee at every hop, and compliance (KYC, sanctions, tax status) re-collected by each party in the chain. The smaller the seller, the worse the terms, and often the deal simply doesn't happen.

On NFH fabric, the two participants — or their regulated [tokenisation](https://docs.finternetlab.io/) instances — **federate directly**. Value settles in seconds under a shared protocol, FX becomes a decision between two instances rather than a multi-fee chain, and compliance travels forward as signed [credentials](/product-documentation/products/vc-on-edge) instead of being re-collected at each border.

## What changes

* **Settlement goes from days to seconds** — the two instances commit atomically instead of waiting on a correspondent chain.
* **FX becomes a protocol-level decision** between two instances, not a stack of intermediary spreads and fees.
* **Compliance moves from re-onboarding to credential verification** — KYC/KYB and sanctions status are proven, not re-gathered.
* **Smaller sellers reach foreign demand** without acquiring foreign payment partners or a local entity.
* **Disputes and refunds are protocol-native** — resolved against a signed, replayable record rather than a card-network chargeback process.

## Where to start

Pair up with one counterparty on another regulated tokenisation instance and federate against the sandbox first, then production. Model the compliance-on-credential flow early — it usually drives the longest design conversation, so agree the credential schemas (KYC, sanctions, tax) with both sides' compliance teams before wiring settlement.


# An arbitration network

Dispute resolution, arbitration, legal aid, and court-grade digital evidence — as an open network on NFH fabric.

A gig worker is owed three weeks' pay by a platform. The amount is too small to justify a lawyer and too large to walk away from. The dispute, the evidence, and the resolution all live in different places — if they exist in a usable form at all. Meanwhile arbitrators, legal-aid paralegals, and specialist firms have capacity that never reaches the people who need it, because discovery and trust are manual.

NFH fabric lets **legal services, dispute resolution, and evidence** operate as a network: needs and capacity discover each other, decisions carry verifiable authority, and every transaction on the network produces evidence a court can actually trust.

## What changes

* A gig worker files a dispute and gets a **fair decision in days at an affordable fee**, routed to an accredited arbitrator instead of a courtroom.
* An NGO **matches pro-bono paralegals** to the people and firms who need them instantly, with certification verified — not via spreadsheets and phone calls.
* A boutique competition-law firm **reaches the right clients** through discovery instead of marketing spend.
* A private arbitration institution issues decisions whose authority is **verifiable and machine-actionable** — an award can trigger a downstream settlement or asset transfer under policy.
* A district-court judge can **trust digital evidence** because its origin and chain of custody are cryptographically anchored, not asserted.
* A small business gains confidence that a **smart-contract handshake is recognisable** as a contract, because intent, identity, and signature are all captured and auditable.

## What NFH fabric provides — and what stays with the State

NFH fabric provides the **rails**: verifiable identity, discoverable services, signed agreements, and court-grade evidence trails. It does **not** replace the judiciary or confer legal force by itself — recognition of digital contracts and self-enforcing awards remains a matter of law and jurisdiction. The network's job is to make the evidence and authority so clean that existing legal processes can rely on them.

## Where to start

Pilot one dispute type (e.g. gig-payment claims) in one jurisdiction: register arbitrators with accreditation credentials, publish a resolution-service catalogue, and run a claim end-to-end with the full evidence chain anchored. Evaluate the anchored record with a legal reviewer before scaling to more dispute types.


# Resilient healthcare supply

Sourcing prequalified medicines across borders with end-to-end traceability — a resilient health-supply network on NFH fabric.

A public-hospital procurement officer in Lagos needs to source generic medicines from suppliers across West Africa. Today that means fragmented supplier lists, prequalification checks done by email, and traceability that regulators ask for but no one can produce quickly. A single counterfeit or out-of-spec batch is a patient-safety event and a compliance failure at once.

NFH fabric lets health buyers **discover prequalified suppliers, verify quality claims cryptographically, and carry a batch's provenance from manufacture to shelf** — across borders, without a central intermediary owning the data.

## What changes

* Prequalification becomes a **verifiable credential checked in milliseconds**, not an email chain — expired or revoked status is caught before the order, not after.
* A pharmacist or nurse can **confirm a batch is genuine and in-date** by verifying its provenance credential at the point of dispensing.
* Traceability for regulators is **produced automatically** from the anchored trail instead of reconstructed under audit pressure.
* Smaller regional suppliers reach public buyers directly, **widening supply and resilience** against single-source shocks.
* Procurement stays **within budget** with atomic settlement against delivery proof.

## Where to start

Register two suppliers and one hospital in a sandbox. Issue a prequalification credential and a batch-provenance credential, publish a small formulary catalogue, and run one cross-border order with verification and the provenance trail anchored end-to-end. Review the trail with a compliance officer before widening the supplier set.


# Portable benefits & fair pricing

Insurance, credit, and benefits that follow the worker across platforms — portable, verifiable, fairly priced, on NFH fabric.

A delivery rider works across three apps in a year. Each holds a slice of their earnings history, their ratings, and their reliability — and none of it travels. So an insurer in Bogotá can't price a policy for them without treating them as a thin-file stranger, a lender can't extend fair credit, and the worker loses every benefit each time they switch platforms. The data that would establish their trustworthiness exists; it just isn't portable or verifiable.

NFH fabric lets a worker **carry a verifiable, portable record of their own activity** across platforms — so insurers and lenders can price risk accurately, and benefits stop resetting at every employer boundary.

## What changes

* An underwriter **prices policies accurately for gig workers** using verified, portable history — improving the claims ratio and lowering acquisition cost.
* Benefits and reputation **follow the worker across platforms** instead of resetting each time they switch.
* A microfinance officer **lends to thin-file customers** against a verifiable transaction history, reducing default risk.
* The worker discloses **only what's needed** (e.g. "12 months, 98% on-time") via selective disclosure — not their entire raw record.

## Where to start

Issue a portable earnings-and-reliability credential from a sandbox platform to a test worker. Publish one insurance product, have the worker present a selectively-disclosed proof, and run a quote-and-settle loop. Confirm the insurer never receives raw platform data — only the verified claim.


# The creator economy

Sustainable funding for open-source, frictionless global micropayments, and creators who own their audience — on NFH fabric.

An open-source maintainer in Buenos Aires keeps a library that thousands of companies depend on, and earns almost nothing from it. An indie game studio in Helsinki wants to take small payments from players in 60 countries, but payment-processor friction, currency conversion, and chargebacks eat the margin on a €2 purchase. The value these creators produce is global and continuous; the rails to capture it are national, lumpy, and intermediated.

NFH fabric gives creators **direct, low-friction, global rails** — micropayments that settle instantly, funding relationships that are verifiable, and an audience they own rather than rent from a platform.

## What changes

* An OSS maintainer receives **sustainable, predictable funding** from corporate users — with contributor recognition and **no compromise on independence**, because the relationship is on open rails, not a platform's terms.
* A game studio takes **€2 micropayments worldwide** with instant settlement and reduced chargeback exposure, keeping conversion high.
* Creators **own the audience relationship** — the identity, the offering, and the payment don't belong to an intermediary that can change the rules.
* Sponsors get an **auditable trail** of where funding went, which is exactly what turns goodwill into recurring budget.

## Where to start

Publish one offering (a sponsorship tier or a paid item) to a sandbox catalogue, wire a micropayment settlement against it, and run ten cross-border test purchases. Add a contributor-recognition credential and confirm a sponsor can verify it independently.


# Securitising illiquid assets

Provenance-anchored tokens for assets that don't move today.

A warehouse of stored grain, a solar project's future cash flows, a plot of farmland, a fine-art piece, a batch of carbon credits — real value that sits frozen because the legal, custodial, and transactional plumbing to trade it isn't there. Every sale is a bespoke, lawyer-heavy deal; there is no continuous market and no cheap way to sell a fraction rather than the whole.

NFH fabric supplies the **protocol-level plumbing** — verifiable provenance, custody, and transfer — so an issuer can wrap an asset once and let a fractional claim on it be discovered, priced, and settled on an open network. The legal and custodial wrappers remain the issuer's responsibility; what changes is that the technical friction no longer dictates them.

## What changes

* **Illiquid assets become tradeable** without standing up a bespoke market venue for each class.
* **Custody and provenance become cryptographic**, not documentary — the chain of ownership is signed and replayable rather than a folder of PDFs.
* **Fractional ownership is a protocol pattern**, not a special legal structure — the legal wrapper still applies, but the plumbing no longer constrains what wrapper you can use.
* **Price discovery reaches a wider pool** — a claim that used to require a broker's rolodex is discoverable by any qualified buyer on the network.
* **Audit and compliance are continuous** — every transfer is anchored, so regulators and auditors see a live trail instead of a reconstructed one.

## Where to start

Pick one asset class. Define the token class and the credential schemas for provenance, custody, and audit, then issue a test instrument on a sandbox tokenisation instance and run a fractional transfer between two holders. Most of the design effort goes into the credential schemas, not the token plumbing — so validate those with a custodian and a compliance reviewer before widening the asset set.


# Data marketplace for agents

MCP-native discovery and per-call metering for data products.

An autonomous agent needs data to act — a pricing feed, a geospatial layer, a model output, an API, a slice of a training corpus. Today it gets that data through bilateral integrations and annual contracts negotiated by humans. That doesn't scale to thousands of agents making thousands of decisions an hour, each needing a different source for a few seconds.

NFH fabric makes data a **tradable primitive** an agent can handle end to end in a single, signed network conversation: discover the right product, verify its quality and licence, pay per call, and consume it — no human in the loop, no standing contract. Discovery is exposed as MCP tools, so the agent treats a data market the way it treats any other tool.

## What changes

* **Acquisition shifts from annual contracts to spot, per-call markets** — an agent buys exactly the data it needs, when it needs it.
* **Lineage is signed** — consumers can prove what source they used, at what version, for which decision.
* **New data providers reach autonomous customers** without an enterprise sales motion — publishing a product is the go-to-market.
* **Agents compose sources at runtime** based on observed quality, freshness, and price, switching providers without re-integration.
* **Licensing and purpose are enforced as credentials** — usage outside the agreed purpose is verifiable and refusable, not a contractual afterthought.

## Where to start

Wrap one existing data API as an NFH fabric-published offering, add a credential for quality and freshness, and wire micropayment-per-call via [Tokenisation](https://docs.finternetlab.io/). Expose discovery as an MCP tool and have a test agent find, license, and call it end to end. The hardest design call is usually the licence-and-purpose credential model — solve that first.


# Hybrid human-agent teams

Credentialled delegation with audit, across humans and agents.

A real task — reconciling invoices, triaging support, running a procurement cycle — is rarely all-human or all-agent. It's a mix: an agent drafts and a human approves; a human sets policy and an agent executes; an agent handles the routine and escalates the edge case to a person. Today, wiring that mix together means custom orchestration, brittle role-based permissions, and reconciliation done by hand after the fact.

On NFH fabric, a team is a **protocol-level construct**. Every member — human or agent — has a verifiable [identity](/product-documentation/products/registr), holds delegated authority as a [credential](/product-documentation/products/vc-on-edge), is paid atomically for the work it does, and leaves a signed [audit trail](/product-documentation/products/observability-audit). The team's rules live in the credential graph, not in bespoke glue code.

## What changes

* **Team composition is configurable in minutes** — adding a member is issuing a credential, not rebuilding an integration.
* **Mixed authorisation patterns are first-class** — "human gates agent," "agent escalates to human," "two-of-three approve" are expressed as delegation credentials.
* **Compensation is atomic to the work**, not retrospective and bundled — each unit of work settles as it completes.
* **Off-boarding is a credential revocation**, not a quarterly access cleanup — authority ends the moment it's revoked.
* **Accountability is provable** — every action is attributable to an identity and a delegation, so "who authorised this?" always has a signed answer.

## Where to start

Model one workflow as a credential graph: who can do what, under whose delegation, with what review. Run it in a sandbox with a mix of human and agent participants, then watch the audit trail — it will tell you quickly whether the credential model matches the actual flow of decisions, before you wire it into anything real.


# Get started

Build on NFH fabric — from your first transaction to standing up a whole network. Getting started, agents, and the operator playbook.

NFH fabric is open. Every protocol is published, every reference node is open-source, and every participant runs the network themselves.

{% hint style="info" %}
**Two journeys live here.** *Building on* NFH fabric (join, transact, build agents) and *creating* a network (the operator playbook for a Network Facilitator). Start with the walkthrough, then pick your track below.
{% endhint %}

## Build on NFH fabric

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting started with NFH fabric</strong></td><td>The end-to-end walkthrough — from identity to a working transaction.</td><td><a href="/build/getting-started-with-fabric">Getting started with NFH fabric</a></td></tr><tr><td><strong>Join the network</strong></td><td>Get an identity, publish a catalogue, transact.</td><td><a href="/build/join-the-network">Join the network</a></td></tr><tr><td><strong>Build with agents</strong></td><td>Patterns for agent-native applications.</td><td><a href="/build/agents">Build with agents</a></td></tr></tbody></table>

## Create a network

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Creating a network</strong></td><td>The operator playbook — environment, onboarding, policies, and bringing nodes online.</td><td><a href="/build/creating-a-network">Creating a network</a></td></tr><tr><td><strong>Resources and changelog</strong></td><td>Working group, releases, specs, and the note.</td><td><a href="/build/resources">Resources and changelog</a></td></tr></tbody></table>

> Need help? Ask a question, report a bug, request a feature, or request additional documentation — reach out to us [here](https://support.nfh.global/)


# Getting started with NFH fabric

A hands-on starter kit for running a live beckn network in your own environment within 10 minutes — complete with a consumer node, a provider node, and the…

A hands-on starter kit for running a live beckn network in your own environment within **10 minutes** — complete with a consumer node, a provider node, and the NFH fabric services that tie them together. No prior beckn experience needed.

```mermaid
sequenceDiagram
    participant C as Consumer node
    participant D as Discovery (DISCOVR)
    participant P as Provider node
    C->>D: discover
    D-->>C: on_discover (catalog)
    C->>P: select / init
    P-->>C: on_select / on_init
    C->>P: confirm
    P-->>C: on_confirm (order)
```

***

### What Will You Learn?

By the end of this guide you will have:

1. **A running beckn network** — a Consumer Node (consumer-side platform), a Provider Node (provider-side platform), and the ONIX adapters that connect them, all running in your own environment, local or cloud. You will also see how a crawler-fed **Discovery Service** serves `discover` requests from Consumer nodes.
2. **A working understanding of NFH fabric's DeDi Registry** — how it's used for identity and routing, and how a Provider node makes its own catalog independently discoverable by publishing signed files and registering a catalog index URL — no publish API call involved.
3. **An observable transaction flow** — you will fire real beckn API calls, see the messages get signed and routed, and watch the full `discover → select → init → confirm` lifecycle play out end-to-end.

***

### What is NFH fabric? — A Quick Recap

**NFH fabric** is an open protocol that allows any buyer-side application to transact with any provider-side application across an open network — without either side being locked into a single platform. Think of it like HTTP for transactions: as long as both sides speak the beckn protocol, they can discover each other, negotiate, and transact, regardless of who built them.

Every beckn network has two kinds of application participants:

* **Consumer Node** — the consumer side. A consumer node initiates transactions by sending actions: `discover`, `select`, `init`, `confirm`, and so on.
* **Provider Node** — the provider side. A provider node responds asynchronously: `on_discover`, `on_select`, `on_init`, `on_confirm`, and so on.

These two sides need not talk to each other directly. Every message travels through **ONIX adapters** — middleware that handles digital signing, schema validation, and protocol-level routing. It can also support observability at the network level, business policy enforcement, and much more. This keeps your application code focused on business logic.

Underpinning the network is NFH fabric's **DeDi Registry** — shared, trustless infrastructure every participant relies on for identity and routing lookups. Discovery in this starter kit is served by a **crawler-fed Discovery Service**: a Provider node publishes its catalog to storage it controls, points its Registry entry at that catalog's index, and a crawler independently discovers, verifies, and indexes it — no direct call between a publishing Provider node and a central catalog service is involved. This is covered in detail in [Beckn NFH fabric: Registry and Discovery](#fabric-registry-and-discovery) and [Catalog Publishing](#catalog-publishing).

***

### Prerequisites

Ensure the following tools are installed before you begin:

* **Git** — to clone this repository
* **Docker** and **Docker Compose**
  * [Install Docker](https://docs.docker.com/engine/install/)
  * Docker Compose ships with Docker Desktop; for Linux see the [Compose plugin guide](https://docs.docker.com/compose/install/)
* **Postman** — to send test requests
  * [Download Postman](https://www.postman.com/downloads/)
* **ngrok** — a static domain is needed to run through the full flow, including making anything you publish actually crawlable
  * [Download ngrok](https://ngrok.com/download) · requires a free ngrok account

For cloud VPS deployment you additionally need SSH access to a Linux server (Ubuntu 22.04 recommended) with ports 8081, 8082, and 9000 open in your firewall.

***

### Quick Start: Run the Network Locally

This is the fastest way to see a beckn network in action. Six Docker containers — two adapters, two application simulators, Redis, and a reverse proxy — start up on your laptop and form a complete, working network.

**Step 1 — Clone the repository**

```shell
git clone https://github.com/beckn/starter-kit.git
cd starter-kit/generic-devkit/install
```

**Step 2 — Start the stack**

```shell
docker compose -f docker-compose-generic.yml up
```

The first run pulls the required Docker images. This takes a few minutes once; subsequent starts are fast.

**Step 3 — Confirm all services are healthy**

```shell
docker compose -f docker-compose-generic.yml ps
```

Wait until all containers show `running` or `healthy`:

| Container      | Port | Role                                                                                                                                |
| -------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `beckn-router` | 9000 | Caddy reverse proxy — single entry point, routes `/bap/*` → `onix-bap`, `/bpp/*` → `onix-bpp`, `/beckn/*` → published catalog files |
| `redis`        | 6379 | Shared cache for both adapters                                                                                                      |
| `onix-bap`     | 8081 | Consumer node-side ONIX adapter (caller + receiver)                                                                                 |
| `onix-bpp`     | 8082 | Provider node-side ONIX adapter (caller + receiver + `catalog/publish`)                                                             |
| `sandbox-bap`  | 3001 | Mock consumer node application (receives callbacks)                                                                                 |
| `sandbox-bpp`  | 3002 | Mock provider node application (processes requests)                                                                                 |

**Step 4 — (Optional) Watch the adapters in real time**

Open a second terminal and tail the adapter logs while you send requests:

```shell
docker compose -f docker-compose-generic.yml logs -f onix-bap onix-bpp
```

You will see each message being signed, validated, and routed as you work through the transaction steps.

**Stopping the stack**

```shell
docker compose -f docker-compose-generic.yml down
```

***

### Public-Internet Testing (ngrok)

When you send a `discover` request, the Discovery Service sends `on_discover` back to whatever URL is in `context.bapUri`. That callback URL must be reachable from the public internet — which your laptop is not, by default. Publishing also depends on the tunnel: the catalog index and catalog files your Provider node writes are only crawlable if they're served from a publicly reachable URL (see [Catalog Publishing](#catalog-publishing)).

The stack includes **beckn-router**, a Caddy reverse proxy on port 9000 that sits in front of both adapters and your published catalog:

```
internet
    │
https://<your-static-domain>.ngrok-free.app
    │
ngrok → localhost:9000
    │
beckn-router (Caddy)
    ├── /bap/*     →  onix-bap:8081
    ├── /bpp/*     →  onix-bpp:8082
    └── /beckn/*   →  published catalog files (read-only)
```

One tunnelled port gives you a single stable public URL for the adapters and your published catalog. Set up an ngrok static domain, point the Postman collections' `public_url` variable at it, and keep `catalogBaseURL` in `generic-bpp.yaml` in sync with the same domain — this is the value that gets stamped into the URLs a crawler will try to fetch. Full walkthrough: [starter-kit's Public-Internet Testing section](https://github.com/beckn/starter-kit/blob/main/README.md#public-internet-testing-ngrok).

***

### Deployment: Cloud VPS

The same Docker Compose file works on any Linux VPS. Follow these steps after provisioning your server.

**Recommended server spec:** 2 GB RAM, Ubuntu 22.04.

**Firewall — open these ports:**

| Port | Purpose                                                |
| ---- | ------------------------------------------------------ |
| 22   | SSH                                                    |
| 8081 | onix-bap (consumer node ONIX adapter)                  |
| 8082 | onix-bpp (provider node ONIX adapter)                  |
| 9000 | beckn-router (reverse proxy)                           |
| 3001 | sandbox-bap (optional — for direct application access) |
| 3002 | sandbox-bpp (optional)                                 |

**Install Docker on the server:**

```shell
ssh user@your-server-ip

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker
```

**Clone and start:**

```shell
git clone https://github.com/beckn/starter-kit.git
cd starter-kit/generic-devkit/install
docker compose -f docker-compose-generic.yml up -d
```

The `-d` flag runs the stack in the background. Verify with:

```shell
docker compose -f docker-compose-generic.yml ps
docker compose -f docker-compose-generic.yml logs --tail=50
```

**Using a domain name and TLS:**

For a production-like setup, place a reverse proxy in front of the adapters. Example with Caddy (auto-TLS via Let's Encrypt):

```
bap.yourdomain.com {
    reverse_proxy localhost:8081
}

bpp.yourdomain.com {
    reverse_proxy localhost:8082
}
```

Once your domain is live, update the routing configs with the public URLs, and register your own participant identity with the DeDi Registry (see Customising the Starter Kit).

***

### Your First Transaction

With the stack running, import the Postman collections and walk through a complete beckn transaction.

**Import the collections**

1. Open Postman and click **Import**.
2. Navigate to `starter-kit/generic-devkit/postman/`.
3. Import both files:
   * `BAPBecknStarterKit.postman_collection.json` — the buyer side: `discover`, `select`, `init`, `confirm`
   * `BPPBecknStarterKit.postman_collection.json` — the provider side: `on_select`, `on_init`, `on_confirm`, and `publish`

**Set the collection variables**

Each collection has a `bap_adapter_url` / `bpp_adapter_url` variable that tells Postman where the ONIX adapters are reachable. For local deployment:

* `bap_adapter_url` → `http://localhost:8081/bap/caller`
* `bpp_adapter_url` → `http://localhost:8082/bpp/caller`

For a VPS, replace `localhost` with your server's IP or domain.

**Run the transaction flow**

Use the **consumer node collection**, in order:

```
discover  →  select  →  init  →  confirm
```

`discover` does **not** require you to have published anything — it's served from whatever a crawler has already indexed across the network, independent of your own publishing activity. The `on_*` callbacks (`on_discover`, `on_select`, `on_init`, `on_confirm`) are sent asynchronously and received automatically by the sandbox applications — you do not need to trigger them manually. Use the provider node collection for `on_select`/`on_init`/`on_confirm` (to simulate a provider-initiated callback directly) and for `publish` — see [Catalog Publishing](#catalog-publishing) if you want your own catalog to become discoverable.

After each step, check the `onix-bap` and `onix-bpp` logs to see the message being processed.

***

### Catalog Publishing

`onix-bpp` exposes `/catalog/publish` — a same-operator trigger that publishes one or more plain Beckn Catalog objects: it diffs each against what was last published (producing a fresh baseline, an incremental change file, or a no-op), signs the result, and writes a manifest plus a catalog index to disk. This is the `catalog-publisher` plugin for [beckn-onix](https://github.com/beckn/beckn-onix) — see its [design background](https://github.com/beckn/beckn-onix/blob/catalog-publisher/pkg/plugin/implementation/catalogpublisher/README.md) for the full reference.

**Prerequisites for your published catalogs to be discoverable** — neither is needed to use `discover` itself, only to have your own catalogs show up in results:

1. **Publicly available storage for the catalog files** — any static host works (your own domain, a CDN, GitHub Pages, or a tunnel such as ngrok for local testing). `catalogBaseURL` in `generic-bpp.yaml` must point at wherever that storage is actually served from.
2. **A live DeDi Registry entry for your node, with `meta.catalog_index_urls` set.** A crawler only picks up your catalog once your Registry record points at your published index.

Trigger it via the **`publish`** request under the provider node collection's **Catalog Publishing** folder, or directly:

```bash
curl -X POST http://localhost:8082/catalog/publish \
  -H "Content-Type: application/json" \
  -d '{
    "context": { "action": "catalog/publish" },
    "message": {
      "catalogs": [
        { "id": "staging.p-node.fabric.nfh.global/CAT-GENERIC-001", "descriptor": { "name": "Generic Catalog" }, "provider": { "id": "PROV-EXAMPLE-01" }, "resources": [ /* ... */ ] }
      ],
      "publishDirectives": [
        { "catalogId": "staging.p-node.fabric.nfh.global/CAT-GENERIC-001", "catalogType": "REGULAR" }
      ]
    }
  }'
```

The response is synchronous — there's no `on_publish` callback, since this is an unsigned, same-operator call:

```json
{
  "status": "COMPLETED",
  "results": [
    { "catalogId": "staging.p-node.fabric.nfh.global/CAT-GENERIC-001", "status": "ACCEPTED", "version": 1 }
  ]
}
```

Publishing the same `catalogId` again with edited content produces an incremental change file and bumps its version instead of a fresh baseline; publishing it unchanged is a no-op. Inspect `generic-devkit/data/beckn/` on the host directly to see the generated manifest, catalog index, and versioned catalog files. Full request/response reference: [starter-kit's Catalog Publishing section](https://github.com/beckn/starter-kit/blob/main/README.md#catalog-publishing-catalogpublish). For the full walkthrough of this model, see [Catalog Publishing and Discovery → Quickstart](/build/creating-a-network/catalog-publishing-and-discovery#quickstart--host-and-sign-your-first-catalog).

***

### How It All Works

Now that you have seen the network in action, here is a deeper look at how the pieces fit together.

#### The Services in This Stack

```
  ┌──────────────────────────────────────────────────────────────┐
  │                      Your Environment                        │
  │                                                              │
  │  ┌──────────────┐     ┌────────────────────────────────────┐ │
  │  │  sandbox-bap │◄───►│  onix-bap  (port 8081)             │ │
  │  │  BAP app     │     │  BAP-side ONIX adapter             │ │
  │  └──────────────┘     │  /bap/caller/   /bap/receiver/     │ │
  │                       └──────────────────────┬─────────────┘ │
  │                                              │               │
  │  ┌──────────────┐     ┌────────────────────────────────────┐ │
  │  │  sandbox-bpp │◄───►│  onix-bpp  (port 8082)             │ │
  │  │  BPP app     │     │  BPP-side ONIX adapter             │ │
  │  └──────────────┘     │  /bpp/receiver/  /bpp/caller/      │ │
  │                       │  /catalog/publish (writes to        │ │
  │                       │   ../data/beckn, served publicly    │ │
  │                       │   via beckn-router)                 │ │
  │                       └──────────────────────┬─────────────┘ │
  │                                              │               │
  │  ┌──────────────────────────────────────┐    │               │
  │  │  redis  (shared cache, port 6379)    │    │               │
  │  └──────────────────────────────────────┘    │               │
  └─────────────────────────────────────────────┼───────────────┘
                                                │
                           ┌────────────────────┴──────────────────┐
                           ▼                                       ▼
          ┌─────────────────────────────┐     ┌─────────────────────────────┐
          │      Beckn NFH fabric       │     │      Discovery Service      │
          │                             │     │   (independent service,     │
          │  DeDi Registry              │     │    crawler-fed)             │
          │  · Identity lookups         │     │                             │
          │  · Dynamic routing          │     │  Receives discover from     │
          │    (resolves BAP/BPP URIs)  │     │  BAPs, serves results from  │
          │  · Holds each node's        │     │  whatever a crawler has     │
          │    catalog_index_urls       │     │  already indexed, returns   │
          │                             │     │  on_discover                │
          └─────────────────────────────┘     └─────────────────────────────┘
                           ▲
                           │ (independently, on its own schedule)
                           │
          A crawler reads catalog_index_urls from the DeDi Registry
          and pulls each node's published catalog files directly --
          no call from the publishing BPP to the Discovery Service.
```

| Service        | Image                          | Port | Role                                                                             |
| -------------- | ------------------------------ | ---- | -------------------------------------------------------------------------------- |
| `beckn-router` | `caddy:alpine`                 | 9000 | Reverse proxy — single entry point for both adapters and published catalog files |
| `onix-bap`     | `fidedocker/onix-adapter`      | 8081 | Consumer node-side protocol adapter                                              |
| `onix-bpp`     | `fidedocker/catalog-publisher` | 8082 | Provider node-side protocol adapter, includes the `catalogpublisher` plugin      |
| `sandbox-bap`  | `fidedocker/sandbox-2.0`       | 3001 | Simulates a consumer node application                                            |
| `sandbox-bpp`  | `fidedocker/sandbox-2.0`       | 3002 | Simulates a provider node application                                            |
| `redis`        | `redis:alpine`                 | 6379 | Shared request/response cache                                                    |

**The ONIX adapter** is the core middleware from the [beckn-onix](https://github.com/beckn/beckn-onix) project. It is a plugin-based Go server that handles signing, signature validation, schema validation, and routing for every beckn message. Both `onix-bap` and `onix-bpp` run the same underlying binary — their behaviour is entirely determined by their config files and which plugins are compiled in.

**The application simulator** (`fidedocker/sandbox-2.0`) is a generic beckn application simulator. It exposes simple HTTP endpoints that receive forwarded messages and generate appropriate responses, so you can observe the full protocol flow without building your own Consumer node or Provider node app yet.

#### NFH fabric: Registry and Discovery

**Beckn NFH fabric** is the shared infrastructure layer that makes an open beckn network possible. Without NFH fabric, each participant would need bilateral agreements with every other participant. NFH fabric removes that requirement by providing shared, trustless services that the whole network relies on. This starter kit uses one Beckn NFH fabric service — the **DeDi Registry** — plus an independent, crawler-fed Discovery Service that runs alongside but outside of NFH fabric.

**DeDi Registry** (`fabric.nfh.global/registry/dedi`)

The DeDi (Decentralised Directory) Registry is the source of truth for participant identity on the network. Every Consumer node and Provider node registers their network ID, public key, and callback URI with the registry. The ONIX adapter consults the registry for two things:

* **Signature validation** — when an inbound message arrives, the adapter looks up the sender's public key in the registry to verify the digital signature. If the key is not found or the signature is invalid, the message is rejected.
* **Routing** — when a message needs to reach a Provider node (e.g., `select`) or return to a Consumer node (e.g., `on_select`), the adapter performs a registry lookup by participant ID to resolve the correct callback URL. This is how the network routes messages without any static config between participants.

The registry is referenced in all four adapter config files under the `registry` plugin:

```yaml
registry:
  id: dediregistry
  config:
    url: https://fabric.nfh.global/registry/dedi
    registryName: subscribers.beckn.one
```

The same registry record is also where a Provider node points crawlers at its own catalog — see `meta.catalog_index_urls` in [Catalog Publishing](#catalog-publishing).

**Discovery Service** (crawler-fed)

The Discovery Service is an independent network service — not part of Beckn NFH fabric — that acts as the search engine for the network. It does **not** receive a direct call from a Provider node's `publish`. Instead, a crawler reads `meta.catalog_index_urls` from each DeDi-registered node's record, independently fetches and verifies that node's published catalog files, and feeds the result into the Discovery Service's own index on its own schedule. When a Consumer node sends a `discover` request, the adapter routes it to the Discovery Service, which serves results from whatever the crawler has already indexed and responds asynchronously with `on_discover`. The Consumer node never contacts a Provider node directly during discovery — direct Consumer-to-Provider communication only begins at `select`.

The Discovery Service endpoint is configured in `generic-routing-BAPCaller.yaml`:

```yaml
target:
  url: "https://<discovery-service>/beckn"
endpoints:
  - discover
```

#### The Full Transaction Flow

Here is the complete picture of how a beckn transaction flows through the network:

```
Provider node side — catalog publishing (independent of any Consumer node transaction, optional)
─────────────────────────────────────────────────────────────────

sandbox-bpp ──publish──► onix-bpp ──writes files──► ../data/beckn
                                                          (served publicly via beckn-router)
sandbox-bpp ◄──synchronous response── onix-bpp
(no on_publish callback -- this is a same-operator, unsigned call)

                                                          │
                                          (independently, on its own schedule)
                                                          ▼
                                       A crawler reads this node's DeDi registry
                                       entry, finds catalog_index_urls, and pulls
                                       the published catalog files directly.


Consumer node side — discovery
─────────────────────────────────────────────────────────────────

sandbox-bap ──discover──► onix-bap ──discover──► Discovery Service
                                                    │
                                    (serves from whatever a crawler
                                     has already indexed, from any
                                     publishing node -- not only this one)
                                                    │
sandbox-bap ◄──on_discover── onix-bap ◄──on_discover───┘
(Consumer node receives list of matching offerings)


Consumer node ↔ Provider node — transaction (select / init / confirm)
─────────────────────────────────────────────────────────────────

sandbox-bap ──select──► onix-bap
                        │ DeDi Registry resolves Provider node URI
                        ▼
                    onix-bpp ──► sandbox-bpp
                        │
                    sandbox-bpp sends on_select response
                        │
                    onix-bpp
                        │ DeDi Registry resolves Consumer node URI
                        ▼
sandbox-bap ◄──on_select── onix-bap

     ... same pattern repeats for init / confirm ...
```

The key insight: **discovery is served from whatever a crawler has already indexed across the network**, independent of when or whether *this* Provider node has published anything, and **post-discovery transactions flow directly between Consumer node and Provider node** with the DeDi Registry providing dynamic routing. Publishing your own catalog (optional) makes it discoverable on the crawler's own schedule, asynchronously — it is never a prerequisite for `discover` to return results from other nodes.

#### Tracing a Request End-to-End

Here is the step-by-step journey of a single `discover` call, showing what happens inside each service:

**1. Postman → onix-bap** You trigger a `discover` by POSTing to onix-bap's caller endpoint (`/bap/caller/discover`). The `bapTxnCaller` module picks it up.

**2. addRoute** — the adapter reads `generic-routing-BAPCaller.yaml` and matches the `discover` action to the configured Discovery Service URL.

**3. sign** — the adapter signs the request body using the Ed25519 private key defined under `keyManager` in `generic-bap.yaml` (identity: `bap.example.com`).

**4. validateSchema** — the Beckn v2.0.0 OpenAPI spec is fetched from GitHub (cached for 1 hour) and the message is validated against it.

**5. Request → Discovery Service** — the signed, validated `discover` message is forwarded to the Discovery Service.

**6. Discovery Service → on\_discover callback** — the Discovery Service searches its crawler-built catalog index and asynchronously POSTs `on_discover` back to onix-bap's receiver endpoint (`/bap/receiver/on_discover`).

**7. validateSign** — the `bapTxnReceiver` module verifies the Discovery Service's digital signature by looking up its public key in the DeDi Registry.

**8. addRoute** — reads `generic-routing-BAPReceiver.yaml`, which routes all `on_*` callbacks to the sandbox-bap webhook.

**9. sandbox-bap receives on\_discover** — the response (list of available offerings) is now stored in the application and visible in logs.

For `select`, `init`, and `confirm`, the flow is similar but the adapter uses the DeDi Registry to resolve the Provider node's URI dynamically (no hardcoded URL needed), and onix-bpp uses the registry to resolve the Consumer node's callback URI for the `on_*` responses.

***

### Repository Structure

```
starter-kit/
│
└── generic-devkit/
    │
    ├── config/                               # All adapter configuration
    │   ├── generic-bap.yaml                  # BAP adapter: modules, plugins, keys
    │   ├── generic-bpp.yaml                  # BPP adapter: modules, plugins, keys (incl. catalogPublish)
    │   ├── generic-routing-BAPCaller.yaml    # Where BAP sends outbound requests
    │   ├── generic-routing-BAPReceiver.yaml  # Where BAP delivers incoming callbacks
    │   ├── generic-routing-BPPCaller.yaml    # Where BPP sends outbound responses
    │   └── generic-routing-BPPReceiver.yaml  # Where BPP delivers incoming requests
    │
    ├── data/beckn/                            # catalog/publish output (see Catalog Publishing)
    │
    ├── install/
    │   ├── docker-compose-generic.yml        # Main compose file (pre-built adapter images)
    │   └── docker-compose-generic-local.yml  # Alternate compose file (locally built image)
    │
    └── postman/
        ├── BAPBecknStarterKit.postman_collection.json   # BAP-side flows
        └── BPPBecknStarterKit.postman_collection.json   # BPP-side flows
```

#### config/ — How Each File Is Used

Each ONIX adapter instance loads one primary config file, which in turn references routing config files for each module.

**`generic-bap.yaml`** — loaded by onix-bap. Defines two modules:

* `bapTxnCaller` at `/bap/caller/` handles **outbound** Consumer node requests. It signs each message, routes it using `generic-routing-BAPCaller.yaml`, and validates the schema.
* `bapTxnReceiver` at `/bap/receiver/` handles **inbound** `on_*` callbacks. It validates the sender's signature (via DeDi Registry lookup), routes the response to sandbox-bap using `generic-routing-BAPReceiver.yaml`, and validates the schema.

**`generic-bpp.yaml`** — loaded by onix-bpp. Defines three modules:

* `bppTxnReceiver` at `/bpp/receiver/` handles **inbound** action requests from Consumer nodes. It validates signatures and routes to sandbox-bpp using `generic-routing-BPPReceiver.yaml`.
* `bppTxnCaller` at `/bpp/caller/` handles **outbound** `on_*` responses. It signs messages and routes them using `generic-routing-BPPCaller.yaml`.
* `catalogPublish` at `/catalog/publish` — a separate module, **not** part of `bppTxnCaller` — handles `catalog/publish` directly: unsigned, same-operator, no routing config involved. See [Catalog Publishing](#catalog-publishing).

**`generic-routing-BAPCaller.yaml`** — outbound routing for the Consumer node:

* `discover` → routes to the Discovery Service
* Transaction actions (`select`, `init`, `confirm`, plus not-yet-implemented `status`, `track`, `update`, `cancel`, `rate`, `support`) → `targetType: bpp`, resolved dynamically via DeDi Registry lookup

**`generic-routing-BAPReceiver.yaml`** — all inbound `on_*` callbacks are routed to sandbox-bap's webhook endpoint.

**`generic-routing-BPPReceiver.yaml`** — all inbound action requests are routed to sandbox-bpp's webhook endpoint.

**`generic-routing-BPPCaller.yaml`** — outbound routing for the Provider node's `on_*` responses → `targetType: bap`, resolved dynamically via DeDi Registry lookup. `catalog/publish` does not route through this file at all — it's handled entirely by the separate `catalogPublish` module above.

Both config files embed a **`keyManager`** section with pre-generated Ed25519 key pairs for testnet participants `bap.example.com` and `bpp.example.com`. These are registered with the DeDi Registry on `beckn.one/testnet` and work out of the box — no changes needed to get started.

#### postman/ — What the Collections Do

**`BAPBecknStarterKit.postman_collection.json`** — the buyer-side flows, organised in two folders:

* **1 — Discovery:** `discover` — sent to onix-bap (`/bap/caller/discover`), which routes it to the Discovery Service.
* **2 — Transaction:** `select` → `init` → `confirm` — sent to onix-bap, which routes each to the Provider node via DeDi Registry lookup.

**`BPPBecknStarterKit.postman_collection.json`** — the provider-side flows, organised in two folders:

* **1 — Transaction:** `on_select`, `on_init`, `on_confirm` — sent to onix-bpp (`/bpp/caller/on_*`). Use these to manually simulate or inspect Provider node responses. In a normal flow sandbox-bpp handles these automatically.
* **2 — Catalog Publishing:** `publish` — sent to onix-bpp at `/catalog/publish` directly (**not** `/bpp/caller/publish` — this is the separate `catalogPublish` module, see [Catalog Publishing](#catalog-publishing)).

***

### Customising the Starter Kit

**Changing the Discovery Service endpoint**

Edit `config/generic-routing-BAPCaller.yaml` to point `discover` at a different Discovery Service.

**Running fully offline (no external dependencies)**

Change the `discover` target in `generic-routing-BAPCaller.yaml` to route directly to onix-bpp's receiver endpoint (`http://onix-bpp:8082/bpp/receiver/`). You will also need to remove or stub the DeDi Registry lookups for the routing to work without network access.

**Using your own participant identity**

The config files contain pre-generated testnet key pairs for `bap.example.com` and `bpp.example.com`, registered on `beckn.one/testnet`. To use your own identity:

1. Generate a new Ed25519 key pair.
2. Register your `networkParticipant` domain and public key with the DeDi Registry at `fabric.nfh.global/registry/dedi`.
3. Update the `keyManager` section in `generic-bap.yaml` and `generic-bpp.yaml` with your new participant ID, key ID, and key material.
4. Update the routing config files to use your `networkId` in place of `beckn.one/testnet`.
5. If you want your own published catalogs to be discoverable, see the registry prerequisite in [Catalog Publishing](#catalog-publishing).

**Replacing the application simulator with your own application**

The application simulator containers (`sandbox-bap` and `sandbox-bpp`) are simple simulators. Replace either with your own application by updating the service image and webhook URLs in the compose file and routing configs. Your application needs to accept POSTed beckn messages at the configured endpoints and be on the same Docker network.

**Using a different beckn domain**

Update the `domain` (or `networkId`) field in all four routing YAML files to match your domain. Point the `schemav2validator` in the adapter config to the appropriate OpenAPI spec URL for schema validation.

***

### Troubleshooting

**Containers fail to start**

Check for port conflicts on 8081, 8082, 9000, 3001, 3002, or 6379:

```shell
docker compose -f docker-compose-generic.yml logs
```

**sandbox-bap or sandbox-bpp stays in `starting` state**

The application containers health-check at `/api/health`. If they don't reach `healthy` within about a minute, inspect their logs:

```shell
docker compose -f docker-compose-generic.yml logs sandbox-bap
docker compose -f docker-compose-generic.yml logs sandbox-bpp
```

**Postman requests return connection errors**

Confirm the stack is fully up (`docker compose ps` shows all six containers as `running` or `healthy`) and that your Postman collection variables point to the right host and port.

**Signature validation failures (`validateSign` errors in logs)**

The most common cause is clock skew. Beckn signatures embed a timestamp with a short validity window. On Linux: `timedatectl` to check clock sync. On Docker Desktop, ensure the VM clock is synchronised.

**`discover` returns no results**

The Discovery Service must be reachable. Check the URL configured in `generic-routing-BAPCaller.yaml` and test connectivity with:

```shell
curl -s https://<discovery-service>/beckn
```

If it times out, the testnet may be temporarily unavailable, or your network may block outbound HTTPS. `discover` does **not** depend on you having called `publish` — it's served from whatever a crawler has already indexed across the network. If you expected to see your *own* published catalog specifically, check that your DeDi registry entry actually carries `meta.catalog_index_urls` — a crawler has no other way to find it, and there's no immediate feedback if that field is missing.

**`catalog/publish` not working**

There is no `on_publish` callback in this model — `catalog/publish` responds synchronously. Check the response body directly: `status: FAILED` with an `error` object means a fatal failure (e.g. signing); a `REJECTED` entry in `results[]` means that specific catalog was invalid (check its `reason`). Also verify the Provider node's signing keys are valid by reviewing the `keyManager` section in `generic-bpp.yaml`, and that `outputRoot`/`catalogBaseURL` are set correctly (see [Catalog Publishing](#catalog-publishing)).

**Images fail to pull**

Ensure Docker has at least 2 GB RAM allocated and a stable internet connection for pulling the required images.

**Stopping and cleaning up**

```shell
# Stop containers
docker compose -f docker-compose-generic.yml down

# Stop and remove volumes and image cache
docker compose -f docker-compose-generic.yml down -v
```

{% hint style="info" %}
Need help? Ask a question, report a bug, request a feature, or request additional documentation — reach out to us [here](https://support.nfh.global/)
{% endhint %}


# Join the network

Get an identity on NFH fabric, publish a catalogue, and transact.

Joining NFH fabric takes four steps. None of them require permission from a platform owner.

## 1. Register an identity

Use the [Registry](/product-documentation/products/registr) to create a DID and publish your public key. This is your verifiable identity across every NFH fabric-aligned network.

## 2. Stand up a network adapter

Run the [Network Adapters Edge](/product-documentation/products/onix) reference software inside your infrastructure. Configure plug-ins for signing, schema validation, policy, and audit.

## 3. Publish, discover, or both

* **Publish** — list offerings via [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery).
* **Discover** — query the network via [Discovery Edge](/product-documentation/products/discovr).

## 4. Transact

Settle in any token class via the [Tokenisation](https://docs.finternetlab.io/) federation protocol. Carry credentials via [Credentialling Edge](/product-documentation/products/vc-on-edge). Watch your fleet and anchor audit trails via [Observability & Audit](/product-documentation/products/observability-audit).

***

## Next steps

* [Getting started with NFH fabric](/build/getting-started-with-fabric)
* [Resources and changelog](/build/resources)


# Onboarding on the NFH fabric

Join the NFH fabric as a Network Facilitator Organisation (NFO) or a Network Participant (NP) — on the hosted dedi.global solution or by publishing files on your own domain.

**Your role**

* **Network Facilitator Organisation (NFO)** — you operate a network. You onboard the network onto the NFH fabric and keep a reference registry of the NPs that belong to it.
* **Network Participant (NP)** — you join the NFH fabric by publishing your own subscriber details (endpoint and keys). An NFO includes you in its network by adding a reference to them. You can also onboard without being tied to any NFO, and be added to networks later.

**Your path** — where you publish:

* **Path 1 — Hosted**: on [dedi.global](https://dedi.global). You create your registries there; nothing to host yourself.
* **Path 2 — File-based**: on a domain you control, as DeDi files following the [DeDi protocol specification](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol).

Pick the guide for your situation:

| Role | Path 1 — Hosted (dedi.global)                                                                                                                                           | Path 2 — File-based (own domain)                                                    |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| NFO  | [Set up your network](/build/onboarding/hosted#if-you-are-an-nfo-set-up-your-network) and [add NPs](/build/onboarding/hosted#if-you-are-an-nfo-add-nps-to-your-network) | [Onboard your network](/build/onboarding/file-based#if-you-are-an-nfo)              |
| NP   | [Register your subscriber details](/build/onboarding/hosted#if-you-are-an-np-register-your-subscriber-details)                                                          | [Onboard by publishing your records](/build/onboarding/file-based#if-you-are-an-np) |

The paths mix freely across a network: an NFO can run a file-based network and still accept NPs that are on dedi.global, and vice versa.

{% hint style="warning" %}

1. An entity (NFO or NP) cannot use the hosted (dedi.global) path and the file-based path at the same time for any write operations. Each entity writes on exactly one path.
2. Registry names and file locations in these guides are suggested conventions, not requirements. The hard requirements are that record names are unique within a registry, and that the published URLs (in the index file and in reference records) are correct. A record's name can be reused as the key ID in the publisher's ONIX configuration.
   {% endhint %}

```mermaid
flowchart TD
    A["You are joining the NFH fabric<br/>(as NFO or NP)"] --> B{"Can you publish files<br/>on your own domain?"}
    B -- "No / prefer hosted" --> C["Path 1 — Hosted<br/>Publish on dedi.global<br/>(you still need access to your<br/>domain's DNS records, to verify<br/>a namespace via TXT record)"]
    B -- "Yes" --> D["Path 2 — File-based<br/>Publish DeDi files on your domain"]
```

See a complete network laid out end to end in the [worked example](/build/onboarding/worked-example). To change path later, see [Switching onboarding paths](/build/onboarding/switching-paths); to leave, see [Unpublishing your registries](/build/onboarding/unpublishing).


# Hosted onboarding via dedi.global

Set up your network as an NFO, or register your subscriber details as an NP, on the hosted dedi.global solution.

On this path you use [dedi.global](https://publish.dedi.global/) — a ready-to-use SaaS implementing the open [DeDi protocol](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol), offered by the Networks for Humanity Foundation. You publish and manage your registries there; there are no files to host yourself.

The flow at a glance:

```mermaid
sequenceDiagram
    participant NFO
    participant D as dedi.global
    participant NP

    NFO->>D: 1. Register account, create + verify namespace (DNS TXT)
    NP->>D: 1. Register account, create + verify namespace (DNS TXT)
    NFO->>D: 2. Create network registry (Beckn Subscriber Reference schema)
    NP->>D: 3. Create NP registry (Beckn Subscriber schema)<br/>and publish subscriber record
    NP-->>NFO: 4. Share lookup URL of registry / record
    NFO->>D: 5. Add lookup URLs as records in the network registry
```

***

## If you are an NFO: set up your network

A network on the NFH fabric is anchored by your verified namespace and one or more registries under it. Together they define the network boundary participants use during signing, verification, and discovery. Setting this up gives you:

* a verified identity for your NFO, anchored to your domain
* a registry that represents the network
* a **networkId** that participants rely on for trust and policy enforcement, of the form `<nfoDomain>/<registryName>` — for example `example-nfo.com/commerce-network`

### Step 1 — Set up a dedi.global account

Create an account on [dedi.global](https://publish.dedi.global/).

### Step 2 — Create and verify your namespace

1. Create a namespace in dedi.global.
2. Request whitelisting of your domain using [this form](https://docs.google.com/forms/d/e/1FAIpQLScAwEZh94DCIw70zrxWUJ1cud_wYfo_WEjqDpEmbxaw5ZF9aw/viewform). Requests are processed within 5 minutes, provided no adverse signals are detected for the domain.
3. Enter your domain name. A TXT record is generated (only for whitelisted domains).
4. Add the generated TXT record to your domain's DNS configuration.
5. Click **Verify** once the DNS record is in place. DNS propagation takes from 15 minutes up to 48 hours.

Your namespace is now anchored to your domain — if you operate `example-nfo.com`, that is your namespace.

### Step 3 — Create the network registry

Inside your verified namespace, create a registry using the [Beckn Subscriber Reference schema](https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber_reference.json). This registry stores references to the NPs that belong to your network.

Choose the registry name carefully — it becomes part of the networkId. A registry named `commerce-network` under `example-nfo.com` gives the network ID `example-nfo.com/commerce-network`.

{% hint style="info" icon="lightbulb" %}
**Tip**: If you operate across multiple environments (sandbox, staging, production) or sectors, create a separate registry for each — e.g. registry `production` → networkId `example-nfo.com/production`, registry `mobility-production` → networkId `example-nfo.com/mobility-production`. This keeps network boundaries explicit and lets participants configure their ONIX instances to accept requests only from networks they want to interact with.
{% endhint %}

***

## If you are an NFO: add NPs to your network

Once your network registry exists, add approved NPs to it. You never copy participant data manually — you add **references** to registries or records the NPs have already published themselves. This keeps identity self-owned while you curate who belongs to the network.

### Create a reference record per NP

For each approved NP, create a subscriber reference record in your network registry with these fields:

| Field          | Description                                                       | Example                                   |
| -------------- | ----------------------------------------------------------------- | ----------------------------------------- |
| subscriber\_id | The NP's unique identifier                                        | example-bap.com                           |
| url            | Lookup URL of the NP's registry or record                         | `https://api.dedi.global/dedi/lookup/...` |
| type           | Whether the URL points to a full registry or an individual record | Registry, Record                          |

**Registry or Record?**

* Use **Registry** when the NP's entire registry belongs to the network — all its current *and future* records are then treated as part of the network.
* Use **Record** when only one specific record should belong to the network.

### Get the NP's lookup URL

1. Go to the [dedi explore page](https://explore.dedi.global/) and find the NP's namespace. (The NP is only visible here once it has verified its namespace.)
2. Click the namespace to see its registries, then open the registry to be added — it should carry the registry tag `beckn_subscriber`.
3. To reference the whole registry, click **Copy** in the *Registry Lookup API* widget (use type **Registry**).
4. To reference a single record, open that record and click **Copy** in the *Record Lookup API* widget (use type **Record**).

### Validate before adding

Before creating the reference entry, confirm that:

* the NP has published its subscriber details under its own verified namespace
* the published callback URL is correct and reachable
* the published public key is valid for signing and verification
* the role and participant details are appropriate for the network
* the NP is being added to the correct environment-specific registry

Once the reference entry is added, the NP is part of the curated network represented by your networkId.

***

## If you are an NP: register your subscriber details

To join a network, publish your subscriber details on dedi.global so other participants can discover your endpoint and verify your signatures. You publish under your own verified domain; the NFO then decides whether to include you in its network.

You will publish:

* your subscriber identity
* your callback URL
* your role on the network (consumer node or provider node)
* your signing public key
* any other subscriber metadata required by the schema

### Step 1 — Set up a dedi.global account

Create an account on [dedi.global](https://publish.dedi.global/).

### Step 2 — Create and verify your namespace

1. Create a namespace.
2. Request whitelisting of your domain using [this form](https://docs.google.com/forms/d/e/1FAIpQLScAwEZh94DCIw70zrxWUJ1cud_wYfo_WEjqDpEmbxaw5ZF9aw/viewform). Requests are processed within 5 minutes, provided no adverse signals are detected for the domain.
3. Enter your domain name. A TXT record is generated (only for whitelisted domains).
4. Add the generated TXT record to your domain's DNS configuration.
5. Click **Verify** once the DNS record is in place. DNS propagation takes from 15 minutes up to 48 hours.

If you operate `example-np.com`, your namespace is anchored to that domain.

### Step 3 — Add a registry under your namespace

Under your verified namespace, create a registry using the [Beckn Subscriber schema](https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber.json). It will hold one or more subscriber records for your organisation.

### Step 4 — Publish your subscriber record

Create a subscriber record with:

| Field                 | What to fill                                                      | Example                            |
| --------------------- | ----------------------------------------------------------------- | ---------------------------------- |
| Subscriber ID         | Your unique identifier, typically your domain                     | np.example.com                     |
| Subscriber URL        | Your ONIX receiver endpoint                                       | `https://np.example.com/bap/beckn` |
| Type                  | Your role on the network                                          | consumer node or provider node     |
| Domain                | Deprecated field; can be ignored                                  | \*                                 |
| Signing Public Key    | Your Ed25519 public key, Base64-encoded, without header or footer | eyAeqGFtAuks...                    |
| Encryption Public Key | Optional encryption public key                                    | lCI84I0Q0U0w\...                   |
| Countries             | Countries where you operate                                       | \["IND"]                           |

If you operate in multiple roles, publish a separate record for each role.

{% hint style="warning" %}
Your Subscriber ID must be your namespace domain itself, or a subdomain of it — e.g. a namespace of `example-np.com` may use subscriber IDs `example-np.com` or `bap.example-np.com`, but not `something.com`.
{% endhint %}

**Generating the signing keypair for ONIX**: you can use [this utility script](https://github.com/beckn/beckn-onix/blob/main/install/generate-ed25519-keys.go) provided in ONIX, or any other tool, as long as it produces an Ed25519 key pair with the private key as the raw 32-byte seed and the public key as the raw 32-byte public key, both Base64-encoded (standard RFC 4648, with padding).

Click **Publish**, then note the **record ID** — this is the key ID you will configure in ONIX.

### Step 5 — Verify your key lookup

Check that your key has been cached by the service:

```
https://fabric.nfh.global/registry/dedi/lookup/<np_subscriber_id>/subscribers.beckn.one/<record_id_in_np_registry>
```

{% hint style="info" %}
Allow 5–10 minutes for the cache to update.
{% endhint %}

### Step 6 — Share your lookup URL with the NFO

Publishing on dedi.global is your onboarding — nothing further is needed to be on the NFH fabric. To join a network, share the lookup URL of your registry (or of the relevant record) with the NFO, which adds it to its network registry — see [adding NPs](#if-you-are-an-nfo-add-nps-to-your-network) above.

**Why this matters**: other participants use your published details to resolve your endpoint during transactions, retrieve your public key during signature verification, and validate that your requests are authentic and untampered. After publishing, configure and deploy ONIX with the same subscriber identity, key ID, and private key that correspond to the published record.


# File-based onboarding

Publish DeDi files on your own domain — publishing your index file and registry is your onboarding, for NFOs and NPs alike.

On this path you publish records directly on a domain under your own control, in conformance with the [DeDi protocol specification](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol).

Any file-based publisher — NFO or NP — must publish at least two files:

| File                                                                                                                                                                               | Location                                                                                                                                                                                                          | Purpose                                                    | Schema                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DeDi index file](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#6-the-manifest--well-knowndediindexjson) | `https://<your-domain>/.well-known/dedi.index.json`                                                                                                                                                               | Lists your signing keys and the registry files you publish | [dedi-manifest.schema.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/dedi-manifest.schema.json)                                                                                                                                                                                                                                                                                                                                                |
| [Registry file(s)](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#5-the-dedi-file)                        | URL declared in the index file ([hosting conventions](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#52-layout-and-hosting-conventions)) | The registry records themselves, signed by you             | [dedi-file.schema.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/dedi-file.schema.json); records follow [beckn\_subscriber\_reference.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/beckn_subscriber_reference.json) (NFO) or [beckn\_subscriber.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/beckn_subscriber.json) (NP) |

Both files are signed with your key — see [Signing your files](#signing-your-files) below.

## How a file-based network comes together

Publishing your DeDi index file and registry **is** your onboarding — for NFOs and NPs alike. The sequence below shows an NFO onboarding its network together with its NPs.

**Step 1 — NFO expresses intent to join the NFH fabric.** The NFO enters its domain on the [NFH fabric onboarding portal](https://fabric.nfh.global/#onboarding).

**Step 2 — NFO publishes its index and participant registry.** The NFO publishes its DeDi index file at `nfo.com/.well-known/dedi.index.json`, and creates its reference registry of network participants — suggested name `nfoname_networkname_env_ref_registry` — at `nfo.com/dedi/nfoname_networkname_env_ref_registry.json`. The registry must use the [Beckn Subscriber Reference schema](https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber_reference.json).

**Step 3 — NP publishes its records.** The NP publishes its DeDi index file at `np.com/.well-known/dedi.index.json`, and creates its network key registry at `np.com/dedi/nfoname_networkname_env_registry.json` (e.g. `nfo-x_mobility_prod_registry.json`), using the [Beckn Subscriber schema](https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber.json). It then shares its registry URL with the NFO.

**Step 4 — NFO updates its records.** The NFO adds the new NP's details to its registry of NPs, re-signs, and republishes.

In Steps 2–4, every file is signed before it is published — see [Signing your files](#signing-your-files).

```mermaid
sequenceDiagram
    participant NFO as NFO (nfo.com)
    participant P as NFH fabric onboarding portal
    participant NP as NP (np.com)

    NFO->>P: 1. Express intent — enter domain
    NFO->>NFO: 2. Publish /.well-known/dedi.index.json<br/>+ nfoname_networkname_env_ref_registry.json
    NP->>NP: 3. Publish /.well-known/dedi.index.json<br/>+ nfoname_networkname_env_registry.json
    NP-->>NFO: 3. Share URL of registry (or dedi.global lookup URL)
    NFO->>NFO: 4. Add NP record to reference registry,<br/>re-sign and republish
```

## If you are an NFO

* **Onboarding your network**: do Steps 1 and 2 — express intent on the onboarding portal, then publish your index file and reference registry. See the NFO's index file and reference registry laid out in full in the [worked example](/build/onboarding/worked-example#dedi-index-file-of-the-nfo).
* **Adding an NP to your network**: do Step 4 each time an NP joins — add a record with the NP's `subscriber_id` and registry URL (in either [URL form](#registry-url-forms)) to your reference registry, then re-sign and republish the registry file. If your index file carries a [digest](#adding-a-digest-optional) for that registry, also update the digest, then re-sign and republish the index file.

## If you are an NP

Your onboarding is Step 3 — publishing your DeDi index file at `np.com/.well-known/dedi.index.json` and your network key registry at `np.com/dedi/nfoname_networkname_env_registry.json`, using the Beckn Subscriber schema. See NP1's index file and registry laid out in full in the [worked example](/build/onboarding/worked-example#dedi-index-file-of-np1).

Each record in your registry describes one of your subscriber endpoints:

| Field                 | What to fill                                                      | Example                             |
| --------------------- | ----------------------------------------------------------------- | ----------------------------------- |
| Subscriber ID         | Your unique identifier, typically your domain                     | np.com                              |
| Subscriber URL        | Your ONIX receiver endpoint                                       | `https://np.com/beckn/bap/receiver` |
| Type                  | Your role on the network                                          | consumer node or provider node      |
| Domain                | Deprecated field; can be ignored                                  | \*                                  |
| Signing Public Key    | Your Ed25519 public key, Base64-encoded, without header or footer | eyAeqGFtAuks...                     |
| Encryption Public Key | Optional encryption public key                                    | lCI84I0Q0U0w\...                    |
| Countries             | Countries where you operate                                       | \["IND"]                            |

If you operate in multiple roles, publish a separate record for each role.

{% hint style="warning" %}
Your Subscriber ID must be your domain itself, or a subdomain of it — e.g. a domain of `example.com` may use subscriber IDs `example.com` or `bap.example.com`, but not `something.com`.
{% endhint %}

**Generating the signing keypair for ONIX**: you can use [this utility script](https://github.com/beckn/beckn-onix/blob/main/install/generate-ed25519-keys.go) provided in ONIX, or any other tool, as long as it produces an Ed25519 key pair with the private key as the raw 32-byte seed and the public key as the raw 32-byte public key, both Base64-encoded (standard RFC 4648, with padding).

Sign your registry file with the key declared in your DeDi index file, then publish both.

* **Joining under an NFO**: share your registry URL with the NFO, which adds your record to its reference registry (Step 4).
* **Not tied to any NFO yet**: enter your domain on the NFH fabric onboarding portal yourself, then publish. You are then on the NFH fabric standalone, and NFOs can add you to their networks later.

## Signing your files

[dedi-cli](https://github.com/nfh-trust-labs/dedi-cli) generates your signing key, signs your index and registry files, and checks the signatures locally, as the [DeDi protocol](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md) requires. Install it with Go:

```bash
go install github.com/nfh-trust-labs/dedi-cli/cmd/dedi-cli@latest
```

Or download a pre-built binary for Linux, macOS or Windows from the [Releases page](https://github.com/nfh-trust-labs/dedi-cli/releases).

**1. Generate a signing key** (once):

```bash
dedi-cli keygen --kid key-1 --out key.json
```

`key.json` holds your private key. Keep it secret, never commit it, and back it up — you need it every time you re-sign.

**This is not your ONIX key.** You work with two different signing keys:

| Key                   | What it signs                                   | Where its public key goes                    |
| --------------------- | ----------------------------------------------- | -------------------------------------------- |
| ONIX signing key      | Beckn messages, live during transactions        | `signing_public_key` in your registry record |
| DeDi file-signing key | Your index and registry files, when you publish | `keys` in your index file                    |

{% hint style="info" %}
We recommend a separate key for each. You *can* reuse one keypair for both (re-encoded for each place), but keeping them apart is safer: the ONIX key lives on a running server, while the DeDi key can stay offline. And if the ONIX key leaks or you rotate it, your index file isn't affected.
{% endhint %}

**2. Sign each file.** Fill in every field of the index or registry file except the signing key and `proof`, then:

```bash
dedi-cli sign --key key.json --in unsigned/nfo-x_mobility_prod_ref_registry.json --out signed/nfo-x_mobility_prod_ref_registry.json
```

`sign` detects whether the input is an index file or a registry file, adds your public key if it is missing, and writes the `proof`. Before signing, it also catches mistakes that would otherwise fail silently later:

* records whose `details` don't match the registry's schema;
* for Beckn Subscriber registries, a `subscriber_id` that is not your domain or a subdomain of it — DeDi never picks up such a record;
* a `next_update` that is already in the past.

If you're using a [digest](#adding-a-digest-optional), sign the registry file first, then add its digest to the index file, then sign the index file.

**3. Check the signature** before you publish:

```bash
dedi-cli verify --in signed/nfo-x_mobility_prod_ref_registry.json
```

This only checks the signature itself, not domain binding or freshness. dedi-cli doesn't publish: upload the signed files to your domain yourself, exactly as `sign` wrote them.

## Adding a digest (optional)

Each registry entry in your index file's `files` can carry a `digest` — a hash of the registry file's current content. The [DeDi specification](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#63-digests) makes it optional, but it helps crawlers: a crawler compares the digest in your index file with the one it saw last time. If it hasn't changed, the crawler skips re-fetching the registry. If it has changed, the crawler fetches the new version. Without a digest, crawlers have to fetch the registry file itself to find out whether it changed.

The digest is the SHA-256 hash of the exact bytes of the signed registry file you publish, written as `sha-256:` followed by the lowercase hex hash:

{% tabs %}
{% tab title="macOS" %}

```bash
echo "sha-256:$(shasum -a 256 signed/nfo-x_mobility_prod_ref_registry.json | cut -d ' ' -f 1)"
```

{% endtab %}

{% tab title="Linux" %}

```bash
echo "sha-256:$(sha256sum signed/nfo-x_mobility_prod_ref_registry.json | cut -d ' ' -f 1)"
```

{% endtab %}

{% tab title="Windows (PowerShell)" %}

```powershell
"sha-256:" + (Get-FileHash signed\nfo-x_mobility_prod_ref_registry.json -Algorithm SHA256).Hash.ToLower()
```

{% endtab %}
{% endtabs %}

Put the result in that registry's `files[].digest` in your index file, then sign the index file. Keep these rules in mind:

* **Hash the signed file.** Compute the digest after signing the registry, and publish that file unchanged — reformatting or re-saving it changes the bytes and breaks the digest.
* **Update it on every change.** Each time you re-sign a registry, recompute its digest, update the index file and re-sign it too. A stale digest makes verifiers reject the registry until the index file catches up.
* **Or keep it in a separate digests file.** To avoid re-signing your index file on every registry change, you can put digests in a signed digests file linked from the index file's `digests` URL instead — see [§6.3 of the specification](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#63-digests).

## Reuse of an existing dedi.global presence

Where an NP already maintains a presence on dedi.global, that existing record may be used for onboarding, without requiring the NP to publish files independently. In this case, the lookup URL from dedi.global can be used in the NFO's registry, for example:

```
https://api.dedi.global/dedi/lookup/np2.com/nfo-x_mobility_prod_registry
```

## Registry URL forms

An NP's registry URL can be in one of two forms, depending on the path the NP uses:

| NP path    | URL form                                               | Example                                                                   |
| ---------- | ------------------------------------------------------ | ------------------------------------------------------------------------- |
| Hosted     | `api.dedi.global/dedi/lookup/<domain>/<registry-name>` | `https://api.dedi.global/dedi/lookup/np.com/nfo-x_mobility_prod_registry` |
| File-based | `<domain>/dedi/<registry-name>`                        | `https://np.com/dedi/nfo-x_mobility_prod_registry`                        |

See all of these files fully written out in the [worked example](/build/onboarding/worked-example).


# Worked example

A complete file-based mobility network example - the NFO's index and reference registry, a file-based NP, and a hosted NP referenced via dedi.global lookup.

The following are example files for a mobility network operated by an NFO (`nfo-x.com`) with two NPs: `np1.com` (on the [file-based path](/build/onboarding/file-based)) and `np2.com` (on the [hosted path](/build/onboarding/hosted), referenced via its dedi.global lookup URL).

```mermaid
flowchart LR
    subgraph NFOX ["nfo-x.com (file-based NFO)"]
        A["/.well-known/dedi.index.json"] -- "URL (+ optional digest)" --> B["/dedi/nfo-x_mobility_prod_ref_registry.json"]
    end
    subgraph NP1 ["np1.com (file-based NP)"]
        C["/.well-known/dedi.index.json"] -- "URL (+ optional digest)" --> D["/dedi/nfo-x_mobility_prod_registry.json"]
    end
    subgraph DG ["dedi.global (hosted)"]
        E["lookup/np2.com/nfo-x_mobility_prod_registry"]
    end
    B -- "record np-1" --> D
    B -- "record np-2" --> E
```

### DeDi index file of the NFO

Hosted at `https://nfo-x.com/.well-known/dedi.index.json`:

```json
{
  "dedi_version": "0.1",
  "type": "dedi-manifest",
  "domain": "nfo-x.com",
  "name": "NFO-X",

  "keys": [
    { "kid": "key-1", "kty": "OKP", "crv": "Ed25519", "x": "j3bN3KHtT_LDVHLBySF0eZ59wn51gwdLg_2v6lcb874" }
  ],

  "updated_at": "2026-07-08T10:00:00Z",
  "next_update": "2026-07-15T10:00:00Z",

  "files": [
    {
      "registry": "nfo-x_mobility_prod_ref_registry",
      "url": "https://nfo-x.com/dedi/nfo-x_mobility_prod_ref_registry.json",
      "digest": "sha-256:59563cf66b442a61b2ee5bee6d306b23668266e9b5ce5d888f65bf14d28aa589",
      "schema": "https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber_reference.json"
    }
  ],

  "proof": {
    "verification_method": "key-1", "canonicalization": "JCS", "jws": "eyJ..."
  }
}
```

The `digest` field is optional. It lets crawlers skip re-fetching the registry when nothing has changed — see [Adding a digest](/build/onboarding/file-based#adding-a-digest-optional) for what it's for and how to compute it. Leave it out and the index file is still valid.

### The NFO's reference registry

Hosted at `https://nfo-x.com/dedi/nfo-x_mobility_prod_ref_registry.json`:

```json
{
  "dedi_version": "0.1",
  "type": "dedi-file",
  "source_url": "https://nfo-x.com/dedi/nfo-x_mobility_prod_ref_registry.json",
  "next_update": "2026-07-15T10:00:00Z",

  "publisher": {
    "domain": "nfo-x.com",
    "key": {
      "kid": "key-1", "kty": "OKP", "crv": "Ed25519",
      "x": "j3bN3KHtT_LDVHLBySF0eZ59wn51gwdLg_2v6lcb874"
    }
  },

  "namespace": "nfo-x.com",
  "registry": {
    "name": "nfo-x_mobility_prod_ref_registry",
    "schema": "https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber_reference.json",
    "state": "live",
    "updated_at": "2026-07-08T10:00:00Z"
  },

  "records": [
    {
      "record_name": "np-1",
      "details": {
        "url": "https://np1.com/dedi/nfo-x_mobility_prod_registry",
        "type": "Registry",
        "subscriber_id": "np1.com"
      }
    },
    {
      "record_name": "np-2",
      "details": {
        "url": "https://api.dedi.global/dedi/lookup/np2.com/nfo-x_mobility_prod_registry",
        "type": "Registry",
        "subscriber_id": "np2.com"
      }
    }
  ],

  "proof": {
    "verification_method": "key-1",
    "canonicalization": "JCS",
    "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..<detached-signature>"
  }
}
```

### DeDi index file of NP1

Hosted at `https://np1.com/.well-known/dedi.index.json`:

```json
{
  "dedi_version": "0.1",
  "type": "dedi-manifest",
  "domain": "np1.com",
  "name": "Network Participant 1",

  "keys": [
    { "kid": "key-1", "kty": "OKP", "crv": "Ed25519", "x": "m0Wu77LVm7YRsF9Xus4YWqDjrE9zWDPtFgkytdbIMCE" }
  ],

  "updated_at": "2026-07-08T10:00:00Z",
  "next_update": "2026-07-15T10:00:00Z",

  "files": [
    {
      "registry": "nfo-x_mobility_prod_registry",
      "url": "https://np1.com/dedi/nfo-x_mobility_prod_registry.json",
      "digest": "sha-256:c54ee7a794bdb3533a3b7d2b429851183d4bb99b8d91a494b4e917b779457334",
      "schema": "https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber.json"
    }
  ],

  "proof": {
    "verification_method": "key-1", "canonicalization": "JCS", "jws": "eyJ..."
  }
}
```

### NP1's registry file

Hosted at `https://np1.com/dedi/nfo-x_mobility_prod_registry.json`:

```json
{
  "dedi_version": "0.1",
  "type": "dedi-file",
  "source_url": "https://np1.com/dedi/nfo-x_mobility_prod_registry.json",
  "next_update": "2026-07-15T10:00:00Z",
  "publisher": {
    "domain": "np1.com",
    "key": {
      "kid": "key-1",
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "m0Wu77LVm7YRsF9Xus4YWqDjrE9zWDPtFgkytdbIMCE"
    }
  },
  "namespace": "np1.com",
  "registry": {
    "name": "nfo-x_mobility_prod_registry",
    "schema": "https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber.json",
    "state": "live",
    "updated_at": "2026-07-08T10:00:00Z"
  },
  "records": [
    {
      "record_name": "bap-record",
      "details": {
        "subscriber_id": "np1.com",
        "url": "https://np1.com/beckn/bap/receiver/",
        "type": "BAP",
        "countries": [
          "IDN"
        ],
        "signing_public_key": "4FyXHFd2DZpSlmjN/GybS2w1SO3mFRSqQjCGrbTxoJM="
      }
    }
  ],
  "proof": {
    "verification_method": "key-1",
    "canonicalization": "JCS",
    "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..<detached-signature>"
  }
}
```

### NP2's hosted record on dedi.global

NP2 is on the hosted path, so its registry lives on dedi.global and is retrieved via the lookup API at `https://api.dedi.global/dedi/lookup/np2.com/nfo-x_mobility_prod_registry`. The response below is abridged — the embedded Beckn Subscriber schema (including the full country-code enum) is truncated for readability:

```json
{
  "message": "Resource retrieved successfully",
  "data": {
    "namespace": "np2.com",
    "namespace_id": "did:web:did.cord.network:<namespace-did>",
    "registry_id": "<registry-id>",
    "registry_name": "nfo-x_mobility_prod_registry",
    "record_id": "<record-id>",
    "record_name": "np2-bap",
    "description": "np2-bap",
    "digest": "0x<sha-256-digest>",
    "schema": {
      "type": "object",
      "title": "Beckn Subscriber",
      "...": "full Beckn Subscriber schema omitted for brevity"
    },
    "version_count": 3,
    "version": "0x<version-hash>",
    "details": {
      "url": "https://api.np2.com/beckn/onix/bap/receiver",
      "type": "BAP",
      "countries": [
        "NLD"
      ],
      "subscriber_id": "np2.com",
      "encr_public_key": "<encryption-public-key>",
      "signing_public_key": "<signing-public-key>"
    },
    "meta": {},
    "genesis": "2026-08-06T08:59:50.939Z",
    "created_at": "2026-08-07T06:56:59.756Z",
    "updated_at": "2026-08-07T06:56:59.756Z",
    "created_by": "did:web:did.cord.network:<creator-did>",
    "state": "live",
    "ttl": 600,
    "proof": {
      "type": "DediRecordProof2026",
      "namespace_did": "did:web:did.cord.network:<namespace-did>",
      "registry_identifier": "<registry-id>",
      "record_identifier": "<record-id>",
      "creator_did": "did:web:did.cord.network:<creator-did>",
      "digest": "0x<sha-256-digest>",
      "network_genesis": "0x<network-genesis-hash>"
    }
  }
}
```


# Switching onboarding paths

Move an NFO or NP between the hosted (dedi.global) path and the file-based path without leaving the NFH fabric.

An entity may adopt either of the two onboarding paths onto the NFH fabric, and may switch between them at any time. An entity (NFO or NP) cannot simultaneously use the hosted (dedi.global) and file-based paths for any write operations — so a switch always ends with exactly one active write path.

In both directions, you first establish your presence on the new path, then remove it from the old one.

```mermaid
flowchart LR
    H["Hosted<br/>(dedi.global)"] -- "1. Publish files on your domain<br/>2. Remove namespace verification" --> F["File-based<br/>(own domain)"]
    F -- "1. Set up namespace + registries<br/>2. Verify DNS TXT<br/>3. Remove files" --> H
```

## Moving from dedi.global to file-based

{% hint style="info" %}
There is a one-time delay of about 15 minutes while the switch takes effect.
{% endhint %}

1. Publish your DeDi index file and the corresponding registry on your own domain, as described in [File-based onboarding](/build/onboarding/file-based) — a Beckn Subscriber registry if you are an NP, a Beckn Subscriber Reference registry if you are an NFO.
2. Log in to [publish.dedi.global](https://publish.dedi.global/), click on your namespace card, select **View TXT**, and remove the verification.

Your registry URL changes form when you switch — from `api.dedi.global/dedi/lookup/<domain>/<registry-name>` to `<domain>/dedi/<registry-name>` (see [Registry URL forms](/build/onboarding/file-based#registry-url-forms)). If you are an NP, share the new URL with your NFO so it can update its reference record in the network registry.

## Moving from file-based to dedi.global

1. Log in at [dedi.global](https://publish.dedi.global/) and set up your namespace and directories as described in [Hosted onboarding](/build/onboarding/hosted).
2. Complete the DNS TXT verification.
3. Remove the DeDi files from your domain.

The same applies in this direction: your registry URL changes to the hosted lookup form, so if you are an NP, share the new lookup URL with your NFO.


# Unpublishing your registries

Remove your registries from the NFH fabric, on either onboarding path.

To leave the NFH fabric, remove your published registries on whichever path you use.

## If you are on dedi.global

1. Unverify your namespace.
2. Delete the namespace.

## If you are file-based

1. Remove the entries for the registries you're unpublishing from your DeDi index file's `files` list, re-sign, and republish the index.
2. Delete the corresponding registry file(s) from your domain.

Keep the DeDi index file itself published — editing a registry out of it is what declares that registry removed. Deleting the index file (or a registry file) without first removing it from the index leaves the removal ambiguous: consumers may read the resulting unreachability as a temporary outage rather than an intentional deletion, and would only treat it as removed after the grace period below lapses.

{% hint style="info" %}
There is a 1-day grace period before your registries are completely removed from the system.
{% endhint %}


# Build with agents

Patterns and primitives for building agent-native applications on NFH fabric.

Agents are first-class participants on NFH fabric. They hold identities, sign transactions, hold tokens, earn reputation, and are accountable for what they do.

[**Read the agents concept page →**](/nfh-fabric/agents)

## Common patterns

### Agent-owned account

Provision a DID for the agent. Issue it a capability credential. Fund a Tokenisation account in its name. The agent transacts under its own identity, with audit trails attached.

### Delegated authority

Issue a time-bounded, scope-bounded credential from a human or organisation to an agent. The agent acts under that delegation; revocation is a one-call action.

### Human-in-the-loop gating

Use Network Adapters Edge policy plug-ins to require human approval for actions above a threshold (value, risk, counterparty).

### Multi-agent commerce

Discovery via MCP. Contracts via Network Adapters Edge. Settlement via Tokenisation. Audit via Observability & Audit. Agents brokering with agents, end to end.

## Standards

MCP for discovery and service consumption. W3C Verifiable Credentials for capability and delegation. OpenTelemetry for action tracing.

## What to read next

* [Credentialling Edge](/product-documentation/products/vc-on-edge)
* [Tokenisation](https://docs.finternetlab.io/)
* [Discovery Edge](/product-documentation/products/discovr)
* [The agent data marketplace use case](/use-cases/agent-data-marketplace)


# Creating a network

The operator track for standing up an open network on NFH fabric — environment, participant onboarding, policies, and building consumer and provider nodes.

This is the hands-on track for a **Network Facilitator Organisation (NFO)** standing up an open network on NFH fabric, and for **Network Participants (NPs)** joining one. It walks from a blank environment through onboarding, policy, and building the nodes that transact.

{% hint style="info" %}
These guides use the **Beckn Protocol** (the wire spec keeps its name) over NFH fabric services — [REGISTR](/product-documentation/products/registr) / [DeDi](https://docs.nfh.global/dedi) for identity, [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery) + [DISCOVR](/product-documentation/products/discovr) for catalogs and discovery, and [ONIX](/product-documentation/products/onix) for the protocol adapter.
{% endhint %}

## The path

{% stepper %}
{% step %}

### Set up the network environment

The infrastructure and services an NFO stands up first. → [Setting up the network environment](/build/creating-a-network/environment)
{% endstep %}

{% step %}

### Onboard network participants

Register identities, keys, and callback URLs in DeDi. → [Onboarding network participants](/build/creating-a-network/onboarding-participants)
{% endstep %}

{% step %}

### Publish and discover catalogs

Self-host and self-sign a catalog, and see how a Discovery Service crawls and verifies it. → [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery)
{% endstep %}

{% step %}

### Configure network policies

Express the network's rules. → [Configuring network policies](/build/creating-a-network/network-policies) — the [network manifest](/build/creating-a-network/network-policies/network-manifest), [Rego policy artifacts](/build/creating-a-network/network-policies/rego-policies), and [signing a file](/build/creating-a-network/network-policies/signing-files).
{% endstep %}

{% step %}

### Build the nodes that transact

Stand up the consumer (buyer-side) and provider (seller-side) applications using [ONIX](/product-documentation/products/onix) as the protocol adapter, then run the [Getting started with NFH fabric](/build/getting-started-with-fabric) walkthrough end-to-end.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
**Just want to try NFH fabric first?** See [Getting started with NFH fabric](/build/getting-started-with-fabric) for a guided, runnable walkthrough before standing up a full network.
{% endhint %}


# Setting up the network environment

This section covers how a Network Facilitator Organization (NFO) sets up a new NFH fabric network using the NFH fabric Registry infrastructure on DeDi Global, and how…

This section covers how a Network Facilitator Organization (NFO) sets up a new NFH fabric network using the NFH fabric Registry infrastructure on DeDi Global, and how approved Network Participants (NPs) are onboarded into that network.

An NFH fabric network is anchored by a verified namespace and one or more registries under that namespace. Together, the namespace and registry form the network's root of trust and define the network boundary that participants can use during signing, verification, and discovery.

### Registering the network on NFH fabric

To register a new NFH fabric network, the NFO first creates its identity root on [DeDi Global](https://publish.dedi.global/) and then publishes a registry for the network. This registry becomes the canonical place from which participants in that network are referenced.

{% hint style="info" %}
Dedi.global is a ready to use SaaS implementing the open[ DeDi protocol](https://github.com/LF-Decentralized-Trust-labs/DeDi) offered by the Networks for Humanity Foundation. This allows registrars to effortlessly publish and manage their directories (aka public registries) on a decentralized, user controlled infrastructure.
{% endhint %}

#### What this establishes

* A verified identity for the NFO, anchored to its domain
* A registry that represents the network
* A networkId that participants can rely on for trust and policy enforcement

\
The networkId is of the form:

```
<nfoDomain>/<registryName>
```

For example:

```
example-nfo.com/commerce-network
```

{% hint style="info" icon="lightbulb" %}
**Tip**: If you operate across multiple environments such as sandbox, staging, and production, create a separate registry for each environment. If needed, you can also create separate registries per sector. This keeps network boundaries explicit and allows participants to configure their ONIX instances appropriately to allow requests from networks they want to interact with. NFOs are free to create these boundaries as per their operational requirements.
{% endhint %}

#### Step 1: Set up a DeDi Global account

Create an account on [DeDi Global](https://publish.dedi.global/).

#### Step 2: Create and verify the NFO namespace

1. Create a namespace in DeDi.
2. Request for whitelisting of a domain. This can be done [here](https://docs.google.com/forms/d/e/1FAIpQLScAwEZh94DCIw70zrxWUJ1cud_wYfo_WEjqDpEmbxaw5ZF9aw/viewform). The request will be processed within 5 minutes, provided no adverse signals are detected for the domain.
3. Enter the domain name. A TXT record will be generated (only for whitelisted domains).
4. Copy the generated TXT record as it needs to be updated in the DNS configuration file of your domain.
5. Click “Verify” after you have successfully updated the domain’s DNS file. The DNS text propagation will take from 15 min to up to 48 hours. Once this is done, your domain is verified.

Example: If you as an NFO operate example-nfo.com, your namespace will be anchored to that domain.

#### Step 3: Create the network registry

Inside the verified namespace, create a new registry using the NFH fabric subscriber reference schema. This registry stores references to the NPs that belong to the network.

The registry name is significant because it becomes part of the networkId. For example, an NFO registry named commerce-network under example-nfo.com results in the network ID example-nfo.com/commerce-network.

{% hint style="info" icon="lightbulb" %}
Tip: You can create multiple registries for any number of boundaries that you want to create in the NFH fabric. Based on your operational requirements you can create separate registries for specific environments or sectors that you are operating in.

Example: Suppose your verified domain is `example-nfo.com`

* Sandbox environment: Registry name: `sandbox` Network ID: `example-nfo.com/sandbox`
* Staging environment: Registry name: `staging` Network ID: `example-nfo.com/staging`
* Production environment: Registry name: `production` Network ID: `example-nfo.com/production`
* Sector-specific production environment: Registry name: `mobility-production` Network ID: `example-nfo.com/mobility-production`
  {% endhint %}

Each network registry should eventually contain references to approved participants, with valid subscriber details, callback endpoints, and public-key material published by those participants in their own registries.


# Onboarding network participants

Once the network registry has been created, approved NPs can be added to the network.

### Adding or onboarding Network Participants

Once the network registry has been created, approved NPs can be added to the network. In this model, the NFO does not duplicate participant data manually. Instead, the NFO adds references to NP-owned registries or NP-owned records that are already published on DeDi Global.\
This preserves self-owned identity for participants while allowing the NFO to curate who belongs to the network.

#### Adding Registry entries

For each approved NP, create a subscriber reference record in the network registry. The NP details should already be published by the NP on the NFH fabric and the steps for the same can be found [here](#network-participants-registering-on-the-fabric).

These records tell the network which NP-owned registry or record should be treated as part of the network.

**Fields required in the network registry entry**

| **Field**      | **Description**                                                   | **Example**                               |
| -------------- | ----------------------------------------------------------------- | ----------------------------------------- |
| subscriber\_id | The NP's unique identifier                                        | example-bap.com                           |
| url            | Lookup URL of the NP registry or NP record on DeDi Global         | `https://api.dedi.global/dedi/lookup/...` |
| type           | Whether the URL points to a full registry or an individual record | Registry, Record                          |

**Choosing between type Registry or Record**

* Use Registry when the entire NP registry should be recognized as belonging to the network. This means all current and future records inside that NP registry are treated as part of the network.
* Use Record when only one specific NP record should belong to the network.

**Getting the Lookup URL of the NP**

To get the lookup URL of a record or a registry of an NP, you can go to the [dedi explore page](https://explore.dedi.global/) and find the namespace of the NP.

* Click on the NP namespace to see all their registries.
* Click on the registry that needs to be added. Please note it should have the registry tag as beckn\_subscriber.
* Once inside the registry, if you need to reference the whole registry, click on Copy in the Registry Lookup API widget to copy the URL. If you are providing the registry lookup URL, then type should be Registry.
*

```
<figure><img src="../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>
```

* If you want to reference a single record in the registry as belonging to your network, click on the record from the list of records in the registry.
* Once inside the record, click on Copy in the Record Lookup API widget to copy the URL.

Please note the details of the NP will be visible on DeDi explore only if they have verified their namespace.

**What the NFO should validate before adding an NP**

Before creating the reference entry, confirm that:

* the NP has published its subscriber details under its own verified namespace
* the published callback URL is correct and reachable
* the published public key is valid for signing and verification
* the role and participant details are appropriate for the network
* the NP is being added to the correct environment-specific registry

Once this reference entry is added, that NP becomes part of the curated network represented by the NFO's networkId.

## Network Participants registering on the NFH fabric

This section is for Network Participants (NPs) such as consumer nodes and provider nodes that want to join an existing NFH fabric network. To participate, an NP must first publish its subscription and key details on the NFH fabric Registry infrastructure, and then configure its ONIX instance to transact on the network.

In this model, the NP owns and publishes its identity under its own verified domain, while the Network Facilitator Organization (NFO) decides whether to include that NP in a curated network.

### 4.1 Registering your subscription details on NFH fabric

To participate in an NFH fabric network, you must publish your subscriber details on DeDi Global so that other participants can discover your endpoint and verify your signatures. Your verified namespace and registry act as your root of trust on the NFH fabric.

#### What you are publishing

By registering your subscriber details, you make the following information available in a standard form:

* your subscriber identity
* your NFH fabric callback URL
* your role on the network, such as consumer node or provider node
* your signing public key
* any other subscriber metadata required by the schema

Once these details are published, the NFO can reference your registry or record in its own network registry to include you in a specific NFH fabric network.

#### Step 1 - Set up your DeDi account

Create an account on[ DeDi Global](https://dedi.global/).

#### Step 2 - Create & verify your namespace

1. Create a namespace.
2. Request for whitelisting of a domain. This can be done [here](https://docs.google.com/forms/d/e/1FAIpQLScAwEZh94DCIw70zrxWUJ1cud_wYfo_WEjqDpEmbxaw5ZF9aw/viewform). The request will be processed within 5 minutes, provided no adverse signals are detected for the domain.
3. Enter the domain name. A TXT record will be generated (only for whitelisted domains).
4. Copy the generated TXT record as it needs to be updated in the DNS configuration file of your domain.
5. Click “Verify” after you have successfully updated the domain’s DNS file. The DNS text propagation will take from 15 min to up to 48 hours. Once this is done, your domain is verified.

After you claim your organization's namespace by proving domain ownership, this namespace becomes your root of trust.

Example: If you as an NP operate example-np.com, your namespace will be anchored to that domain.

#### Step 3 - Add a registry under your namespace

Under your verified namespace, create a registry using the NFH fabric subscriber schema. This registry will contain one or more subscriber records for your organization.

#### Step 4 - Publish your subscriber record

Create a subscriber record with the following details:

| **Field**             | **What to fill**                                                  | **Example**                        |
| --------------------- | ----------------------------------------------------------------- | ---------------------------------- |
| Subscriber ID         | Your unique identifier, typically your domain                     | np.example.com                     |
| Subscriber URL        | Your ONIX receiver endpoint                                       | `https://np.example.com/bap/beckn` |
| Type                  | Your role on the network                                          | consumer node or provider node     |
| Domain                | Deprecated field; can be ignored                                  | \*                                 |
| Signing Public Key    | Your Ed25519 public key, Base64-encoded, without header or footer | eyAeqGFtAuks...                    |
| Encryption Public Key | Optional encryption public key                                    | lCI84I0Q0U0w\...                   |
| Countries             | Countries where you operate                                       | \["IND"]                           |

If you operate in multiple roles, publish separate records for each role.

**Generating the signing keypair to be used in ONIX**

You can use [this](https://github.com/beckn/beckn-onix/blob/main/install/generate-ed25519-keys.go) utility script provided in ONIX to generate your keypair. You can use any other utility as well as long as it is an Ed25519 key pair and you provide the private key as the raw 32-byte Ed25519 seed and the public key as the raw 32-byte Ed25519 public key, both Base64-encoded using standard RFC 4648 Base64 with padding.

Once you click on publish the record will be published. Once published please make a note of the record ID. This will essentially be your key ID which you will configure in ONIX.

#### Step 5 - Verify your key lookup

Use the following URL to check if your key has been cached successfully by the service:

```
https://fabric.nfh.global/registry/dedi/lookup/<np_subscriber_id>/subscribers.beckn.one/<record_id_in_np_registry>
```

{% hint style="info" %}
Please allow 5-10 minutes for the cache to be updated.
{% endhint %}

#### Why this matters

Other participants use your published subscriber details to:

* resolve your endpoint during transactions
* retrieve your public key during signature verification
* validate that the requests you send are authentic and untampered

After publishing these details, your next step is to configure and deploy ONIX so it uses the same subscriber identity, key ID, and private key that correspond to the published record.


# Catalog Publishing and Discovery

How a Provider Node self-hosts and self-signs its catalog, and how a Discovery Service finds, verifies, and indexes it — with no centrally-run relay in between.

A **Provider Node (PN)** hosts its own signed catalog files and a signed catalog index on infrastructure it already controls, and every **Discovery Service (DS)** that cares about it crawls, verifies, and indexes that data directly — with no shared, centrally-run relay standing between the two. This page covers everything a PN needs to publish a catalog and everything a DS needs to find and crawl one.

For the full protocol specification behind everything on this page, see [NFH-014 — Decentralized Catalog Publishing and Discovery](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md) and [NFH-003 — The Beckn Protocol Stack](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/The_Beckn_Protocol_Stack.md).

***

## What a Provider Node needs, before anything else

Publishing is three things you set up once — get these right first, because nothing below this section works without them:

| Prerequisite                                                         | Why it's required                                                                                                                                                                                               | Where to set it up                                                                                                                                             |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **A signing key already registered on the DeDi Registry**            | Every catalog file and index entry you publish is self-signed with it — a Discovery Service has no other way to verify content came from you                                                                    | [Onboarding on the NFH fabric](/build/onboarding)                                                                                                              |
| **Public HTTPS storage for your catalog files and index**            | A crawler can only fetch what it can reach — your own domain, a CDN, an object store, or a tunnel such as ngrok while testing. This is not an NFH fabric service you sign up for; it's storage you already have | [Quickstart → Step 3](#step-3--serve-the-files-publicly)                                                                                                       |
| **`meta.catalog_index_urls` set on your Registry Subscriber record** | The only pointer a crawler has to find your index at all — this is a catalog-publishing addition on top of basic network onboarding, not part of it                                                             | [Linking your catalog index for discovery](#linking-your-catalog-index-for-discovery), [Quickstart → Step 4](#step-4--point-your-registry-record-at-the-index) |

There is no publish API call anywhere in this list — publishing a catalog is generating and hosting files, not calling a service. The [Quickstart](#quickstart--host-and-sign-your-first-catalog) below walks through all three in order.

***

## The problem

Without a shared, verifiable way to publish catalogs, NFH fabric networks fragment quickly:

* Every provider publishes through a different mechanism
* Discovery Services have no independent way to verify that what they index actually matches what a provider published
* A provider has no sovereignty over how or where its own catalog data is hosted or served
* Every provider reinvents product definitions independently

The result is duplicated effort, inconsistent search results, and no canonical source of truth.

***

## How catalog publishing works

Catalog publishing is the discipline and tooling a **Provider Node** uses to publish catalog data that any **Discovery Service** can find, verify, and index. It gives the network:

* **Full publisher sovereignty** — a PN hosts and signs its own catalog files on its own storage (an object store, a CDN, a static site); publishing never requires calling a network API
* **Independent verifiability** — every catalog file and every catalog-index entry is self-signed with the PN's Registry-anchored key, so a Discovery Service verifies content came from the PN that claims to publish it, not from an intermediary's copy of it
* **Incremental updates** — a catalog is a signed baseline plus append-only, signed change files, so a Discovery Service re-fetches only what changed since its last crawl
* **Network-wide templates** — a network can publish canonical resource definitions that providers extend, ensuring data consistency across the network
* **Granular visibility** — a catalog entry declares which networks it is relevant to, letting a network-scoped Discovery Service skip catalogs it doesn't need

A Provider Node is the **source of truth** for what it publishes — a Discovery Service never trusts a relayed copy, only the PN's own signature. Consumer applications never call a PN's catalog storage directly — they query a Discovery Service, which keeps its own index current by crawling every PN it cares about.

**High-level architecture.** A PN's publishing surface sits in two layers: the Registry layer (its manifest and Subscriber record, which change rarely) and the catalog layer (its catalog index, baselines, and change files, which change on every publish). Nothing about this surface is centrally operated — a Discovery Service reaches every layer by resolving the PN's Registry identity and then fetching directly from the PN's own storage.

**End-to-end** — from a PN hosting and signing its catalog, through a Discovery Service crawling and verifying it, to a consumer discovering the result:

```mermaid
sequenceDiagram
    participant PN as Provider Node
    participant Store as PN storage
    participant Reg as Registry
    participant DS as Discovery Service
    participant CN as Consumer Node

    Note over PN: One-time, at onboarding
    PN->>PN: Confirm its signing key is already registered on the Registry
    PN->>Store: Host catalog files, change files, and the catalog index
    PN->>Reg: Add catalog_index_urls to its Registry record's meta section, re-signed
    Note over PN,Reg: PN is now discoverable — no publish call was made

    Note over PN: On every content update
    PN->>PN: Create a new catalog baseline or change file, then sign it
    PN->>PN: Re-sign the catalog index entry
    PN->>Store: Publish the updated files and index

    rect rgb(240, 248, 255)
        Note over DS,PN: Discovery crawl (independent, on its own schedule)
        DS->>Reg: Resolve PN's Registry manifest and Subscriber record
        DS->>PN: GET the catalog index, conditionally
        PN-->>DS: Signed catalog index
        DS->>DS: Verify signature, compare entryVersion to stored cursor
        DS->>PN: GET the baseline or change files required
        PN-->>DS: Signed catalog file or change file
        DS->>DS: Verify signature and digest, apply upserts and removals
    end

    rect rgb(255, 240, 255)
        Note over CN,DS: Consumer discovery
        CN->>DS: POST /discover
        DS-->>CN: 200 OK {status: ACK, messageId}
        DS->>CN: POST /on_discover {matching catalogs}
    end
```

**Key points:**

* **Publishing writes files, it does not call an API** — a PN's own storage and its own Registry record are the only things that change
* **Crawling is pull-based and DS-initiated** — a PN never pushes to a Discovery Service, and a Discovery Service never waits on a PN to be reachable to serve `/discover`
* **Verification happens before indexing, every time** — a Discovery Service that cannot verify a signature or a digest discards the content rather than indexing it
* **`on_discover` is asynchronous** — Discovery Service calls the Consumer Node's `bapUri` with matching results, exactly as before

***

## Where you fit

| You are…                                          | Start here                                                                                     |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| A **Provider Node** publishing catalogs           | [Quickstart](#quickstart--host-and-sign-your-first-catalog) — host and sign your first catalog |
| A **Discovery Service builder** crawling catalogs | [Hosting & Discovery](#hosting--discovery)                                                     |
| A **Network Facilitator** defining templates      | [The catalog data model → Catalog types](#catalog-types)                                       |

***

## Quickstart — host and sign your first catalog

This walkthrough takes you from zero to a signed, crawlable catalog in a few minutes. By the end, you will have hosted a real catalog and its index on storage you control, pointed your Registry record at it, and confirmed the files are exactly what a Discovery Service's crawler will fetch and verify.

Two prerequisites must be in place first — both one-time setup steps for your organisation:

**1. A signing key registered on the DeDi Registry.** Your Ed25519 signing key must already be registered against your participant identity. Every catalog file and every catalog-index entry you publish is self-signed with this key — a Discovery Service resolves your public key from the Registry to verify it. See [Onboarding on the NFH fabric](/build/onboarding) if you haven't joined the NFH fabric yet — this is a prerequisite to catalog publishing, not something publishing sets up for you.

**2. Somewhere public to host static files.** Any storage that can serve plain files over HTTPS works — an object store, a CDN, a static site, even GitHub Pages. This is where your catalog files, change files, and catalog index will live. There is no service to call and no account to open with NFH fabric to publish — you're pointing at storage you already have.

### Step 1 — Prepare a minimal catalog

A catalog is a plain JSON object. Below is a small valid catalog — one provider, one resource, and one offer that references the resource.

```json
{
  "id": "CAT-FRESHMART-HELLO",
  "descriptor": {
    "name": "FreshMart Hello Catalog",
    "shortDesc": "First catalog from FreshMart"
  },
  "provider": {
    "id": "freshmart-blr-001",
    "descriptor": { "name": "FreshMart Koramangala" }
  },
  "resources": [
    {
      "id": "ITEM-BASMATI-1KG",
      "descriptor": { "name": "India Gate Basmati Rice 1KG" },
      "resourceAttributes": {
        "@context": "https://schema.beckn.io/RetailResource/2.1/context.jsonld",
        "@type": "RetailResource",
        "brand": "India Gate"
      }
    }
  ],
  "offers": [
    {
      "id": "OFFER-BASMATI-HELLO",
      "descriptor": { "name": "Basmati 1KG — Launch Offer" },
      "resourceIds": ["ITEM-BASMATI-1KG"],
      "offerAttributes": {
        "@context": "https://schema.beckn.io/RetailOffer/2.1/context.jsonld",
        "@type": "RetailOffer",
        "isActive": true
      }
    }
  ]
}
```

`resourceAttributes[].@context` declares which domain schema the resource follows, and `offers[].resourceIds` links an offer to the resources it applies to — see [The catalog data model](#the-catalog-data-model) below for the full object shape.

### Step 2 — Generate, sign, and host it with `catalog-publisher`

You don't hand-write baselines, change files, digests, or a self-signing index. The **`catalog-publisher`** plugin for [beckn-onix](https://github.com/beckn/beckn-onix) does this for you: hand it your catalog JSON, and it diffs against what you last published, produces the right kind of file (a fresh baseline the first time, an incremental change file after that), signs everything with your registered key, and writes the resulting catalog index.

The fastest way to see this end-to-end is the [starter-kit repository](https://github.com/beckn/starter-kit), which runs `catalog-publisher` on a live ONIX adapter (`onix-bpp`) with a `catalog/publish` trigger:

```bash
curl -X POST http://localhost:8082/catalog/publish \
  -H "Content-Type: application/json" \
  -d '{
    "context": { "action": "catalog/publish" },
    "message": {
      "catalogs": [ { "id": "CAT-FRESHMART-HELLO", "...": "the catalog from Step 1" } ],
      "publishDirectives": [
        { "catalogId": "CAT-FRESHMART-HELLO", "catalogType": "REGULAR" }
      ]
    }
  }'
```

This call is **unsigned and local** — it's a same-operator trigger on your own adapter, not a network API, so there's no Beckn HTTP Signature to attach here. Signing happens downstream, on the catalog files and index the plugin writes. It responds synchronously:

```json
{
  "status": "COMPLETED",
  "results": [
    { "catalogId": "CAT-FRESHMART-HELLO", "status": "ACCEPTED", "version": 1 }
  ]
}
```

Inspect the output directly — no need to exec into any container:

```
generic-devkit/data/beckn/
  index/
    becknCatalogs.index.json          # the catalog index — entryVersion, baseline, changes[], signature
  catalogs/
    CAT-FRESHMART-HELLO.v1.json.gz    # the signed baseline
    CAT-FRESHMART-HELLO.latest.json.gz
```

Publishing the same `catalogId` again with an edited catalog produces a signed **change file** and bumps the index entry's version, instead of a fresh baseline — the plugin decides this for you. See the starter-kit's [Catalog Publishing walkthrough](https://github.com/beckn/starter-kit/blob/main/README.md#catalog-publishing-catalogpublish) for the full request/response shape, and the [`catalog-publisher` plugin README](https://github.com/beckn/beckn-onix/blob/catalog-publisher/pkg/plugin/implementation/catalogpublisher/README.md) for its design.

### Step 3 — Serve the files publicly

A Discovery Service can only crawl what it can fetch over HTTPS. Point `catalogBaseURL` (in your adapter config, or the equivalent setting for whatever storage you use) at wherever the `index/` and `catalogs/` output above is actually being served from — your own domain, a CDN, or a tunnel such as ngrok for local testing. This is the only value that needs to match the domain your files are actually reachable at.

### Step 4 — Point your Registry record at the index

Add the index's public URL to your existing Registry Subscriber record's `meta.catalog_index_urls` (a list of `{url}` entries — a node may host more than one catalog index):

```json
{
  "subscriber_id": "bpp.freshmart.local-retail.net",
  "type": "BPP",
  "url": "https://bpp.freshmart.local-retail.net/beckn/",
  "meta": {
    "catalog_index_urls": [
      { "url": "https://cdn.freshmart.example/beckn/index/becknCatalogs.index.json" }
    ]
  }
}
```

That's the entire "registration" step — there is no separate catalog-specific onboarding call. A crawler has no other way to find your catalog, so this field being missing is the most common reason a published catalog never shows up in `discover` results.

### Step 5 — Test the round trip with starter-kit

If you did Steps 1–4 inside the [starter-kit](https://github.com/beckn/starter-kit) environment (recommended the first time you do this), confirm it actually works end to end rather than trusting the file layout alone:

1. Send a `discover` request from the BAP Postman collection.
2. Confirm your catalog appears in the `on_discover` results.

A crawler runs on its own schedule, not on-demand — so allow for the same crawl-cadence delay you'd see against a real network rather than expecting an instant reflection of what you just published. If it doesn't show up after a reasonable wait, re-check `meta.catalog_index_urls` on your Registry record first — a missing or wrong pointer there, with no immediate error anywhere, is the most common cause. The starter-kit's [Catalog Publishing walkthrough](https://github.com/beckn/starter-kit/blob/main/README.md#catalog-publishing-catalogpublish) and [Troubleshooting](https://github.com/beckn/starter-kit/blob/main/README.md#troubleshooting) sections cover this in more depth.

### What just happened?

You generated a signed catalog baseline and a signed catalog index using `catalog-publisher`, hosted both on storage you control, and pointed your existing Registry record at the index. No publish API was called, no ACK/NACK was exchanged, and no central service now holds a copy of your catalog — every Discovery Service that cares about your network will independently crawl, verify, and index exactly what you published, on its own schedule.

A consumer application can now find your catalog by querying any Discovery Service that crawls your network — without that Discovery Service ever calling you directly, and without you ever calling it.

***

## The catalog data model

This section builds your mental model of what you are publishing and hosting. It walks through the catalog object, its parts, and the rules that govern how a Discovery Service processes it. If you have not yet published a catalog, run the [Quickstart](#quickstart--host-and-sign-your-first-catalog) first — it will make every concept here much more concrete.

### A catalog at a glance

A **catalog** is the top-level payload you publish. It carries the identity of the publishing provider, the resources they offer, and any pricing or commercial terms attached to those resources.

Here is a complete catalog stripped to its essentials:

```json
{
  "id": "CAT-FRESHMART-2026",
  "descriptor": {
    "name": "FreshMart Daily Catalog",
    "shortDesc": "Fresh groceries — Bangalore South"
  },
  "provider": {
    "id": "freshmart-blr-001",
    "descriptor": { "name": "FreshMart Koramangala" }
  },
  "resources": [ ... ],
  "offers":    [ ... ]
}
```

A catalog must contain at least one of `resources` or `offers` — both is common. How the catalog is *processed* (its type, who it's relevant to, whether it's currently active) is declared **separately**, in the catalog's own entry in your **catalog index** — not inside the catalog object itself. See [Publishing your catalog index](#publishing-your-catalog-index) below.

### Resources

A **resource** is a domain-neutral unit of value. It can be a product SKU on a grocery shelf, an EV charging slot, a clinic appointment, a carbon credit, a job role — anything a network wants to make discoverable.

The core fields (`id`, `descriptor`) are universal. Domain-specific properties live inside `resourceAttributes`, declared using a JSON-LD `@context` and `@type`. This pattern lets any domain extend the schema without modifying the core Beckn protocol.

```json
{
  "id": "ITEM-BASMATI-RICE-1KG",
  "descriptor": {
    "name": "India Gate Basmati Rice",
    "shortDesc": "Aged basmati, 1 kg pack"
  },
  "resourceAttributes": {
    "@context": "https://schema.beckn.io/RetailResource/2.1/context.jsonld",
    "@type": "RetailResource",
    "brand": "India Gate",
    "sku": "BSMTI-1KG-IG"
  }
}
```

The `@context` URI tells consumers which schema vocabulary applies. A Discovery Service uses it during domain schema verification (see [Verification](#verification--what-a-discovery-service-checks-before-indexing)).

### Offers

An **offer** captures the commercial terms under which one or more resources can be obtained — price, discount, eligibility, validity. Offers are *separate from* resources and are linked by `resourceIds`, which means the same resource can carry multiple competing offers from different providers.

```json
{
  "id": "OFFER-BASMATI-MAY26",
  "descriptor": { "name": "May Staples Deal" },
  "resourceIds": ["ITEM-BASMATI-RICE-1KG"],
  "validity": {
    "startDate": "2026-05-01T00:00:00Z",
    "endDate":   "2026-05-31T23:59:59Z"
  },
  "offerAttributes": {
    "@context": "https://schema.beckn.io/RetailOffer/2.1/context.jsonld",
    "@type": "RetailOffer",
    "isActive": true
  },
  "considerations": [
    {
      "id": "PRICE-BASMATI",
      "considerationAttributes": {
        "@context": "https://schema.beckn.io/PriceSpecification/2.0/context.jsonld",
        "@type": "PriceSpecification",
        "value": 95,
        "currency": "INR"
      }
    }
  ]
}
```

#### Provider-level offers

An offer with **no `resourceIds`** applies to all resources published by that provider. Use this for blanket promotions, free-delivery thresholds, loyalty programmes, or any commercial term not tied to a specific resource.

```json
{
  "id": "OFFER-FREE-DELIVERY",
  "descriptor": { "name": "Free delivery on orders above ₹500" },
  "offerAttributes": {
    "@context": "https://schema.beckn.io/RetailOffer/2.1/context.jsonld",
    "@type": "RetailOffer",
    "isActive": true
  },
  "considerations": [
    {
      "id": "DELIVERY-WAIVER",
      "considerationAttributes": {
        "@context": "https://schema.beckn.io/PriceSpecification/2.0/context.jsonld",
        "@type": "PriceSpecification",
        "value": 0,
        "currency": "INR",
        "components": [
          { "type": "DELIVERY", "value": 0, "currency": "INR" }
        ]
      }
    }
  ]
}
```

#### Offer-only catalogs

A catalog can contain offers without any resources of its own. This is how a provider publishes pricing overlays or promotions that reference resources published *by another provider*. The catalog must still carry `id`, `descriptor`, and `provider` — only `resources` is omitted.

> **Discoverability:** Offer-only catalogs and provider-level offers are not independently discoverable via resource search. A Discovery Service resolves and attaches these offers to matching real resources at query time. If no matching real resources exist in the Discovery Service, the offers will not appear in search results.

### Provider

The `provider` block identifies who is publishing the catalog and where they operate. The `availableAt` array carries geo-coordinates and address, enabling spatial search on Discovery Services.

| Field         | Required | Description                                                                                                                                                                |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`          | yes      | Stable provider identifier within the publisher's namespace                                                                                                                |
| `descriptor`  | yes      | `name`, optional `shortDesc`, `longDesc`, `thumbnailImage`                                                                                                                 |
| `availableAt` | no       | Array of `Location` objects — `geo` (GeoJSON Point) + `address` (structured postal address). Resources inherit provider locations; there is no per-resource location field |
| `rating`      | no       | Aggregate rating across the provider's resources                                                                                                                           |

```json
{
  "id": "freshmart-blr-001",
  "descriptor": {
    "name": "FreshMart Koramangala",
    "shortDesc": "Neighbourhood grocery, open 7am–10pm"
  },
  "availableAt": [
    {
      "geo": { "type": "Point", "coordinates": [77.6278, 12.9352] },
      "address": {
        "streetAddress": "42 80-Feet Road, Koramangala 4th Block",
        "addressLocality": "Bengaluru",
        "addressRegion": "Karnataka",
        "postalCode": "560034",
        "addressCountry": "IN"
      }
    }
  ]
}
```

### Catalog types

Every catalog is one of two types, declared via `catalogType` in `publishDirectives`.

#### REGULAR

A commercial catalog published by a **Provider Node**. Resources represent what the provider is currently offering. REGULAR catalogs can contain resources, offers, or both. Most catalogs on a network are REGULAR.

#### MASTER (template)

A **master catalog** is a network-wide template published by a **network facilitator or domain authority**. It defines the canonical specification for a class of product or service — authoritative name, brand identity, schema type, unit of measure, and any other attributes the network wants to standardise across all providers.

**Why templates exist.** Without templates, every provider on a network independently defines the same product — different naming conventions, inconsistent schema types, missing attributes, conflicting brand spellings. A master resource establishes one authoritative definition that all providers on the network build from. When a consumer searches for "India Gate Basmati Rice 1KG", every store's listing refers back to the same canonical resource — ensuring consistent data across the entire network.

> Master catalogs **do not contain offers**. They are pure resource definitions. Pricing, promotions, and commercial terms belong in REGULAR catalogs.

#### Extending a master in a REGULAR catalog

A Provider Node extends a master resource using `resourceDirectives` inside `publishDirectives`. The provider supplies only the fields unique to their offering — local pricing, stock status, location — and inherits everything else from the template.

```json
"resourceDirectives": [
  {
    "resourceId": "MY-LOCAL-BASMATI",
    "extends": { "masterResourceId": "MASTER-INDIA-GATE-BASMATI-1KG" }
  }
]
```

**Template attributes are immutable.** The provider can *add* new fields but cannot change values defined by the template. This is what guarantees consumers see consistent, authoritative data — canonical brand name, schema type, fixed specifications — regardless of which provider's catalog they are looking at. For the full schema of `publishDirectives` and `resourceDirectives`, see [NFH-014 — Decentralized Catalog Publishing and Discovery](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md).

### Publishing your catalog index

Your **catalog index** is a signed file you host yourself, listing every catalog you offer. Each entry — matched to one of your catalogs by `catalogId` — carries the metadata that used to live in a message-level publish directive: catalog type, which networks it's relevant to, whether it's currently active, and where to fetch its current baseline and change files.

```json
{
  "nodeId": "bpp.freshmart.local-retail.net",
  "next_update": "2026-07-24T09:00:00Z",
  "catalogs": [
    {
      "catalogId": "CAT-FRESHMART-2026",
      "entryVersion": 7,
      "catalogType": "REGULAR",
      "networkIds": ["local-retail.net/grocery-net"],
      "isActive": true,
      "baseline": { "version": 12, "url": "https://cdn.freshmart.example/beckn/CAT-FRESHMART-2026.v12.json", "size": 48213, "digest": "sha256:..." },
      "changes": [
        { "version": 13, "url": "https://cdn.freshmart.example/beckn/changes/CAT-FRESHMART-2026.v13.changes.json", "digest": "sha256:..." }
      ]
    }
  ]
}
```

The `catalog-publisher` tool (see [Publishing tooling](#publishing-tooling--the-catalog-publisher)) generates and re-signs this index for you on every publish — you supply the catalog content, it works out whether that's a fresh baseline or an incremental change file, and keeps the index's digests, `entryVersion`, and signature in sync automatically.

#### Update modes — baseline vs. change files

Where the old model had a per-catalog `updateMode` on a publish request, incremental delivery is now expressed structurally, as two kinds of file the index points a Discovery Service at:

* **A change file** (the equivalent of `MERGE`) — carries only the resources and offers added, updated, or removed since the previous version, keyed by id. A DS applies it as an upsert/removal patch on top of what it already has.
* **A baseline** (the equivalent of `FULL`) — a complete, self-contained snapshot of the catalog's current resources and offers. Published fresh when a PN chooses to compact an accumulated chain of change files, or whenever a DS is too far behind to catch up incrementally.

A DS decides which to fetch based on how far behind its own cursor is — see [Incremental updates](#incremental-updates) for the crawl-side cutover rule.

#### Visibility — `networkIds`

A catalog entry's `networkIds` declares which NFH fabric networks it's relevant to. A network-scoped Discovery Service uses this to skip catalogs it doesn't need to index, without fetching them first.

```json
{
  "catalogId": "CAT-WHOLESALE-2026",
  "catalogType": "REGULAR",
  "networkIds": ["acme.net/distributor-net", "acme.net/wholesale-net"]
}
```

**When `networkIds` is omitted**, the catalog is relevant to every Discovery Service that crawls your index — this is the catch-all path, and it lets a Provider Node publish without explicit network configuration and still be broadly discoverable across the NFH fabric. Unlike the old centralized model, `networkIds` is a **relevance filter, not an access gate** — catalog access is uniformly public; any party with a file's URL can fetch it. A network operator's own membership registry, not this field, governs which catalogs a network-scoped DS chooses to trust and surface.

### Ownership

Ownership is not something a central service enforces on your behalf — it's a direct consequence of self-signing. **A catalog belongs to whoever holds the Registry-registered signing key it's signed with.** A Discovery Service verifies every catalog file and index entry against the key registered for your domain; nobody else can produce a signature that verifies against your key, so nobody else can publish an update a DS will accept as coming from you.

**Catalog ownership.** Only you can publish a new version of a `catalogId` you've already published, because only you hold the key it was originally signed with. There is no separate "ownership check" step — a DS simply never indexes content it can't verify against the key on file for your domain.

**Template resource integrity.** Master resources are published and signed by the network facilitator. Any Provider Node can extend a template with `resourceDirectives[].extends`, but the template's defined values are inherited as-is — a DS applies your own fields on top of the master's, never the reverse, so you can add fields but cannot override what the facilitator's own signed file declares.

**Key rotation.** Add your new key to your Registry manifest and start signing new content with it; let already-published content signed by the old key age out naturally rather than eagerly re-signing your entire catalog history. Retiring a key because it was compromised is different — content signed by a key being revoked for compromise must be re-signed or accepted as unverifiable. See [NFH-014 §10.1](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md#101-onboarding-and-steady-state-publish) for the full rationale.

### Verification — what a Discovery Service checks before indexing

There is no central validation step your publish request waits on. Instead, every Discovery Service that crawls your catalog independently runs the same checks before it will index anything:

1. **Registry manifest and Subscriber record signature** — resolved via the same DeDi lookup every actor already uses.
2. **Catalog index signature** — verified against your Registry-registered key before anything in the index is trusted.
3. **File digest** — every baseline or change file's bytes must match the digest declared in the (now-trusted) index.
4. **File signature** — each catalog file and change file carries its own detached signature over its own content.
5. **Domain schema conformance** — a resource's `resourceAttributes`, an offer's `offerAttributes`, and a consideration's `considerationAttributes` must conform to the domain schema declared in their `@context` URI, exactly as before.

A file that fails any of these checks is discarded — never indexed, never partially applied. Because this verification happens at crawl time, on the DS side, rather than synchronously at your publish time, there's no ACK/NACK round-trip to wait on when you publish: the `catalog-publisher` tool validates structure locally, before you ever write a file to storage, and a Discovery Service's own crawl log is where you'd see a downstream verification failure (see [Error handling](#error-handling)).

### Catalog lifecycle — active, paused, retired

A catalog entry in your index carries `isActive`, which you can toggle freely in either direction — a paused catalog stays fully indexed by every DS that has already crawled it, just excluded from what they treat as currently transactable. Retiring a catalog is one-way: populate the entry's `retiredAt` before you stop publishing updates for it, and never unset it. A DS treats a `retiredAt` entry as no longer offered and stops serving it via `/on_discover` — but it never infers retirement from your catalog simply disappearing from the index, since that could just as easily be a partial crawl on its end. See [NFH-014 §10.4](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md#104-catalog-entry-lifecycle) for the full state machine.

***

## Hosting & Discovery

A catalog you publish is not pushed anywhere — there is no subscription to register and no push endpoint to implement. Every Discovery Service that cares about your network **crawls, verifies, and indexes your catalog directly**, on its own schedule, by resolving your Registry record and fetching from your own storage. This section explains what a Discovery Service does with what you've hosted, so you can host it correctly and reason about how quickly your updates propagate. For the full crawl and verification specification this section summarizes, see [NFH-014 §10.2 — Discovery crawl](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md#102-discovery-crawl).

### How a Discovery Service finds your catalog

A crawl pass has three phases: resolve your identity, fetch and verify your index, then fetch and verify only what has changed.

```mermaid
sequenceDiagram
    actor DS as Discovery Service
    participant Reg as Registry
    participant PN as PN storage

    DS->>Reg: Enumerate PNs relevant to a networkId
    DS->>PN: GET the Registry manifest at the well-known path, conditionally
    PN-->>DS: Registry manifest, signed
    DS->>DS: Verify the manifest signature against the Registry-registered key
    DS->>PN: GET the Beckn Subscriber record referenced by the manifest
    PN-->>DS: Subscriber record, including meta.catalog_index_urls, signed
    DS->>DS: Verify the Subscriber record digest against the manifest
    DS->>PN: GET each catalog_index_urls entry, conditionally
    PN-->>DS: Catalog index, self-signing per entry
    loop for each catalog entry
        DS->>DS: Verify the entry signature, compare entryVersion and content-lineage versions to the stored cursor
        alt entry unchanged
            DS->>DS: Skip, nothing to fetch
        else entry changed
            DS->>PN: GET the baseline or change files required by the cutover rule
            PN-->>DS: Catalog file or change file, self-signed
            DS->>DS: Verify the file signature and digest, schema-validate, apply upserts and removals, advance the cursor
        end
    end
    Note over DS: Consumers query /discover against this index, they never wait on a crawl
```

A DS must perform every verification step shown above before indexing any catalog content, and must not index a catalog file or catalog-index entry that fails any of them. A DS should use conditional HTTP requests (`ETag`/`If-Modified-Since`) so an unchanged catalog costs it one cheap poll, not a re-fetch.

**Enumerating PNs.** A crawler either enumerates candidate domains and reads each one's Registry manifest itself, or uses a registry service that caches records with a reverse lookup ("which index URIs are relevant to me"). Either is conformant — a registry service is never treated as an authority, since every file a DS ingests is still verified at its own source.

**How a DS notices a brand-new PN.** There is no publish-time event a PN emits and no subscription a DS registers — a new publisher is simply picked up the next time a DS re-runs its own enumeration pass over the Registry for the `networkId`(s) it cares about. The moment a PN's Registry record carries `meta.catalog_index_urls`, it's a normal candidate on the DS's next pass; there is no separate "new node" fast path. This is why both halves of [Before you're crawlable](#before-youre-crawlable) need to already be true *before* you expect to show up — a DS has no way to notice you sooner than its own enumeration cadence, other than the optional out-of-band change signal in [NFH-014 §10.6](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md#106-async-trigger-conditions), which still requires the DS to fully verify everything itself before trusting it.

### Before you're crawlable

Before any Discovery Service will find your catalog, two things must be true:

| Requirement                                                                   | What it's for                                                                                                                     |
| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Your catalog files and index are hosted at a publicly reachable HTTPS URL** | A crawler can only fetch what it can reach — your own domain, a CDN, an object store, or a tunnel such as ngrok for local testing |
| **`meta.catalog_index_urls` is set on your Registry Subscriber record**       | The only pointer a crawler has to find your index in the first place                                                              |

Neither of these is a call to any NFH fabric API — see [Quickstart](#quickstart--host-and-sign-your-first-catalog) for hosting your first catalog and registering the pointer.

### Incremental updates

Each catalog entry in your index carries a **baseline** (the latest full snapshot) and a list of **changes** files, one per publish, each holding only the resources and offers added, updated, or removed since the previous version. A crawler remembers the last version it applied:

* **Slightly behind** — fetch only the change files after its cursor.
* **New, or far behind** — fetch the baseline, then the changes after it.
* **Changes too large relative to the baseline** — the *cutover rule*: if the combined size of pending change files exceeds a threshold fraction of the baseline's size, a DS should fetch the baseline instead — it's cheaper.

```mermaid
flowchart LR
  C["Crawler<br/>(remembers last version)"]
  IDX["Index head"]
  SEG["change files<br/>(small)"]
  BASE["baseline<br/>(full catalog)"]

  C -->|"read"| IDX
  IDX -->|"a little behind"| SEG
  IDX -->|"new / far behind /<br/>changes too large"| BASE
```

**Compaction.** When your change-file chain grows long, you may fold everything into a fresh baseline: publish the new full file at a new URL, point the index's `baseline` at it, and keep — not merely host, keep listed — the superseded change files for at least one full `next_update` cycle, so a crawler mid-lineage can still reach the new baseline by applying diffs. A crawler needs no special handling for compaction — its rule is already complete: if the changes it needs are listed, take them; otherwise take the baseline.

The `catalog-publisher` tool computes diffs, digests, and compaction for you (see [Publishing tooling](#publishing-tooling--the-catalog-publisher)) — you supply the current catalog content and it decides what kind of file to write.

### Error handling

A Discovery Service that cannot verify something discards it — it never indexes unverified content, and it never treats an absence as proof of removal.

| What the DS observes                                                                                                                    | What it does                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A catalog file's digest doesn't match the index entry's declared digest                                                                 | Discards the file; does not index it; logs the failure                                                                                                                            |
| A catalog file's own signature fails verification                                                                                       | Discards; does not index; logs                                                                                                                                                    |
| A catalog-index entry's signature fails verification                                                                                    | Discards the entry and all its files; does not index; logs                                                                                                                        |
| `entryVersion` or a content-lineage version regresses relative to the stored cursor                                                     | Flags as a possible rollback/tamper condition; does not apply the regressed content                                                                                               |
| A previously-indexed `catalogId` is missing from a later, successfully-fetched, validly-signed index, with no `retiredAt` ever observed | Treats this as a possible incomplete crawl, not a removal — logs it, re-verifies next cycle, and does **not** delete the catalog's previously-indexed content on that basis alone |

See [NFH-014 §10.5](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md#105-error-flows) for the complete error-flow table.

### Master/Regular resolution

A REGULAR catalog's index entry carries `dependencies.masters`, pointing at the MASTER catalog(s) its resources extend:

```json
"dependencies": {
  "masters": [
    { "catalogId": "open-economy.nfh.global/electronics-master", "version": 12, "indexUrl": "https://cdn.open-economy.nfh.global/beckn/catalog-index.json" }
  ]
}
```

A DS inherits attributes from a REGULAR resource's declared MASTER resource, with the REGULAR resource's own fields taking precedence — the same merge semantics as before. `indexUrl` is a hint, not a trust delegation: a DS must verify whatever it fetches via `indexUrl` exactly as it would via ordinary discovery, and must fall back to standard Registry resolution if the hint is stale, unreachable, or fails verification.

***

## Linking your catalog index for discovery

Hosting signed files is not, by itself, enough to be found — a Discovery Service has exactly one way to locate your catalog index, and it's this link. This is deliberately separate from basic NFH fabric onboarding ([Onboarding on the NFH fabric](/build/onboarding)), because it's a catalog-publishing addition on top of that base flow, not a step inside it — a consumer node or a provider node that never publishes catalogs never needs it.

**Where it lives.** Your Beckn Subscriber record — the same record you already publish for basic identity and routing — carries a `meta` object alongside its base fields. `catalog_index_urls`, inside `meta`, is a list of `{url}` entries, one per catalog index you host:

```json
{
  "subscriber_id": "bpp.freshmart.local-retail.net",
  "type": "BPP",
  "url": "https://bpp.freshmart.local-retail.net/beckn/",
  "meta": {
    "catalog_index_urls": [
      { "url": "https://cdn.freshmart.example/beckn/index/becknCatalogs.index.json" }
    ]
  }
}
```

**Why a list, not a single URL.** A node can host more than one catalog index — for example, a platform onboarding many providers as one node keeps one catalog index per provider, or a node participating in more than one network segments its catalogs across indexes. Every entry is just another `{url}` a crawler adds to what it resolves for you; nothing about the shape changes whether you host one index or several.

**Why this is easy to miss.** `catalog_index_urls` is not part of the base Subscriber record schema every network participant fills in — it's an addition specific to catalog publishing, living under a generic `meta` object. A provider node can complete ordinary network onboarding, register a signing key, and start transacting entirely correctly, while still never having set this field — and nothing in that flow will tell you it's missing. The only symptom is silent: your catalog never appears in `discover` results, with no error anywhere.

**How to know it's working.** There is no confirmation callback — you're editing a record, not calling an API. Verify it yourself:

1. Re-fetch your own Subscriber record from the Registry and confirm `meta.catalog_index_urls` is present and points at a URL that's actually reachable (`curl` it directly).
2. Confirm that URL serves your current, signed catalog index — not a 404, not a stale copy.
3. Run an actual `discover` request against a Discovery Service that crawls your network and confirm your catalog shows up — see [Quickstart → Step 5](#step-5--test-the-round-trip-with-starter-kit) for a concrete way to do this with starter-kit.

A DS has no separate signal for "this specific field just changed" — it picks up a new or updated `catalog_index_urls` value the same way it picks up everything else about you: on its own next crawl pass. See [How a Discovery Service finds your catalog](#how-a-discovery-service-finds-your-catalog) for exactly how that works.

***

## Publishing tooling — the catalog-publisher

Hand-generating signed baselines, change files, digests, and a self-signing index is not something a publisher should do by hand. **`catalog-publisher`** — a plugin for [beckn-onix](https://github.com/beckn/beckn-onix) — does this for you: it diffs each new catalog submission against what you last published, produces a fresh baseline or an incremental change file as appropriate, computes digests, signs everything with your registered key, and writes the resulting catalog index.

The [starter-kit repository](https://github.com/beckn/starter-kit) runs `catalog-publisher` end-to-end as a working example — a `catalog/publish` trigger on a live ONIX adapter that writes real signed catalog files and an index to disk, served publicly so a crawler can pick them up. It's the fastest way to see the whole shape (files on disk, the index format, `catalogBaseURL`, the Registry's `catalog_index_urls`) before wiring up your own storage. See its [Catalog Publishing walkthrough](https://github.com/beckn/starter-kit/blob/main/README.md#catalog-publishing-catalogpublish) and the [`catalog-publisher` plugin README](https://github.com/beckn/beckn-onix/blob/catalog-publisher/pkg/plugin/implementation/catalogpublisher/README.md) for the full design and configuration reference — an AI agent building a publisher integration should read both before writing any code.

***

## Example use case

A multi-brand EV charging network wants to list all its charging stations nationwide. The network facilitator first publishes a **master (template) catalog** defining canonical charging resource schemas — connector types, power levels, tariff structures — self-hosted and signed like any other catalog.

Each charging operator then publishes a **REGULAR catalog** extending the master templates, adding their specific stations, live availability, and pricing, hosted on their own storage and pointed to from their own Registry record. Every Discovery Service that crawls the network verifies each submission independently and indexes what it can verify.

One such Discovery Service — NFH fabric DISCOVR — makes the data available for discovery. A mobility app queries DISCOVR for "CCS2 chargers above 50 kW near Bangalore" and gets real-time results from multiple operators in a single response.

***

## The NFH fabric capability: Cataloguing

Catalog publishing and discovery realises the NFH fabric **Cataloguing** capability — a canonical surface for publishing offerings (items, prices, providers, locations, terms) to the entire network in one motion. Catalogues live in NFH fabric; transactions happen off it.

**What it gives you**

* **Publish once, on your own terms** — self-hosted, self-signed, network-wide reach.
* **Provider identity** — every offering tied to a Registry identity.
* **Structured schemas** — typed items, prices, terms, quantities, geos.
* **Versioning** — offerings change without breaking crawlers, via a signed baseline plus incremental change files.
* **Multi-network publishing** — the same offering can appear in multiple networks via policy.

**Where it sits** — a publishing discipline and reference tooling NFH defines and maintains (the `catalog-publisher` plugin, demonstrated in starter-kit) plus the protocol NFH defines (the schemas for offerings, items, providers, catalog files, and the catalog index), and [DISCOVR](/product-documentation/products/discovr) as the discovery surface that crawls and serves it.

**Standards alignment:** Beckn Protocol v2 catalogue schemas · JSON-LD · [NFH-014 — Decentralized Catalog Publishing and Discovery](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md).


# Configuring network policies

Once the network environment exists, the network facilitator can define rules that apply across that network.

Once the network environment exists, the network facilitator can define rules that apply across that network. In NFH fabric, these rules are configured at the network level through a manifest published by the Network Facilitator Organization (NFO) for a specific `networkId`.

This allows all participants on that network to discover the same policy configuration and apply it consistently.

### What network policy configuration does

Network policy configuration gives the NFO a standard way to publish:

* which policy artifacts apply to the network
* where those policy artifacts are hosted
* how participants should evaluate them

In practice, this means the network can enforce shared business and validation rules without each participant implementing a separate, custom integration.

### The role of the manifest

The manifest is the network-level configuration document associated with a specific registry and `networkId`. It is typically published as a signed YAML file and linked from the metadata of the NFO's network registry.

Participants use the manifest to discover:

* the policy source type
* the artifact URL
* the evaluation query path
* the signing key information required for verification
* the governance validity window for that release

### Registry metadata required for policy discovery

The NFO registry should expose metadata that points to the manifest and its signature material.

The key fields are:

* `manifestUrl`
* `manifestSignatureUrl`
* `signingPublicKeyLookupUrl`

This allows participants and ONIX instances to fetch the manifest and verify that it was published by the expected network authority.

### Policy configuration in the manifest

The manifest defines policy configuration inside the `policies` section.

At a high level:

* `type` identifies the policy language
* `source` identifies how the policy is distributed
* either a `bundle` section or a `file` section describes the final published artifact

#### Example using an OPA bundle

```yaml
policies:
  type: "rego"
  source: "bundle"

  bundle:
    id: "network-policy-bundle"
    url: "https://example.org/policies/bundle.tar.gz"
    policyQueryPath: "data.retail.policy.result"
    signingPublicKeyId: "key-reg/prod-policy-key"
```

#### Example using a single Rego file

```yaml
policies:
  type: "rego"
  source: "file"

  file:
    id: "network-policy-file"
    url: "https://example.org/policies/network.rego"
    policyQueryPath: "data.retail.policy.result"
    signed: true
    signatureUrl: "https://example.org/policies/network.rego.sig"
    signingPublicKeyId: "key-reg/prod-policy-key"
```

### Supported policy distribution models

At present, network policies can be distributed in two ways:

* as an **OPA bundle**
* as a single **Rego file**

Exactly one of these should be used for a given policy reference in the manifest.

The `policyQueryPath` identifies the decision rule that participants should evaluate from that policy artifact.

### Recommended configuration flow

Use the following sequence when configuring policies for a network:

1. Decide which rules should be enforced at the network level.
2. Prepare the final published policy artifact for those rules.
3. Publish the artifact at a stable URL.
4. Add the `policies` section to the manifest for the target `networkId`.
5. Sign and publish the manifest.
6. Update the NFO registry metadata so participants can discover the latest manifest.

### Detailed guides

Use the following pages for the detailed operational steps:

* 3.3.1 [Creating and publishing the network manifest](/build/creating-a-network/network-policies/network-manifest)
* 3.3.2 [Creating and publishing Rego policy artifacts](/build/creating-a-network/network-policies/rego-policies)


# Creating and publishing the network manifest

This guide explains how a Network Facilitator Organization (NFO) can create, publish, and maintain a network manifest for an NFH fabric network.

## Guide for NFOs - Creating & Publishing Network Manifest

This guide explains how a Network Facilitator Organization (NFO) can create, publish, and maintain a network manifest for an NFH fabric network. The manifest is the control document for a given networkId and allows the NFO to publish network-level configuration in a discoverable, versioned, and verifiable way.

### 1. Overview

In NFH fabric, the networkId is tied to a specific registry maintained by the NFO. That registry represents the network boundary and acts as the network's root of trust. The network manifest is a signed YAML document associated with that registry and serves as the main release document for network-level configuration.

Participants can use the manifest to discover:<br>

* which policies apply to the network
* where those policy artifacts are hosted
* whether observability is enabled
* where telemetry configuration and collector endpoints are defined<br>

The manifest itself can be hosted by the NFO at any stable URL. The URL and signature metadata are then published as metadata on the NFO's network registry, allowing participants to resolve the current network configuration for that networkId.

### 2. Where the manifest is referenced

The NFO should attach manifest-related metadata to the network registry on DeDi Global. This allows participants and ONIX instances to discover the manifest for a specific networkId.

The registry metadata should contain:

| Field                     | Description                                                        |
| ------------------------- | ------------------------------------------------------------------ |
| manifestUrl               | URL of the network manifest file                                   |
| manifestSignatureUrl      | URL of the detached signature for the manifest                     |
| signingPublicKeyLookupUrl | Lookup URL of the public key used to verify the manifest signature |

The signing public key referenced here should be retrievable through the registry lookup URL so that participants can verify the authenticity and integrity of the manifest.

### 3. Relationship between registry and network ID

The networkId is formed from:

```
<nfoDomain>/<registryName>
```

For example:

```
example-nfo.com/production
```

This means each network registry has its own manifest and its own network configuration. In practice, NFOs usually maintain separate registries and manifest for each environment boundary they are defining using their registries.

### 4. Manifest structure

The manifest is a YAML document for a specific network release. A typical manifest looks like this:

```
manifestVersion: "1.0"
manifestType: "network-manifest"

networkId: "nfo.com/production"
releaseId: 2026.02

publisher:
  role: "NFO"
  domain: "nfo.example.org"

policies:
  type: "rego"
  source: "bundle"

  bundle:
    id: "network-policy-bundle-v0.1"
    url: "https://nfo.example.org/policies/network-policy-bundle-0.1.tar.gz"
    policyQueryPath: "data.retail.validation.result"
    signingPublicKeyLookupUrl: "ac0bc933-3862-481d-ac8b-d87642a5e994"

observability:
  enabled: true

  config:
    url: "https://nfo.example.org/observ/fields.yaml"
    signed: true
    signatureUrl: "https://nfo.example.org/observ/fields.yaml.sig"
    signingPublicKeyLookupUrl: "ac0bc933-3862-481d-ac8b-d87642a5e994"

  collector:
    url: "https://telemetry.nfo.example.org/v1/network/events"

governance:
  effectiveFrom: "2026-03-10T00:00:00Z"
  effectiveUntil: "2027-03-10T00:00:00Z"
  signed: true
```

### 5. Top-level fields

| Field           | Required | Description                                      |
| --------------- | -------- | ------------------------------------------------ |
| manifestVersion | Yes      | Version of the manifest schema                   |
| manifestType    | Yes      | Must be network-manifest                         |
| networkId       | Yes      | Network the manifest applies to                  |
| releaseId       | Yes      | Release identifier for this manifest version     |
| publisher       | Yes      | Publisher identity information                   |
| policies        | No       | Policy distribution and evaluation configuration |
| observability   | No       | Telemetry and observability configuration        |
| governance      | Yes      | Validity period and signature state              |

#### Publisher

| Field  | Required | Description                       |
| ------ | -------- | --------------------------------- |
| role   | Yes      | Publisher role, typically NFO     |
| domain | Yes      | Domain representing the publisher |

### 6. Defining policies in the manifest

The manifest can point to network policies written in Rego. Policies may be distributed either as:

* an OPA bundle
* a single Rego file

The policies section must declare the source format and the evaluation query path.

#### Policy section rules

* type must currently be rego
* source must be either bundle or file
* exactly one of bundle or file must be present

#### Example using an OPA bundle

```
policies:
  type: "rego"
  source: "bundle"

  bundle:
    id: "network-policy-bundle"
    url: "https://example.org/policies/bundle.tar.gz"
    policyQueryPath: "data.retail.policy.result"
    signingPublicKeyLookupUrl: "key-reg/prod-policy-key"
```

#### Example using a single Rego file

```
policies:
  type: "rego"
  source: "file"

  file:
    id: "network-policy-file"
    url: "https://example.org/policies/network.rego"
    policyQueryPath: "data.retail.policy.result"
    signed: true
    signatureUrl: "https://example.org/policies/network.rego.sig"
    signingPublicKeyLookupUrl: "https://fabric.nfh.global/dedi/lookup/nfo.org/key-reg/prod-policy-key"
```

The `policyQueryPath` field should point to the decision rule that participants evaluate for that policy artifact.

### 7. Creating and publishing policy artifacts

Detailed guidance for policy authors, including the expected policy output contract, repository structure, build steps, signing flow, testing process, and publication of the final artifact, is covered in the separate guide: [Creating and publishing Rego policy artifacts](/build/creating-a-network/network-policies/rego-policies).

In the manifest, the NFO only needs to reference the final published artifact using the appropriate bundle or file section.

### 8. Defining observability in the manifest

The manifest can also define network observability settings. This allows the NFO to standardize what telemetry participants emit and where that telemetry is sent as part of the network release.

#### Observability fields

| Field                                   | Required    | Description                              |
| --------------------------------------- | ----------- | ---------------------------------------- |
| observability.enabled                   | Yes         | Enables observability when true          |
| observability.config.url                | Conditional | URL of the observability config document |
| observability.config.signed             | Conditional | Whether the config is signed             |
| observability.config.signatureUrl       | Conditional | Detached signature URL when signed       |
| observability.config.signingPublicKeyId | Conditional | Key identifier used for verification     |
| observability.collector.url             | Conditional | Endpoint receiving telemetry events      |

#### Example

```
observability:
  enabled: true

  config:
    url: "https://nfo.example.org/observ/fields.yaml"
    signed: true
    signatureUrl: "https://nfo.example.org/observ/fields.yaml.sig"
    signingPublicKeyLookupUrl: "key-reg/prod-policy-key"

  collector:
    url: "https://telemetry.nfo.example.org/v1/network/events"
```

The observability config document can describe required and optional telemetry fields or other network-wide telemetry rules. Participants should verify the configuration before using it. Please refer the [observability guide](https://github.com/beckn/beckn-onix/blob/main/pkg/plugin/implementation/otelsetup/OBSERVABILITY.md#audit-fields-configuration-configaudit-fieldsyaml) for the understanding the `config.url` parameter and how observability can be set up in ONIX.

### 9. Governance section

The governance section defines the validity window of the manifest.

Example:

```
governance:
  effectiveFrom: "2026-03-10T00:00:00Z"
  effectiveUntil: "2027-03-10T00:00:00Z"
  signed: true
```

#### Governance rules

* effectiveFrom defines when the manifest becomes active
* if effectiveUntil is present, it must be later than effectiveFrom
* once the current time passes effectiveUntil, the manifest should be treated as expired
* if the manifest is signed, the detached signature and key lookup information must be available through registry metadata

### 10. Suggested publishing workflow

Use this sequence when publishing or updating a manifest:

1. Create or update policy artifacts.
2. Create or update observability configuration if required.
3. Publish all referenced files at stable URLs.
4. Create the manifest YAML for the target networkId.
5. Sign the manifest. You can use [this guide](/build/creating-a-network/network-policies/signing-files) to sign the manifest file.
6. Publish the manifest and detached signature.
7. Update the NFO registry metadata with manifestUrl, manifestSignatureUrl, and signingPublicKeyLookupUrl.
8. Roll out the new release and communicate the new releaseId to participants if needed.

{% hint style="info" icon="lightbulb" %}
Once published, NPs can configure the same on their ONIX instances using the [policy checker](https://github.com/beckn/beckn-onix/tree/main/pkg/plugin/implementation/opapolicychecker) plugin.
{% endhint %}

### 11. Operational recommendations

* version releases clearly using releaseId
* keep artifact URLs stable and preferably immutable
* test policies before publishing them into production manifests
* avoid mixing unrelated policy changes and observability changes in one release unless necessary
* ensure registry metadata always points to the currently intended manifest for that network

The manifest is the NFO's main distribution mechanism for network-level configuration. Treat it as a versioned, signed contract between the NFO and all participants operating on that networkId.

<br>


# Creating and publishing Rego policy artifacts

This guide explains how Network Facilitating Organizations (NFOs) can author policies in Rego, package them as OPA bundles, or a single rego file, publish…

This guide explains how Network Facilitating Organizations (NFOs) can author policies in Rego, package them as OPA bundles, or a single rego file, publish them, and refer them in DeDi so that they can be discovered and evaluated for a specific networkId.

### 1. Overview

Policies in the network are distributed as OPA bundles or a single rego file.

Each bundle:

* contains one or more Rego policy modules
* may include policy data
* exposes a decision rule that returns a validation result
* is signed to ensure integrity
* should be referenced in the network manifest by the NFO

For a given networkId, all applicable policy bundles are fetched and evaluated together.

A request is considered valid only if all applicable policies return valid=true.

### 2. Create Rego Policies and Decision Rule

Policies must be written in Rego and must expose a decision rule that returns the evaluation result.

Every policy bundle (or the rego file in case of a single rego file) must define a rule that returns:

```
{
  "valid": true | false,
  "violations": ["string"]
}
```

#### Field descriptions

| Field      | Description                                            |
| ---------- | ------------------------------------------------------ |
| valid      | Indicates whether the input satisfies the policy rules |
| violations | List of violations detected during evaluation          |

#### Example policy

The following example ensures that message.order.items.quantity.count is greater than zero.

package retail.policy

```
default result := {
  "valid": true,
  "violations": []
}

result := {
  "valid": count(violations) == 0,
  "violations": violations
}

violations contains msg if {
  some item in input.message.order.items
  item.quantity.count <= 0
  msg := "message.order.items.quantity.count must be greater than 0"
}
```

#### Example query path

The rule path must be recorded in the registry:

data.retail.policy.result

This value must be configured as policyQueryPath.

### 3. Organize the Policy Repository

OPA does not require a fixed repository layout.

Example repository:

```
repo/
  retail-policy/
    validation.rego
    pricingRules.rego
    data.json

  prod-policy/
    prodValidation.rego
```

#### Bundle files

| File      | Purpose                  |
| --------- | ------------------------ |
| .rego     | Policy logic             |
| data.json | Optional structured data |
| .manifest | Bundle metadata          |

The .manifest file is automatically created when building bundles.

### 4. Build and Sign the OPA Bundle or Rego File

To sign a single rego file please follow the instructions in [Signing a single file](/build/creating-a-network/network-policies/signing-files).

To sign an OPA bundle, download the OPA CLI from:

<https://www.openpolicyagent.org/docs#1-download-opa>

Once installed, build and sign a bundle:

```
opa build \
  --bundle retail-policy/ \
  --signing-key private.pem \
  --signing-alg ES256 \
  -o retail-bundle.tar.gz
```

This command:

* packages policy modules and data
* generates a .manifest
* signs the bundle
* creates .signatures.json inside the bundle

Reference:[ https://www.openpolicyagent.org/docs/management-bundles](https://www.openpolicyagent.org/docs/management-bundles)

You can use openssl to generate an ECDSA P-256 keypair compatible with `ES256` for signing your bundle:

```
# GENERATE PRIVATE KEY
openssl ecparam -name prime256v1 -genkey -noout -out private.pem

# GENERATE PUBLIC KEY
openssl pkey -in private.pem -pubout -out public.pem

# Keys will be saved as private.pem and public.pem
```

### 5. Testing Policies Before Publishing

Before publishing bundles, authors must test the policies.

This ensures that:

* bundles load correctly
* there are no namespace conflicts
* policies produce the expected results when evaluated together

#### Step 1 - Build the policy bundle (if using bundles)

Build the bundles you intend to publish:

```
opa build \
  --bundle retail-policy/ \
  --signing-key private.pem \
  --signing-alg ES256 \
  -o retail-bundle.tar.gz
```

Step 2 - Create sample input

Example input:

```
{
  "message": {
    "order": {
      "items": [
        {
          "id": "item1",
          "quantity": {
            "count": 0
          }
        },
        {
          "id": "item2",
          "quantity": {
            "count": 2
          }
        }
      ]
    }
  }
}
```

Save as input.json.

#### Step 3 - Evaluate the policy

Use the OPA CLI to load the built bundle or the single rego file and evaluate the decision rules.

In case of a bundle:

```
opa eval \
-b retail-bundle.tar.gz \
-i input.json \
--format=raw \
data.retail.policy.result
```

In case of a single file:

```
opa eval \
-d policy.rego \
-i input.json \
--format=raw \
data.retail.policy.result
```

Example output:

```
{
    "valid": false,
    "violations": [
      "message.order.items.quantity.count must be greater than 0"
    ]
}
```

Testing bundles ensures that policies execute correctly before publishing them.

### 6. Publish the Policy

The policy must be published to a stable URL.

Example: `https://github.com/nfo/policies/releases/download/v1/retail-bundle.tar.gz`

Recommended hosting options:

* GitHub Releases
* Object storage
* CDN

Immutable URLs are recommended.

{% hint style="info" icon="lightbulb" %}
**Testing directly without setting up network manifest**: You can directly test the policy by configuring the [OPA Policy Checker plugin](https://github.com/beckn/beckn-onix/tree/main/pkg/plugin/implementation/opapolicychecker) in ONIX. For testing you can use `type: bundle` pointing to a local signed OPA bundle. Add it to your adapter's `networkPolicyConfig` YAML under your networkId or a `default` key so it applies to all requests regardless of `networkId`:

```yaml
# config/opa-network-policies.yaml
networkPolicies:
  nfo.com/production:
    type: bundle
    location: https://github.com/nfo/policies/releases/download/v1/retail-bundle.tar.gz
    query: "data.retail.policy.result"
    verification:
      enabled: true
      publicKeyLookupUrl: https://api.dedi.global/dedi/lookup/your-nfo.example.com/public_key_test/your-key-name
```

You can refer to *Step 8* in this guide to see how to publish your public key.

Then reference it from your adapter config.

```yaml
checkPolicy:
  id: opapolicychecker
  config:
    networkPolicyConfig: ./config/opa-network-policies.yaml

# Also add checkPolicy to the handler's steps list.
```

{% endhint %}

### 7. Create or Update your manifest file to point to the bundle

```
manifestVersion: "1.0"
manifestType: "network-manifest"


networkId: "nfo.com/production"


publisher:
  role: "NFO"
  domain: "nfo.example.org"


policies:
  type: "rego"
  source: "bundle"
  
  bundle:
    id: "network-policy-bundle"
    url: "https://github.com/nfo/policies/releases/download/v1/retail-bundle.tar.gz"
    policyQueryPath: "data.retail.policy.result"


observability:
  enabled: true  


  config:
    url: "https://nfo.example.org/observ/fields.yaml"
    signatureUrl: "https://nfo.example.org/observ/fields.yaml.sig"


  collector:
    url: "https://telemetry.nfo.example.org/v1/network/events"


governance:
  effectiveFrom: "2026-03-10T00:00:00Z"
  effectiveUntil: "2027-03-10T00:00:00Z"
  signed: true
  signatureUrl: "https://nfo.example.org/network-runtime-manifest.sig"
```

### 8. Ensure the registry metadata for the network references the manifest file and the public key is published

#### Publishing signing public key

Login to [DeDi.Global](https://publish.dedi.global). In your namespace, you can create a public key registry to publish your public key. Click on the new registry button and select the Public Key schema.

When publishing the public key in DeDi for bundles signed with `ES256`, use:

* `keyType`: `ECDSA`
* `keyFormat`: `base64`
* `publicKey`: the Base64-encoded contents of the public key (excluding the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` lines), copied into the corresponding field in DeDi

Once the record is published and it's status is live, you can go to the record to copy its lookup URL from the widget on the page.

#### Referencing the network manifest

Go to the NFO reference registry where the reference to NP registries are added in DeDi Global. Once you have located the registry click on the 3 dots on the card:

Click on update.

Ensure the following fields are present as metadata for the registry:

| Field Name                | Description                                                     |
| ------------------------- | --------------------------------------------------------------- |
| manifestUrl               | The URL pointing to the network's policy manifest file.         |
| signingPublicKeyLookupUrl | The lookup URL of the public key published in DeDi.             |
| manifestSignatureUrl      | The URL pointing to the signature of the network manifest file. |

{% hint style="info" icon="lightbulb" %}
**Referencing the policy using network ID in beckn ONIX**: To resolve policies automatically from a verified network manifest set for a network in the [OPA Policy Checker plugin](https://github.com/beckn/beckn-onix/tree/main/pkg/plugin/implementation/opapolicychecker), set `type: manifest` for the network entry in your `networkPolicyConfig` file, using the `networkId` as the key. Also configure the `manifestLoader` plugin in the same handler — the OPA plugin uses it to fetch and verify the manifest at startup:

```yaml
# config/opa-network-policies.yaml
networkPolicies:
  nfo.com/production:
    type: manifest
```

```yaml
manifestLoader:
  id: manifestloader
  config:
    cacheTTL: 24h

checkPolicy:
  id: opapolicychecker
  config:
    networkPolicyConfig: ./config/opa-network-policies.yaml
```

The policy source, query path, and signing details are all read from the manifest — no `location`, `query`, or `verification` block is needed in the config.
{% endhint %}

### 9. Updating Policies

There are two ways to update policies.

#### Option 1 — Publish a new version

1. Update the policy files
2. Build a new bundle
3. Update the manifest file

#### Option 2 — Update the bundle at the same URL

Policies can also be updated at the same static URL. It is recommended to update the release number in the network manifest when you do so.

Example:

```
https://github.com/nfo/policies/releases/download/latest/retail-bundle.tar.gz
```

When the bundle content changes:

* the updated bundle will be fetched automatically
* the updated policies will be applied
* no restart is required

If using a mutable URL, ensure the path remains stable.

### 10. Best Practices

* Always sign policy bundles or files
* Prefer immutable artifact URLs
* Use clear package naming
* Version policies explicitly
* Test all policies for the same networkId together before publishing


# Signing a single file

OpenSSL can create digital signatures using a private key and verify them using the corresponding public key.

OpenSSL can create digital signatures using a private key and verify them using the corresponding public key. These same steps can be used to sign the network manifest file as well as any single file artifacts referenced in the manifest.

The recommended algorithm is `ES256` using an ECDSA P-256 keypair. `EdDSA` is a modern alternative, but `ES256` is preferred here because it has better support in OPA's runtime verification path.

## 1. Prerequisites

### OpenSSL Version

These commands require OpenSSL, not LibreSSL.

LibreSSL sometimes lacks support for certain signing commands or behaves differently from OpenSSL, so it is recommended to use openssl if you are following this guide.

Check your version:

```
openssl version
```

Expected output should look similar to:

```
OpenSSL 1.1.1x
```

or

```
OpenSSL 3.x.x
```

Recommended versions:

| Version       | Status          |
| ------------- | --------------- |
| OpenSSL 3.x   | Recommended     |
| OpenSSL 1.1.1 | Supported       |
| LibreSSL      | Not recommended |

If the output contains:

```
LibreSSL
```

install OpenSSL instead.

### Required Files

You need:

```
private.pem
artifact.yaml
```

private.pem must contain the private key used for signing. And assume artifact.yaml is the file you need to sign which may be a network manifest or a policy rego file or any other artifact that needs to be signed by you.

## 2. Generate a Key Pair (If You Don’t Already Have One)

If you already have the key pair, you can skip this step.

### Generate a private key (ECDSA P-256 for ES256)

```
openssl ecparam -name prime256v1 -genkey -noout -out private.pem
```

### Extract the public key

```
openssl pkey -in private.pem -pubout -out public.pem
```

Result:

```
private.pem
public.pem
```

## 3. Sign the File

Suppose you want to sign:

artifact.yaml

Run:

```
openssl dgst -sha256 -sign private.pem -out artifact.yaml.sig artifact.yaml
```

Generated file:

```
artifact.yaml.sig
```

## 4. Files to Publish

When publishing the signed artifact, provide:

```
artifact.yaml
artifact.yaml.sig
```

If the signed file is an artifact referenced in the network manifest, the links of the published files should be added to the network manifest at the appropriate section based on the type of artifact that is being signed.

If the signed file is the network manifest itself, it should be added as the manifestUrl in the metadata field of the NFO network registry this manifest is for.

## 5. Verifying the Signature

Anyone with the public key can verify the file.

Run:

```
openssl dgst -sha256 -verify public.pem -signature artifact.yaml.sig artifact.yaml
```

Expected output:

```
Verified OK
```

If the file has been modified, verification will fail:

```
Verification Failure
```

## 6. Security Best Practices

✔ Keep private.pem secret\
✔ Store private keys securely\
✔ Never upload private keys\
✔ Rotate keys periodically

### Recommended Naming Convention

Common pattern:

```
file.ext
file.ext.sig
```

Example:

```
artifact.yaml
artifact.yaml.sig
```


# Migration Guides

Guides for moving a Beckn Network deployment between various topologies without breaking network interoperability.

Protocol upgrades happen while the network keeps running — consumer-side (BAP) and provider-side (BPP) applications can't all be rewritten and redeployed at once. These guides cover how to move a deployment from one network topology to another with a phased, low-risk approach.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Migrating from Beckn protocol version 1 to version 2</strong></td><td>A readiness checklist covering DEDI registry setup, protocol and schema readiness, ONIX configuration, and business application migration paths — including the reqmapper fallback for phased migration.</td><td><a href="/build/migration-guides/beckn-v1-to-v2">Migrating from Beckn protocol version 1 to version 2</a></td></tr></tbody></table>


# Migrating from Beckn protocol version 1 to version 2

A readiness checklist for moving a Beckn network participant from protocol v1 to v2 — covering DEDI registry setup, protocol and schema readiness, ONIX configuration, and business application migratio

## Executive Summary

Moving a Beckn network from v1 to v2 is not just a payload rename. V2 introduces improved identity and discovery, a JSON-LD-based protocol contract, and changes to adapter configuration — and it also touches how the business application connects to the network. This guide is a shared readiness checklist for that move, written for network participants, network facilitator organizations, and business application teams who need to align before implementation starts.

It walks through what a participant must get right, in the order it typically comes up: registering identity on the DEDI registry, meeting the v2 protocol and schema requirements, configuring ONIX correctly, and planning the business application's migration.

## 1. DEDI registry and participant records

The v2 migration path does not depend on a separate gateway. Instead, trust and participant discovery are established through the DEDI registry and its participant records.

### DEDI registry readiness

Register on the [DEDI registry](https://publish.dedi.global/) before starting any other DEDI-dependent step below. Registration involves four steps:

1. **Namespace creation** — Create and verify the participant's namespace by proving domain ownership. This establishes the root of trust for everything published under it.
2. **Registry publication** — Add a registry under that namespace, following the NFH fabric subscriber schema, to list Beckn subscriber details.
3. **Subscriber record creation** — Publish subscriber records for each participant, including callback URL, network role (consumer/provider node, etc.), domain code, and public key.
4. **ONIX interaction** — Confirm that ONIX automatically resolves subscriber details (keys, roles, callback URLs) during network interactions. No additional registry API integration is required on the application side.

**Reference**

* If your organization is a **Network Participant (NP)** registering subscriber details on an existing network, follow [Network Participants registering on the NFH fabric](/build/creating-a-network/onboarding-participants#network-participants-registering-on-the-fabric).
* If your organization is instead a **Network Facilitator Organization (NFO)** setting up a new network, follow [Setting up the network environment](/build/creating-a-network/environment).
* For background on the service itself, see the [REGISTR product overview](/product-documentation/products/registr).

## 2. Protocol and schema readiness

For a new v1-to-v2 migration, start by creating the domain-specific schema, if it does not exist already, before anything else in this section — ONIX's validator has nothing to validate against until that schema exists and is hosted. Once it's in place, the rest of this section — the core spec, hosting, and how the validator resolves it — follows.

Primary source: Beckn v2 protocol specification, `beckn.yaml`

Specification URL: [beckn.yaml](https://raw.githubusercontent.com/beckn/protocol-specifications-v2/refs/heads/main/api/v2.0.0/beckn.yaml)

Use `beckn.yaml` as the source of truth for v2 actions, schemas, response formats, signing expectations, and validation behavior. Confirm the exact protocol version and supported actions before making any code or ONIX configuration changes.

Schema validation itself is automatic: ONIX's `schema2validator` plugin validates every payload against both the core protocol schema and any domain-specific extended schema. Teams don't need to write custom validation code — the readiness work is making sure both schemas are correctly in place.

### Core protocol vs. domain-specific schema

* **Domain-specific extended schema** — Create this first, before any other schema readiness step. It covers domain-specific fields (for example, agri-procurement or soil-testing attributes) that aren't covered by the core schema. A separate extended schema is required for each domain migrating to v2.
* **Core protocol** — `beckn.yaml`, referenced above. Covers actions, context, and structure common to every domain.
* `schema2validator` doesn't need the extended schema URL configured manually — it fetches the schema automatically from the `@context` field carried in the incoming payload's JSON-LD context.
* Host the extended schema on a raw GitHub URL for testing, and on [schema.nfh.global](https://schema.nfh.global/) for production. Payloads for each environment must reference the matching URL through `@context`.
* Re-host and re-reference the schema whenever the domain schema changes. A stale hosted schema causes `schema2validator` to pass or fail payloads incorrectly.

### What to confirm

* Target protocol version and action list.
* Field-level mapping from v1 to v2 for every supported action.
* Mandatory v2 fields that don't exist in the current v1 payload.
* Business concepts affected by v2 changes, including catalog, offer, contract, performance, fulfillment, status, payment, and settlement data.

## 3. ONIX configuration

ONIX is the adapter layer for the v2 migration path and must be configured for every participant. It handles routing, signing, schema validation, and DEDI registry lookup for v2 network communication.

### Configuration checklist

* Correct ONIX version for Beckn v2.
* Participant role and enabled plugins.
* Application-facing and network-facing endpoints.
* Signing keys, verification behavior, and authorization settings.
* Schema validation for v2 requests and callbacks.
* DEDI registry lookup and participant discovery.
* Restart or redeploy process after configuration changes.

### Adapter config reference

Each role runs its own adapter config file. Confirm both are present and correctly configured before go-live:

| Adapter config    | Role  | Modules configured                                                      |
| ----------------- | ----- | ----------------------------------------------------------------------- |
| `bap-config.yaml` | `bap` | `bapTxnReceiver` (`/bap/receiver/`) and `bapTxnCaller` (`/bap/caller/`) |
| `bpp-config.yaml` | `bpp` | `bppTxnReceiver` (`/bpp/receiver/`) and `bppTxnCaller` (`/bpp/caller/`) |

## 4. Business application migration options

Every network participant (NP) is expected to reach full v2 migration — there is no second, equally valid destination. An NP that cannot get there on the required timeline doesn't get to treat that as a stopping point; it needs a documented, time-boxed exception with a plan to close the gap.

### Primary path — full v2 migration

The application natively produces and consumes Beckn v2 payloads. Every NP should plan for this outcome by default.

**Application responsibilities**

* Update request builders and callback handlers for v2 schemas.
* Update domain models where v2 concepts differ from v1.
* Update catalog, contract, performance, fulfillment, status, payment, and settlement logic.
* Update fixtures, automated tests, and API collections to use v2 payloads.
* Configure ONIX for v2 network connectivity (see [Section 3](#3-onix-configuration)).

### Fallback path — phased migration with reqmapper

Use this path only when an NP does not agree to, or cannot complete, immediate v2 migration — for example, because of a legacy application dependency or a resourcing constraint. While reqmapper is in place, the NP continues to send and receive v1 payloads at the application boundary, and ONIX (configured per Section 3, plus the reqmapper plugin described in the [Reqmapper Configuration Reference](#reqmapper-configuration-reference) below) handles v1-to-v2 and v2-to-v1 transformation.

Critically, using reqmapper is conditional: the NP must be **actively and visibly migrating its application to full v2 support in parallel**. Reqmapper is a bridge for the transition period, not a permanent architecture.

**Application responsibilities**

* Keep existing v1 request and callback behavior stable while the mapper is active.
* Provide complete v1 payload samples for every supported action.
* Confirm every required business field can be represented in the mapped v2 payload.
* Test the full flow through ONIX, not only at the application boundary.
* Run the v2-native migration in parallel, with a tracked plan and milestone dates.
* Set a firm milestone for removing the mapper dependency and reconfiguring ONIX for v2-only connectivity.

### Decision rule

Default to full v2 migration for every NP. Only fall back to reqmapper when an NP cannot migrate on the required timeline, and only with a documented parallel migration plan and a retirement date for the mapper. Reqmapper should never be adopted as a long-term substitute for v2 migration.

## Reqmapper Configuration Reference

This section applies only if you are using the reqmapper fallback path described in [Section 4](#4-business-application-migration-options). If your application is fully v2-native, you can skip it entirely. It covers the mapper's configuration, components, and general transformation behavior only — it is not specific to any single use case or domain.

### Technical overview

The ONIX adapter bridges Beckn protocol v1.x and v2.x networks using a file-based transformation layer called the **request mapper**. Rather than hard-coding payload shapes in the adapter binary, all transformation logic lives in a single YAML file containing **JSONata expressions**. The adapter loads this file at startup and applies the right expression automatically based on the action and the participant role (BAP or BPP).

This section explains how the mapper is wired into ONIX, what it transforms, and how transformations are structured for each Beckn action.

### How the mapper plugs into ONIX

**Configuration**

The mapper is declared as a plugin named `payloadTransformer` in the adapter config (`configs/bpp-config.yaml` / `bap-config.yaml`):

```yaml
payloadTransformer:
  id: reqmapper
  config:
    role: bpp   # or "bap"
    mappingsFile: /app/config/mappings.yaml
```

`role` tells the plugin which side of the mapping to apply. `mappingsFile` is the path to the YAML file mounted into the container.

**The `transformPayload` step**

Each module (Receiver and Caller) defines an ordered list of pipeline steps. The `transformPayload` step is where payload conversion happens:

**BAP Receiver** (`/bap/receiver/`) — receives v2 callbacks from the network, converts to v1 for the BAP app:

`validateSign → addRoute → validateSchema → transformPayload`

**BAP Caller** (`/bap/caller/`) — receives v1 requests from the BAP app, converts to v2 for the network:

`transformPayload → addRoute → sign → validateSchema`

**BPP Receiver** (`/bpp/receiver/`) — receives v2 from the network, converts to v1 for the BPP app:

`validateSign → addRoute → validateSchema → transformPayload`

**BPP Caller** (`/bpp/caller/`) — receives v1 from the BPP app, converts to v2 for the network:

`transformPayload → addRoute → sign → checkPolicy → validateSchema`

The step position determines which payload version the surrounding steps see. On Receiver modules, schema validation runs before `transformPayload` (validating the incoming v2 payload); on Caller modules, it runs after (validating the outbound v2 payload).

### Mapping architecture: bapMappings vs. bppMappings

Each Beckn action in the mappings file has two entries:

```yaml
mappings:
  <action>:
    bapMappings: |
      (JSONata expression...)
    bppMappings: |
      (JSONata expression...)
```

| Entry         | Direction                               | Applied when           |
| ------------- | --------------------------------------- | ---------------------- |
| `bapMappings` | v1 → v2 (outbound) or v2 → v1 (inbound) | adapter running as BAP |
| `bppMappings` | v2 → v1 (inbound) or v1 → v2 (outbound) | adapter running as BPP |

The `role` field in the plugin config (`bap` or `bpp`) determines which entry is used at runtime. This keeps a single mappings file shared between both roles.

### Transformation levels

Transformations happen at two levels in every action:

**1. Context level (universal)**

Every message, regardless of action, carries a context block. The field names changed between v1 and v2:

| v1 field           | v2 field           | Notes                                 |
| ------------------ | ------------------ | ------------------------------------- |
| `domain`           | `networkId`        | Identifies the Beckn network/domain   |
| `bap_id`           | `bapId`            | Consumer platform identifier          |
| `bap_uri`          | `bapUri`           | Consumer platform endpoint            |
| `bpp_id`           | `bppId`            | Provider platform identifier          |
| `bpp_uri`          | `bppUri`           | Provider platform endpoint            |
| `transaction_id`   | `transactionId`    | Correlation ID for a full transaction |
| `message_id`       | `messageId`        | Unique ID per request                 |
| `version: "1.0.0"` | `version: "2.0.0"` | Protocol version literal              |

The mapper always rewrites `version` and all snake\_case → camelCase context fields.

**2. Message/payload level (per-action)**

Each action also transforms the message body. The substantive schema changes between v1 and v2 — such as renamed structures, restructured catalogs, and coded metadata — happen here. Unlike the context-level rewrite above, message-level field mappings are not generic: they depend on the specific v1 payload shape a given business application sends, and the v2 structure the target network expects, for each action (`discover`, `on_discover`, `confirm`, `status`, and so on).

Because those payload shapes differ by use case and domain, exact field-level mapping rules are not enumerated here. Each network's mappings file defines its own `bapMappings` and `bppMappings` JSONata expressions per action, following the entry structure described above. Treat the per-action mapping logic as something to write and review against your specific v1 and v2 payload samples, not something to copy from a generic reference.

### Summary of schema changes (v1 → v2)

The rows below are structural, protocol-level renames that apply regardless of domain. Field-level content within catalogs, orders, and fulfillments varies by use case and is not enumerated here — see the note above.

| Category            | v1                                | v2                                               |
| ------------------- | --------------------------------- | ------------------------------------------------ |
| Context field names | snake\_case (`bap_id`, `bpp_uri`) | camelCase (`bapId`, `bppUri`)                    |
| Protocol version    | `"1.0.0"`                         | `"2.0.0"`                                        |
| Domain identifier   | `context.domain`                  | `context.networkId`                              |
| Catalog items       | `providers[].items[]`             | `catalogs[].resources[]` + `catalogs[].offers[]` |
| Order object        | `message.order`                   | `message.contract`                               |
| Fulfillment status  | `order.fulfillments[].state`      | `contract.performance[].status`                  |
| Geo search          | Intent-based (flat address)       | `filters` (JSONPath) + `spatial` (`S_DWITHIN`)   |

### Adapter configuration

The mapper file path is configured separately in the BAP and BPP adapter configs under `payloadTransformer.config.mappingsFile`. Both roles (BAP and BPP) share the same mappings file — the `role` field in the plugin config (`bap` or `bpp`) determines which entry (`bapMappings` or `bppMappings`) is applied at runtime.

| Adapter config    | Role  | Modules configured                                                                 |
| ----------------- | ----- | ---------------------------------------------------------------------------------- |
| `bap-config.yaml` | `bap` | `bapTxnReceiver` (port 8081, `/bap/receiver/`) and `bapTxnCaller` (`/bap/caller/`) |
| `bpp-config.yaml` | `bpp` | `bppTxnReceiver` (port 8082, `/bpp/receiver/`) and `bppTxnCaller` (`/bpp/caller/`) |

When deploying, the mappings file is mounted into the container and its path is referenced by `mappingsFile`. No adapter code changes are required when updating the mappings — only a container restart is needed.

### Challenges and maintenance considerations

**Mapper must be updated for every new field**

The JSONata expressions in the mappings file explicitly enumerate every field that needs to be carried across. If a new field is added to a v1 payload (by the BPP or BAP application) and is not handled in the corresponding mapping expression, that field will be silently dropped during transformation. The adapter will not throw an error — it simply produces an output that omits the unrecognized field.

This means:

* Any new v1 field added to `order`, `items`, `tags`, `fulfillments`, or `context` must have a corresponding mapping added to `confirm.bapMappings` / `confirm.bppMappings` (and likewise for other actions).
* Any new v2 field added by the network side must be handled in the reverse direction.
* The same applies to new `entitlementIds` codes: if a BPP starts sending a new code in v2, `on_discover.bapMappings` (and the `on_confirm`/`on_status` equivalents) must add a rule to convert it back to the correct v1 `tags` group. Without this, the tag is either dropped or falls through to the generic "unknown" passthrough handler, where one exists.

**No schema-awareness at transform time**

The mapper operates on raw JSON; it has no knowledge of the Beckn schema. If the input payload has an unexpected structure (for example, `items` is an object instead of an array), the JSONata expression may produce an incorrect output silently. Schema validation (the `validateSchema` step) is the safety net, but it runs separately from the transform and only validates the version it receives.

**Bidirectional parity must be maintained**

`bapMappings` and `bppMappings` for a given action are mirror images of each other. When one is updated, the other typically needs a matching update. Letting them diverge can cause round-trip data loss — for example, a field survives the outbound transform but is missing from the inbound response.

### Adding or modifying a mapping

1. Open the mappings file (path configured in the adapter config under `payloadTransformer.config.mappingsFile`).
2. Find the relevant action block (for example, `on_discover:`).
3. Edit the `bapMappings` or `bppMappings` JSONata expression, and update the mirror direction if the change affects round-trip data.
4. Redeploy the adapter — no code changes needed, only a container restart.
5. Verify with the relevant Postman collection covering the affected action.

JSONata expressions have access to the full input payload via `$` and support functions like `$map`, `$filter`, `$merge`, `$append`, `$reduce`, `$string`, `$number`, `$boolean`, `$replace`, `startswith`, and sprintf-style string formatting via the adapter's runtime.


# Migrating from the centralized Catalog Service to the decentralized catalog

A migration guide for networks currently publishing through CATALG's centralized publish/subscribe API, moving to the decentralized, self-hosted catalog model.

{% hint style="success" %}
**This migration needs no new integration code from you.**

* **Provider Node:** publishing becomes hosting files and running the existing `catalog-publisher` tool — no `catalog/publish` client to write.
* **Discovery Service builder:** the crawling and signature-verification logic you'd otherwise have to build is already done for you by the [`catalogcrawler` plugin](#2-if-you-are-a-discovery-service-builder) — you configure it, not code it (if you're using DISCOVR, even that's already wired up).
* **Consumer Node:** no change at all — you still call `discover` against the same Discovery Service as before; this migration is entirely behind that API and invisible to you.

This is a configuration and infrastructure change for two of the three actors, and a non-event for the third — not a development project for anyone.
{% endhint %}

> **Full specifications:** [NFH-014 — Decentralized Catalog Publishing and Discovery](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md) defines the new model end to end; [NFH-003 — The Beckn Protocol Stack](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/The_Beckn_Protocol_Stack.md) is the updated stack definition with the Cataloging Service actor removed. Both are linked again, at the relevant section, throughout this guide.

## If you're a Provider Node, here's what changes — in three steps

This is the question most PNs land on this page to answer. In full, it's [§1 below](#1-if-you-are-a-provider-node-publisher) — but the short version is:

1. **Host your catalog files on storage you already have** (S3, a CDN, GitHub Pages, an ngrok tunnel for testing) instead of calling a network API.
2. **Generate and sign them with the `catalog-publisher` tool** instead of hand-building a `catalog/publish` request — it produces the baseline/change file and catalog index for you.
3. **Set one field — `meta.catalog_index_urls` — on the Registry record you already have.** That's the entire "registration" step; there's no separate publish-side onboarding.

No server to stand up, no subscription list to manage, no ACK/NACK handshake to get right. See [Test it yourself with starter-kit](#test-it-yourself-with-starter-kit) below to see this end to end before touching your own integration.

## Executive Summary

If you're publishing catalogs today via `catalog/publish` with ACK/NACK responses, managing subscriptions with `catalog/subscription`, or running a Discovery Service that subscribes to a central Cataloging Service (CS) — this guide is for you. NFH fabric's catalog model has moved to a decentralized shape: a Provider Node (PN) self-hosts and self-signs its own catalog files and a catalog index on infrastructure it controls, and a Discovery Service (DS) crawls, independently verifies, and indexes that data directly. There is no shared, centrally-run relay in the path anymore.

Nothing about your catalog *content* changes — the `Catalog`, `Resource`, and `Offer` schemas are exactly what they were. What changes is how a catalog gets from a PN to a DS. This document is the specification for that new model: [NFH-014 — Decentralized Catalog Publishing and Discovery](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md), which also updates [NFH-003 — The Beckn Protocol Stack](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/The_Beckn_Protocol_Stack.md) to remove the Cataloging Service actor entirely.

**The legacy API is not being switched off out from under you.** `beckn.yaml`'s Cataloging Service endpoint group (`/catalog/publish`, `/catalog/subscription`, `/catalog/pull`, `/catalog/push`, `/catalog/search`, and their callbacks) is marked `deprecated: true`, not removed. Its actual retirement date and forced-cutover path are not yet defined; this guide covers the migration you can start today, on your own timeline.

## The conceptual shift

**Before:** a Provider Node called a network API (`catalog/publish`) and got an ACK/NACK back. A central Cataloging Service stored the catalog, handled Discovery Service subscriptions, and served `catalog/pull`/`catalog/search` to consumers.

**Now:** a Provider Node publishes immutable, signed JSON files to storage it already controls (any CDN, object store, or static host). A Discovery Service resolves the PN's Registry record, crawls that storage directly, verifies every file's signature and digest, and builds its own index. There is no central service to call, subscribe to, or wait on.

## 1. If you are a Provider Node (publisher)

Short version: **pick some storage, generate and sign your catalog files with the `catalog-publisher` tool, and set one field on a Registry record you already have.** There's no server to stand up, no subscription list to manage, and no ACK/NACK handshake to get right.

This assumes you're already onboarded to the NFH fabric — a Registry identity and registered signing key are prerequisites to publishing, not something this migration sets up for you. If you're not there yet, start with [Onboarding on the NFH fabric](/build/onboarding).

1. **Pick storage you already have.** Any static host works — S3, a CDN, GitHub Pages, even an ngrok tunnel for local testing. You're not building a new service; you're pointing a publishing tool at a folder.
2. **Generate and sign your catalog with `catalog-publisher`.** This is a plugin for [beckn-onix](https://github.com/beckn/beckn-onix) that diffs your submission against what you last published, produces a fresh baseline or an incremental change file as appropriate, computes digests, signs everything with your Registry-registered key, and writes the resulting catalog index. See [Catalog Publishing and Discovery → Publishing tooling](/build/creating-a-network/catalog-publishing-and-discovery#publishing-tooling--the-catalog-publisher) and the [starter-kit](https://github.com/beckn/starter-kit)'s [Catalog Publishing walkthrough](https://github.com/beckn/starter-kit/blob/main/README.md#catalog-publishing-catalogpublish) for a working, runnable example.
3. **Set `meta.catalog_index_urls` on your existing Registry Subscriber record** (a list of `{url}` entries, not a single string) — that's the entire "registration" step. No separate pointer file, no new registry to onboard into.

Everything else — subscriptions, a central Cataloging Service, waiting on `on_publish` callbacks — simply isn't part of this model anymore, so there's nothing to configure for it; see [What you no longer need](#what-you-no-longer-need) below for what to actually delete from your existing integration.

Full step-by-step walkthrough: [Catalog Publishing and Discovery → Quickstart](/build/creating-a-network/catalog-publishing-and-discovery#quickstart--host-and-sign-your-first-catalog).

## 2. If you are a Discovery Service builder

Replace your subscription setup and `catalog/push` receiver with a crawler — and in practice, you don't need to build that crawler yourself. The four things a conformant DS must do (enumerate PNs, resolve their Registry records, fetch and verify their catalog index and files, and never index anything unverified) are exactly what the **`catalogcrawler`** plugin for [beckn-onix](https://github.com/beckn/beckn-onix) already does, out of the box, as a scheduled background job inside your ONIX deployment. For most DS builders, this whole section reduces to: run ONIX with the `catalogcrawler` plugin configured and pointed at your own `/catalog/push`-equivalent ingestion endpoint — there's no separate crawl service to design or write.

This isn't specific to any one Discovery Service product. If you're building your **own** DS — your own indexing, ranking, and `/discover` API — you still don't need to hand-write the crawl/verify logic: `catalogcrawler` is a standalone, deployment-agnostic plugin whose only integration contract is `discoveryPushUrl`, an HTTP endpoint on **your** service that receives resolved, verified catalogs. Point it at your own ingestion endpoint and it does the crawling for you, regardless of what you build behind that endpoint. Writing your own crawler from scratch is only necessary if this plugin's behavior genuinely doesn't fit your case (see its README for exactly what it does and doesn't cover).

What the crawler plugin handles for you:

1. **Enumerates the Provider Nodes relevant to your network** — either by direct Registry enumeration, or via a registry plugin (e.g. `dediregistry`) that answers "which index URIs are relevant to me" in one call. You configure which `networkId`(s) to watch (`networks` in its config), or hand it a fixed `staticIndexUrls` list; it does the enumeration.
2. **Resolves each PN's Registry manifest and Subscriber record**, and reads `meta.catalog_index_urls` — again, no code you write; this is the plugin's discovery source.
3. **Fetches and verifies the catalog index**, then fetches only the baseline or change files its own persisted per-catalog cursor calls for — it never re-fetches what it's already verified and applied, and resumes correctly after a restart (progress is stored in Postgres).
4. **Never indexes anything unverified** — a missing, invalid, or mismatched signature or digest gets the entry parked (retried on a bounded schedule, then surfaced as abandoned if it never clears), not silently indexed or silently dropped; the plugin never deletes previously-indexed content just because an entry disappeared from a later crawl.

### The interface between the crawler and your Discovery Service

Your integration work is entirely on the receiving side, and it's a single HTTP contract: the plugin POSTs each resolved, verified catalog to whatever URL you set as `discoveryPushUrl`, as a `catalog/push`-shaped Beckn payload — `context.action: "catalog/push"`, `message.catalogs[]` holding the fully-resolved catalog (masters already merged into overlays, so you receive self-contained resources, not raw fragments), and a matching `message.publishDirectives[]` entry carrying `catalogType` and `updateMode`. Your endpoint just needs to respond `HTTP 200` to acknowledge the push (indexing can happen asynchronously after that); anything else is treated as a failed push and retried on the plugin's normal retry/park schedule. There's no separate ACK/NACK envelope to parse — the HTTP status code alone is the signal.

This is the same internal interface [DISCOVR](/product-documentation/products/discovr) — NFH fabric's reference Discovery Service — implements at its own `/catalog/push` endpoint (see [DISCOVR → Catalog indexing](/product-documentation/products/discovr#catalog-indexing)): DISCOVR is simply a `catalogcrawler` deployment with its own `discoveryPushUrl` pointed at itself. Nothing about this endpoint is Beckn-protocol-mandated or crawler-mandated — it's just the shape this plugin happens to push in — so building your own DS means implementing a `POST` receiver with this same request shape, not designing a new protocol between your crawler and your indexer.

See the [`catalogcrawler` plugin README](https://github.com/beckn/beckn-onix/blob/main/pkg/plugin/implementation/catalogcrawler/README.md) for the full config reference (`networks`, `staticIndexUrls`, `discoveryPushUrl`, polling intervals, retry/park behavior) and its `/crawl/trigger` and `/crawl/status` operational endpoints.

Full crawl sequence, verification rules, and error-handling table (what the plugin implements under the hood, useful if you're auditing its behavior or building a crawler from scratch instead): [Catalog Publishing and Discovery → Hosting & Discovery](/build/creating-a-network/catalog-publishing-and-discovery#hosting--discovery).

### How a DS notices a brand-new publisher

There's no separate "onboarding event" to subscribe to, because the old `catalog/subscription` step doesn't exist to replace. A DS's own periodic **enumeration** pass — re-querying the Registry for participants relevant to the `networkId`(s) it cares about (§Enumerating PNs, above) — is what surfaces a PN that registered since the last pass. Once that PN's Registry record carries `meta.catalog_index_urls`, it becomes a normal candidate the very next time the DS enumerates: there's no separate "new publisher" code path, and no faster way to be noticed than making sure both the Registry record and the index it points to are already in place *before* you expect to be discoverable — that gap is exactly what [Before you're crawlable](/build/creating-a-network/catalog-publishing-and-discovery#before-youre-crawlable) covers. A PN that wants to be picked up sooner than a DS's own enumeration cadence can additionally emit an out-of-band change signal to invite an earlier crawl (§10.6 of NFH-014) — this is an optional accelerator, never a substitute for the DS still fully verifying everything on its own terms.

## What you no longer need

* **A `catalog/publish` call to a shared, network-facing Cataloging Service, with an ACK/NACK response.** Files replace the round-trip; local validation happens up front, before you ever write a file to storage.
* **`catalog/subscription` CRUD.** A crawler's scope is its own configuration now — you don't manage subscriber lists.
* **`catalog/search`.** Removed from the publish/pull surface; a Discovery Service may still offer search over its own index, but that's not something you interact with as a publisher.
* **`catalog/push`/`on_pull` callbacks.** Consolidated into the crawler pulling from a PN and pushing into the Discovery Service's own index — a DS never receives a callback for this.
* **Restricted catalogs, download gates, `authMethods` as an access gate.** Catalog access is uniformly public, unconditionally — any party with a file's URL can fetch it. If you relied on `publishDirectives.visibleTo` as an access gate, its replacement (`networkIds` in the index) is a **relevance filter only**, never an access control.

## Field-by-field mapping

| Old (centralized CATALG / DISCOVR)                                    | New (decentralized)                                                                                       |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `catalog/publish` with ACK/NACK                                       | Files saved to storage; validation happens up front, locally                                              |
| `publishDirectives.visibleTo`                                         | Per-catalog `networkIds` in the index — relevance filter, not access gate                                 |
| `publishDirectives.updateMode: MERGE`                                 | A change file (id-keyed upserts/removals)                                                                 |
| `publishDirectives.updateMode: FULL`                                  | A fresh baseline                                                                                          |
| `catalog/pull`, mode `FULL`                                           | The baseline file                                                                                         |
| `catalog/pull`, mode `INCREMENTAL`                                    | Change files after the crawler's cursor                                                                   |
| `downloadManifest` (checksum, sizeBytes)                              | `digest`/`size` in the index, verified against each self-signed file                                      |
| Subscription filters (`networkIds`, `schemaTypes`)                    | Crawler-side filtering on the index                                                                       |
| Subscription CRUD (`catalog/subscription`)                            | Not needed — a crawler's scope is its own config                                                          |
| `catalog/search`                                                      | Removed from this surface                                                                                 |
| `catalog/push`                                                        | Crawler pull, with an optional out-of-band change signal as an accelerator                                |
| `on_pull` callback                                                    | Consolidated into the Discovery Service's own crawl loop                                                  |
| `subscriberId`                                                        | The PN's domain, resolved via its Registry record                                                         |
| Restricted catalogs / download gate / `authMethods` as access control | **Removed.** Catalogs are public-only; no per-catalog auth exists in this RFC                             |
| Offer-only catalogs, query-time attachment                            | Unchanged — still resolved behind `/discover`                                                             |
| Master/Regular resolution (`resourceDirectives[].extends`)            | Unchanged in shape — resolved by the Discovery Service at index time instead of centrally at publish time |

## What stays exactly the same

* Your `Catalog`/`Resource`/`Offer` JSON content and its schema.
* `catalogType: MASTER`/`REGULAR` and `resourceDirectives[].extends`.
* Offer-only catalogs and query-time attachment behind `/discover`.
* The Beckn HTTP Signature discipline itself — you're still signing with your Registry-registered key; you're just signing files instead of API requests.

## Test it yourself with starter-kit

Before touching your production integration, run the whole loop locally with the [starter-kit repository](https://github.com/beckn/starter-kit) — it already runs the target-state model end to end:

1. Clone starter-kit and bring up the stack (`docker compose -f docker-compose-generic.yml up`) — see its [Quick Start](https://github.com/beckn/starter-kit/blob/main/README.md#quick-start-run-the-network-locally).
2. Set up the ngrok tunnel so your published files are actually reachable from outside your machine — see its [Public-Internet Testing](https://github.com/beckn/starter-kit/blob/main/README.md#public-internet-testing-ngrok) section. This step is easy to skip and is the most common reason a locally-published catalog never shows up in `discover`.
3. Trigger `catalog/publish` against `onix-bpp` (the [Catalog Publishing](https://github.com/beckn/starter-kit/blob/main/README.md#catalog-publishing-catalogpublish) walkthrough) and inspect `generic-devkit/data/beckn/` to see the signed baseline and index it wrote.
4. Send a `discover` request from the BAP collection and confirm your catalog comes back in the results — remember a crawler runs on its own schedule, so allow for the same propagation delay you'd see against a real network, not an instant reflection of what you just published.
5. Confirm `meta.catalog_index_urls` is actually set on your node's Registry record — the starter-kit README calls this out as the field most commonly left unset, with no immediate feedback when it is.

This is the same shape a real migration follows — only the storage and Registry identity are throwaway.

## Reference material

* [NFH-014 — Decentralized Catalog Publishing and Discovery](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/Catalog_Publishing_and_Discovery.md) — the full protocol specification: schemas, versioning, error flows, and security considerations.
* [NFH-003 — The Beckn Protocol Stack](https://github.com/beckn/protocol-specifications-v2/blob/decentralised-catalog/docs/The_Beckn_Protocol_Stack.md) — the updated stack definition with the Cataloging Service actor removed.
* [starter-kit](https://github.com/beckn/starter-kit) — a runnable, end-to-end example of `catalog-publisher` publishing signed files and a crawler-fed Discovery Service consuming them.
* [`catalog-publisher` plugin README](https://github.com/beckn/beckn-onix/blob/catalog-publisher/pkg/plugin/implementation/catalogpublisher/README.md) — the publishing tool's design and configuration reference.
* [`catalogcrawler` plugin README](https://github.com/beckn/beckn-onix/blob/main/pkg/plugin/implementation/catalogcrawler/README.md) — the Discovery-side crawler plugin's design and configuration reference.
* [Catalog Publishing and Discovery](/build/creating-a-network/catalog-publishing-and-discovery) — the full guide for the new decentralized model.


# Resources and changelog

Working group, changelog, repositories, and the broader resource map.

## Network

* **Protocol specifications** — [docs.nfh.global/beckn](https://docs.nfh.global/beckn) (discovery/transaction) · [docs.nfh.global/finternet](https://docs.nfh.global/finternet) (tokenisation) · [docs.nfh.global/dedi](https://docs.nfh.global/dedi) (registries).
* **Registry** — the live Registry surface, realised by DeDi: [dedi.global](https://dedi.global) · publish: [publish.dedi.global](https://publish.dedi.global/) · explore: [explore.dedi.global](https://explore.dedi.global/).
* **Governance** — how decisions are made and how to participate. See [Governance and the open commons](/nfh-fabric/fabric#nfh-fabric-is-open-for-anyone-to-build-on).

## Repositories

| Project                     | Link                                                                                                                                            |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Trust Labs (DeDi, OpenCred) | [github.com/nfh-trust-labs](https://github.com/nfh-trust-labs)                                                                                  |
| OpenCred releases & issues  | [opencred-releases](https://github.com/nfh-trust-labs/opencred-releases)                                                                        |
| OpenCred Docker image       | `ghcr.io/nfh-trust-labs/opencred/opencred-server:latest`                                                                                        |
| OpenCred VC schemas         | [opencred-vc-schemas](https://github.com/nfh-trust-labs/opencred-vc-schemas)                                                                    |
| DeDi protocol (LFDT)        | [LF-Decentralized-Trust-labs/decentralized-directory-protocol](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol) |
| NFH fabric website          | [networks-for-humanity.github.io/fabric-website](https://networks-for-humanity.github.io/fabric-website/)                                       |

## Build

* **Product how-tos** — operator guides for the shipping products. See [Product documentation](/product-documentation/products).
* **Getting started** — the end-to-end walkthrough. See [Getting started with NFH fabric](/build/getting-started-with-fabric).
* **SDKs & reference nodes** — client libraries and open-source edge runtimes, published in the component repositories.

## Read

* **The story** — why NFH fabric exists and the open-vs-owned choice. See [Open or owned](/nfh-fabric/open-rails).
* **Working group** — open discussions, RFCs, roadmap input.
* **Changelog** — protocol and reference-software releases (OpenCred: [releases](https://github.com/nfh-trust-labs/opencred-releases/releases)).

## Useful links

| Resource                                                                 | Description                                                                                                                                                    |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Beckn Protocol v2](https://github.com/beckn/protocol-specifications-v2) | v2.0 spec with JSON-LD/schema.org-aligned core schema, modular schema packs, and CDS-based discovery for decentralized commerce networks.                      |
| [NFH fabric Schema Registry](https://schema.beckn.io/)                   | Collaborative registry of 345+ schema types and definitions for Beckn Protocol across mobility, logistics, energy, and financial services.                     |
| [ONIX](https://github.com/beckn/beckn-onix)                              | Plugin-based middleware adapter enabling secure, validated message exchange between consumer nodes and provider nodes across NFH fabric networks.              |
| [DeDi Docs](https://docs.nfh.global/dedi)                                | Universal decentralized directory infrastructure for public registries — public keys, membership, and revocation — under Linux Foundation Decentralized Trust. |
| [OpenCred](https://opencred.global/)                                     | Open infrastructure for issuing tamper-proof, W3C-compliant verifiable credentials with zero data storage, by Networks for Humanity.                           |
| [DEG - Digital Energy Grid](https://github.com/beckn/DEG)                | Specs for an interoperable digital energy ecosystem enabling decentralized energy contracts for production, consumption, and storage.                          |
| [Retail](https://github.com/beckn/local-retail)                          | Retail v2 schema family (RetailCore, grocery, food & beverage, home & kitchen) and reference documentation for Beckn Protocol v2 networks.                     |
| [Mobility](https://github.com/beckn/mobility)                            | Mobility domain ontology, worked example payloads, and a devkit for Beckn Protocol v2.                                                                         |

## Get in touch

Open issues on GitHub, join the working group, attend the open community calls. All links live at [networks-for-humanity.github.io](https://networks-for-humanity.github.io/fabric-website/) and on [nfh.global](https://nfh.global).


# Roadmap

What's coming next across the NFH fabric platform and its services.

Coming soon.


# Releases

Release notes across the NFH fabric services

Expand a release to see what changed across the services.

{% hint style="info" %}
This page is the single source of truth for release notes across all NFH fabric services. Product-specific release-notes pages have been retired in its favor.
{% endhint %}

<details>

<summary><strong>🚀 2026-09-15</strong></summary>

#### Discovr v1.7.0

* RFC 9535–compliant JSONPath filter compiler, translating JSONPath expressions into typed SQL predicates, with a conformance test suite.
* Fixed a tokenizer infinite-loop (denial-of-service risk) and an existence-predicate false-negative in JSONPath evaluation.
* RFC 9535 comparison operators now correctly handle type casts, with inline function-call denylisting for security hardening.
* Query-timeout and parse-failure are now distinguished; the legacy-probe statement timeout is now actually enforced.
* Schema validation for `discover` / `on_discover` payloads is now optional and off by default (`discovery.schema.validation-enabled`), resolving startup hangs under bad network conditions.

#### ONIX v1.9.1

* New JSONata-based translator plugin (`jsonatatranslator`) wired into the request-mapper flow, so mappings can use injected JSONata expressions instead of being hard-coded.
* Catalog crawler no longer aborts the entire poll tick when a single network ID fails lookup — other networks keep polling.
* Updated `grpc-go` and `amqp091-go` to address Dependabot-flagged vulnerabilities.
* Internal caching added for JSONata expression compilation, reducing repeated parsing overhead.

#### DeDi v0.8.2

* Security patches and stability improvements.

</details>

<details>

<summary><strong>🚀 2026-08-31</strong></summary>

#### ONIX v1.9.0

* Decentralized-catalog crawling and publishing support, including a new signed `/crawl/status` endpoint and an on-demand crawl trigger.
* Catalog publish payloads now get referential and business validation before acceptance.
* Fixed off-by-one and falsy-zero bugs in the catalog crawler's park/abandon budget logic.
* Fixed a logging bug that dropped error attributes on Warn/Info/Debug records.
* Hardened post-write verification for published catalog files.

</details>

<details>

<summary><strong>🚀 2026-08-14</strong></summary>

#### Discovr v1.6.0

* New catalog-crawler service, pushing decentralized catalogs into Discover's index so they're searchable via `discover`; runs independently with no consumer configuration needed.
* Fixed catalog metadata not propagating to resources absent from a MERGE publish, and offers being dropped on MERGE publishes that omitted them.
* Fixed catalog metadata incorrectly propagating from offer-only publishes.

#### Registry v1.0.3

* More flexible lookup URL format for subscriber/record references, including looking up records directly by name.
* Enhanced logging for DeDi/Beckn parameters.
* Fixed parsing of reference URLs that omit the scheme (`host:port`).
* Fixed stale record/subscriber index entries not being cleaned up on record storage.

#### DeDi v0.9.0

* Added domain crawling support.

#### ONIX v1.8.2

* VC validator now rejects Data Integrity proofs missing `verificationMethod`.
* Internal error-handling refactor (consolidated `CodedErr` type) — no consumer-facing change.

</details>

<details>

<summary><strong>🚀 2026-07-31</strong></summary>

#### ONIX v1.8.1

* Adapter now logs its version at startup and exposes it at runtime.
* Patched `kin-openapi`, `grpc-go`, and `golang.org/x/crypto` (13 Dependabot-flagged SSH CVEs).
* **Breaking:** NACK error responses now use Beckn v2.0.0 `ErrorCode` taxonomy strings instead of HTTP-status-mapped codes. No action needed unless integrator logic keys off the old codes.

#### CATALG v1.5.1

* Fixed the `on_publish` callback retry path to use a bounded, config-driven retry budget instead of unbounded retries.
* Fixed a silent record drop when the DLT produce step itself failed — now acknowledges correctly.

#### Registry v1.0.2

* NFO (subscriber reference) registries now auto-publish to the global root registry, with no manual approval needed.
* Routine dependency patching.

#### DeDi v0.8.0

* New x402 Agent-Ready Authentication — wallet-signature auth as an additional option alongside existing token auth.
* Added search to enum multi-select fields.
* Fixed CPU-aware worker allocation and chain-task concurrency; the bulk-upload status API's missing progress fields; the bulk-upload + DNS TXT dialog box; record-form focus and blank-field handling; empty form fields in schema payloads.
* A `402` response is now correctly classified as unauthorized.

</details>

<details>

<summary><strong>🚀 Week 29 · 2026</strong></summary>

#### ONIX v1.8.0

* Schema version mediation plugin and a W3C Verifiable Credential validator (`did:key` / `did:jwk` / `did:web`, with revocation checks).
* Network-agnostic DeDi registry subscriber resolution; `context.network_id` is now validated against the caller's network memberships.

#### CATALG v1.5.0

* New Catalog Pull API (`POST /catalog/pull` + `on_pull` callback); 5 MB payloads supported end-to-end.
* Error codes standardized to the Beckn v2.0 `ErrorCode` enum; `on_publish` now sends one consolidated report per request.

#### Discovr v1.5.0

* `on_pull` callback ingestion; opt-in `?active` / `?validity` discover filters; `legacy_ack_nack_support` flag (default off).

#### Registry v1.0.1

* Faster caching for new registries; cache-refresh and record-lookup stability fixes.

#### DeDi v0.7.0

* Typed deletion confirmations; form-based / JSON-paste schema builder; Beckn subscriber verification UI; namespace creation and anchoring now run in the background.

</details>

<details>

<summary><strong>🚀 Week 27 · 2026</strong></summary>

**NFH fabric Release Week 27-2026 is live!**

We've successfully deployed this week's release across the NFH fabric services. Here's what's new:

### ONIX v1.7.2

* Audit log now captures ACK/NACK response bodies and Beckn signature headers for full traceability.
* Sign validator now tolerates configurable clock skew (default 5s) on inbound signature timestamps — fixes NTP drift issues between network participants.

### CATALG v1.4.0

* Catalog-level `bppId` and `bppUri` are now preserved through the publish pipeline.
* Subscription update endpoint restored per Beckn v2.0 spec (`POST /catalog/subscription?subscriptionId=`).
* Request correlation IDs (`messageId` / `transactionId`) now attached to every log line for improved traceability.
* DeDi registry-entry cache is now configurable.

### Discovr v1.4.0

* Discover responses now echo catalog-level `bppId`, `bppUri`, `provider.availableAt`, and `catalog.isActive`.
* All 7 JSONPath / Geo / Text query combinations now routed correctly.
* Discover results can be scoped by `context.networkId`.
* Multi-location publish now fully supported.

</details>


