Saltearse al contenido

Provenance Claims

Esta página aún no está disponible en tu idioma.

Provenance claims are assertions by a specific user that s/he created a specific piece of content, identified by a hash. These assertions can be backed by a registrar.

The ProvenanceClaim struct

Provenance claims are stored in ProvenanceClaim structs 🔗:

FieldTypeMeaning
originatorIduint256Royal ID of the originator, the user who created the content which this ProvenanceClaim represents.
registrarIduint256Royal ID of the registrar, the user who registered this ProvenanceClaim on behalf of the originator.
contentHashbytes32Blake3 🔗 hash of the content which this ProvenanceClaim represents.
nftContractaddressNFT contract of the associated NFT of this ProvenanceClaim (optional).
nftTokenIduint256Token ID of the NFT associated with this ProvenanceClaim (optional).
blockNumberuint256Block in which this content was registered.1

(1) Offchain you can always get this information by looking at events, but having the block number facilitates faster access, as well as access onchain.

Contracts

Control and data flows

Why have an NFT?

Having an NFT attached to a provenance claim is not required. However, there are some benefits to having such an NFT.

  • An NFT can include a visual representation of the governance claim.
  • NFT metadata can improve the ability to discover and display the claim.
  • NFTs can be tradeable. The provenance claim can preserve the identity of the original creator, while the current owner of the NFT can have it as a collectible. It is also possible to have certain licensed rights attached to the NFT’s owner.

Queries

There are several ways to get a provenance claim’s data onchain.

  • Query by originator Royal ID and content hash
  • Query by NFT (which requires the NFT contract address and the NFT’s token ID)
  • Query by provenance claim Id
Query byFunctionBaseBase Sepolia
NFT (token and contract address)provenanceClaimOfNftToken(address nftContract, uint256 nftTokenId) 🔗 🔗 🔗
originator and contract hashprovenanceClaimOfOriginatorAndHash(uint256 originatorId, bytes32 contentHash) 🔗 🔗 🔗
provenance claim IDprovenanceClaim(uint256 id) 🔗 🔗 🔗