nChain Event
Back to All
V.1.4.3
V.1.4.3
  • nChain Event User Guide
  • 📔Overview
    • Introduction
    • Configuration Symbols
    • Features and Benefits
    • Core Concepts
    • Encoded and Unencoded ‡ Records
  • 🤔Using nChain Event
    • How to Use nChain Event
    • Initial Set-Up
  • 🔏Independent Records
    • Introduction
    • Functional Description
      • Write Record
      • Read Record
      • Verify Record †
    • Use Cases
      • Lucky Number Tickets
      • Internet of Things (IoT) Data
      • Intellectual Property Rights (IPR) Evidence
      • Car Dealership
    • Tutorials
      • Data Integrity
      • Blockchain Unique Identifiers
    • API Workflow
      • Configure API
      • Write Record
      • Get Location Status
      • Read Record
      • Verify Record †
  • 🔗Linked Records §
    • Introduction
    • Functional Description
      • Create Link Record §
      • Read Link Record §
      • Update Link Record §
      • Delete Link Record §
      • Verify Link Record § †
      • Navigate Linked Record § ¶
    • Use Cases
      • Luxury Handbag Provenance
      • Random Prize Draw
    • Tutorials
      • Collection Integrity
      • Provenance Integrity
    • API Workflow
      • Configure API
      • Create Link Record §
      • Get Link Location Status §
      • Read Link Record §
      • Update Link Record §
      • Delete Link Record §
      • Verify Link Record § †
      • Navigate Link Record § ¶
  • ⚙️API Documentation
    • nChain Event API
  • ⛓️Bitcoin SV Blockchain
    • Features and Benefits
    • Writing to Blockchain
    • Reading from Blockchain
    • Transaction Format
  • ⁉️Troubleshooting
    • Troubleshooting
    • Error Codes
    • Glossary
    • Contact Us
Powered by GitBook
On this page
  • Verify Encoded Link
  • Verify Unencoded Link ‡
  • Example Responses
  1. 🔗Linked Records §
  2. API Workflow

Verify Link Record § †

PreviousDelete Link Record §NextNavigate Link Record § ¶

Last updated 6 months ago

  1. Anyone with the original record and information can check whether the record exists at the location

  2. Any type of link record (create, update and delete) can be verified

  3. The result indicates whether there is a match, a mismatch, or unknown (retry later)

Verify Encoded Link

To verify the original record, the verifier will need any previous link location, the record, encoder, salt and the expected location.

Example code:

curl -X POST "$URL/api/v1/linkedrecords/$LOC/match?prevTxId=$LOC1&encode=SHA256(01-02T13.14.15)|Base64" \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain" \
     -H "Content-Type: application/octet-stream" \
     --data-binary "hello"
const response = await fetch('${url}/api/v1/linkedrecords/${loc1}/match?prevTxId=${loc}&encode=SHA256(01-02T13.14.15)|Base64', {
  method: 'POST',
  headers: {
    'x-api-key': '${key}',
    'accept': 'text/plain',
    'Content-Type': 'application/octet-stream'
  },
  body: 'hello'
});

Verify Unencoded Link ‡

To verify the original record, the verifier will need any previous link location, the record and the expected location.

Example code:

curl -X POST "$URL/api/v1/linkedrecords/$LOC/match?prevTxId=$LOC1" \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain" \
     -H "Content-Type: application/octet-stream" \
     --data-binary "hello"
const response = await fetch('${url}/api/v1/linkedrecords/${loc1}/match?prevTxId=${loc}', {
  method: 'POST',
  headers: {
    'x-api-key': '${key}',
    'accept': 'text/plain',
    'Content-Type': 'application/octet-stream'
  },
  body: 'hello'
});

Example Responses

Example cURL matching response:

{
  "match": true,
  ....
}

Example cURL mismatching response:

{
  "match": false,
  ....
}

Example cURL unknown response:

{
  "title": "Content not found",
  "status": 404,
  ....
}