mirror of
https://github.com/bigchaindb/site.git
synced 2024-11-25 19:18:29 +01:00
Last small changes
This commit is contained in:
parent
e169c468c3
commit
9f9f17786d
@ -2,14 +2,14 @@
|
|||||||
layout: guide
|
layout: guide
|
||||||
|
|
||||||
title: "Tutorial: How to create a digital twin of your car"
|
title: "Tutorial: How to create a digital twin of your car"
|
||||||
tagline: Build a telemetry app to track specific dynamic parameters of an asset, such as the mileage of a car.
|
tagline: Build a telemetry app to digitally track the mileage of a car
|
||||||
header: header-car.jpg
|
header: header-car.jpg
|
||||||
learn: >
|
learn: >
|
||||||
- How BigchainDB can be used to build telemetry apps to track specific dynamic parameters of an asset
|
- How BigchainDB can be used to record dynamic parameters of an asset
|
||||||
|
|
||||||
- How assets can be used on BigchainDB to represent real objects
|
- How assets can be used on BigchainDB to represent real objects
|
||||||
|
|
||||||
- How to make a `CREATE` transaction to digitally register an object on BigchainDB
|
- How to make a `CREATE` transaction to digitally register an asset on BigchainDB
|
||||||
|
|
||||||
- How asset metadata is updated by using `TRANSFER` transactions to change the state of an asset (the mileage of a car in our example)
|
- How asset metadata is updated by using `TRANSFER` transactions to change the state of an asset (the mileage of a car in our example)
|
||||||
---
|
---
|
||||||
@ -32,7 +32,7 @@ Start by installing the official [BigchainDB JavaScript driver](https://github.c
|
|||||||
npm i bigchaindb-driver
|
npm i bigchaindb-driver
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, include that as a module and connect to IPDB or any BigchainDB node. Use the credentials below or create your own `app_id` and `app_key` on [IPDB](https://ipdb.io/#getstarted).
|
Then, include that as a module and connect to IPDB or any BigchainDB node. In the case of IPDB, create your own `app_id` and `app_key` on [IPDB](https://ipdb.io/#getstarted).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const BigchainDB = require('bigchaindb-driver')
|
const BigchainDB = require('bigchaindb-driver')
|
||||||
@ -113,7 +113,7 @@ Now you have digitally registered the car on BigchainDB, respectively in our cas
|
|||||||
|
|
||||||
Once a transaction ends up in a decided-valid block, it's "edged into stone". There's no changing it, no deleting it. The asset is registered now and cannot be deleted. However, the usage of the metadata field allows you to do updates in the asset. For this, you can use `TRANSFER` transactions (with their arbitrary metadata) to store any type of information, including information that could be interpreted as changing an asset (if that's how you want it to be interpreted).
|
Once a transaction ends up in a decided-valid block, it's "edged into stone". There's no changing it, no deleting it. The asset is registered now and cannot be deleted. However, the usage of the metadata field allows you to do updates in the asset. For this, you can use `TRANSFER` transactions (with their arbitrary metadata) to store any type of information, including information that could be interpreted as changing an asset (if that's how you want it to be interpreted).
|
||||||
|
|
||||||
We will use this feature to update the mileage of the car. Note that by using `carOwner.publicKey` as the issuer of the create transaction, you have established that Alice will be the only person able to update the metadata value, respectively a `TRANSFER` transaction for this asset. That's because the usage of this output as an input in a separate transaction will require a signature with Alice’s private key.
|
We will use this feature to update the mileage of the car. Note that by using `carOwner.publicKey` in the output of the create transaction, you have established that Alice will be the only person able to update the metadata value, respectively a `TRANSFER` transaction for this asset. That's because the usage of this output as an input in a separate transaction will require a signature with Alice’s private key.
|
||||||
|
|
||||||
# Update of an asset on BigchainDB
|
# Update of an asset on BigchainDB
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user