Skip to main content

Asset

An asset, often referred to as a token, represents any artifact or specific tangible or intangible value recorded on the blockchain within the CoreLedger TEOS platform.

Assets can be measurable if there is a need to operate with the units of the asset, for example, steel, man-hours or currencies.

Some assets are not supposed to have any quantity, for example, an audit report or a document notarized on blockchain does not need quantity, then it needs only a unique digital id - the unique asset id in TEOS platform.

Asset can be described in a very detailed way by filling its properties in TEOS platform with the help of TEOS API. These properties are categorized and placed within their categories (or sections) when forming a JSON structure to be saved in TEOS API. There are general and custom properties.

TEOS user can link assets and unlink them, change asset with the help of amendments written to blockchain, exchange them with the help of supplies. All of these operations are possible after asset is created and written to blockchain.

Creating asset​

General properties​

For EVM-compatible networks (e.g. Sparknet, Ethereum, and Polygon), the "Author" has 42 characters. In non-EVM networks, address length may be different. For example, on Internet Computer, the "Author" (principal identifier) has 63 characters.

{
"Author": "vvzlj-ltorg-pmogv-f6cwd-z5kky-7dgal-l4ahx-3x5bx-fmf45-c4lyo-lae",
"Name": "Gold",
"Description": "1oz Gold bars",
"LanguageCode": "en",
"JurisdictionCode": "CH",
"UnitOfMeasureCode": "kg",
"CurrencyCode": "",
"SparkFactor": "1000000",
"SparkFactorModifier": "{\"type\":\"FORMULA\",\"start\":\"2021-08-12T14:01:52Z\",\"t\":\"1d\",\"f\":\"1\"}",
"AssetClassCode": "A017",
}

All of these properties must have a value. Some of them (Author, Name, Description, LanguageCode, JurisdictionCode) are mandatory and has to be filled in, others are optional and filled in with a default values when left empty. General properties are placed in the section called "General"

Default values for properties if not provided:

  • UnitOfMeasureCode: "token"
  • SparkFactor: "1"
  • SparkFactorModifier: {"type":"FORMULA","start":"{current-datetime}","t":"1d","f":"1"}
  • AssetClassCode: "A017"
info

CurrencyCode definition rules

In case asset is created with AssetClassCode = "A013", CurrencyCode is mandatory and UnitOfMeasureCode must be left blank

In case asset is created with any other AssetClassCode, CurrencyCode can't be set

Asset Classes​

ID(en)
A013Cash and Cash equivalent
A103Commodity
A104Intangible assets
A022Financial products
A031Services
A041Real estate
A016Other assets
A017Document

Custom properties​

{
"Key": "apitutorial",
"Name": "API Tutorial",
"Type": "TEXT",
"Value": "My Private documentation: lorem ipsum",
"SectionsPath": "[documentation][manuals]",
"SectionsPathNames": "[Documentation][Manuals]"
}

Default values for optional properties (the rest are mandatory):

  • Type: "STRING"
  • SectionsPath: "[General]"
  • SectionsPathNames: "[GENERAL]"

SectionsPath define the path through the sections where the property (in TEOS API it is called "Custom definition item") is placed within the JSON document. For the example mentioned above, the property "apitutorial" is placed in a section "manuals", which in turn is placed in the section "documentation". SectionsPathNames define labels for the sections.

Possible types of properties: [ STRING, DECIMAL, BOOLEAN, NUMBER, VALUERANGE, DATE, DATETIME, ASSETCLASS, COUNTRY, CURRENCY, LANGUAGE, UNITOFMEASURE, TIME, TEXT, ADDRESS ]

With STRING, any value can be provided.

With specific types such as COUNTRY, LANGUAGE, CURRENCY, etc., the value is expected to represent a member of a well-defined reference dataset, making the meaning of the field explicit and reducing ambiguity for integrators and consumers of the data.

At the moment, this distinction is primarily semantic, as TEOS does not validate custom field values. However, using the most appropriate type is recommended and provides better compatibility with potential future validations and integrations.

For the following types:

  • ASSETCLASS
  • COUNTRY
  • CURRENCY
  • LANGUAGE
  • UNITOFMEASURE

