Update Record at Link Location

  1. The record owner updates the previous link location with a new record via nChain Event

  2. The result is the new link Location of the new record on the blockchain

  3. The record owner stores the new link Location for later processing

  4. Any number of updates may be performed

  5. Ideally, the record owner should check the status of the new link location

This does not actually update a linked record on the blockchain. Instead, it creates a new linked record that prevents any further updates to the previous linked record, although it can still be queried for its status and content. Each linked record can only be updated once. To update the new linked record, a further new linked record must be created using the returned location of this linked record.

Example code:

curl -X "POST" \
     -L "$URL/api/v1/linkedrecords/$LOC/update" \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain" \
     -H "Content-Type: application/octet-stream" \
     --data-binary "hello world"

Example response:

  "txId": "4674e3fc20a708dc....c32b37c76b724db48",

The response includes a location that will be used in subsequent operations.

: Extract the location from the response to the update command


Last updated

Copyright © nChain Licensing AG 2024