Hash Network Documentation
Website
  • About Hash Network
    • What is Provenance
    • Why Provenance Matters?
    • Why Hash Network Exists?
    • How Hash Network Solves These Problems?
  • Hash Netwok Provenance
    • Use Cases
      • Provenance For AI Agent Actions
      • Provenance In Camera
      • Provenance In Editing Tools
      • AI Generated Content
      • Other Use Cases
    • Provenance SDK
    • Provenance Contract
    • Provenance Schema
    • JSON Example
    • Verify SDK
    • Verify API
    • Architecture Overview
    • Supported Media Formats
    • Reputation System
    • Hash Verify - Chrome Extension
  • C2PA Standard
    • Overview
    • Manifest
    • Assertion
    • Action
    • Ingredient
    • Compatibility with Hash Network
  • Hash Network Playground
    • Provenance for AI generated Content
    • Register Content's Provenance Onchain
    • Verify provenance of content
  • Using Hash Network Chain
    • Network Information
    • Adding Network To Metamask
    • Contracts
    • Bridges
    • Block Explorer
    • Faucet
Powered by GitBook
On this page
  1. Hash Netwok Provenance

Provenance Contract

The Provenance contract ensures data traceability by allowing authorized writers to create and modify provenance data. This contract is particularly useful for verifying the history and modifications of digital assets.

Key Features

  • Writer Management: Only designated writers can create or modify provenance data.

  • Data Traceability: Each provenance record links back to its original hash for complete transparency.

  • Modification Mapping: Tracks updates made to existing provenance records.

Contract Details

Constructor

Initializes the contract by assigning the deployer as the owner and the first writer.

Provenance Structure

struct ProvenanceData {
    string provenance;
    address writer;
}
  • provenance: The description or metadata of the asset.

  • writer: The address of the entity that created or modified the record.

Key Functions

  1. getWriters: Returns the list of all authorized writers.

  2. addWriterAddress: Allows the owner to add new writers.

  3. removeWriterAddress: Enables the owner to remove writers.

  4. createProvenance: Allows a writer to create a new provenance record.

  5. updateProvenance: Updates an existing provenance record and links it to the original hash.

  6. getProvenanceData: Fetches the provenance data for a given hash.

  7. getOriginalHash: Retrieves the original hash for a given modified hash.

PreviousProvenance SDKNextProvenance Schema

Last updated 4 months ago

Contract Deployed on the Hash Network Testnet at:

View Provenance Contract