the value is expected to correspond to the Code property of a record returned by the respective reference data endpoint:

  • /odata/vx.x/assetclasses
  • /odata/vx.x/countries
  • /odata/vx.x/currencies
  • /odata/vx.x/languages
  • /odata/vx.x/units

For example, given the following unit record:

{
  "Code": "KGm",
  "LanguageCode": "en",
  "Name": "kilogram-meter"
}

the custom field value should be "KGm".

After asset is created​

After asset is created in the TEOS Platform and finally in the blockchain, it gets the list of additional technical properties which help to deal with this asset.

PropertyDetails
Idstring
example: 0x5db616f7e9aaa6fce9b0001
The UniqueAssetId of the asset
Author*string
example (Hex Address of the asset issuer):
-EVM-compatible networks (e.g. Sparknet, Ethereum, and Polygon): 0xabe9e6c2b231ae427cd089b2b68be0a1dab565a1
-Internet Computer network: vvzlj-ltorg-pmogv-f6cwd-z5kky-7dgal-l4ahx-3x5bx-fmf45-c4lyo-lae
Name*string
minLength: 1
example: Gold
Name of the asset.
Description*string
minLength: 1
example: 1oz Gold bars
Description of the asset.
LanguageCode*string
maxLength: 2
minLength: 1
example: en
The default language code of the asset (ISO 2).
JurisdictionCode*string
maxLength: 5
minLength: 1
example: CH
The jurisdiction country code (ISO 2).
UnitOfMeasureCodestring
nullable: true
example: kg
The asset's unit of measure code.
CurrencyCodestring
maxLength: 3
nullable: true
Currency code in ISO 4217 format
SparkFactorstring
nullable: true
example: 1000000
Defines how many Sparks equal 1 unit of measure.
SparkFactorModifierstring
nullable: true
example: {"type":"FORMULA","start":"2021-08-12T14:01:52Z","t":"1d","f":"1"}
Defines Sparks Factor formula.
AssetClassCodestring
nullable: true
example: "A017" - Document
Defines the class of asset.
CustomDefinitionItemsList of provided custom properties
AssetLinkIdsList of the links to other assets
CreatedInBlockchainOnstring($date-time)
nullable: true
example: 2021-05-18T15:23:12.5246259+02:00
The timestamp of the block, in which the asset was activated. null, if the asset is not yet created in blockchain
AmendedInBlockchainOnstring($date-time)
nullable: true
example: 2021-05-18T15:23:12.5246259+02:00
The timestamp of the block of the last amendment of the asset. null, if the asset was never amended
BlockchainHashstring
nullable: true
example:
-EVM-compatible networks: 0x263865a752660b9dd6b9377df57466d1348661aa9a49d5dde8e9d16dddddf69b
-ICP network: 015e80cd2db039cac2e0282764960330b709cd0a0656918ddc57d94822bc6965
Hash of the asset documentation, stored in blockchain
DocumentDbHashstring
nullable: true
example: 263865a752660b9dd6b9377df57466d1348661aa9a49d5dde8e9d16dddddf69b
Hash of the asset documentation, stored in TEOS
TransactionIdstring($uuid)
example: C0D34D73-6FD3-40F2-A7E1-08D9412448F7
The id of the transaction where the asset was written to blockchain
Translations[
nullable: true
Translations navigation property
{
}]
LanguageCode*string
maxLength: 2
minLength: 1
example: en
language code of the asset translation (ISO 2).
Namestring
nullable: true
example: Gold
Name of the asset.
Descriptionstring
nullable: true
example: 1oz Gold bars
Translated asset description
CustomDefinitionItemslist of definition items in the specific language

Asset ids​

  • AssetId and LedgerId - assetId is unique within Blockchain network, combination of assetId and ledgerId is unique through all environments and Blockchain networks
  • UniqueAssetId - unique asset id through all environments and Blockchain networks, we strongly recommend to use this id

Asset translation​

When asset is retrieved, it comes with asset default language in the root of the asset object. Default language is defined by TEOS user when the asset is created. In order to get the list of all available translations to all available languages which were added for the asset, section "Translations" must be retrieved. Check its description in the asset model above. Following asset data can be translated to other languages:

  • name
  • description
  • all custom properties (section CustomDefinitionItems), for some property types both values and property names can be translated, for some only property names