Track and Trace output

Understanding the output of the Track and Trace sample

Let's break down the output.

The public keys of the car manufacturer, Alice and Bob are displayed.

The public keys serve as their identifiers in the sample below.

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace -
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Car Manufacturer : DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Alice : 7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Bob : 6Ca1pZyRkSPStRXdMjgAoMskXcc2ZBEx6U553GTGoM8V

In the first transaction, the car manufacturer creates an asset, a car. This transaction is assigned the following ID:

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace -
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - CREATE transaction id : 9f7a1d82576024b20bb776558c19501a06b0876d8fd0817ca47a0cce3d788f7b

Alice then buys the car, generating the following ID:

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - TRANSFER 1 transaction id: cb6d80bd6f58b859503aa083b592006cf7a2a6725c22e28d63f572c25fae5b6a

Alice then buys the car, generating the following ID:

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - TRANSFER 1 transaction id: cb6d80bd6f58b859503aa083b592006cf7a2a6725c22e28d63f572c25fae5b6a

At a later point in time, Alice sells the car to Bob, which also generates another transaction ID:

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - TRANSFER 2 transaction id: 881909c087717b14621f306e6468876239e5876955a7593c1930c91839805c9f

This transaction is validated, and the new owner of the asset, Bob, is seen in the output (indicated by his public key).

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Current owner of asset is :6Ca1pZyRkSPStRXdMjgAoMskXcc2ZBEx6U553GTGoM8V

Below is the entire asset history (i.e., the car). Specifically, manufactured the car as well as the different owners of the car:

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Asset history of car asset:
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - 3 entries
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - [ { from: [ 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT' ],
to: [ 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT' ],
amount: 1,
timestamp: 1565172811121 },
{ from: [ 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT' ],
to: [ '7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH' ],
amount: 1,
timestamp: 1565172812702 },
{ from: [ '7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH' ],
to: [ '6Ca1pZyRkSPStRXdMjgAoMskXcc2ZBEx6U553GTGoM8V' ],
amount: 1,
timestamp: 1565172814762 } ]

In addition, the transaction history is also displayed for each of the asset owners. In addition to the public key, metadata such as the amount, assetType and timestamp are also shown.

[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Tx history of manufacturer:
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - 2 entries
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - [ { direction: 'create',
from: [ 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT' ],
to: 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT',
amount: 1,
assetType: 'tendermint_blob',
timestamp: 1565172811121 },
{ direction: 'out',
from: [ 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT' ],
to: [ '7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH' ],
amount: 1,
assetType: 'tendermint_blob',
timestamp: 1565172812702 } ]
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Tx history of alice:
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - 2 entries
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - [ { direction: 'in',
from: [ 'DEFHXcs9guPyQNRECzvbXkaKSerNAQoHQnq676XF3RrT' ],
to: '7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH',
amount: 1,
assetType: 'tendermint_blob',
timestamp: 1565172812702 },
{ direction: 'out',
from: [ '7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH' ],
to: [ '6Ca1pZyRkSPStRXdMjgAoMskXcc2ZBEx6U553GTGoM8V' ],
amount: 1,
assetType: 'tendermint_blob',
timestamp: 1565172814762 } ]
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - Tx history of bob:
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - 1 entries
[INFO] ng-rt-digitalAsset-sdk.examples.business.track_and_trace - [ { direction: 'in',
from: [ '7FtPkzNg7tyHuCjjCGLM5KUeJx7oboMDzofrtuMfzJBH' ],
to: '6Ca1pZyRkSPStRXdMjgAoMskXcc2ZBEx6U553GTGoM8V',
amount: 1,
assetType: 'tendermint_blob',
timestamp: 1565172814762 } ]

Navigation

Click here to learn more about the functions within this sample application.