> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extrascoop.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital Deed

> The cryptographic manifest representing an exclusive content licence.

You will understand how licences are recorded immutably on the blockchain.

The Digital Deed is the final, legally binding record of a transaction on Extra Scoop. It proves ownership and establishes the exact terms of the exclusive licence purchased by a newsroom.

## Decentralised Storage

When a transaction settles, the system generates a cryptographic JSON manifest (the Extra Scoop Content Deed). This document contains the details of the scoop, the journalist, the agency, the price paid, and the final forensic audit results.

This manifest is pinned to decentralised IPFS storage, ensuring it remains publicly accessible and immutable regardless of internal servers.

## Blockchain Anchoring

To guarantee the integrity of the licence, the deed is anchored to the Base L2 blockchain (a Coinbase-backed Ethereum rollup).

The system calculates a SHA-256 Merkle root based on the core transaction identifiers. This forensic anchor is submitted to the `ContentDeed.sol` smart contract.

<CodeGroup>
  ```solidity Smart Contract Event theme={null}
  event DeedAnchored(
      bytes32 indexed merkleRoot,
      string indexed scoopId,
      address indexed journalist,
      address agency,
      uint256 pricePaid,
      uint256 timestamp
  );
  ```
</CodeGroup>

Once the transaction is confirmed on-chain, the licence transfer is irreversible.

```mermaid theme={null}
sequenceDiagram
    autonumber
    participant App as Eyewitness / Terminal
    participant Edge as Edge Function Gateway
    participant IPFS as IPFS Storage Gateway
    participant Contract as ContentDeed.sol (Base L2)
    participant DB as Transaction Database

    App->>Edge: License Settlement Request
    Edge->>Edge: Calculate SHA-256 Merkle Forensic Anchor
    Edge->>IPFS: Pin Content Deed Manifest
    IPFS-->>Edge: Returns IPFS CID & Gateway URL
    Edge->>Contract: Call anchorDeed(forensicAnchor, ...)
    Contract-->>Edge: Emits DeedAnchored event & returns txHash
    Edge->>DB: Atomic Settlement Finalization
```

## Forensic Merkle Anchor

The cryptographic anchor committed on-chain binds the unique asset identifier, the provenance manifest root, and the acquiring agency:

$\text{ForensicAnchor} = \text{0x} + \text{SHA256}(\text{asset.id} : \text{provenanceRoot} : \text{license.agency\_id})$
